diff --git a/assets/styles/gargoyle.scss b/assets/styles/gargoyle.scss new file mode 100644 index 0000000..4de8b1b --- /dev/null +++ b/assets/styles/gargoyle.scss @@ -0,0 +1,37 @@ +$nav-bar-height: 50px; + +body{ + padding: $nav-bar-height 0 0; + background: lightgrey; +} + +#nav-bar{ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: $nav-bar-height; + background: #212121; + box-shadow: 0 2px 1px rgba(0, 0, 0, .25); + + .nav-bar-left{ + float: left; + } + + ul{ + list-style: none; + + li{ + display: inline-block; + } + } + + .nav-link a{ + color: teal; + transition: all 230ms ease-in-out; + + &:hover{ + color: green; + } + } +} diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..2c6f686 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,17 @@ +const gulp = require('gulp'); +const { watch } = require('gulp'); +const sass = require('gulp-sass')(require('sass')); + +// compile +function styles(cb) { + return gulp.src('./assets/styles/**/*.scss') + .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) + .pipe(gulp.dest('./public/css')); + cb(); +} + +// by default, watch files +exports.default = function() { + // compile sass stylesheets + watch('assets/styles/**/*.scss', styles); +}; diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob new file mode 120000 index 0000000..a68344a --- /dev/null +++ b/node_modules/.bin/atob @@ -0,0 +1 @@ +../atob/bin/atob.js \ No newline at end of file diff --git a/node_modules/.bin/color-support b/node_modules/.bin/color-support new file mode 120000 index 0000000..fcbcb28 --- /dev/null +++ b/node_modules/.bin/color-support @@ -0,0 +1 @@ +../color-support/bin.js \ No newline at end of file diff --git a/node_modules/.bin/gulp b/node_modules/.bin/gulp new file mode 120000 index 0000000..5de7332 --- /dev/null +++ b/node_modules/.bin/gulp @@ -0,0 +1 @@ +../gulp/bin/gulp.js \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 0000000..b6afda6 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/sass b/node_modules/.bin/sass new file mode 120000 index 0000000..4bda500 --- /dev/null +++ b/node_modules/.bin/sass @@ -0,0 +1 @@ +../sass/sass.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000..f62471c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..f2b89c1 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,4259 @@ +{ + "name": "overseer", + "version": "0.1.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "dependencies": { + "ansi-wrap": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==", + "dev": true, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", + "dev": true, + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==", + "dev": true, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw==", + "dev": true, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==", + "dev": true, + "dependencies": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-initial/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "dependencies": { + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "dependencies": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "node_modules/async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==", + "dev": true, + "dependencies": { + "async-done": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg==", + "dev": true, + "dependencies": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "dev": true, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dev": true, + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", + "dev": true + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA==", + "dev": true, + "dependencies": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-props": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", + "dev": true, + "dependencies": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "dependencies": { + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "node_modules/each-props/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "dependencies": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==", + "dev": true + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dev": true, + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dev": true, + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dev": true, + "dependencies": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dev": true, + "dependencies": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dev": true, + "dependencies": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-sass": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-5.1.0.tgz", + "integrity": "sha512-7VT0uaF+VZCmkNBglfe1b34bxn/AfcssquLKVDYnCDJ3xNBaW7cUuI3p3BQmoKcoKFrs9jdzUxyb+u+NGfL4OQ==", + "dev": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "picocolors": "^1.0.0", + "plugin-error": "^1.0.1", + "replace-ext": "^2.0.0", + "strip-ansi": "^6.0.1", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/gulp-sass/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/gulp-sass/node_modules/replace-ext": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", + "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/gulp-sass/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", + "dev": true, + "dependencies": { + "glogg": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/immutable": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==", + "dev": true + }, + "node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", + "dev": true, + "dependencies": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "dev": true, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", + "dev": true, + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/make-iterator/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", + "dev": true, + "dependencies": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/matchdep/node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/matchdep/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dev": true, + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dev": true, + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", + "dev": true, + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "dev": true, + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dev": true, + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dev": true, + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "dependencies": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/plugin-error/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "dev": true, + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", + "dev": true, + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", + "dev": true, + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/sass": { + "version": "1.55.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz", + "integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/sass/node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/sass/node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sass/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sass/node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/sass/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sass/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sass/node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sass/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/sass/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==", + "dev": true, + "dependencies": { + "sver-compat": "^1.5.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "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" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg==", + "dev": true, + "dependencies": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", + "dev": true, + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", + "dev": true, + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "dependencies": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dev": true, + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", + "dev": true, + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha512-+oDh3KYZBoZC8hfocrbrxbLUeaYtQK7J5WU5Br9VqWqmCll3tFJqKp97GC9GmMsVIL0qnx2DgEDVxdo5EZ5sSw==", + "dev": true, + "dependencies": { + "source-map": "^0.5.1" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "dev": true + }, + "node_modules/yargs": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "dev": true, + "dependencies": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "node_modules/yargs-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "dev": true, + "dependencies": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + } + } +} diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/ansi-colors/LICENSE new file mode 100644 index 0000000..b70671f --- /dev/null +++ b/node_modules/ansi-colors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md new file mode 100644 index 0000000..2e669fe --- /dev/null +++ b/node_modules/ansi-colors/README.md @@ -0,0 +1,105 @@ +# ansi-colors [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/ansi-colors.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/ansi-colors) + +> Collection of ansi colors and styles. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save ansi-colors +``` + +## Usage + +This module exports an object of functions. Each function wraps a string with the ansi codes used to display the string with that color (or style). Use the wrapped string with `console.log`: + +```js +var colors = require('ansi-colors'); +console.log(colors.bold(colors.cyan('[info]')), colors.cyan('This is some information')); +console.log(colors.bold(colors.yellow('[warning]')), colors.yellow('This is a warning')); +console.error(colors.bold(colors.red('[ERROR]')), colors.red('Danger! There was an error!')); +``` + +![image](https://user-images.githubusercontent.com/995160/34897845-3150daae-f7be-11e7-9706-38c42461e0ee.png) + +## Example + +See the [example](./example.js) for more colors and styles. + +## About + +### Related projects + +* [ansi-bgblack](https://www.npmjs.com/package/ansi-bgblack): The color bgblack, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgblack "The color bgblack, in ansi.") +* [ansi-bgblue](https://www.npmjs.com/package/ansi-bgblue): The color bgblue, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgblue "The color bgblue, in ansi.") +* [ansi-bgcyan](https://www.npmjs.com/package/ansi-bgcyan): The color bgcyan, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgcyan "The color bgcyan, in ansi.") +* [ansi-bggreen](https://www.npmjs.com/package/ansi-bggreen): The color bggreen, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bggreen "The color bggreen, in ansi.") +* [ansi-bgmagenta](https://www.npmjs.com/package/ansi-bgmagenta): The color bgmagenta, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgmagenta "The color bgmagenta, in ansi.") +* [ansi-bgred](https://www.npmjs.com/package/ansi-bgred): The color bgred, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgred "The color bgred, in ansi.") +* [ansi-bgwhite](https://www.npmjs.com/package/ansi-bgwhite): The color bgwhite, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgwhite "The color bgwhite, in ansi.") +* [ansi-bgyellow](https://www.npmjs.com/package/ansi-bgyellow): The color bgyellow, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgyellow "The color bgyellow, in ansi.") +* [ansi-black](https://www.npmjs.com/package/ansi-black): The color black, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-black "The color black, in ansi.") +* [ansi-blue](https://www.npmjs.com/package/ansi-blue): The color blue, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-blue "The color blue, in ansi.") +* [ansi-bold](https://www.npmjs.com/package/ansi-bold): The color bold, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bold "The color bold, in ansi.") +* [ansi-cyan](https://www.npmjs.com/package/ansi-cyan): The color cyan, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-cyan "The color cyan, in ansi.") +* [ansi-dim](https://www.npmjs.com/package/ansi-dim): The color dim, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-dim "The color dim, in ansi.") +* [ansi-gray](https://www.npmjs.com/package/ansi-gray): The color gray, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-gray "The color gray, in ansi.") +* [ansi-green](https://www.npmjs.com/package/ansi-green): The color green, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-green "The color green, in ansi.") +* [ansi-grey](https://www.npmjs.com/package/ansi-grey): The color grey, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-grey "The color grey, in ansi.") +* [ansi-hidden](https://www.npmjs.com/package/ansi-hidden): The color hidden, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-hidden "The color hidden, in ansi.") +* [ansi-inverse](https://www.npmjs.com/package/ansi-inverse): The color inverse, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-inverse "The color inverse, in ansi.") +* [ansi-italic](https://www.npmjs.com/package/ansi-italic): The color italic, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-italic "The color italic, in ansi.") +* [ansi-magenta](https://www.npmjs.com/package/ansi-magenta): The color magenta, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-magenta "The color magenta, in ansi.") +* [ansi-red](https://www.npmjs.com/package/ansi-red): The color red, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-red "The color red, in ansi.") +* [ansi-reset](https://www.npmjs.com/package/ansi-reset): The color reset, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-reset "The color reset, in ansi.") +* [ansi-strikethrough](https://www.npmjs.com/package/ansi-strikethrough): The color strikethrough, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-strikethrough "The color strikethrough, in ansi.") +* [ansi-underline](https://www.npmjs.com/package/ansi-underline): The color underline, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-underline "The color underline, in ansi.") +* [ansi-white](https://www.npmjs.com/package/ansi-white): The color white, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-white "The color white, in ansi.") +* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") +* [ansi-yellow](https://www.npmjs.com/package/ansi-yellow): The color yellow, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-yellow "The color yellow, in ansi.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [doowb](https://github.com/doowb) | +| 3 | [jonschlinkert](https://github.com/jonschlinkert) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2018, [Brian Woodward](https://github.com/doowb). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 12, 2018._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js new file mode 100644 index 0000000..37da67f --- /dev/null +++ b/node_modules/ansi-colors/index.js @@ -0,0 +1,456 @@ +/*! + * ansi-colors + * + * Copyright (c) 2015-2017, Brian Woodward. + * Released under the MIT License. + */ + +'use strict'; + +/** + * Module dependencies + */ + +var wrap = require('ansi-wrap'); + +/** + * Wrap a string with ansi codes to create a black background. + * + * ```js + * console.log(colors.bgblack('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgblack + */ + +exports.bgblack = function bgblack(message) { + return wrap(40, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a blue background. + * + * ```js + * console.log(colors.bgblue('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgblue + */ + +exports.bgblue = function bgblue(message) { + return wrap(44, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a cyan background. + * + * ```js + * console.log(colors.bgcyan('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgcyan + */ + +exports.bgcyan = function bgcyan(message) { + return wrap(46, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a green background. + * + * ```js + * console.log(colors.bggreen('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bggreen + */ + +exports.bggreen = function bggreen(message) { + return wrap(42, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a magenta background. + * + * ```js + * console.log(colors.bgmagenta('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgmagenta + */ + +exports.bgmagenta = function bgmagenta(message) { + return wrap(45, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a red background. + * + * ```js + * console.log(colors.bgred('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgred + */ + +exports.bgred = function bgred(message) { + return wrap(41, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a white background. + * + * ```js + * console.log(colors.bgwhite('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgwhite + */ + +exports.bgwhite = function bgwhite(message) { + return wrap(47, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a yellow background. + * + * ```js + * console.log(colors.bgyellow('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgyellow + */ + +exports.bgyellow = function bgyellow(message) { + return wrap(43, 49, message); +}; + +/** + * Wrap a string with ansi codes to create black text. + * + * ```js + * console.log(colors.black('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name black + */ + +exports.black = function black(message) { + return wrap(30, 39, message); +}; + +/** + * Wrap a string with ansi codes to create blue text. + * + * ```js + * console.log(colors.blue('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name blue + */ + +exports.blue = function blue(message) { + return wrap(34, 39, message); +}; + +/** + * Wrap a string with ansi codes to create bold text. + * + * ```js + * console.log(colors.bold('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bold + */ + +exports.bold = function bold(message) { + return wrap(1, 22, message); +}; + +/** + * Wrap a string with ansi codes to create cyan text. + * + * ```js + * console.log(colors.cyan('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name cyan + */ + +exports.cyan = function cyan(message) { + return wrap(36, 39, message); +}; + +/** + * Wrap a string with ansi codes to create dim text. + * + * ```js + * console.log(colors.dim('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name dim + */ + +exports.dim = function dim(message) { + return wrap(2, 22, message); +}; + +/** + * Wrap a string with ansi codes to create gray text. + * + * ```js + * console.log(colors.gray('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name gray + */ + +exports.gray = function gray(message) { + return wrap(90, 39, message); +}; + +/** + * Wrap a string with ansi codes to create green text. + * + * ```js + * console.log(colors.green('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name green + */ + +exports.green = function green(message) { + return wrap(32, 39, message); +}; + +/** + * Wrap a string with ansi codes to create grey text. + * + * ```js + * console.log(colors.grey('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name grey + */ + +exports.grey = function grey(message) { + return wrap(90, 39, message); +}; + +/** + * Wrap a string with ansi codes to create hidden text. + * + * ```js + * console.log(colors.hidden('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name hidden + */ + +exports.hidden = function hidden(message) { + return wrap(8, 28, message); +}; + +/** + * Wrap a string with ansi codes to create inverse text. + * + * ```js + * console.log(colors.inverse('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name inverse + */ + +exports.inverse = function inverse(message) { + return wrap(7, 27, message); +}; + +/** + * Wrap a string with ansi codes to create italic text. + * + * ```js + * console.log(colors.italic('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name italic + */ + +exports.italic = function italic(message) { + return wrap(3, 23, message); +}; + +/** + * Wrap a string with ansi codes to create magenta text. + * + * ```js + * console.log(colors.magenta('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name magenta + */ + +exports.magenta = function magenta(message) { + return wrap(35, 39, message); +}; + +/** + * Wrap a string with ansi codes to create red text. + * + * ```js + * console.log(colors.red('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name red + */ + +exports.red = function red(message) { + return wrap(31, 39, message); +}; + +/** + * Wrap a string with ansi codes to reset ansi colors currently on the string. + * + * ```js + * console.log(colors.reset('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name reset + */ + +exports.reset = function reset(message) { + return wrap(0, 0, message); +}; + +/** + * Wrap a string with ansi codes to add a strikethrough to the text. + * + * ```js + * console.log(colors.strikethrough('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name strikethrough + */ + +exports.strikethrough = function strikethrough(message) { + return wrap(9, 29, message); +}; + +/** + * Wrap a string with ansi codes to underline the text. + * + * ```js + * console.log(colors.underline('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name underline + */ + +exports.underline = function underline(message) { + return wrap(4, 24, message); +}; + +/** + * Wrap a string with ansi codes to create white text. + * + * ```js + * console.log(colors.white('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name white + */ + +exports.white = function white(message) { + return wrap(37, 39, message); +}; + +/** + * Wrap a string with ansi codes to create yellow text. + * + * ```js + * console.log(colors.yellow('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name yellow + */ + +exports.yellow = function yellow(message) { + return wrap(33, 39, message); +}; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json new file mode 100644 index 0000000..a042a34 --- /dev/null +++ b/node_modules/ansi-colors/package.json @@ -0,0 +1,138 @@ +{ + "name": "ansi-colors", + "description": "Collection of ansi colors and styles.", + "version": "1.1.0", + "homepage": "https://github.com/doowb/ansi-colors", + "author": "Brian Woodward (https://github.com/doowb)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "doowb/ansi-colors", + "bugs": { + "url": "https://github.com/doowb/ansi-colors/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "types/index.d.ts" + ], + "main": "index.js", + "types": "./types/index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && tsc --project types" + }, + "dependencies": { + "ansi-wrap": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "typescript": "^2.7.1" + }, + "keywords": [ + "ansi-bgblack", + "ansi-bgblue", + "ansi-bgcyan", + "ansi-bggreen", + "ansi-bgmagenta", + "ansi-bgred", + "ansi-bgwhite", + "ansi-bgyellow", + "ansi-black", + "ansi-blue", + "ansi-bold", + "ansi-cyan", + "ansi-dim", + "ansi-gray", + "ansi-green", + "ansi-grey", + "ansi-hidden", + "ansi-inverse", + "ansi-italic", + "ansi-magenta", + "ansi-red", + "ansi-reset", + "ansi-strikethrough", + "ansi-underline", + "ansi-white", + "ansi-yellow", + "bgblack", + "bgblue", + "bgcyan", + "bggreen", + "bgmagenta", + "bgred", + "bgwhite", + "bgyellow", + "black", + "blue", + "bold", + "cyan", + "dim", + "gray", + "green", + "grey", + "hidden", + "inverse", + "italic", + "magenta", + "red", + "reset", + "strikethrough", + "underline", + "white", + "yellow" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb-readme-generator", + "verb" + ], + "related": { + "list": [ + "ansi-bgblack", + "ansi-bgblue", + "ansi-bgcyan", + "ansi-bggreen", + "ansi-bgmagenta", + "ansi-bgred", + "ansi-bgwhite", + "ansi-bgyellow", + "ansi-black", + "ansi-blue", + "ansi-bold", + "ansi-cyan", + "ansi-dim", + "ansi-gray", + "ansi-green", + "ansi-grey", + "ansi-hidden", + "ansi-inverse", + "ansi-italic", + "ansi-magenta", + "ansi-red", + "ansi-reset", + "ansi-strikethrough", + "ansi-underline", + "ansi-white", + "ansi-wrap", + "ansi-yellow" + ] + } + } +} diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts new file mode 100644 index 0000000..5f216a8 --- /dev/null +++ b/node_modules/ansi-colors/types/index.d.ts @@ -0,0 +1,31 @@ +// Imported from from DefinitelyTyped project. +// TypeScript definitions for ansi-colors +// Definitions by: Rogier Schouten +// Integrated by: Jordan Mele + +export function bgblack(message: string): string; +export function bgblue(message: string): string; +export function bgcyan(message: string): string; +export function bggreen(message: string): string; +export function bgmagenta(message: string): string; +export function bgred(message: string): string; +export function bgwhite(message: string): string; +export function bgyellow(message: string): string; +export function black(message: string): string; +export function blue(message: string): string; +export function bold(message: string): string; +export function cyan(message: string): string; +export function dim(message: string): string; +export function gray(message: string): string; +export function green(message: string): string; +export function grey(message: string): string; +export function hidden(message: string): string; +export function inverse(message: string): string; +export function italic(message: string): string; +export function magenta(message: string): string; +export function red(message: string): string; +export function reset(message: string): string; +export function strikethrough(message: string): string; +export function underline(message: string): string; +export function white(message: string): string; +export function yellow(message: string): string; diff --git a/node_modules/ansi-gray/LICENSE b/node_modules/ansi-gray/LICENSE new file mode 100644 index 0000000..41283c9 --- /dev/null +++ b/node_modules/ansi-gray/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) <%= year() %>, 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. diff --git a/node_modules/ansi-gray/index.js b/node_modules/ansi-gray/index.js new file mode 100644 index 0000000..c22176a --- /dev/null +++ b/node_modules/ansi-gray/index.js @@ -0,0 +1,14 @@ +/*! + * ansi-gray + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function gray(message) { + return wrap(90, 39, message); +}; diff --git a/node_modules/ansi-gray/package.json b/node_modules/ansi-gray/package.json new file mode 100644 index 0000000..a35e962 --- /dev/null +++ b/node_modules/ansi-gray/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-gray", + "description": "The color gray, in ansi.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/ansi-gray", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/ansi-gray", + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-gray/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "gray", + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command", + "command-line", + "console", + "format", + "formatting", + "iterm", + "log", + "logging", + "rgb", + "shell", + "string", + "style", + "styles", + "styling", + "terminal", + "text", + "tty", + "xterm" + ] +} diff --git a/node_modules/ansi-gray/readme.md b/node_modules/ansi-gray/readme.md new file mode 100644 index 0000000..9b59a29 --- /dev/null +++ b/node_modules/ansi-gray/readme.md @@ -0,0 +1,74 @@ +# ansi-gray [![NPM version](https://badge.fury.io/js/ansi-gray.svg)](http://badge.fury.io/js/ansi-gray) + +> The color gray, in ansi. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-gray --save +``` + +## Usage + +```js +var gray = require('ansi-gray'); +``` + +## Related projects + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-gray/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..b9574ed --- /dev/null +++ b/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..eb44fb5 --- /dev/null +++ b/node_modules/ansi-regex/package.json @@ -0,0 +1,64 @@ +{ + "name": "ansi-regex", + "version": "2.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..6a928ed --- /dev/null +++ b/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/ansi-wrap/LICENSE b/node_modules/ansi-wrap/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/ansi-wrap/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/ansi-wrap/README.md b/node_modules/ansi-wrap/README.md new file mode 100644 index 0000000..032c1e6 --- /dev/null +++ b/node_modules/ansi-wrap/README.md @@ -0,0 +1,89 @@ +# ansi-wrap [![NPM version](https://badge.fury.io/js/ansi-wrap.svg)](http://badge.fury.io/js/ansi-wrap) + +> Create ansi colors by passing the open and close codes. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-wrap --save +``` + +## Usage + +```js +var wrap = require('ansi-wrap'); +``` + +**Example** + +Pass codes for [ansi magenta background](https://github.com/jonschlinkert/ansi-bgmagenta): + +```js +console.log(wrap(45, 49, 'This is a message...')); +//=> '\u001b[45mfoo\u001b[49m' +``` + +Which prints out... + +[![screen shot 2015-05-21 at 8 28 32 pm](https://cloud.githubusercontent.com/assets/383994/7761769/12488afa-fff8-11e4-9cc1-71a8a6ec14a4.png)](https://www.npmjs.com/) + +## Related projects + +This is used in these projects: + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-wrap/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/node_modules/ansi-wrap/index.js b/node_modules/ansi-wrap/index.js new file mode 100644 index 0000000..ffc52d7 --- /dev/null +++ b/node_modules/ansi-wrap/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(a, b, msg) { + return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm'; +}; diff --git a/node_modules/ansi-wrap/package.json b/node_modules/ansi-wrap/package.json new file mode 100644 index 0000000..f3c2916 --- /dev/null +++ b/node_modules/ansi-wrap/package.json @@ -0,0 +1,34 @@ +{ + "name": "ansi-wrap", + "description": "Create ansi colors by passing the open and close codes.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/ansi-wrap", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "https://github.com/jonschlinkert/ansi-wrap.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-wrap/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/ansi-wrap/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": {}, + "keywords": [] +} \ No newline at end of file diff --git a/node_modules/anymatch/LICENSE b/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..bc42470 --- /dev/null +++ b/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 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. diff --git a/node_modules/anymatch/README.md b/node_modules/anymatch/README.md new file mode 100644 index 0000000..f674f40 --- /dev/null +++ b/node_modules/anymatch/README.md @@ -0,0 +1,99 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo\.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js new file mode 100644 index 0000000..e411618 --- /dev/null +++ b/node_modules/anymatch/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var micromatch = require('micromatch'); +var normalize = require('normalize-path'); +var path = require('path'); // required for tests. +var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString, altValue; + var matched = false; + var matchIndex = -1; + function testCriteria(criterion, index) { + var result; + switch (Object.prototype.toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + result = result || altValue && criterion.apply(null, altValue); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = normalize(string); + altString = altString === string ? null : altString; + if (altString) altValue = [altString].concat(value.slice(1)); + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/node_modules/anymatch/node_modules/normalize-path/LICENSE b/node_modules/anymatch/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/anymatch/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/anymatch/node_modules/normalize-path/README.md b/node_modules/anymatch/node_modules/normalize-path/README.md new file mode 100644 index 0000000..daa0edd --- /dev/null +++ b/node_modules/anymatch/node_modules/normalize-path/README.md @@ -0,0 +1,92 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +var normalize = require('normalize-path'); + +normalize('\\foo\\bar\\baz\\'); +//=> '/foo/bar/baz' + +normalize('./foo/bar/baz/'); +//=> './foo/bar/baz' +``` + +Pass `false` as the last argument to **keep** trailing slashes: + +```js +normalize('./foo/bar/baz/', false); +//=> './foo/bar/baz/' + +normalize('foo\\bar\\baz\\', false); +//=> 'foo/bar/baz/' +``` + +## About + +### Related projects + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.") +* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 31 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._ \ No newline at end of file diff --git a/node_modules/anymatch/node_modules/normalize-path/index.js b/node_modules/anymatch/node_modules/normalize-path/index.js new file mode 100644 index 0000000..4a4f8cc --- /dev/null +++ b/node_modules/anymatch/node_modules/normalize-path/index.js @@ -0,0 +1,19 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var removeTrailingSeparator = require('remove-trailing-separator'); + +module.exports = function normalizePath(str, stripTrailing) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + str = str.replace(/[\\\/]+/g, '/'); + if (stripTrailing !== false) { + str = removeTrailingSeparator(str); + } + return str; +}; diff --git a/node_modules/anymatch/node_modules/normalize-path/package.json b/node_modules/anymatch/node_modules/normalize-path/package.json new file mode 100644 index 0000000..c16ef9d --- /dev/null +++ b/node_modules/anymatch/node_modules/normalize-path/package.json @@ -0,0 +1,78 @@ +{ + "name": "normalize-path", + "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "devDependencies": { + "benchmarked": "^0.1.1", + "gulp-format-md": "^0.1.11", + "minimist": "^1.2.0", + "mocha": "*" + }, + "keywords": [ + "backslash", + "file", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "related": { + "list": [ + "contains-path", + "ends-with", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-segments", + "rewrite-ext", + "unixify" + ], + "description": "Other useful libraries for working with paths in node.js:" + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/anymatch/package.json b/node_modules/anymatch/package.json new file mode 100644 index 0000000..fdbafd7 --- /dev/null +++ b/node_modules/anymatch/package.json @@ -0,0 +1,47 @@ +{ + "name": "anymatch", + "version": "2.0.0", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js" + ], + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/micromatch/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/micromatch/anymatch" + }, + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "devDependencies": { + "coveralls": "^2.7.0", + "istanbul": "^0.4.5", + "mocha": "^3.0.0" + } +} diff --git a/node_modules/append-buffer/LICENSE b/node_modules/append-buffer/LICENSE new file mode 100644 index 0000000..ffb7ec5 --- /dev/null +++ b/node_modules/append-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/append-buffer/README.md b/node_modules/append-buffer/README.md new file mode 100644 index 0000000..681a3c3 --- /dev/null +++ b/node_modules/append-buffer/README.md @@ -0,0 +1,95 @@ +# append-buffer [![NPM version](https://img.shields.io/npm/v/append-buffer.svg?style=flat)](https://www.npmjs.com/package/append-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![Linux Build Status](https://img.shields.io/travis/doowb/append-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/append-buffer) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/append-buffer.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/append-buffer) + +> Append a buffer to another buffer ensuring to preserve line ending characters. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save append-buffer +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add append-buffer +``` + +## Usage + +```js +var appendBuffer = require('append-buffer'); +``` + +## API + +### [appendBuffer](index.js#L28) + +Append a buffer to another buffer ensuring to preserve line ending characters. + +**Params** + +* `buf` **{Buffer}**: Buffer that will be used to check for an existing line ending. The suffix is appended to this. +* `suffix` **{Buffer}**: Buffer that will be appended to the buf. +* `returns` **{Buffer}**: Final Buffer + +**Example** + +```js +console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); +//=> [ 'abc\r\ndef\r\n' ] + +console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef\n' ] + +// uses os.EOL when a line ending is not found +console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef' ] +``` + +## Attribution + +The code in this module was originally added in a [PR](https://github.com/jonschlinkert/file-normalize/pull/3) to [file-normalize](https://github.com/jonschlinkert/file-normalize). It has been split out to allow for standalone use cases. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2017, [Brian Woodward](https://doowb.com). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 01, 2017._ \ No newline at end of file diff --git a/node_modules/append-buffer/index.js b/node_modules/append-buffer/index.js new file mode 100644 index 0000000..a385570 --- /dev/null +++ b/node_modules/append-buffer/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var os = require('os'); +var equals = require('buffer-equal'); +var cr = new Buffer('\r\n'); +var nl = new Buffer('\n'); + +/** + * Append a buffer to another buffer ensuring to preserve line ending characters. + * + * ```js + * console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\r\ndef\r\n' ] + * + * console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef\n' ] + * + * // uses os.EOL when a line ending is not found + * console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef' ] + * * ``` + * @param {Buffer} `buf` Buffer that will be used to check for an existing line ending. The suffix is appended to this. + * @param {Buffer} `suffix` Buffer that will be appended to the buf. + * @return {Buffer} Final Buffer + * @api public + */ + +module.exports = function appendBuffer(buf, suffix) { + if (!suffix || !suffix.length) { + return buf; + } + var eol; + if (equals(buf.slice(-2), cr)) { + eol = cr; + } else if (equals(buf.slice(-1), nl)) { + eol = nl; + } else { + return Buffer.concat([buf, new Buffer(os.EOL), new Buffer(suffix)]); + } + return Buffer.concat([buf, new Buffer(suffix), eol]); +}; diff --git a/node_modules/append-buffer/package.json b/node_modules/append-buffer/package.json new file mode 100644 index 0000000..7264b84 --- /dev/null +++ b/node_modules/append-buffer/package.json @@ -0,0 +1,53 @@ +{ + "name": "append-buffer", + "description": "Append a buffer to another buffer ensuring to preserve line ending characters.", + "version": "1.0.2", + "homepage": "https://github.com/doowb/append-buffer", + "author": "Brian Woodward (https://doowb.com)", + "repository": "doowb/append-buffer", + "bugs": { + "url": "https://github.com/doowb/append-buffer/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "keywords": [ + "append", + "append-buffer", + "concat", + "concat-buffer", + "eol", + "join", + "join-buffer", + "normalize", + "buffer" + ], + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.0" + }, + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/archy/.travis.yml b/node_modules/archy/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/node_modules/archy/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/node_modules/archy/LICENSE b/node_modules/archy/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/archy/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/archy/examples/beep.js b/node_modules/archy/examples/beep.js new file mode 100644 index 0000000..9c07047 --- /dev/null +++ b/node_modules/archy/examples/beep.js @@ -0,0 +1,24 @@ +var archy = require('../'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/node_modules/archy/examples/multi_line.js b/node_modules/archy/examples/multi_line.js new file mode 100644 index 0000000..8afdfad --- /dev/null +++ b/node_modules/archy/examples/multi_line.js @@ -0,0 +1,25 @@ +var archy = require('../'); + +var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/node_modules/archy/index.js b/node_modules/archy/index.js new file mode 100644 index 0000000..869d64e --- /dev/null +++ b/node_modules/archy/index.js @@ -0,0 +1,35 @@ +module.exports = function archy (obj, prefix, opts) { + if (prefix === undefined) prefix = ''; + if (!opts) opts = {}; + var chr = function (s) { + var chars = { + '│' : '|', + '└' : '`', + '├' : '+', + '─' : '-', + '┬' : '-' + }; + return opts.unicode === false ? chars[s] : s; + }; + + if (typeof obj === 'string') obj = { label : obj }; + + var nodes = obj.nodes || []; + var lines = (obj.label || '').split('\n'); + var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; + + return prefix + + lines.join(splitter) + '\n' + + nodes.map(function (node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; + + return prefix + + (last ? chr('└') : chr('├')) + chr('─') + + (more ? chr('┬') : chr('─')) + ' ' + + archy(node, prefix_, opts).slice(prefix.length + 2) + ; + }).join('') + ; +}; diff --git a/node_modules/archy/package.json b/node_modules/archy/package.json new file mode 100644 index 0000000..0ce3149 --- /dev/null +++ b/node_modules/archy/package.json @@ -0,0 +1,40 @@ +{ + "name" : "archy", + "version" : "1.0.0", + "description" : "render nested hierarchies `npm ls` style with unicode pipes", + "main" : "index.js", + "devDependencies" : { + "tap" : "~0.3.3", + "tape" : "~0.1.1" + }, + "scripts" : { + "test" : "tap test" + }, + "testling" : { + "files" : "test/*.js", + "browsers" : { + "iexplore" : [ "6.0", "7.0", "8.0", "9.0" ], + "chrome" : [ "20.0" ], + "firefox" : [ "10.0", "15.0" ], + "safari" : [ "5.1" ], + "opera" : [ "12.0" ] + } + }, + "repository" : { + "type" : "git", + "url" : "http://github.com/substack/node-archy.git" + }, + "keywords" : [ + "hierarchy", + "npm ls", + "unicode", + "pretty", + "print" + ], + "author" : { + "name" : "James Halliday", + "email" : "mail@substack.net", + "url" : "http://substack.net" + }, + "license" : "MIT" +} diff --git a/node_modules/archy/readme.markdown b/node_modules/archy/readme.markdown new file mode 100644 index 0000000..ef7a5cf --- /dev/null +++ b/node_modules/archy/readme.markdown @@ -0,0 +1,88 @@ +# archy + +Render nested hierarchies `npm ls` style with unicode pipes. + +[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) + +[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) + +# example + +``` js +var archy = require('archy'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); +``` + +output + +``` +beep +├── ity +└─┬ boop + ├─┬ o_O + │ ├─┬ oh + │ │ ├── hello + │ │ └── puny + │ └── human + └── party + time! +``` + +# methods + +var archy = require('archy') + +## archy(obj, prefix='', opts={}) + +Return a string representation of `obj` with unicode pipe characters like how +`npm ls` looks. + +`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields. +`'label'` is a string of text to display at a node level and `'nodes'` is an +array of the descendents of the current node. + +If a node is a string, that string will be used as the `'label'` and an empty +array of `'nodes'` will be used. + +`prefix` gets prepended to all the lines and is used by the algorithm to +recursively update. + +If `'label'` has newlines they will be indented at the present indentation level +with the current prefix. + +To disable unicode results in favor of all-ansi output set `opts.unicode` to +`false`. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install archy +``` + +# license + +MIT diff --git a/node_modules/archy/test/beep.js b/node_modules/archy/test/beep.js new file mode 100644 index 0000000..4ea74f9 --- /dev/null +++ b/node_modules/archy/test/beep.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ └── human', + ' └── party!', + '' + ].join('\n')); + t.end(); +}); diff --git a/node_modules/archy/test/multi_line.js b/node_modules/archy/test/multi_line.js new file mode 100644 index 0000000..2cf2154 --- /dev/null +++ b/node_modules/archy/test/multi_line.js @@ -0,0 +1,45 @@ +var test = require('tape'); +var archy = require('../'); + +test('multi-line', function (t) { + var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '│ one', + '│ two', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ │ wheee', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ │ meat', + ' │ └── creature', + ' └── party', + ' time!', + '' + ].join('\n')); + t.end(); +}); diff --git a/node_modules/archy/test/non_unicode.js b/node_modules/archy/test/non_unicode.js new file mode 100644 index 0000000..7204d33 --- /dev/null +++ b/node_modules/archy/test/non_unicode.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }, '', { unicode : false }); + t.equal(s, [ + 'beep', + '+-- ity', + '`-- boop', + ' +-- o_O', + ' | +-- oh', + ' | | +-- hello', + ' | | `-- puny', + ' | `-- human', + ' `-- party!', + '' + ].join('\n')); + t.end(); +}); diff --git a/node_modules/arr-diff/LICENSE b/node_modules/arr-diff/LICENSE new file mode 100755 index 0000000..d734237 --- /dev/null +++ b/node_modules/arr-diff/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/arr-diff/README.md b/node_modules/arr-diff/README.md new file mode 100644 index 0000000..961f5c3 --- /dev/null +++ b/node_modules/arr-diff/README.md @@ -0,0 +1,130 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-diff +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add arr-diff +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## Usage + +Returns the difference between the first array and additional arrays. + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Benchmarks + +This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017: + +``` +Benchmarking: (4 of 4) + · long-dupes + · long + · med + · short + +# benchmark/fixtures/long-dupes.js (100804 bytes) + arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled) + arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled) + array-differ x 708 ops/sec ±0.70% (89 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/long.js (94529 bytes) + arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled) + arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled) + array-differ x 769 ops/sec ±0.61% (90 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/med.js (708 bytes) + arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled) + arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled) + array-differ x 653,888 ops/sec ±1.02% (86 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/short.js (60 bytes) + arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled) + arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled) + array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled) + + fastest is arr-diff-4.0.0 +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.") +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._ \ No newline at end of file diff --git a/node_modules/arr-diff/index.js b/node_modules/arr-diff/index.js new file mode 100644 index 0000000..90f2807 --- /dev/null +++ b/node_modules/arr-diff/index.js @@ -0,0 +1,47 @@ +/*! + * arr-diff + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function diff(arr/*, arrays*/) { + var len = arguments.length; + var idx = 0; + while (++idx < len) { + arr = diffArray(arr, arguments[idx]); + } + return arr; +}; + +function diffArray(one, two) { + if (!Array.isArray(two)) { + return one.slice(); + } + + var tlen = two.length + var olen = one.length; + var idx = -1; + var arr = []; + + while (++idx < olen) { + var ele = one[idx]; + + var hasEle = false; + for (var i = 0; i < tlen; i++) { + var val = two[i]; + + if (ele === val) { + hasEle = true; + break; + } + } + + if (hasEle === false) { + arr.push(ele); + } + } + return arr; +} diff --git a/node_modules/arr-diff/package.json b/node_modules/arr-diff/package.json new file mode 100644 index 0000000..c106813 --- /dev/null +++ b/node_modules/arr-diff/package.json @@ -0,0 +1,69 @@ +{ + "name": "arr-diff", + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/arr-diff", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-flatten": "^1.0.1", + "array-differ": "^1.0.0", + "benchmarked": "^0.2.4", + "gulp-format-md": "^0.1.9", + "minimist": "^1.2.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + }, + "reflinks": [ + "array-differ", + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/arr-filter/LICENSE b/node_modules/arr-filter/LICENSE new file mode 100755 index 0000000..d290fe0 --- /dev/null +++ b/node_modules/arr-filter/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/arr-filter/README.md b/node_modules/arr-filter/README.md new file mode 100755 index 0000000..96435ae --- /dev/null +++ b/node_modules/arr-filter/README.md @@ -0,0 +1,72 @@ +# arr-filter [![NPM version](https://img.shields.io/npm/v/arr-filter.svg?style=flat)](https://www.npmjs.com/package/arr-filter) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-filter.svg?style=flat)](https://npmjs.org/package/arr-filter) [![NPM total downloads](https://img.shields.io/npm/dt/arr-filter.svg?style=flat)](https://npmjs.org/package/arr-filter) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-filter.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-filter) + +> Faster alternative to javascript's native filter method. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-filter +``` + +## Usage + +```js +var filter = require('arr-filter'); + +filter(['a', {a: 'b'}, 1, 'b', 2, {c: 'd'}, 'c'], function (ele) { + return typeof ele === 'string'; +}); +//=> ['a', 'b', 'c'] +``` + +## Why another array filter? + +[array-filter](https://github.com/juliangruber/array-filter) is pretty popular, but it's tuned to be used in older browsers and it falls back on native `.filter()` when available, which is much slower. See [jsperf results](http://jsperf.com/array-filter-while-vs-for/2). The functions used in the benchmarks are the top performers from a dozen or so other functions. + +## About + +### Related projects + +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/node_modules/arr-filter/index.js b/node_modules/arr-filter/index.js new file mode 100755 index 0000000..29b8c3c --- /dev/null +++ b/node_modules/arr-filter/index.js @@ -0,0 +1,33 @@ +/*! + * arr-filter + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var makeIterator = require('make-iterator'); + +module.exports = function filter(arr, fn, thisArg) { + if (arr == null) { + return []; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected callback to be a function'); + } + + var iterator = makeIterator(fn, thisArg); + var len = arr.length; + var res = arr.slice(); + var i = -1; + + while (len--) { + if (!iterator(arr[len], i++)) { + res.splice(len, 1); + } + } + return res; +}; + diff --git a/node_modules/arr-filter/package.json b/node_modules/arr-filter/package.json new file mode 100644 index 0000000..7fb0bf1 --- /dev/null +++ b/node_modules/arr-filter/package.json @@ -0,0 +1,61 @@ +{ + "name": "arr-filter", + "description": "Faster alternative to javascript's native filter method.", + "version": "1.1.2", + "homepage": "https://github.com/jonschlinkert/arr-filter", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-filter", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-filter/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "devDependencies": { + "array-filter": "^1.0.0", + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.11", + "micromatch": "^2.3.11", + "minimist": "^1.2.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "arr", + "array", + "collection", + "filter", + "util" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "collection-map", + "arr-map", + "array-each" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE new file mode 100755 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/arr-flatten/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md new file mode 100755 index 0000000..7dc7a97 --- /dev/null +++ b/node_modules/arr-flatten/README.md @@ -0,0 +1,86 @@ +# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-flatten +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-flatten --save +``` + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Why another flatten utility? + +I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 20 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [lukeed](https://github.com/lukeed) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js new file mode 100644 index 0000000..0cb4ea4 --- /dev/null +++ b/node_modules/arr-flatten/index.js @@ -0,0 +1,22 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json new file mode 100644 index 0000000..d2d33e9 --- /dev/null +++ b/node_modules/arr-flatten/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-flatten", + "description": "Recursively flatten an array or arrays.", + "version": "1.1.0", + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Luke Edwards (https://lukeed.com)" + ], + "repository": "jonschlinkert/arr-flatten", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-flatten": "^2.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.0.0", + "compute-flatten": "^1.0.0", + "flatit": "^1.1.1", + "flatten": "^1.0.2", + "flatten-array": "^1.0.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "just-flatten-it": "^1.1.23", + "lodash.flattendeep": "^4.4.0", + "m_flattened": "^1.0.1", + "mocha": "^3.2.0", + "utils-flatten": "^1.0.0", + "write": "^0.3.3" + }, + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-filter", + "arr-union", + "array-each", + "array-unique" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/arr-map/LICENSE b/node_modules/arr-map/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/arr-map/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/arr-map/README.md b/node_modules/arr-map/README.md new file mode 100644 index 0000000..04e9910 --- /dev/null +++ b/node_modules/arr-map/README.md @@ -0,0 +1,78 @@ +# arr-map [![NPM version](https://img.shields.io/npm/v/arr-map.svg?style=flat)](https://www.npmjs.com/package/arr-map) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-map.svg?style=flat)](https://npmjs.org/package/arr-map) [![NPM total downloads](https://img.shields.io/npm/dt/arr-map.svg?style=flat)](https://npmjs.org/package/arr-map) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-map.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-map) + +> Faster, node.js focused alternative to JavaScript's native array map. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-map +``` + +## Why use this? + +JavaScript's native `Array.map()` is slow, and other popular array map libraries are focused on browser compatibility, which makes them bloated or less than idea for non-browser usage. This implementation is focused on node.js usage keeping it light and fast. + +## Usage + +```js +var map = require('arr-map'); + +map(['a', 'b', 'c'], function(ele) { + return ele + ele; +}); +//=> ['aa', 'bb', 'cc'] + +map(['a', 'b', 'c'], function(ele, i) { + return i + ele; +}); +//=> ['0a', '1b', '2c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/node_modules/arr-map/index.js b/node_modules/arr-map/index.js new file mode 100644 index 0000000..8bfb360 --- /dev/null +++ b/node_modules/arr-map/index.js @@ -0,0 +1,23 @@ +/*! + * arr-map + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var iterator = require('make-iterator'); + +module.exports = function map(arr, fn, thisArg) { + if (arr == null) return []; + fn = iterator(fn, thisArg); + + var len = arr.length; + var res = new Array(len); + + for (var i = 0; i < len; i++) { + res[i] = fn(arr[i], i, arr); + } + return res; +}; diff --git a/node_modules/arr-map/package.json b/node_modules/arr-map/package.json new file mode 100644 index 0000000..34dcab6 --- /dev/null +++ b/node_modules/arr-map/package.json @@ -0,0 +1,62 @@ +{ + "name": "arr-map", + "description": "Faster, node.js focused alternative to JavaScript's native array map.", + "version": "2.0.2", + "homepage": "https://github.com/jonschlinkert/arr-map", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-map", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-map/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "devDependencies": { + "array-map": "^0.0.0", + "benchmarked": "^0.2.5", + "braces": "^2.0.3", + "chalk": "^1.1.3", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.11", + "micromatch": "^2.3.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "arr", + "array", + "map" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "arr-diff", + "arr-filter", + "arr-flatten", + "arr-reduce" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/arr-union/LICENSE b/node_modules/arr-union/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/arr-union/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/arr-union/README.md b/node_modules/arr-union/README.md new file mode 100644 index 0000000..b3cd4f4 --- /dev/null +++ b/node_modules/arr-union/README.md @@ -0,0 +1,99 @@ +# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union) + +> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i arr-union --save +``` + +## Benchmarks + +This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union). + +See the [benchmarks](./benchmark). + +```sh +#1: five-arrays + array-union x 511,121 ops/sec ±0.80% (96 runs sampled) + arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled) + +#2: ten-arrays + array-union x 245,196 ops/sec ±0.69% (94 runs sampled) + arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled) + +#3: two-arrays + array-union x 563,869 ops/sec ±0.97% (94 runs sampled) + arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled) +``` + +## Usage + +```js +var union = require('arr-union'); + +union(['a'], ['b', 'c'], ['d', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e', 'f'] +``` + +Returns only unique elements: + +```js +union(['a', 'a'], ['b', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff) +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter) +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map) +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck) +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce) +* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm i verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._ \ No newline at end of file diff --git a/node_modules/arr-union/index.js b/node_modules/arr-union/index.js new file mode 100644 index 0000000..5ae6c4a --- /dev/null +++ b/node_modules/arr-union/index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function union(init) { + if (!Array.isArray(init)) { + throw new TypeError('arr-union expects the first argument to be an array.'); + } + + var len = arguments.length; + var i = 0; + + while (++i < len) { + var arg = arguments[i]; + if (!arg) continue; + + if (!Array.isArray(arg)) { + arg = [arg]; + } + + for (var j = 0; j < arg.length; j++) { + var ele = arg[j]; + + if (init.indexOf(ele) >= 0) { + continue; + } + init.push(ele); + } + } + return init; +}; diff --git a/node_modules/arr-union/package.json b/node_modules/arr-union/package.json new file mode 100644 index 0000000..5ee87fd --- /dev/null +++ b/node_modules/arr-union/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-union", + "description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/arr-union", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-union", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-union/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-union": "^1.0.1", + "array-unique": "^0.2.1", + "benchmarked": "^0.1.4", + "gulp-format-md": "^0.1.7", + "minimist": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "add", + "append", + "array", + "arrays", + "combine", + "concat", + "extend", + "union", + "uniq", + "unique", + "util", + "utility", + "utils" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-flatten", + "arr-filter", + "arr-map", + "arr-pluck", + "arr-reduce", + "array-unique" + ] + }, + "reflinks": [ + "verb", + "array-union" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-each/LICENSE b/node_modules/array-each/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/array-each/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/array-each/README.md b/node_modules/array-each/README.md new file mode 100644 index 0000000..e8602a1 --- /dev/null +++ b/node_modules/array-each/README.md @@ -0,0 +1,84 @@ +# array-each [![NPM version](https://img.shields.io/npm/v/array-each.svg?style=flat)](https://www.npmjs.com/package/array-each) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![NPM total downloads](https://img.shields.io/npm/dt/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-each.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-each) + +> Loop over each item in an array and call the given function on every element. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-each +``` + +## Usage + +### [each](index.js#L34) + +Loop over each item in an array and call the given function on every element. + +**Params** + +* `array` **{Array}** +* `fn` **{Function}** +* `thisArg` **{Object}**: (optional) pass a `thisArg` to be used as the context in which to call the function. +* `returns` **{undefined}** + +**Example** + +```js +each(['a', 'b', 'c'], function(ele) { + return ele + ele; +}); +//=> ['aa', 'bb', 'cc'] + +each(['a', 'b', 'c'], function(ele, i) { + return i + ele; +}); +//=> ['0a', '1b', '2c'] +``` + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/node_modules/array-each/index.js b/node_modules/array-each/index.js new file mode 100644 index 0000000..12afef4 --- /dev/null +++ b/node_modules/array-each/index.js @@ -0,0 +1,46 @@ +/*! + * array-each + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +/** + * Loop over each item in an array and call the given function on every element. + * + * ```js + * each(['a', 'b', 'c'], function(ele) { + * return ele + ele; + * }); + * //=> ['aa', 'bb', 'cc'] + * + * each(['a', 'b', 'c'], function(ele, i) { + * return i + ele; + * }); + * //=> ['0a', '1b', '2c'] + * ``` + * + * @name each + * @alias forEach + * @param {Array} `array` + * @param {Function} `fn` + * @param {Object} `thisArg` (optional) pass a `thisArg` to be used as the context in which to call the function. + * @return {undefined} + * @api public + */ + +module.exports = function each(arr, cb, thisArg) { + if (arr == null) return; + + var len = arr.length; + var idx = -1; + + while (++idx < len) { + var ele = arr[idx]; + if (cb.call(thisArg, ele, idx, arr) === false) { + break; + } + } +}; diff --git a/node_modules/array-each/package.json b/node_modules/array-each/package.json new file mode 100644 index 0000000..212fb80 --- /dev/null +++ b/node_modules/array-each/package.json @@ -0,0 +1,50 @@ +{ + "name": "array-each", + "description": "Loop over each item in an array and call the given function on every element.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/array-each", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-each", + "bugs": { + "url": "https://github.com/jonschlinkert/array-each/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "array", + "each" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "collection-map", + "arr-filter", + "arr-map" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-initial/.jshintrc b/node_modules/array-initial/.jshintrc new file mode 100644 index 0000000..ffd6173 --- /dev/null +++ b/node_modules/array-initial/.jshintrc @@ -0,0 +1,17 @@ +{ + "esnext": true, + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "indent": 2, + "latedef": true, + "newcap": true, + "noarg": true, + "node": true, + "sub": true, + "undef": true, + "unused": true, + "mocha": true +} diff --git a/node_modules/array-initial/.npmignore b/node_modules/array-initial/.npmignore new file mode 100644 index 0000000..cbe37ae --- /dev/null +++ b/node_modules/array-initial/.npmignore @@ -0,0 +1,59 @@ +# Numerous always-ignore extensions +*.csv +*.dat +*.diff +*.err +*.gz +*.log +*.orig +*.out +*.pid +*.rar +*.rej +*.seed +*.swo +*.swp +*.vi +*.yo-rc.json +*.zip +*~ +.ruby-version +lib-cov +npm-debug.log + +# Always-ignore dirs +/bower_components/ +/node_modules/ +/temp/ +/tmp/ +/vendor/ +_gh_pages + +# OS or Editor folders +*.esproj +*.komodoproject +.komodotools +*.sublime-* +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +nbproject +Thumbs.db + +# grunt-html-validation +validation-status.json +validation-report.json + +# misc +TODO.md + +# npmignore +test +test.js +.verb.md +.gitattributes +.editorconfig diff --git a/node_modules/array-initial/.travis.yml b/node_modules/array-initial/.travis.yml new file mode 100644 index 0000000..67decb2 --- /dev/null +++ b/node_modules/array-initial/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +os: + - linux + - osx +language: node_js +node_js: + - node + - '8' + - '7' + - '6' + - '5' + - '4' + - '0.12' + - '0.10' diff --git a/node_modules/array-initial/LICENSE-MIT b/node_modules/array-initial/LICENSE-MIT new file mode 100644 index 0000000..f8c06df --- /dev/null +++ b/node_modules/array-initial/LICENSE-MIT @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jon Schlinkert, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/array-initial/README.md b/node_modules/array-initial/README.md new file mode 100644 index 0000000..5b95675 --- /dev/null +++ b/node_modules/array-initial/README.md @@ -0,0 +1,39 @@ +# array-initial [![NPM version](https://badge.fury.io/js/array-initial.svg)](http://badge.fury.io/js/array-initial) + +> Get all but the last element or last n elements of an array. + +## Install with [npm](npmjs.org) + +```bash +npm i array-initial --save +``` + +## Usage + +```js +var initial = require('array-initial'); + +initial(['a', 'b', 'c', 'd', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e'] + +initial(['a', 'b', 'c', 'd', 'e', 'f'], 1); +//=> ['a', 'b', 'c', 'd', 'e'] + +initial(['a', 'b', 'c', 'd', 'e', 'f'], 2); +//=> ['a', 'b', 'c', 'd'] +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on December 12, 2014. To update, run `npm i -g verb && verb`._ diff --git a/node_modules/array-initial/index.js b/node_modules/array-initial/index.js new file mode 100644 index 0000000..239e8c6 --- /dev/null +++ b/node_modules/array-initial/index.js @@ -0,0 +1,21 @@ +/*! + * array-initial + * + * Copyright (c) 2014 Jon Schlinkert, contributors. + * Licensed under the MIT license. + */ + +var isNumber = require('is-number'); +var slice = require('array-slice'); + +module.exports = function arrayInitial(arr, num) { + if (!Array.isArray(arr)) { + throw new Error('array-initial expects an array as the first argument.'); + } + + if (arr.length === 0) { + return null; + } + + return slice(arr, 0, arr.length - (isNumber(num) ? num : 1)); +}; diff --git a/node_modules/array-initial/node_modules/is-number/LICENSE b/node_modules/array-initial/node_modules/is-number/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/array-initial/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/array-initial/node_modules/is-number/README.md b/node_modules/array-initial/node_modules/is-number/README.md new file mode 100644 index 0000000..6436992 --- /dev/null +++ b/node_modules/array-initial/node_modules/is-number/README.md @@ -0,0 +1,135 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ \ No newline at end of file diff --git a/node_modules/array-initial/node_modules/is-number/index.js b/node_modules/array-initial/node_modules/is-number/index.js new file mode 100644 index 0000000..5221f40 --- /dev/null +++ b/node_modules/array-initial/node_modules/is-number/index.js @@ -0,0 +1,21 @@ +/*! + * is-number + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isNumber(num) { + var type = typeof num; + + if (type === 'string' || num instanceof String) { + // an empty string would be coerced to true with the below logic + if (!num.trim()) return false; + } else if (type !== 'number' && !(num instanceof Number)) { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/array-initial/node_modules/is-number/package.json b/node_modules/array-initial/node_modules/is-number/package.json new file mode 100644 index 0000000..c8a7af1 --- /dev/null +++ b/node_modules/array-initial/node_modules/is-number/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-initial/package.json b/node_modules/array-initial/package.json new file mode 100644 index 0000000..2f70ba0 --- /dev/null +++ b/node_modules/array-initial/package.json @@ -0,0 +1,46 @@ +{ + "name": "array-initial", + "description": "Get all but the last element or last n elements of an array.", + "version": "1.1.0", + "homepage": "https://github.com/jonschlinkert/array-initial", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/array-initial.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-initial/issues" + }, + "license": "MIT", + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "mocha": "^2.0.0", + "should": "^11.2.1" + }, + "dependencies": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "keywords": [ + "array", + "fast", + "first", + "initial", + "javascript", + "js", + "last", + "rest", + "util", + "utility", + "utils" + ] +} diff --git a/node_modules/array-last/LICENSE b/node_modules/array-last/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/array-last/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/array-last/README.md b/node_modules/array-last/README.md new file mode 100755 index 0000000..d976c93 --- /dev/null +++ b/node_modules/array-last/README.md @@ -0,0 +1,94 @@ +# array-last [![NPM version](https://img.shields.io/npm/v/array-last.svg?style=flat)](https://www.npmjs.com/package/array-last) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-last.svg?style=flat)](https://npmjs.org/package/array-last) [![NPM total downloads](https://img.shields.io/npm/dt/array-last.svg?style=flat)](https://npmjs.org/package/array-last) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-last.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-last) + +> Get the last or last n elements in an array. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-last +``` + +## Usage + +```js +var last = require('array-last'); + +last(['a', 'b', 'c', 'd', 'e', 'f']); +//=> 'f' + +last(['a', 'b', 'c', 'd', 'e', 'f'], 1); +//=> 'f' + +last(['a', 'b', 'c', 'd', 'e', 'f'], 3); +//=> ['d', 'e', 'f'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union) +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) +* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor) + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [SpyMaster356](https://github.com/SpyMaster356) | +| 2 | [bendrucker](https://github.com/bendrucker) | +| 2 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 30, 2017._ \ No newline at end of file diff --git a/node_modules/array-last/index.js b/node_modules/array-last/index.js new file mode 100644 index 0000000..5b02f18 --- /dev/null +++ b/node_modules/array-last/index.js @@ -0,0 +1,30 @@ +/*! + * array-last + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isNumber = require('is-number'); + +module.exports = function last(arr, n) { + if (!Array.isArray(arr)) { + throw new Error('expected the first argument to be an array'); + } + + var len = arr.length; + if (len === 0) { + return null; + } + + n = isNumber(n) ? +n : 1; + if (n === 1) { + return arr[len - 1]; + } + + var res = new Array(n); + while (n--) { + res[n] = arr[--len]; + } + return res; +}; diff --git a/node_modules/array-last/node_modules/is-number/LICENSE b/node_modules/array-last/node_modules/is-number/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/array-last/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/array-last/node_modules/is-number/README.md b/node_modules/array-last/node_modules/is-number/README.md new file mode 100644 index 0000000..6436992 --- /dev/null +++ b/node_modules/array-last/node_modules/is-number/README.md @@ -0,0 +1,135 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ \ No newline at end of file diff --git a/node_modules/array-last/node_modules/is-number/index.js b/node_modules/array-last/node_modules/is-number/index.js new file mode 100644 index 0000000..5221f40 --- /dev/null +++ b/node_modules/array-last/node_modules/is-number/index.js @@ -0,0 +1,21 @@ +/*! + * is-number + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isNumber(num) { + var type = typeof num; + + if (type === 'string' || num instanceof String) { + // an empty string would be coerced to true with the below logic + if (!num.trim()) return false; + } else if (type !== 'number' && !(num instanceof Number)) { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/array-last/node_modules/is-number/package.json b/node_modules/array-last/node_modules/is-number/package.json new file mode 100644 index 0000000..c8a7af1 --- /dev/null +++ b/node_modules/array-last/node_modules/is-number/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-last/package.json b/node_modules/array-last/package.json new file mode 100644 index 0000000..591edb6 --- /dev/null +++ b/node_modules/array-last/package.json @@ -0,0 +1,76 @@ +{ + "name": "array-last", + "description": "Get the last or last n elements in an array.", + "version": "1.3.0", + "homepage": "https://github.com/jonschlinkert/array-last", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Ben Drucker (http://www.bendrucker.me)", + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Stephen A. Wilson (https://github.com/SpyMaster356)" + ], + "repository": "jonschlinkert/array-last", + "bugs": { + "url": "https://github.com/jonschlinkert/array-last/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^4.0.0" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.1.1", + "gulp-format-md": "^1.0.0", + "matched": "^1.0.2", + "mocha": "^3.5.0" + }, + "keywords": [ + "array", + "fast", + "first", + "initial", + "javascript", + "js", + "last", + "rest", + "util", + "utility", + "utils" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-union", + "array-unique", + "array-xor" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-slice/LICENSE b/node_modules/array-slice/LICENSE new file mode 100755 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/array-slice/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/array-slice/README.md b/node_modules/array-slice/README.md new file mode 100755 index 0000000..e175ca0 --- /dev/null +++ b/node_modules/array-slice/README.md @@ -0,0 +1,82 @@ +# array-slice [![NPM version](https://img.shields.io/npm/v/array-slice.svg?style=flat)](https://www.npmjs.com/package/array-slice) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![NPM total downloads](https://img.shields.io/npm/dt/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-slice.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-slice) + +> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-slice +``` + +This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned. This is also faster than native slice in some cases. + +## Usage + +```js +var slice = require('array-slice'); +var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; + +slice(arr, 3, 6); +//=> ['e', 'f', 'g'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") +* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor "Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in all given arrays and not in their intersections).") + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 30, 2017._ \ No newline at end of file diff --git a/node_modules/array-slice/index.js b/node_modules/array-slice/index.js new file mode 100644 index 0000000..15cdb77 --- /dev/null +++ b/node_modules/array-slice/index.js @@ -0,0 +1,33 @@ +/*! + * array-slice + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function slice(arr, start, end) { + var len = arr.length; + var range = []; + + start = idx(len, start); + end = idx(len, end, len); + + while (start < end) { + range.push(arr[start++]); + } + return range; +}; + +function idx(len, pos, end) { + if (pos == null) { + pos = end || 0; + } else if (pos < 0) { + pos = Math.max(len + pos, 0); + } else { + pos = Math.min(pos, len); + } + + return pos; +} diff --git a/node_modules/array-slice/package.json b/node_modules/array-slice/package.json new file mode 100644 index 0000000..7fedf0c --- /dev/null +++ b/node_modules/array-slice/package.json @@ -0,0 +1,54 @@ +{ + "name": "array-slice", + "description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.", + "version": "1.1.0", + "homepage": "https://github.com/jonschlinkert/array-slice", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-slice", + "bugs": { + "url": "https://github.com/jonschlinkert/array-slice/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "array", + "javascript", + "js", + "slice", + "util", + "utils" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-unique", + "array-xor" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-sort/LICENSE b/node_modules/array-sort/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/array-sort/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/array-sort/README.md b/node_modules/array-sort/README.md new file mode 100644 index 0000000..94d9ba7 --- /dev/null +++ b/node_modules/array-sort/README.md @@ -0,0 +1,203 @@ +# array-sort [![NPM version](https://img.shields.io/npm/v/array-sort.svg?style=flat)](https://www.npmjs.com/package/array-sort) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-sort.svg?style=flat)](https://npmjs.org/package/array-sort) [![NPM total downloads](https://img.shields.io/npm/dt/array-sort.svg?style=flat)](https://npmjs.org/package/array-sort) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-sort.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-sort) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/array-sort.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/array-sort) + +> Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-sort +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add array-sort +``` + +## Usage + +Sort an array by the given object property: + +```js +var arraySort = require('array-sort'); + +arraySort([{foo: 'y'}, {foo: 'z'}, {foo: 'x'}], 'foo'); +//=> [{foo: 'x'}, {foo: 'y'}, {foo: 'z'}] +``` + +**Reverse order** + +```js +arraySort([{foo: 'y'}, {foo: 'z'}, {foo: 'x'}], 'foo', {reverse: true}); +//=> [{foo: 'z'}, {foo: 'y'}, {foo: 'x'}] +``` + +## Params + +```js +arraySort(array, comparisonArgs); +``` + +* `array`: **{Array}** The array to sort +* `comparisonArgs`: **{Function|String|Array}**: One or more functions or object paths to use for sorting. + +## Examples + +**[Sort blog posts](examples/blog-posts.js)** + +```js +var arraySort = require('array-sort'); + +var posts = [ + { path: 'c.md', locals: { date: '2014-01-09' } }, + { path: 'a.md', locals: { date: '2014-01-02' } }, + { path: 'b.md', locals: { date: '2013-05-06' } }, +]; + +// sort by `locals.date` +console.log(arraySort(posts, 'locals.date')); + +// sort by `path` +console.log(arraySort(posts, 'path')); +``` + +**[Sort by multiple properties](examples/multiple-props.js)** + +```js +var arraySort = require('array-sort'); + +var posts = [ + { locals: { foo: 'bbb', date: '2013-05-06' }}, + { locals: { foo: 'aaa', date: '2012-01-02' }}, + { locals: { foo: 'ccc', date: '2014-01-02' }}, + { locals: { foo: 'ccc', date: '2015-01-02' }}, + { locals: { foo: 'bbb', date: '2014-06-01' }}, + { locals: { foo: 'aaa', date: '2014-02-02' }}, +]; + +// sort by `locals.foo`, then `locals.date` +var result = arraySort(posts, ['locals.foo', 'locals.date']); + +console.log(result); +// [ { locals: { foo: 'aaa', date: '2012-01-02' } }, +// { locals: { foo: 'aaa', date: '2014-02-02' } }, +// { locals: { foo: 'bbb', date: '2013-05-06' } }, +// { locals: { foo: 'bbb', date: '2014-06-01' } }, +// { locals: { foo: 'ccc', date: '2014-01-02' } }, +// { locals: { foo: 'ccc', date: '2015-01-02' } } ] +``` + +**[Custom function](examples/custom-function.js)** + +If custom functions are supplied, array elements are sorted according to the return value of the compare function. See the [docs for ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)`Array.sort()` for more details. + +```js +var arr = [ + {one: 'w', two: 'b'}, + {one: 'z', two: 'a'}, + {one: 'x', two: 'c'}, + {one: 'y', two: 'd'}, +]; + +function compare(prop) { + return function (a, b) { + return a[prop].localeCompare(b[prop]); + }; +} + +var result = arraySort(arr, function (a, b) { + return a.two.localeCompare(b.two); +}); + +console.log(result); +// [ { one: 'z', two: 'a' }, +// { one: 'w', two: 'b' }, +// { one: 'x', two: 'c' }, +// { one: 'y', two: 'd' } ] +``` + +**[Multiple custom functions](examples/custom-functions.js)** + +```js +var arr = [ + {foo: 'w', bar: 'y', baz: 'w'}, + {foo: 'x', bar: 'y', baz: 'w'}, + {foo: 'x', bar: 'y', baz: 'z'}, + {foo: 'x', bar: 'x', baz: 'w'}, +]; + +// reusable compare function +function compare(prop) { + return function (a, b) { + return a[prop].localeCompare(b[prop]); + }; +} + +// the `compare` functions can be a list or array +var result = arraySort(arr, compare('foo'), compare('bar'), compare('baz')); + +console.log(result); +// [ { foo: 'w', bar: 'y', baz: 'w' }, +// { foo: 'x', bar: 'x', baz: 'w' }, +// { foo: 'x', bar: 'y', baz: 'w' }, +// { foo: 'x', bar: 'y', baz: 'z' } ] +``` + +## About + +### Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [sort-asc](https://www.npmjs.com/package/sort-asc): Sort array elements in ascending order. | [homepage](https://github.com/jonschlinkert/sort-asc "Sort array elements in ascending order.") +* [sort-desc](https://www.npmjs.com/package/sort-desc): Sort array elements in descending order. | [homepage](https://github.com/jonschlinkert/sort-desc "Sort array elements in descending order.") +* [sort-object](https://www.npmjs.com/package/sort-object): Sort the keys in an object. | [homepage](https://github.com/doowb/sort-object "Sort the keys in an object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [iamstolis](https://github.com/iamstolis) | +| 1 | [wkevina](https://github.com/wkevina) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 11, 2017._ \ No newline at end of file diff --git a/node_modules/array-sort/index.js b/node_modules/array-sort/index.js new file mode 100644 index 0000000..01880e1 --- /dev/null +++ b/node_modules/array-sort/index.js @@ -0,0 +1,105 @@ +/*! + * array-sort + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var defaultCompare = require('default-compare'); +var typeOf = require('kind-of'); +var get = require('get-value'); + +/** + * Sort an array of objects by one or more properties. + * + * @param {Array} `arr` The Array to sort. + * @param {String|Array|Function} `props` One or more object paths or comparison functions. + * @param {Object} `opts` Pass `{ reverse: true }` to reverse the sort order. + * @return {Array} Returns a sorted array. + * @api public + */ + +function arraySort(arr, props, opts) { + if (arr == null) { + return []; + } + + if (!Array.isArray(arr)) { + throw new TypeError('array-sort expects an array.'); + } + + if (arguments.length === 1) { + return arr.sort(); + } + + var args = flatten([].slice.call(arguments, 1)); + + // if the last argument appears to be a plain object, + // it's not a valid `compare` arg, so it must be options. + if (typeOf(args[args.length - 1]) === 'object') { + opts = args.pop(); + } + return arr.sort(sortBy(args, opts)); +} + +/** + * Iterate over each comparison property or function until `1` or `-1` + * is returned. + * + * @param {String|Array|Function} `props` One or more object paths or comparison functions. + * @param {Object} `opts` Pass `{ reverse: true }` to reverse the sort order. + * @return {Array} + */ + +function sortBy(props, opts) { + opts = opts || {}; + + return function compareFn(a, b) { + var len = props.length, i = -1; + var result; + + while (++i < len) { + result = compare(props[i], a, b); + if (result !== 0) { + break; + } + } + if (opts.reverse === true) { + return result * -1; + } + return result; + }; +} + +/** + * Compare `a` to `b`. If an object `prop` is passed, then + * `a[prop]` is compared to `b[prop]` + */ + +function compare(prop, a, b) { + if (typeof prop === 'function') { + // expose `compare` to custom function + return prop(a, b, compare.bind(null, null)); + } + // compare object values + if (prop && typeof a === 'object' && typeof b === 'object') { + return compare(null, get(a, prop), get(b, prop)); + } + return defaultCompare(a, b); +} + +/** + * Flatten the given array. + */ + +function flatten(arr) { + return [].concat.apply([], arr); +} + +/** + * Expose `arraySort` + */ + +module.exports = arraySort; diff --git a/node_modules/array-sort/package.json b/node_modules/array-sort/package.json new file mode 100644 index 0000000..19e02d7 --- /dev/null +++ b/node_modules/array-sort/package.json @@ -0,0 +1,94 @@ +{ + "name": "array-sort", + "description": "Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/array-sort", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jan Stola (https://github.com/iamstolis)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Kevin Ward (https://github.com/wkevina)" + ], + "repository": "jonschlinkert/array-sort", + "bugs": { + "url": "https://github.com/jonschlinkert/array-sort/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.5", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.8", + "lodash.sortbyorder": "^3.4.4", + "mocha": "^2.4.5", + "should": "^8.3.1" + }, + "keywords": [ + "arr", + "array", + "asc", + "ascend", + "ascending", + "desc", + "descend", + "descending", + "dot", + "element", + "elements", + "get", + "multiple", + "nested", + "obj", + "object", + "order", + "ordered", + "path", + "prop", + "properties", + "property", + "sort", + "sorted", + "sorting" + ], + "verb": { + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "get-value", + "set-value", + "sort-asc", + "sort-desc", + "sort-object" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/array-unique/LICENSE b/node_modules/array-unique/LICENSE new file mode 100755 index 0000000..842218c --- /dev/null +++ b/node_modules/array-unique/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/array-unique/README.md b/node_modules/array-unique/README.md new file mode 100755 index 0000000..41c8c90 --- /dev/null +++ b/node_modules/array-unique/README.md @@ -0,0 +1,77 @@ +# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique) + +Remove duplicate values from an array. Fastest ES5 implementation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-unique +``` + +## Usage + +```js +var unique = require('array-unique'); + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c'] + +/* The above modifies the input array. To prevent that at a slight performance cost: */ +var unique = require("array-unique").immutable; + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c', 'c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._ \ No newline at end of file diff --git a/node_modules/array-unique/index.js b/node_modules/array-unique/index.js new file mode 100644 index 0000000..7e481e0 --- /dev/null +++ b/node_modules/array-unique/index.js @@ -0,0 +1,43 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; + +module.exports.immutable = function uniqueImmutable(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var arrLen = arr.length; + var newArr = new Array(arrLen); + + for (var i = 0; i < arrLen; i++) { + newArr[i] = arr[i]; + } + + return module.exports(newArr); +}; diff --git a/node_modules/array-unique/package.json b/node_modules/array-unique/package.json new file mode 100644 index 0000000..d87640a --- /dev/null +++ b/node_modules/array-unique/package.json @@ -0,0 +1,62 @@ +{ + "name": "array-unique", + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "version": "0.3.2", + "homepage": "https://github.com/jonschlinkert/array-unique", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-unique", + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "keywords": [ + "array", + "unique" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-union", + "arr-flatten", + "arr-reduce", + "arr-map", + "arr-pluck" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/assign-symbols/LICENSE b/node_modules/assign-symbols/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/assign-symbols/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/assign-symbols/README.md b/node_modules/assign-symbols/README.md new file mode 100644 index 0000000..422729d --- /dev/null +++ b/node_modules/assign-symbols/README.md @@ -0,0 +1,73 @@ +# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols) + +> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method. + +From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): + +> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i assign-symbols --save +``` + +## Usage + +```js +var assignSymbols = require('assign-symbols'); +var obj = {}; + +var one = {}; +var symbolOne = Symbol('aaa'); +one[symbolOne] = 'bbb'; + +var two = {}; +var symbolTwo = Symbol('ccc'); +two[symbolTwo] = 'ddd'; + +assignSymbols(obj, one, two); + +console.log(obj[symbolOne]); +//=> 'bbb' +console.log(obj[symbolTwo]); +//=> 'ddd' +``` + +## Similar projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep) +* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep) +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._ \ No newline at end of file diff --git a/node_modules/assign-symbols/index.js b/node_modules/assign-symbols/index.js new file mode 100644 index 0000000..c08a232 --- /dev/null +++ b/node_modules/assign-symbols/index.js @@ -0,0 +1,40 @@ +/*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function(receiver, objects) { + if (receiver === null || typeof receiver === 'undefined') { + throw new TypeError('expected first argument to be an object.'); + } + + if (typeof objects === 'undefined' || typeof Symbol === 'undefined') { + return receiver; + } + + if (typeof Object.getOwnPropertySymbols !== 'function') { + return receiver; + } + + var isEnumerable = Object.prototype.propertyIsEnumerable; + var target = Object(receiver); + var len = arguments.length, i = 0; + + while (++i < len) { + var provider = Object(arguments[i]); + var names = Object.getOwnPropertySymbols(provider); + + for (var j = 0; j < names.length; j++) { + var key = names[j]; + + if (isEnumerable.call(provider, key)) { + target[key] = provider[key]; + } + } + } + return target; +}; diff --git a/node_modules/assign-symbols/package.json b/node_modules/assign-symbols/package.json new file mode 100644 index 0000000..7f77b58 --- /dev/null +++ b/node_modules/assign-symbols/package.json @@ -0,0 +1,40 @@ +{ + "name": "assign-symbols", + "description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/assign-symbols", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/assign-symbols", + "bugs": { + "url": "https://github.com/jonschlinkert/assign-symbols/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "^3.0.0" + }, + "keywords": [ + "assign", + "symbols" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "mixin-deep", + "merge-deep", + "extend-shallow", + "clone-deep" + ] + } + } +} diff --git a/node_modules/async-done/LICENSE b/node_modules/async-done/LICENSE new file mode 100644 index 0000000..9aedc0d --- /dev/null +++ b/node_modules/async-done/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall 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/node_modules/async-done/README.md b/node_modules/async-done/README.md new file mode 100644 index 0000000..93545c2 --- /dev/null +++ b/node_modules/async-done/README.md @@ -0,0 +1,121 @@ +

+ + + +

+ +# async-done + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style. + +As async conventions evolve, it is useful to be able to deal with several different *styles* of async completion uniformly. With this module you can handle completion using a node-style callback, regardless of a return value that's a promise, observable, child process or stream. + +## Usage + +### Successful completion + +```js +var asyncDone = require('async-done'); + +asyncDone(function(done){ + // do async things + done(null, 2); +}, function(error, result){ + // `error` will be null on successful execution of the first function. + // `result` will be the result from the first function. +}); +``` + +### Failed completion + +```js +var asyncDone = require('async-done'); + +asyncDone(function(done){ + // do async things + done(new Error('Some Error Occurred')); +}, function(error, result){ + // `error` will be an error from the first function. + // `result` will be undefined on failed execution of the first function. +}); +``` + +## API + +### `asyncDone(fn, callback)` + +Takes a function to execute (`fn`) and a function to call on completion (`callback`). + +#### `fn([done])` + +Optionally takes a callback to call when async tasks are complete. + +#### Completion and Error Resolution + +* `Callback` (`done`) called + - Completion: called with null error + - Error: called with non-null error +* `Stream` or `EventEmitter` returned + - Completion: [end-of-stream][end-of-stream] module + - Error: [domains][domains] + - __Note:__ Only actual streams are supported, not faux-streams; Therefore, modules like [`event-stream`][event-stream] are not supported. +* `Child Process` returned + - Completion [end-of-stream][end-of-stream] module + - Error: [domains][domains] +* `Promise` returned + - Completion: [onFulfilled][promise-onfulfilled] method called + - Error: [onRejected][promise-onrejected] method called +* `Observable` (e.g. from [RxJS v5][rxjs5-observable] or [RxJS v4][rxjs5-observable]) returned + - Completion: [complete][rxjs5-observer-complete] method called + - Error: [error][rxjs5-observer-error] method called + +__Warning:__ Sync tasks are __not supported__ and your function will never complete if the one of the above strategies is not used to signal completion. However, thrown errors will be caught by the domain. + +#### `callback(error, result)` + +If an error doesn't occur in the execution of the `fn` function, the `callback` method will receive the results as its second argument. Note: Some streams don't received any results. + +If an error occurred in the execution of the `fn` function, The `callback` method will receive an error as its first argument. + +Errors can be caused by: + +* A thrown error +* An error passed to a `done` callback +* An `error` event emitted on a returned `Stream`, `EventEmitter` or `Child Process` +* A rejection of a returned `Promise` - If the `Promise` is not rejected with a value, we generate a new `Error` +* The `onError` handler being called on an `Observable` + +## License + +MIT + +[downloads-image]: https://img.shields.io/npm/dm/async-done.svg +[npm-url]: https://www.npmjs.com/package/async-done +[npm-image]: https://img.shields.io/npm/v/async-done.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=6&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/async-done?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/async-done +[travis-image]: https://img.shields.io/travis/gulpjs/async-done.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/async-done +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/async-done.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/async-done +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-done/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg + +[end-of-stream]: https://www.npmjs.com/package/end-of-stream +[domains]: http://nodejs.org/api/domain.html +[event-stream]: https://github.com/dominictarr/event-stream +[promise-onfulfilled]: http://promisesaplus.com/#point-26 +[promise-onrejected]: http://promisesaplus.com/#point-30 +[rx4-observable]: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md +[rxjs5-observable]: http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html +[rxjs5-observer-complete]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-complete +[rxjs5-observer-error]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-error diff --git a/node_modules/async-done/index.d.ts b/node_modules/async-done/index.d.ts new file mode 100644 index 0000000..2c4ab93 --- /dev/null +++ b/node_modules/async-done/index.d.ts @@ -0,0 +1,101 @@ +/** + * Notes about these type definitions: + * + * - Callbacks returning multiple completion values using multiple arguments are not supported by these types. + * Prefer to use Node's style by grouping your values in a single object or array. + * Support for this kind of callback is blocked by Microsoft/TypeScript#5453 + * + * - For ease of use, `asyncDone` lets you pass callback functions with a result type `T` instead of `T | undefined`. + * This matches Node's types but can lead to unsound code being typechecked. + * + * The following code typechecks but fails at runtime: + * ```typescript + * async function getString(): Promise { + * return "Hello, World!"; + * } + * + * async function evilGetString(): Promise { + * throw new Error("Hello, World!"); + * } + * + * function cb(err: Error | null, result: string): void { + * // This is unsound because `result` is `undefined` when `err` is not `null`. + * console.log(result.toLowerCase()); + * } + * + * asyncDone(getString, cb); // Prints `hello, world!` + * asyncDone(evilGetString, cb); // Runtime error: `TypeError: Cannot read property 'toLowerCase' of undefined` + * ``` + * + * Enforcing stricter callbacks would require developers to use `result?: string` and assert the existence + * of the result either by checking it directly or using the `!` assertion operator after testing for errors. + * ```typescript + * function stricterCb1(err: Error | null, result?: string): void { + * if (err !== null) { + * console.error(err); + * return; + * } + * console.log(result!.toLowerCase()); + * } + * + * function stricterCb2(err: Error | null, result?: string): void { + * if (result === undefined) { + * console.error("Undefined result. Error:); + * console.error(err); + * return; + * } + * console.log(result.toLowerCase()); + * } + * ``` + */ +import { ChildProcess } from "child_process"; +import { EventEmitter } from "events"; +import { Stream } from "stream"; + +declare namespace asyncDone { + + /** + * Represents a callback function used to signal the completion of a + * task without any result value. + */ + type VoidCallback = (err: Error | null) => void; + + /** + * Represents a callback function used to signal the completion of a + * task with a single result value. + */ + interface Callback { + (err: null, result: T): void; + + // Use `result?: T` or `result: undefined` to require the consumer to assert the existence of the result + // (even in case of success). See comment at the top of the file. + (err: Error, result?: any): void; + } + + /** + * Minimal `Observable` interface compatible with `async-done`. + * + * @see https://github.com/ReactiveX/rxjs/blob/c3c56867eaf93f302ac7cd588034c7d8712f2834/src/internal/Observable.ts#L77 + */ + interface Observable { + subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): any; + } + + /** + * Represents an async operation. + */ + export type AsyncTask = + ((done: VoidCallback) => void) + | ((done: Callback) => void) + | (() => ChildProcess | EventEmitter | Observable | PromiseLike | Stream); +} + +/** + * Takes a function to execute (`fn`) and a function to call on completion (`callback`). + * + * @param fn Function to execute. + * @param callback Function to call on completion. + */ +declare function asyncDone(fn: asyncDone.AsyncTask, callback: asyncDone.Callback): void; + +export = asyncDone; diff --git a/node_modules/async-done/index.js b/node_modules/async-done/index.js new file mode 100644 index 0000000..e5be989 --- /dev/null +++ b/node_modules/async-done/index.js @@ -0,0 +1,88 @@ +'use strict'; + +var domain = require('domain'); + +var eos = require('end-of-stream'); +var p = require('process-nextick-args'); +var once = require('once'); +var exhaust = require('stream-exhaust'); + +var eosConfig = { + error: false, +}; + +function rethrowAsync(err) { + process.nextTick(rethrow); + + function rethrow() { + throw err; + } +} + +function tryCatch(fn, args) { + try { + return fn.apply(null, args); + } catch (err) { + rethrowAsync(err); + } +} + +function asyncDone(fn, cb) { + cb = once(cb); + + var d = domain.create(); + d.once('error', onError); + var domainBoundFn = d.bind(fn); + + function done() { + d.removeListener('error', onError); + d.exit(); + return tryCatch(cb, arguments); + } + + function onSuccess(result) { + done(null, result); + } + + function onError(error) { + if (!error) { + error = new Error('Promise rejected without Error'); + } + done(error); + } + + function asyncRunner() { + var result = domainBoundFn(done); + + function onNext(state) { + onNext.state = state; + } + + function onCompleted() { + onSuccess(onNext.state); + } + + if (result && typeof result.on === 'function') { + // Assume node stream + d.add(result); + eos(exhaust(result), eosConfig, done); + return; + } + + if (result && typeof result.subscribe === 'function') { + // Assume RxJS observable + result.subscribe(onNext, onError, onCompleted); + return; + } + + if (result && typeof result.then === 'function') { + // Assume promise + result.then(onSuccess, onError); + return; + } + } + + p.nextTick(asyncRunner); +} + +module.exports = asyncDone; diff --git a/node_modules/async-done/package.json b/node_modules/async-done/package.json new file mode 100644 index 0000000..774c733 --- /dev/null +++ b/node_modules/async-done/package.json @@ -0,0 +1,65 @@ +{ + "name": "async-done", + "version": "1.3.2", + "description": "Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz ", + "Pawel Kozlowski ", + "Matthew Podwysocki ", + "Charles Samborski " + ], + "repository": "gulpjs/async-done", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts", + "LICENSE" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "test-types": "tsc -p test/types", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "devDependencies": { + "@types/node": "^9.3.0", + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^3.0.0", + "nyc": "^10.3.2", + "pumpify": "^1.3.6", + "rxjs": "^5.5.6", + "through2": "^2.0.0", + "typescript": "^2.6.2", + "when": "^3.7.3" + }, + "keywords": [ + "promises", + "callbacks", + "observables", + "streams", + "end", + "completion", + "complete", + "finish", + "done", + "async", + "error handling" + ] +} diff --git a/node_modules/async-each/README.md b/node_modules/async-each/README.md new file mode 100644 index 0000000..6444d95 --- /dev/null +++ b/node_modules/async-each/README.md @@ -0,0 +1,52 @@ +# async-each + +No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Installation +* Just include async-each before your scripts. +* `npm install async-each` if you’re using node.js. + +## Usage + +* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); + +// Alternatively in browser: +asyncEach(list, fn, callback); +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://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. diff --git a/node_modules/async-each/index.js b/node_modules/async-each/index.js new file mode 100644 index 0000000..277217d --- /dev/null +++ b/node_modules/async-each/index.js @@ -0,0 +1,38 @@ +// async-each MIT license (by Paul Miller from https://paulmillr.com). +(function(globals) { + 'use strict'; + var each = function(items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + if (items.length === 0) return callback(undefined, items); + + var transformed = new Array(items.length); + var count = 0; + var returned = false; + + items.forEach(function(item, index) { + next(item, function(error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + count += 1; + if (count === items.length) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function() { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // +``` + +## Usage + +Copy *src* to *dst* simply (and return *dst*) : + +```js +var src = { a: 1, b: { b1: 'bbb' }, c: 'ccc' }; +var dst = { a: 2, b: { b1: 'xxx', b2: 'yyy' } }; + +copyProps(src, dst); +// => { a: 1, b: { b1: 'bbb', b2: 'yyy' }, c: 'ccc' } +``` + +Copy *src* to *dst* with property mapping (and return *dst*) : + +```js +var src = { a: 1, b: { b1: 'bbb' }, c: 'ccc', d: 'ddd' }; +var dst = { f: { a: 2, b1: 'xxx', b2: 'yyy' }, e: 'zzz' }; + +copyProps(src, dst, { + a: 'f.a', + 'b.b1': 'f.b1', + 'b.b2': 'f.b2', + 'c': 'f.c', +}); +// => { f: { a: 1, b1: 'bbb', b2: 'yyy', c: 'ccc' }, e: 'zzz' } +``` + +Copy *src* to *dst* with convert function (and return *dst*) : + +```js +var src = { a: 1, b: { b1: 'bbb' } }; +var dst = { a: 0 }; + +copyProps(src, dst, function(srcInfo) { + if (srcInfo.keyChain === 'a') { + return srcInfo.value * 2; + } + if (srcInfo.keyChain === 'b.b1') { + return srcInfo.value.toUpperCase(); + } +}); +// => { a: 2, b: { b1: 'BBB' } } +``` + +Can use an array instead of a map as property mapping : + +```js +var src = { a: 1, b: { c: 'CCC' }, d: { e: 'EEE' } }; +var dst = { a: 9, b: { c: 'xxx' }, d: { e: 'yyy' } }; +var fromto = [ 'b.c', 'd.e' ]; +copyProps(src, dst, fromto); +// => { a: 9, b: { c: 'CCC' }, d: { e: 'EEE' } } +``` + +Can copy reversively (from *dst* to *src*) by reverse flag (and return *src*): + +```js +var src = { a: 1, b: { b1: 'bbb' }, c: 'ccc' }; +var dst = { a: 2, b: { b1: 'xxx', b2: 'yyy' } }; + +copyProps(src, dst, true); +// => { a: 2, b: { b1: 'xxx', b2: 'yyy' }, c: 'ccc' } +``` + +```js +var src = { a: 1, b: { b1: 'bbb' }, c: 'ccc', d: 'ddd' }; +var dst = { f: { a: 2, b1: 'xxx', b2: 'yyy' }, e: 'zzz' }; + +copyProps(src, dst, { + a: 'f.a', + 'b.b2': 'f.b2', + 'c': 'f.c', +}, true); +// => { a: 2, b: { b1: 'bbb', b2: 'yyy' }, c: 'ccc', d: 'ddd' } +``` + +If a value of source property is undefined (when not using converter), or a result of converter is undefined (when using converter), the value is not copied. + +```js +var src = { a: 'A', b: undefined, c: null, d: 1 }; +var dst = { a: 'a', b: 'b', c: 'c' }; + +copyProps(src, dst, function(srcInfo) { + if (srcInfo.keyChain === 'd') { + return undefined; + } else { + return srcInfo.value; + } +}); +// => { a: 'A', b: 'b', c: null } +``` + +You can operate the parent node object directly in converter. + +```js +var src = { a: 1, b: 2 }; +var dst = {}; + +copyProps(src, dst, function(srcInfo, dstInfo) { + Object.defineProperty(dstInfo.parent, dstInfo.key, { + writable: false, + enumerable: true, + configurable: false, + value: srcInfo.value * 2 + }) +}); // => { a: 2, b: 4 } + +dst // => { a: 2, b: 4 } +dst.a = 9 +dst // -> { a: 2, b: 4 } +``` + +## API + +### copyProps(src, dst [, fromto] [, converter] [, reverse]) => object + +Copy properties of *src* to *dst* deeply. +If *fromto* is given, it is able to copy between different properties. +If *converter* is given, it is able to convert the terminal values. + +#### Parameters: + +| Parameter | Type | Description | +|:------------|:------:|:-------------------------------------------------| +| *src* | object | A source object of copy. | +| *dst* | object | A destinate object of copy. | +| *fromto* | object | array | An object mapping properties between *src* and *dst*. (Optional) | +| *converter* |function| A function to convert terminal values in *src*. (Optional) | +| *reverse* |boolean | True, if copying reversively from dst to src and returns src object. `fromto` is also reversively used from value to key. This default value is `false`. (Optional) | + +#### Returns: + +*dst* object after copying. + +**Type:** object + +* **Format of fromto** + + *fromto* is a non-nested key-value object. And the *key*s are property key chains of *src* and the *value*s are property key chains of *dst*. + The key chain is a string which is concatenated property keys on each level with dots, like `'aaa.bbb.ccc'`. + + The following example copys the value of `src.aaa.bbb.ccc` to `dst.xxx.yyy`. + + ```js + copyProps(src, dst, { + 'aaa.bbb.ccc' : 'xxx.yyy' + }) + ``` + + *fromto* can be an array. In that case, the array works as a map which has pairs of same key and value. + +* **API of converter** + + **converter(srcInfo, dstInfo) : Any** + + *converter* is a function to convert terminal values of propeerties of *src*. + + **Parameters:** + + | Parameter | Type | Description | + |:------------|:------:|:---------------------------------------------| + | *srcInfo* | object | An object which has informations about the current node of *src*. | + | *dstInfo* | object | An object which has informations about the current node of *dst*. | + + **Return:** + + The converted value to be set as a destination property value. If this value is undefined, the destination property is not set to the destination node object. + + **Type:** *Any* + + * **Properties of srcInfo and dstInfo** + + *srcInfo* and *dstInfo* has same properties, as follows: + + | Property | Type | Description | + |:-----------|:------:|:------------------------------------------| + | *value* | *Any* | The value of the current node. | + | *key* | string | The key name of the current node. | + | *keyChain* | string | The full key of the current node concatenated with dot. | + | *depth* | number | The depth of the current node. | + | *parent* | object | The parent node of the current node. | + + +## License + +Copyright (C) 2016-2021 Gulp Team. + +This program is free software under [MIT][mit-url] License. +See the file LICENSE in this distribution for more details. + +[repo-url]: https://github.com/gulpjs/copy-props/ +[npm-img]: https://img.shields.io/badge/npm-v2.0.5-blue.svg +[npm-url]: https://www.npmjs.org/package/copy-props/ +[mit-img]: https://img.shields.io/badge/license-MIT-green.svg +[mit-url]: https://opensource.org/licenses.MIT +[travis-img]: https://travis-ci.org/gulpjs/copy-props.svg?branch=master +[travis-url]: https://travis-ci.org/gulpjs/copy-props +[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/gulpjs/copy-props?branch=master&svg=true +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/copy-props +[coverage-img]: https://coveralls.io/repos/github/gulpjs/copy-props/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/gulpjs/copy-props?branch=master diff --git a/node_modules/copy-props/index.js b/node_modules/copy-props/index.js new file mode 100644 index 0000000..994807e --- /dev/null +++ b/node_modules/copy-props/index.js @@ -0,0 +1,234 @@ +'use strict'; + +var eachProps = require('each-props'); +var isPlainObject = require('is-plain-object').isPlainObject; + +module.exports = function(src, dst, fromto, converter, reverse) { + + if (!isObject(src)) { + src = {}; + } + + if (!isObject(dst)) { + dst = {}; + } + + if (isPlainObject(fromto)) { + fromto = onlyValueIsString(fromto); + } else if (Array.isArray(fromto)) { + fromto = arrayToObject(fromto); + } else if (typeof fromto === 'boolean') { + reverse = fromto; + converter = noop; + fromto = null; + } else if (typeof fromto === 'function') { + reverse = converter; + converter = fromto; + fromto = null; + } else { + fromto = null; + } + + if (typeof converter !== 'function') { + if (typeof converter === 'boolean') { + reverse = converter; + converter = noop; + } else { + converter = noop; + } + } + + if (typeof reverse !== 'boolean') { + reverse = false; + } + + if (reverse) { + var tmp = src; + src = dst; + dst = tmp; + + if (fromto) { + fromto = invert(fromto); + } + } + + var opts = { + dest: dst, + fromto: fromto, + convert: converter, + }; + + if (fromto) { + eachProps(src, copyWithFromto, opts); + setParentEmptyObject(dst, fromto); + } else { + eachProps(src, copyWithoutFromto, opts); + } + + return dst; +}; + +function copyWithFromto(value, keyChain, nodeInfo) { + if (isPlainObject(value)) { + return; + } + + var dstKeyChains = nodeInfo.fromto[keyChain]; + if (!dstKeyChains) { + return; + } + delete nodeInfo.fromto[keyChain]; + + if (!Array.isArray(dstKeyChains)) { + dstKeyChains = [dstKeyChains]; + } + + var srcInfo = { + keyChain: keyChain, + value: value, + key: nodeInfo.name, + depth: nodeInfo.depth, + parent: nodeInfo.parent, + }; + + for (var i = 0, n = dstKeyChains.length; i < n; i++) { + setDeep(nodeInfo.dest, dstKeyChains[i], function(parent, key, depth) { + var dstInfo = { + keyChain: dstKeyChains[i], + value: parent[key], + key: key, + depth: depth, + parent: parent, + }; + + return nodeInfo.convert(srcInfo, dstInfo); + }); + } +} + +function copyWithoutFromto(value, keyChain, nodeInfo) { + if (isPlainObject(value)) { + for (var k in value) { + return; + } + setDeep(nodeInfo.dest, keyChain, newObject); + return; + } + + var srcInfo = { + keyChain: keyChain, + value: value, + key: nodeInfo.name, + depth: nodeInfo.depth, + parent: nodeInfo.parent, + }; + + setDeep(nodeInfo.dest, keyChain, function(parent, key, depth) { + var dstInfo = { + keyChain: keyChain, + value: parent[key], + key: key, + depth: depth, + parent: parent, + }; + + return nodeInfo.convert(srcInfo, dstInfo); + }); +} + +function newObject() { + return {}; +} + +function noop(srcInfo) { + return srcInfo.value; +} + +function onlyValueIsString(obj) { + var newObj = {}; + for (var key in obj) { + var val = obj[key]; + if (typeof val === 'string') { + newObj[key] = val; + } + } + return newObj; +} + +function arrayToObject(arr) { + var obj = {}; + for (var i = 0, n = arr.length; i < n; i++) { + var elm = arr[i]; + if (typeof elm === 'string') { + obj[elm] = elm; + } + } + return obj; +} + +function invert(fromto) { + var inv = {}; + for (var key in fromto) { + var val = fromto[key]; + if (!inv[val]) { + inv[val] = []; + } + inv[val].push(key); + } + return inv; +} + +function setDeep(obj, keyChain, valueCreator) { + _setDeep(obj, keyChain.split('.'), 1, valueCreator); +} + +function _setDeep(obj, keyElems, depth, valueCreator) { + var key = keyElems.shift(); + if (isPossibilityOfPrototypePollution(key)) { + return; + } + + if (!keyElems.length) { + var value = valueCreator(obj, key, depth); + if (value === undefined) { + return; + } + if (isPlainObject(value)) { // value is always an empty object. + if (isPlainObject(obj[key])) { + return; + } + } + obj[key] = value; + return; + } + + if (!isPlainObject(obj[key])) { + obj[key] = {}; + } + _setDeep(obj[key], keyElems, depth + 1, valueCreator); +} + +function setParentEmptyObject(obj, fromto) { + for (var srcKeyChain in fromto) { + var dstKeyChains = fromto[srcKeyChain]; + if (!Array.isArray(dstKeyChains)) { + dstKeyChains = [dstKeyChains]; + } + + for (var i = 0, n = dstKeyChains.length; i < n; i++) { + setDeep(obj, dstKeyChains[i], newUndefined); + } + } +} + +function newUndefined() { + return undefined; +} + +function isObject(v) { + return Object.prototype.toString.call(v) === '[object Object]'; +} + +function isPossibilityOfPrototypePollution(key) { + return (key === '__proto__' || key === 'constructor'); +} diff --git a/node_modules/copy-props/package.json b/node_modules/copy-props/package.json new file mode 100644 index 0000000..6b2a51e --- /dev/null +++ b/node_modules/copy-props/package.json @@ -0,0 +1,51 @@ +{ + "name": "copy-props", + "version": "2.0.5", + "description": "Copy properties deeply between two objects.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha", + "coverage": "nyc --reporter=lcov --reporter=text-summary npm test", + "coveralls": "nyc --reporter=text-lcov npm test | coveralls", + "web:build": "browserify index.js --standalone copyProps -o web/copy-props.js && cd web && uglifyjs copy-props.js --compress --mangle -o copy-props.min.js --source-map url=copy-props.min.js.map", + "chrome:install": "npm i --no-save mocha-chrome", + "chrome:test": "mocha-chrome test/web/browser-test.html", + "build": "npm run lint && npm run coverage && npm run web:build && node test/web/make.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gulpjs/copy-props.git" + }, + "keywords": [ + "object", + "property", + "copy", + "deep", + "map", + "convert" + ], + "author": "Gulp Team (https://gulpjs.com/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/gulpjs/copy-props/issues" + }, + "homepage": "https://github.com/gulpjs/copy-props#readme", + "dependencies": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + }, + "devDependencies": { + "browserify": "^16.5.2", + "chai": "^3.5.0", + "coveralls": "^3.1.0", + "eslint": "^7.9.0", + "eslint-config-gulp": "^5.0.1", + "mocha": "^3.5.3", + "nyc": "^15.1.0", + "uglify-js": "^3.10.4" + } +} diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000..d8d7f94 --- /dev/null +++ b/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md new file mode 100644 index 0000000..5a76b41 --- /dev/null +++ b/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js new file mode 100644 index 0000000..6e5a20d --- /dev/null +++ b/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// 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. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('buffer').Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json new file mode 100644 index 0000000..b0c51f5 --- /dev/null +++ b/node_modules/core-util-is/package.json @@ -0,0 +1,38 @@ +{ + "name": "core-util-is", + "version": "1.0.3", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "files": [ + "lib" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "scripts": { + "test": "tap test.js", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "devDependencies": { + "tap": "^15.0.9" + } +} diff --git a/node_modules/d/.editorconfig b/node_modules/d/.editorconfig new file mode 100755 index 0000000..cbfa577 --- /dev/null +++ b/node_modules/d/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[{*.md,*.yml}] +indent_size = 2 +indent_style = space diff --git a/node_modules/d/.github/FUNDING.yml b/node_modules/d/.github/FUNDING.yml new file mode 100644 index 0000000..bd80ae6 --- /dev/null +++ b/node_modules/d/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/d" diff --git a/node_modules/d/CHANGELOG.md b/node_modules/d/CHANGELOG.md new file mode 100644 index 0000000..d30cc82 --- /dev/null +++ b/node_modules/d/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [1.0.1](https://github.com/medikoo/d/compare/v0.1.1...v1.0.1) (2019-06-14) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/d/CHANGES b/node_modules/d/CHANGES new file mode 100644 index 0000000..73234d5 --- /dev/null +++ b/node_modules/d/CHANGES @@ -0,0 +1,17 @@ +For recent changelog see CHANGELOG.md + +----- + +v1.0.0 -- 2015.12.04 +- autoBind changes: + - replace `bindTo` argument with options and `resolveContext` option + - Add support `overwriteDefinition` +- Introduce IE11 bug workaround in `lazy` handler + +v0.1.1 -- 2014.04.24 +- Add `autoBind` and `lazy` utilities +- Allow to pass other options to be merged onto created descriptor. + Useful when used with other custom utilties + +v0.1.0 -- 2013.06.20 +Initial (derived from es5-ext project) diff --git a/node_modules/d/LICENSE b/node_modules/d/LICENSE new file mode 100644 index 0000000..44745e2 --- /dev/null +++ b/node_modules/d/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2019, 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/node_modules/d/README.md b/node_modules/d/README.md new file mode 100644 index 0000000..95097d4 --- /dev/null +++ b/node_modules/d/README.md @@ -0,0 +1,134 @@ +# D + +## Property descriptor factory + +_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._ + +Defining properties with descriptors is very verbose: + +```javascript +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + withdraw: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + balance: { + get: function () { + /* ... */ + }, + configurable: true, + enumerable: false + } +}); +``` + +D cuts that to: + +```javascript +var d = require("d"); + +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: d(function () { + /* ... */ + }), + withdraw: d(function () { + /* ... */ + }), + balance: d.gs(function () { + /* ... */ + }) +}); +``` + +By default, created descriptor follow characteristics of native ES5 properties, and defines values as: + +```javascript +{ configurable: true, enumerable: false, writable: true } +``` + +You can overwrite it by preceding _value_ argument with instruction: + +```javascript +d("c", value); // { configurable: true, enumerable: false, writable: false } +d("ce", value); // { configurable: true, enumerable: true, writable: false } +d("e", value); // { configurable: false, enumerable: true, writable: false } + +// Same way for get/set: +d.gs("e", value); // { configurable: false, enumerable: true } +``` + +### Installation + + $ npm install d + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Other utilities + +#### autoBind(obj, props) _(d/auto-bind)_ + +Define methods which will be automatically bound to its instances + +```javascript +var d = require('d'); +var autoBind = require('d/auto-bind'); + +var Foo = function () { this._count = 0; }; +Object.defineProperties(Foo.prototype, autoBind({ + increment: d(function () { ++this._count; }); +})); + +var foo = new Foo(); + +// Increment foo counter on each domEl click +domEl.addEventListener('click', foo.increment, false); +``` + +#### lazy(obj, props) _(d/lazy)_ + +Define lazy properties, which will be resolved on first access + +```javascript +var d = require("d"); +var lazy = require("d/lazy"); + +var Foo = function () {}; +Object.defineProperties(Foo.prototype, lazy({ items: d(function () { return []; }) })); + +var foo = new Foo(); +foo.items.push(1, 2); // foo.items array created and defined directly on foo +``` + +## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d) + + $ npm test + +## 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. + +--- + +
+ + Get professional support for d 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/node_modules/d/auto-bind.js b/node_modules/d/auto-bind.js new file mode 100644 index 0000000..a0037fa --- /dev/null +++ b/node_modules/d/auto-bind.js @@ -0,0 +1,33 @@ +"use strict"; + +var isValue = require("type/value/is") + , ensureValue = require("type/value/ensure") + , ensurePlainFunction = require("type/plain-function/ensure") + , copy = require("es5-ext/object/copy") + , normalizeOptions = require("es5-ext/object/normalize-options") + , map = require("es5-ext/object/map"); + +var bind = Function.prototype.bind + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , define; + +define = function (name, desc, options) { + var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs; + dgs = copy(desc); + delete dgs.writable; + delete dgs.value; + dgs.get = function () { + if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value; + desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this); + defineProperty(this, name, desc); + return this[name]; + }; + return dgs; +}; + +module.exports = function (props/*, options*/) { + var options = normalizeOptions(arguments[1]); + if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext); + return map(props, function (desc, name) { return define(name, desc, options); }); +}; diff --git a/node_modules/d/index.js b/node_modules/d/index.js new file mode 100644 index 0000000..b05448b --- /dev/null +++ b/node_modules/d/index.js @@ -0,0 +1,62 @@ +"use strict"; + +var isValue = require("type/value/is") + , isPlainFunction = require("type/plain-function/is") + , assign = require("es5-ext/object/assign") + , normalizeOpts = require("es5-ext/object/normalize-options") + , contains = require("es5-ext/string/#/contains"); + +var d = (module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if (arguments.length < 2 || typeof dscr !== "string") { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + w = contains.call(dscr, "w"); + } else { + c = w = true; + e = false; + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); +}); + +d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== "string") { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (!isValue(get)) { + get = undefined; + } else if (!isPlainFunction(get)) { + options = get; + get = set = undefined; + } else if (!isValue(set)) { + set = undefined; + } else if (!isPlainFunction(set)) { + options = set; + set = undefined; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + } else { + c = true; + e = false; + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; diff --git a/node_modules/d/lazy.js b/node_modules/d/lazy.js new file mode 100644 index 0000000..bae0d6a --- /dev/null +++ b/node_modules/d/lazy.js @@ -0,0 +1,115 @@ +"use strict"; + +var isPlainFunction = require("type/plain-function/is") + , ensureValue = require("type/value/ensure") + , isValue = require("type/value/is") + , map = require("es5-ext/object/map") + , contains = require("es5-ext/string/#/contains"); + +var call = Function.prototype.call + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getPrototypeOf = Object.getPrototypeOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , cacheDesc = { configurable: false, enumerable: false, writable: false, value: null } + , define; + +define = function (name, options) { + var value, dgs, cacheName, desc, writable = false, resolvable, flat; + options = Object(ensureValue(options)); + cacheName = options.cacheName; + flat = options.flat; + if (!isValue(cacheName)) cacheName = name; + delete options.cacheName; + value = options.value; + resolvable = isPlainFunction(value); + delete options.value; + dgs = { configurable: Boolean(options.configurable), enumerable: Boolean(options.enumerable) }; + if (name !== cacheName) { + dgs.get = function () { + if (hasOwnProperty.call(this, cacheName)) return this[cacheName]; + cacheDesc.value = resolvable ? call.call(value, this, options) : value; + cacheDesc.writable = writable; + defineProperty(this, cacheName, cacheDesc); + cacheDesc.value = null; + if (desc) defineProperty(this, name, desc); + return this[cacheName]; + }; + } else if (!flat) { + dgs.get = function self() { + var ownDesc; + if (hasOwnProperty.call(this, name)) { + ownDesc = getOwnPropertyDescriptor(this, name); + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + // While in IE11 it may happen that here ownDesc is undefined (go figure) + if (ownDesc) { + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + return value; + } + } + desc.value = resolvable ? call.call(value, this, options) : value; + defineProperty(this, name, desc); + desc.value = null; + return this[name]; + }; + } else { + dgs.get = function self() { + var base = this, ownDesc; + if (hasOwnProperty.call(this, name)) { + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + ownDesc = getOwnPropertyDescriptor(this, name); + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + } + while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base); + desc.value = resolvable ? call.call(value, base, options) : value; + defineProperty(base, name, desc); + desc.value = null; + return base[name]; + }; + } + dgs.set = function (value) { + if (hasOwnProperty.call(this, name)) { + throw new TypeError("Cannot assign to lazy defined '" + name + "' property of " + this); + } + dgs.get.call(this); + this[cacheName] = value; + }; + if (options.desc) { + desc = { + configurable: contains.call(options.desc, "c"), + enumerable: contains.call(options.desc, "e") + }; + if (cacheName === name) { + desc.writable = contains.call(options.desc, "w"); + desc.value = null; + } else { + writable = contains.call(options.desc, "w"); + desc.get = dgs.get; + desc.set = dgs.set; + } + delete options.desc; + } else if (cacheName === name) { + desc = { + configurable: Boolean(options.configurable), + enumerable: Boolean(options.enumerable), + writable: Boolean(options.writable), + value: null + }; + } + delete options.configurable; + delete options.enumerable; + delete options.writable; + return dgs; +}; + +module.exports = function (props) { + return map(props, function (desc, name) { return define(name, desc); }); +}; diff --git a/node_modules/d/package.json b/node_modules/d/package.json new file mode 100644 index 0000000..e0370df --- /dev/null +++ b/node_modules/d/package.json @@ -0,0 +1,72 @@ +{ + "name": "d", + "version": "1.0.1", + "description": "Property descriptor factory", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "descriptor", + "es", + "ecmascript", + "ecma", + "property", + "descriptors", + "meta", + "properties" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/d.git" + }, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + }, + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-medikoo": "^2.3.0", + "git-list-updated": "^1.1.2", + "husky": "^2.4.1", + "lint-staged": "^8.2.1", + "prettier-elastic": "^1.18.2", + "tad": "^2.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check-updated": "pipe-git-updated --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}'", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/d/test/auto-bind.js b/node_modules/d/test/auto-bind.js new file mode 100644 index 0000000..993308e --- /dev/null +++ b/node_modules/d/test/auto-bind.js @@ -0,0 +1,11 @@ +"use strict"; + +var d = require("../"); + +module.exports = function (t, a) { + var o = Object.defineProperties( + {}, t({ bar: d(function () { return this === o; }), bar2: d(function () { return this; }) }) + ); + + a.deep([o.bar(), o.bar2()], [true, o]); +}; diff --git a/node_modules/d/test/index.js b/node_modules/d/test/index.js new file mode 100644 index 0000000..43e61a3 --- /dev/null +++ b/node_modules/d/test/index.js @@ -0,0 +1,209 @@ +"use strict"; + +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg, dfs; + + o = Object.create(Object.prototype, { + c: t("c", (c = {})), + cgs: t.gs("c", (cg = function () {}), (cs = function () {})), + ce: t("ce", (ce = {})), + cegs: t.gs("ce", (ceg = function () {}), (ces = function () {})), + cew: t("cew", (cew = {})), + cw: t("cw", (cw = {})), + e: t("e", (e = {})), + egs: t.gs("e", (eg = function () {}), (es = function () {})), + ew: t("ew", (ew = {})), + v: t("", (v = {})), + vgs: t.gs("", (vg = function () {}), (vs = function () {})), + w: t("w", (w = {})), + + df: t((df = {})), + dfgs: t.gs((dfg = function () {}), (dfs = function () {})) + }); + + return { + c: function (a) { + var d = getOwnPropertyDescriptor(o, "c"); + a(d.value, c, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cgs"); + a(d.value, undefined, "GS Value"); + a(d.get, cg, "GS Get"); + a(d.set, cs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ce: function (a) { + var d = getOwnPropertyDescriptor(o, "ce"); + a(d.value, ce, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cegs"); + a(d.value, undefined, "GS Value"); + a(d.get, ceg, "GS Get"); + a(d.set, ces, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + cew: function (a) { + var d = getOwnPropertyDescriptor(o, "cew"); + a(d.value, cew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + cw: function (a) { + var d = getOwnPropertyDescriptor(o, "cw"); + a(d.value, cw, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + e: function (a) { + var d = getOwnPropertyDescriptor(o, "e"); + a(d.value, e, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "egs"); + a(d.value, undefined, "GS Value"); + a(d.get, eg, "GS Get"); + a(d.set, es, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ew: function (a) { + var d = getOwnPropertyDescriptor(o, "ew"); + a(d.value, ew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + v: function (a) { + var d = getOwnPropertyDescriptor(o, "v"); + a(d.value, v, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "vgs"); + a(d.value, undefined, "GS Value"); + a(d.get, vg, "GS Get"); + a(d.set, vs, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + w: function (a) { + var d = getOwnPropertyDescriptor(o, "w"); + a(d.value, w, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + d: function (a) { + var d = getOwnPropertyDescriptor(o, "df"); + a(d.value, df, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + + d = getOwnPropertyDescriptor(o, "dfgs"); + a(d.value, undefined, "GS Value"); + a(d.get, dfg, "GS Get"); + a(d.set, dfs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + Options: { + v: function (a) { + var x = {}, d = t(x, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, writable: true, value: x, foo: true }, + "No descriptor" + ); + d = t("c", "foo", { marko: "elo" }); + a.deep( + d, + { + configurable: true, + enumerable: false, + writable: false, + value: "foo", + marko: "elo" + }, + "Descriptor" + ); + }, + gs: function (a) { + var gFn = function () {}, sFn = function () {}, d; + d = t.gs(gFn, sFn, { foo: true }); + a.deep( + d, { configurable: true, enumerable: false, get: gFn, set: sFn, foo: true }, + "No descriptor" + ); + d = t.gs(null, sFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: undefined, set: sFn, foo: true }, + "No descriptor: Just set" + ); + d = t.gs(gFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: gFn, set: undefined, foo: true }, + "No descriptor: Just get" + ); + + d = t.gs("e", gFn, sFn, { bar: true }); + a.deep( + d, { configurable: false, enumerable: true, get: gFn, set: sFn, bar: true }, + "Descriptor" + ); + d = t.gs("e", null, sFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: undefined, set: sFn, bar: true }, + "Descriptor: Just set" + ); + d = t.gs("e", gFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: gFn, set: undefined, bar: true }, + "Descriptor: Just get" + ); + } + } + }; +}; diff --git a/node_modules/d/test/lazy.js b/node_modules/d/test/lazy.js new file mode 100644 index 0000000..e446dd5 --- /dev/null +++ b/node_modules/d/test/lazy.js @@ -0,0 +1,97 @@ +"use strict"; + +var d = require("../") + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var Foo = function () {}, i = 1, o, o2, desc; + Object.defineProperties( + Foo.prototype, + t({ + bar: d(function () { return ++i; }), + bar2: d(function () { return this.bar + 23; }), + bar3: d(function () { return this.bar2 + 34; }, { desc: "ew" }), + bar4: d(function () { return this.bar3 + 12; }, { cacheName: "_bar4_" }), + bar5: d(function () { return this.bar4 + 3; }, { cacheName: "_bar5_", desc: "e" }) + }) + ); + + desc = getOwnPropertyDescriptor(Foo.prototype, "bar"); + a(desc.configurable, true, "Configurable: default"); + a(desc.enumerable, false, "Enumerable: default"); + + o = new Foo(); + a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74], "Values"); + + a.deep( + getOwnPropertyDescriptor(o, "bar3"), + { configurable: false, enumerable: true, writable: true, value: 59 }, "Desc" + ); + a(o.hasOwnProperty("bar4"), false, "Cache not exposed"); + desc = getOwnPropertyDescriptor(o, "bar5"); + a.deep( + desc, { configurable: false, enumerable: true, get: desc.get, set: desc.set }, + "Cache & Desc: desc" + ); + + o2 = Object.create(o); + o2.bar = 30; + o2.bar3 = 100; + + a.deep( + [o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115], "Extension Values" + ); + + Foo = function () {}; + Object.defineProperties( + Foo.prototype, + t({ + test: d("w", function () { return "raz"; }), + test2: d("", function () { return "raz"; }, { desc: "w" }), + test3: d("", function () { return "raz"; }, { cacheName: "__test3__", desc: "w" }), + test4: d("w", "bar") + }) + ); + + o = new Foo(); + o.test = "marko"; + a.deep( + getOwnPropertyDescriptor(o, "test"), + { configurable: false, enumerable: false, writable: true, value: "marko" }, "Set before get" + ); + o.test2 = "marko2"; + a.deep( + getOwnPropertyDescriptor(o, "test2"), + { configurable: false, enumerable: false, writable: true, value: "marko2" }, + "Set before get: Custom desc" + ); + o.test3 = "marko3"; + a.deep( + getOwnPropertyDescriptor(o, "__test3__"), + { configurable: false, enumerable: false, writable: true, value: "marko3" }, + "Set before get: Custom cache name" + ); + a(o.test4, "bar", "Resolve by value"); + + a.h1("Flat"); + Object.defineProperties( + Foo.prototype, + t({ + flat: d(function () { return "foo"; }, { flat: true }), + flat2: d(function () { return "bar"; }, { flat: true }) + }) + ); + + a.h2("Instance"); + a(o.flat, "foo", "Value"); + a(o.hasOwnProperty("flat"), false, "Instance"); + a(Foo.prototype.flat, "foo", "Prototype"); + + a.h2("Direct"); + a(Foo.prototype.flat2, "bar"); + + a.h2("Reset direct"); + Object.defineProperties(Foo.prototype, t({ testResetDirect: d(false) })); + + a.throws(function () { Foo.prototype.testResetDirect = false; }, TypeError); +}; diff --git a/node_modules/debug/.coveralls.yml b/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000..20a7068 --- /dev/null +++ b/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/debug/.eslintrc b/node_modules/debug/.eslintrc new file mode 100644 index 0000000..8a37ae2 --- /dev/null +++ b/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/node_modules/debug/.npmignore b/node_modules/debug/.npmignore new file mode 100644 index 0000000..5f60eec --- /dev/null +++ b/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/node_modules/debug/.travis.yml b/node_modules/debug/.travis.yml new file mode 100644 index 0000000..6c6090c --- /dev/null +++ b/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000..eadaa18 --- /dev/null +++ b/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(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/node_modules/debug/Makefile b/node_modules/debug/Makefile new file mode 100644 index 0000000..584da8b --- /dev/null +++ b/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 0000000..f67be6b --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,312 @@ +# 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/node_modules/debug/component.json b/node_modules/debug/component.json new file mode 100644 index 0000000..9de2641 --- /dev/null +++ b/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/node_modules/debug/karma.conf.js b/node_modules/debug/karma.conf.js new file mode 100644 index 0000000..103a82d --- /dev/null +++ b/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/node_modules/debug/node.js b/node_modules/debug/node.js new file mode 100644 index 0000000..7fc36fe --- /dev/null +++ b/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 0000000..dc787ba --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,49 @@ +{ + "name": "debug", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + }, + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + } +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 0000000..7106924 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/node_modules/debug/src/debug.js b/node_modules/debug/src/debug.js new file mode 100644 index 0000000..6a5e3fc --- /dev/null +++ b/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 0000000..e12cf4d --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/debug/src/inspector-log.js b/node_modules/debug/src/inspector-log.js new file mode 100644 index 0000000..60ea6c0 --- /dev/null +++ b/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 0000000..b15109c --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js new file mode 100644 index 0000000..8d5bab7 --- /dev/null +++ b/node_modules/decamelize/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function (str, sep) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + sep = typeof sep === 'undefined' ? '_' : sep; + + return str + .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') + .toLowerCase(); +}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/decamelize/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json new file mode 100644 index 0000000..ca35790 --- /dev/null +++ b/node_modules/decamelize/package.json @@ -0,0 +1,38 @@ +{ + "name": "decamelize", + "version": "1.2.0", + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "license": "MIT", + "repository": "sindresorhus/decamelize", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decamelize", + "decamelcase", + "camelcase", + "lowercase", + "case", + "dash", + "hyphen", + "string", + "str", + "text", + "convert" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md new file mode 100644 index 0000000..624c7ee --- /dev/null +++ b/node_modules/decamelize/readme.md @@ -0,0 +1,48 @@ +# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) + +> Convert a camelized string into a lowercased one with a custom separator
+> Example: `unicornRainbow` → `unicorn_rainbow` + + +## Install + +``` +$ npm install --save decamelize +``` + + +## Usage + +```js +const decamelize = require('decamelize'); + +decamelize('unicornRainbow'); +//=> 'unicorn_rainbow' + +decamelize('unicornRainbow', '-'); +//=> 'unicorn-rainbow' +``` + + +## API + +### decamelize(input, [separator]) + +#### input + +Type: `string` + +#### separator + +Type: `string`
+Default: `_` + + +## Related + +See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/decode-uri-component/index.js b/node_modules/decode-uri-component/index.js new file mode 100644 index 0000000..691499b --- /dev/null +++ b/node_modules/decode-uri-component/index.js @@ -0,0 +1,94 @@ +'use strict'; +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp(token, 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return decodeURIComponent(components.join('')); + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher); + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher); + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; diff --git a/node_modules/decode-uri-component/license b/node_modules/decode-uri-component/license new file mode 100644 index 0000000..78b0855 --- /dev/null +++ b/node_modules/decode-uri-component/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/decode-uri-component/package.json b/node_modules/decode-uri-component/package.json new file mode 100644 index 0000000..183bd7c --- /dev/null +++ b/node_modules/decode-uri-component/package.json @@ -0,0 +1,37 @@ +{ + "name": "decode-uri-component", + "version": "0.2.0", + "description": "A better decodeURIComponent", + "license": "MIT", + "repository": "SamVerschueren/decode-uri-component", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "xo && nyc ava", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decode", + "uri", + "component", + "decodeuricomponent", + "components", + "decoder", + "url" + ], + "devDependencies": { + "ava": "^0.17.0", + "coveralls": "^2.13.1", + "nyc": "^10.3.2", + "xo": "^0.16.0" + } +} diff --git a/node_modules/decode-uri-component/readme.md b/node_modules/decode-uri-component/readme.md new file mode 100644 index 0000000..795c87f --- /dev/null +++ b/node_modules/decode-uri-component/readme.md @@ -0,0 +1,70 @@ +# decode-uri-component + +[![Build Status](https://travis-ci.org/SamVerschueren/decode-uri-component.svg?branch=master)](https://travis-ci.org/SamVerschueren/decode-uri-component) [![Coverage Status](https://coveralls.io/repos/SamVerschueren/decode-uri-component/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/decode-uri-component?branch=master) + +> A better [decodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) + + +## Why? + +- Decodes `+` to a space. +- Converts the [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) to a [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) `�`. +- Does not throw with invalid encoded input. +- Decodes as much of the string as possible. + + +## Install + +``` +$ npm install --save decode-uri-component +``` + + +## Usage + +```js +const decodeUriComponent = require('decode-uri-component'); + +decodeUriComponent('%25'); +//=> '%' + +decodeUriComponent('%'); +//=> '%' + +decodeUriComponent('st%C3%A5le'); +//=> 'ståle' + +decodeUriComponent('%st%C3%A5le%'); +//=> '%ståle%' + +decodeUriComponent('%%7Bst%C3%A5le%7D%'); +//=> '%{ståle}%' + +decodeUriComponent('%7B%ab%%7C%de%%7D'); +//=> '{%ab%|%de%}' + +decodeUriComponent('%FE%FF'); +//=> '\uFFFD\uFFFD' + +decodeUriComponent('%C2'); +//=> '\uFFFD' + +decodeUriComponent('%C2%B5'); +//=> 'µ' +``` + + +## API + +### decodeUriComponent(encodedURI) + +#### encodedURI + +Type: `string` + +An encoded component of a Uniform Resource Identifier. + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/node_modules/default-compare/LICENSE b/node_modules/default-compare/LICENSE new file mode 100644 index 0000000..ffb7ec5 --- /dev/null +++ b/node_modules/default-compare/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/default-compare/README.md b/node_modules/default-compare/README.md new file mode 100644 index 0000000..7ca91e4 --- /dev/null +++ b/node_modules/default-compare/README.md @@ -0,0 +1,116 @@ +# default-compare [![NPM version](https://img.shields.io/npm/v/default-compare.svg?style=flat)](https://www.npmjs.com/package/default-compare) [![NPM monthly downloads](https://img.shields.io/npm/dm/default-compare.svg?style=flat)](https://npmjs.org/package/default-compare) [![NPM total downloads](https://img.shields.io/npm/dt/default-compare.svg?style=flat)](https://npmjs.org/package/default-compare) [![Linux Build Status](https://img.shields.io/travis/doowb/default-compare.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/default-compare) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/default-compare.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/default-compare) + +> Basic sort algorithm that has similar behavior to Array.prototype.sort for null and undefined, but also allows sorting by an object property. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save default-compare +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add default-compare +``` + +## Usage + +```js +var defaultCompare = require('default-compare'); +``` + +**basic array** + +```js +var arr = ['c', 'a', undefined, 'b', 'd', null, 'e']; +console.log(arr.sort(defaultCompare)); +//=> ['a', 'b', 'c', 'd', 'e', null, undefined] +``` + +**objects sorted by their "name" property** + +```js +var arr = [ + {name: 'c', title: 'C'}, + {name: 'a', title: 'A'}, + {title: 'G'}, + {name: 'b', title: 'B'}, + {name: 'd', title: 'D'}, + {name: null, title: 'F'}, + {name: 'e', title: 'E'} +]; + +arr.sort(function(a, b) { + return defaultCompare(a, b, 'name'); +}); + +console.log(arr); +//=> [ +//=> {name: 'a', title: 'A'}, +//=> {name: 'b', title: 'B'}, +//=> {name: 'c', title: 'C'}, +//=> {name: 'd', title: 'D'}, +//=> {name: 'e', title: 'E'}, +//=> {name: null, title: 'F'}, +//=> {title: 'G'} +//=> ]; +``` + +## API + +### [defaultCompare](index.js#L16) + +Basic sort algorithm that has similar behavior to `Array.prototype.sort` +for null and undefined, but also allows sorting by an object property. + +**Params** + +* `a` **{Mixed}**: First value to compare. +* `b` **{Mixed}**: Second value to compare. +* `prop` **{String}**: Optional property to use when comparing objects. If specified must be a string. +* `returns` **{Number}**: Returns 1 when `a` should come after `b`, -1 when `a` should come before `b`, and 0 when `a` and `b` are equal. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2017, [Brian Woodward](https://doowb.com). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 11, 2017._ \ No newline at end of file diff --git a/node_modules/default-compare/index.js b/node_modules/default-compare/index.js new file mode 100644 index 0000000..6f05fe5 --- /dev/null +++ b/node_modules/default-compare/index.js @@ -0,0 +1,44 @@ +'use strict'; + +var typeOf = require('kind-of'); + +/** + * Basic sort algorithm that has similar behavior to `Array.prototype.sort` + * for null and undefined, but also allows sorting by an object property. + * + * @param {Mixed} `a` First value to compare. + * @param {Mixed} `b` Second value to compare. + * @param {String} `prop` Optional property to use when comparing objects. If specified must be a string. + * @return {Number} Returns 1 when `a` should come after `b`, -1 when `a` should come before `b`, and 0 when `a` and `b` are equal. + * @api public + */ + +module.exports = function defaultCompare(a, b, prop) { + if (prop != null && typeOf(prop) !== 'string') { + throw new TypeError('expected "prop" to be undefined or a string'); + } + + var typeA = typeOf(a); + var typeB = typeOf(b); + + if (prop) { + if (typeA === 'object') { + a = a[prop]; + typeA = typeOf(a); + } + if (typeB === 'object') { + b = b[prop]; + typeB = typeOf(b); + } + } + + if (typeA === 'null') { + return typeB === 'null' ? 0 : (typeB === 'undefined' ? -1 : 1); + } else if (typeA === 'undefined') { + return typeB === 'null' ? 1 : (typeB === 'undefined' ? 0 : 1); + } else if (typeB === 'null' || typeB === 'undefined') { + return -1; + } else { + return a < b ? -1 : (a > b ? 1 : 0); + } +}; diff --git a/node_modules/default-compare/package.json b/node_modules/default-compare/package.json new file mode 100644 index 0000000..7dbe3f3 --- /dev/null +++ b/node_modules/default-compare/package.json @@ -0,0 +1,46 @@ +{ + "name": "default-compare", + "description": "Basic sort algorithm that has similar behavior to Array.prototype.sort for null and undefined, but also allows sorting by an object property.", + "version": "1.0.0", + "homepage": "https://github.com/doowb/default-compare", + "author": "Brian Woodward (https://doowb.com)", + "repository": "doowb/default-compare", + "bugs": { + "url": "https://github.com/doowb/default-compare/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^5.0.2" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.2" + }, + "keywords": [ + "compare", + "default" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/default-resolution/LICENSE b/node_modules/default-resolution/LICENSE new file mode 100644 index 0000000..9aedc0d --- /dev/null +++ b/node_modules/default-resolution/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall 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/node_modules/default-resolution/README.md b/node_modules/default-resolution/README.md new file mode 100644 index 0000000..0ac2651 --- /dev/null +++ b/node_modules/default-resolution/README.md @@ -0,0 +1,70 @@ +

+ + + +

+ +# default-resolution + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Get the default resolution time based on the current node version, optionally overridable. + +Originally implemented by [@dinoboff][dinoboff] in [gulpjs/undertaker#17][original]. + +Split out for standalone use. + +## Usage + +```js +var defaultResolution = require('default-resolution'); + +defaultResolution(); +//-> 1000 (1 second) in node 0.10 +//-> 1 (millisecond) in node 0.11+ + +// use a different value +defaultResolution(12); +//-> 12 always +``` + +## API + +### `defaultResolution([resolution])` + +Returns the default resolution, based on the node platform. See [Default resolution table][default-table] below for resolutions. + +Optionally takes a resolution number to force override any platform resolutions. + +### Default resolutions + +| node version | resolution | +|--------------|------------| +| 0.10 | 1s | +| 0.11+ | 1ms | + +More information at https://github.com/gulpjs/undertaker/pull/17#issuecomment-82374512 + +# License + +MIT + +[dinoboff]: https://github.com/dinoboff +[original]: https://github.com/gulpjs/undertaker/pull/17 +[default-table]: #default-resolutions + +[downloads-image]: http://img.shields.io/npm/dm/default-resolution.svg +[npm-url]: https://www.npmjs.com/package/default-resolution +[npm-image]: http://img.shields.io/npm/v/default-resolution.svg + +[travis-url]: https://travis-ci.org/gulpjs/default-resolution +[travis-image]: http://img.shields.io/travis/gulpjs/default-resolution.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/default-resolution +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/default-resolution.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/default-resolution +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/default-resolution/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/default-resolution/index.js b/node_modules/default-resolution/index.js new file mode 100644 index 0000000..c485481 --- /dev/null +++ b/node_modules/default-resolution/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var nodeVersion = require('./node-version'); + +function defaultResolution(customResolution) { + var resolution = parseInt(customResolution, 10); + + if (resolution) { + return resolution; + } + + return (nodeVersion.major === 0 && nodeVersion.minor <= 10) ? 1000 : 1; +} + +defaultResolution.nodeVersion = nodeVersion; + +module.exports = defaultResolution; diff --git a/node_modules/default-resolution/node-version.js b/node_modules/default-resolution/node-version.js new file mode 100644 index 0000000..97ebd4a --- /dev/null +++ b/node_modules/default-resolution/node-version.js @@ -0,0 +1,10 @@ +'use strict'; + +var match = process.version.match(/v(\d+)\.(\d+)\.(\d+)/); +var nodeVersion = { + major: parseInt(match[1], 10), + minor: parseInt(match[2], 10), + patch: parseInt(match[3], 10), +}; + +module.exports = nodeVersion; diff --git a/node_modules/default-resolution/package.json b/node_modules/default-resolution/package.json new file mode 100644 index 0000000..43e5661 --- /dev/null +++ b/node_modules/default-resolution/package.json @@ -0,0 +1,43 @@ +{ + "name": "default-resolution", + "version": "2.0.0", + "description": "Get the default resolution time based on the current node version, optionally overridable", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz ", + "Damien Lebrun " + ], + "repository": "gulpjs/default-resolution", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js", + "node-version.js" + ], + "scripts": { + "lint": "eslint . && jscs index.js node-version.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "resolution", + "timing" + ] +} diff --git a/node_modules/define-properties/.editorconfig b/node_modules/define-properties/.editorconfig new file mode 100644 index 0000000..eaa2141 --- /dev/null +++ b/node_modules/define-properties/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc new file mode 100644 index 0000000..4297a97 --- /dev/null +++ b/node_modules/define-properties/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 35 }], + "max-params": [2, 4], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/define-properties/.github/FUNDING.yml b/node_modules/define-properties/.github/FUNDING.yml new file mode 100644 index 0000000..c70f264 --- /dev/null +++ b/node_modules/define-properties/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/define-properties +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/node_modules/define-properties/.nycrc b/node_modules/define-properties/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/define-properties/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md new file mode 100644 index 0000000..9c86b5b --- /dev/null +++ b/node_modules/define-properties/CHANGELOG.md @@ -0,0 +1,63 @@ +1.1.4 / 2022-04-14 +================= + * [Refactor] use `has-property-descriptors` + * [readme] add github actions/codecov badges + * [Docs] fix header parsing; remove testling + * [Deps] update `object-keys` + * [meta] use `prepublishOnly` script for npm 7+ + * [meta] add `funding` field; create FUNDING.yml + * [actions] add "Allow Edits" workflow; automatic rebasing / merge commit blocking + * [actions] reuse common workflows + * [actions] update codecov uploader + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape`; add `aud`, `safe-publish-latest` + +1.1.3 / 2018-08-14 +================= + * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes + * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep + * [Tests] use pretest/posttest for linting/security + * [Tests] fix npm upgrades on older nodes + +1.1.2 / 2015-10-14 +================= + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] Update `object-keys` + * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +1.1.1 / 2015-07-21 +================= + * [Deps] Update `object-keys` + * [Dev Deps] Update `tape`, `eslint` + * [Tests] Test on `io.js` `v2.4` + +1.1.0 / 2015-07-01 +================= + * [New] Add support for symbol-valued properties. + * [Dev Deps] Update `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +1.0.3 / 2015-05-30 +================= + * Using a more reliable check for supported property descriptors. + +1.0.2 / 2015-05-23 +================= + * Test up to `io.js` `v2.0` + * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` + +1.0.1 / 2015-01-06 +================= + * Update `object-keys` to fix ES3 support + +1.0.0 / 2015-01-04 +================= + * v1.0.0 diff --git a/node_modules/define-properties/LICENSE b/node_modules/define-properties/LICENSE new file mode 100644 index 0000000..8c271c1 --- /dev/null +++ b/node_modules/define-properties/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/define-properties/README.md b/node_modules/define-properties/README.md new file mode 100644 index 0000000..650adfa --- /dev/null +++ b/node_modules/define-properties/README.md @@ -0,0 +1,84 @@ +# define-properties [![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] + +Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. +Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. + +## Example + +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2 }, { + a: 10, + b: 20, + c: 30 +}); +assert(obj.a === 1); +assert(obj.b === 2); +assert(obj.c === 30); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'b']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { + configurable: true, + enumerable: false, + value: 30, + writable: false + }); +} +``` + +Then, with predicates: +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2, c: 3 }, { + a: 10, + b: 20, + c: 30 +}, { + a: function () { return false; }, + b: function () { return true; } +}); +assert(obj.a === 1); +assert(obj.b === 20); +assert(obj.c === 3); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'c']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { + configurable: true, + enumerable: false, + value: 20, + writable: false + }); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/define-properties +[npm-version-svg]: https://versionbadg.es/ljharb/define-properties.svg +[deps-svg]: https://david-dm.org/ljharb/define-properties.svg +[deps-url]: https://david-dm.org/ljharb/define-properties +[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/define-properties.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/define-properties.svg +[downloads-url]: https://npm-stat.com/charts.html?package=define-properties +[codecov-image]: https://codecov.io/gh/ljharb/define-properties/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/define-properties/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-properties +[actions-url]: https://github.com/ljharb/define-properties/actions diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js new file mode 100644 index 0000000..453afb9 --- /dev/null +++ b/node_modules/define-properties/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; // eslint-disable-line no-param-reassign + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json new file mode 100644 index 0000000..bb34ff3 --- /dev/null +++ b/node_modules/define-properties/package.json @@ -0,0 +1,66 @@ +{ + "name": "define-properties", + "version": "1.1.4", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs ." + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/define-properties.git" + }, + "keywords": [ + "Object.defineProperty", + "Object.defineProperties", + "object", + "property descriptor", + "descriptor", + "define", + "ES5" + ], + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "eslint": "=8.8.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/define-property/CHANGELOG.md b/node_modules/define-property/CHANGELOG.md new file mode 100644 index 0000000..901c8aa --- /dev/null +++ b/node_modules/define-property/CHANGELOG.md @@ -0,0 +1,82 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [2.0.0] - 2017-04-20 + +### Changed + +- Now supports data descriptors in addition to accessor descriptors. +- Now uses [Reflect.defineProperty][reflect] when available, otherwise falls back to [Object.defineProperty][object]. + +## [1.0.0] - 2017-04-20 + +- stable release + +## [0.2.5] - 2015-08-31 + +- use is-descriptor + +## [0.2.3] - 2015-08-29 + +- check keys length + +## [0.2.2] - 2015-08-27 + +- ensure val is an object + +## [0.2.1] - 2015-08-27 + +- support functions + +## [0.2.0] - 2015-08-27 + +- support get/set +- update docs + +## [0.1.0] - 2015-08-12 + +- first commit + +[2.0.0]: https://github.com/jonschlinkert/define-property/compare/1.0.0...2.0.0 +[1.0.0]: https://github.com/jonschlinkert/define-property/compare/0.2.5...1.0.0 +[0.2.5]: https://github.com/jonschlinkert/define-property/compare/0.2.3...0.2.5 +[0.2.3]: https://github.com/jonschlinkert/define-property/compare/0.2.2...0.2.3 +[0.2.2]: https://github.com/jonschlinkert/define-property/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/jonschlinkert/define-property/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/jonschlinkert/define-property/compare/0.1.3...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + +[object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty +[reflect]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty diff --git a/node_modules/define-property/LICENSE b/node_modules/define-property/LICENSE new file mode 100644 index 0000000..f8de063 --- /dev/null +++ b/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/define-property/README.md b/node_modules/define-property/README.md new file mode 100644 index 0000000..f1ee8f9 --- /dev/null +++ b/node_modules/define-property/README.md @@ -0,0 +1,117 @@ +# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) + +> Define a non-enumerable property on an object. Uses Reflect.defineProperty when available, otherwise Object.defineProperty. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save define-property +``` + +## Release history + +See [the CHANGELOG](changelog.md) for updates. + +## Usage + +**Params** + +* `object`: The object on which to define the property. +* `key`: The name of the property to be defined or modified. +* `value`: The value or descriptor of the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +// by default, defined properties are non-enumberable +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**defining setters/getters** + +Pass the same properties you would if using [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) or [Reflect.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty). + +```js +define(obj, 'foo', { + set: function() {}, + get: function() {} +}); +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 28 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | + +### Author + +**Jon Schlinkert** + +* Connect with me on [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* Follow me on [github/jonschlinkert](https://github.com/jonschlinkert) +* Follow me on [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 25, 2018._ \ No newline at end of file diff --git a/node_modules/define-property/index.js b/node_modules/define-property/index.js new file mode 100644 index 0000000..0efa0a9 --- /dev/null +++ b/node_modules/define-property/index.js @@ -0,0 +1,38 @@ +/*! + * define-property + * + * Copyright (c) 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isobject = require('isobject'); +var isDescriptor = require('is-descriptor'); +var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) + ? Reflect.defineProperty + : Object.defineProperty; + +module.exports = function defineProperty(obj, key, val) { + if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) { + throw new TypeError('expected an object, function, or array'); + } + + if (typeof key !== 'string') { + throw new TypeError('expected "key" to be a string'); + } + + if (isDescriptor(val)) { + define(obj, key, val); + return obj; + } + + define(obj, key, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); + + return obj; +}; diff --git a/node_modules/define-property/package.json b/node_modules/define-property/package.json new file mode 100644 index 0000000..f8fd21c --- /dev/null +++ b/node_modules/define-property/package.json @@ -0,0 +1,67 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object. Uses Reflect.defineProperty when available, otherwise Object.defineProperty.", + "version": "2.0.2", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-deep", + "extend-shallow", + "merge-deep", + "mixin-deep" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/detect-file/LICENSE b/node_modules/detect-file/LICENSE new file mode 100644 index 0000000..42f91ca --- /dev/null +++ b/node_modules/detect-file/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/detect-file/README.md b/node_modules/detect-file/README.md new file mode 100644 index 0000000..dee6311 --- /dev/null +++ b/node_modules/detect-file/README.md @@ -0,0 +1,99 @@ +# detect-file [![NPM version](https://img.shields.io/npm/v/detect-file.svg?style=flat)](https://www.npmjs.com/package/detect-file) [![NPM monthly downloads](https://img.shields.io/npm/dm/detect-file.svg?style=flat)](https://npmjs.org/package/detect-file) [![NPM total downloads](https://img.shields.io/npm/dt/detect-file.svg?style=flat)](https://npmjs.org/package/detect-file) [![Linux Build Status](https://img.shields.io/travis/doowb/detect-file.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/detect-file) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/detect-file.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/detect-file) + +> Detects if a file exists and returns the resolved filepath. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save detect-file +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add detect-file +``` + +## Usage + +```js +var detect = require('detect-file'); +``` + +## API + +### [detect](index.js#L33) + +Detect the given `filepath` if it exists. + +**Params** + +* `filepath` **{String}**: filepath to detect. +* `options` **{Object}**: Additional options. +* `options.nocase` **{Boolean}**: Set this to `true` to force case-insensitive filename checks. This is useful on case sensitive file systems. +* `returns` **{String}**: Returns the detected filepath if it exists, otherwise returns `null`. + +**Example** + +```js +var res = detect('package.json'); +console.log(res); +//=> "package.json" + +var res = detect('fake-file.json'); +console.log(res) +//=> null +``` + +## Case sensitive file systems + +When using the `nocase` option, this library will attempt to detect the filepath with the following methods: + +1. Try to read all files in the `filepath` using `fs.readdirSync`. If successful and `filepath` is a directory, return the `filepath`. +2. Try to read all files in the `filepath`'s directory using `fs.readdirSync`. If successful, do case insensitive comparasions of the `filepath` to the files in `filepath`'s directory. + +## About + +### Related projects + +[fs-exists-sync](https://www.npmjs.com/package/fs-exists-sync): Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences… [more](https://github.com/jonschlinkert/fs-exists-sync) | [homepage](https://github.com/jonschlinkert/fs-exists-sync "Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2017, [Brian Woodward](https://github.com/doowb). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 05, 2017._ \ No newline at end of file diff --git a/node_modules/detect-file/index.js b/node_modules/detect-file/index.js new file mode 100644 index 0000000..c7c47f1 --- /dev/null +++ b/node_modules/detect-file/index.js @@ -0,0 +1,109 @@ +/*! + * detect-file + * + * Copyright (c) 2016-2017, Brian Woodward. + * Released under the MIT License. + */ + +'use strict'; + +var fs = require('fs'); +var path = require('path'); + +/** + * Detect the given `filepath` if it exists. + * + * ```js + * var res = detect('package.json'); + * console.log(res); + * //=> "package.json" + * + * var res = detect('fake-file.json'); + * console.log(res) + * //=> null + * ``` + * + * @param {String} `filepath` filepath to detect. + * @param {Object} `options` Additional options. + * @param {Boolean} `options.nocase` Set this to `true` to force case-insensitive filename checks. This is useful on case sensitive file systems. + * @return {String} Returns the detected filepath if it exists, otherwise returns `null`. + * @api public + */ + +module.exports = function detect(filepath, options) { + if (!filepath || (typeof filepath !== 'string')) { + return null; + } + if (fs.existsSync(filepath)) { + return path.resolve(filepath); + } + + options = options || {}; + if (options.nocase === true) { + return nocase(filepath); + } + return null; +}; + +/** + * Check if the filepath exists by falling back to reading in the entire directory. + * Returns the real filepath (for case sensitive file systems) if found. + * + * @param {String} `filepath` filepath to check. + * @return {String} Returns found filepath if exists, otherwise null. + */ + +function nocase(filepath) { + filepath = path.resolve(filepath); + var res = tryReaddir(filepath); + if (res === null) { + return null; + } + + // "filepath" is a directory, an error would be + // thrown if it doesn't exist. if we're here, it exists + if (res.path === filepath) { + return res.path; + } + + // "filepath" is not a directory + // compare against upper case later + // see https://nodejs.org/en/docs/guides/working-with-different-filesystems/ + var upper = filepath.toUpperCase(); + var len = res.files.length; + var idx = -1; + + while (++idx < len) { + var fp = path.resolve(res.path, res.files[idx]); + if (filepath === fp || upper === fp) { + return fp; + } + var fpUpper = fp.toUpperCase(); + if (filepath === fpUpper || upper === fpUpper) { + return fp; + } + } + + return null; +} + +/** + * Try to read the filepath as a directory first, then fallback to the filepath's dirname. + * + * @param {String} `filepath` path of the directory to read. + * @return {Object} Object containing `path` and `files` if succesful. Otherwise, null. + */ + +function tryReaddir(filepath) { + var ctx = { path: filepath, files: [] }; + try { + ctx.files = fs.readdirSync(filepath); + return ctx; + } catch (err) {} + try { + ctx.path = path.dirname(filepath); + ctx.files = fs.readdirSync(ctx.path); + return ctx; + } catch (err) {} + return null; +} diff --git a/node_modules/detect-file/package.json b/node_modules/detect-file/package.json new file mode 100644 index 0000000..d5b3ed8 --- /dev/null +++ b/node_modules/detect-file/package.json @@ -0,0 +1,60 @@ +{ + "name": "detect-file", + "description": "Detects if a file exists and returns the resolved filepath.", + "version": "1.0.0", + "homepage": "https://github.com/doowb/detect-file", + "author": "Brian Woodward (https://github.com/doowb)", + "repository": "doowb/detect-file", + "bugs": { + "url": "https://github.com/doowb/detect-file/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "*", + "mocha": "*" + }, + "keywords": [ + "detect", + "exists", + "file", + "file exists", + "file-path", + "filepath", + "path", + "resolve", + "resolve file", + "resolve filepath" + ], + "verb": { + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "fs-exists-sync" + ] + }, + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/duplexify/.travis.yml b/node_modules/duplexify/.travis.yml new file mode 100644 index 0000000..cb6e182 --- /dev/null +++ b/node_modules/duplexify/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "4" + - "6" + - "8" + - "10" diff --git a/node_modules/duplexify/LICENSE b/node_modules/duplexify/LICENSE new file mode 100644 index 0000000..757562e --- /dev/null +++ b/node_modules/duplexify/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. \ No newline at end of file diff --git a/node_modules/duplexify/README.md b/node_modules/duplexify/README.md new file mode 100644 index 0000000..8352900 --- /dev/null +++ b/node_modules/duplexify/README.md @@ -0,0 +1,97 @@ +# duplexify + +Turn a writeable and readable stream into a single streams2 duplex stream. + +Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input +and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)` + +``` +npm install duplexify +``` + +[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify) + +## Usage + +Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream) + +``` js +var duplexify = require('duplexify') + +// turn writableStream and readableStream into a single duplex stream +var dup = duplexify(writableStream, readableStream) + +dup.write('hello world') // will write to writableStream +dup.on('data', function(data) { + // will read from readableStream +}) +``` + +You can also set the readable and writable parts asynchronously + +``` js +var dup = duplexify() + +dup.write('hello world') // write will buffer until the writable + // part has been set + +// wait a bit ... +dup.setReadable(readableStream) + +// maybe wait some more? +dup.setWritable(writableStream) +``` + +If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream. +To disable the readable or writable part call `setReadable` or `setWritable` with `null`. + +If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event. +You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an +error object as argument, in which case the error is emitted as part of the `error` event. + +``` js +dup.on('error', function(err) { + console.log('readable or writable emitted an error - close will follow') +}) + +dup.on('close', function() { + console.log('the duplex stream is destroyed') +}) + +dup.destroy() // calls destroy on the readable and writable part (if present) +``` + +## HTTP request example + +Turn a node core http request into a duplex stream is as easy as + +``` js +var duplexify = require('duplexify') +var http = require('http') + +var request = function(opts) { + var req = http.request(opts) + var dup = duplexify(req) + req.on('response', function(res) { + dup.setReadable(res) + }) + return dup +} + +var req = request({ + method: 'GET', + host: 'www.google.com', + port: 80 +}) + +req.end() +req.pipe(process.stdout) +``` + +## License + +MIT + +## Related + +`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/duplexify/example.js b/node_modules/duplexify/example.js new file mode 100644 index 0000000..5585c19 --- /dev/null +++ b/node_modules/duplexify/example.js @@ -0,0 +1,21 @@ +var duplexify = require('duplexify') +var http = require('http') + +var request = function(opts) { + var req = http.request(opts) + var dup = duplexify() + dup.setWritable(req) + req.on('response', function(res) { + dup.setReadable(res) + }) + return dup +} + +var req = request({ + method: 'GET', + host: 'www.google.com', + port: 80 +}) + +req.end() +req.pipe(process.stdout) diff --git a/node_modules/duplexify/index.js b/node_modules/duplexify/index.js new file mode 100644 index 0000000..18634c2 --- /dev/null +++ b/node_modules/duplexify/index.js @@ -0,0 +1,234 @@ +var stream = require('readable-stream') +var eos = require('end-of-stream') +var inherits = require('inherits') +var shift = require('stream-shift') + +var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) + +var onuncork = function(self, fn) { + if (self._corked) self.once('uncork', fn) + else fn() +} + +var autoDestroy = function (self, err) { + if (self._autoDestroy) self.destroy(err) +} + +var destroyer = function(self, end) { + return function(err) { + if (err) autoDestroy(self, err.message === 'premature close' ? null : err) + else if (end && !self._ended) self.end() + } +} + +var end = function(ws, fn) { + if (!ws) return fn() + if (ws._writableState && ws._writableState.finished) return fn() + if (ws._writableState) return ws.end(fn) + ws.end() + fn() +} + +var toStreams2 = function(rs) { + return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) +} + +var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) + stream.Duplex.call(this, opts) + + this._writable = null + this._readable = null + this._readable2 = null + + this._autoDestroy = !opts || opts.autoDestroy !== false + this._forwardDestroy = !opts || opts.destroy !== false + this._forwardEnd = !opts || opts.end !== false + this._corked = 1 // start corked + this._ondrain = null + this._drained = false + this._forwarding = false + this._unwrite = null + this._unread = null + this._ended = false + + this.destroyed = false + + if (writable) this.setWritable(writable) + if (readable) this.setReadable(readable) +} + +inherits(Duplexify, stream.Duplex) + +Duplexify.obj = function(writable, readable, opts) { + if (!opts) opts = {} + opts.objectMode = true + opts.highWaterMark = 16 + return new Duplexify(writable, readable, opts) +} + +Duplexify.prototype.cork = function() { + if (++this._corked === 1) this.emit('cork') +} + +Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) this.emit('uncork') +} + +Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) this._unwrite() + + if (this.destroyed) { + if (writable && writable.destroy) writable.destroy() + return + } + + if (writable === null || writable === false) { + this.end() + return + } + + var self = this + var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) + + var ondrain = function() { + var ondrain = self._ondrain + self._ondrain = null + if (ondrain) ondrain() + } + + var clear = function() { + self._writable.removeListener('drain', ondrain) + unend() + } + + if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks + + this._writable = writable + this._writable.on('drain', ondrain) + this._unwrite = clear + + this.uncork() // always uncork setWritable +} + +Duplexify.prototype.setReadable = function(readable) { + if (this._unread) this._unread() + + if (this.destroyed) { + if (readable && readable.destroy) readable.destroy() + return + } + + if (readable === null || readable === false) { + this.push(null) + this.resume() + return + } + + var self = this + var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) + + var onreadable = function() { + self._forward() + } + + var onend = function() { + self.push(null) + } + + var clear = function() { + self._readable2.removeListener('readable', onreadable) + self._readable2.removeListener('end', onend) + unend() + } + + this._drained = true + this._readable = readable + this._readable2 = readable._readableState ? readable : toStreams2(readable) + this._readable2.on('readable', onreadable) + this._readable2.on('end', onend) + this._unread = clear + + this._forward() +} + +Duplexify.prototype._read = function() { + this._drained = true + this._forward() +} + +Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) return + this._forwarding = true + + var data + + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) continue + this._drained = this.push(data) + } + + this._forwarding = false +} + +Duplexify.prototype.destroy = function(err) { + if (this.destroyed) return + this.destroyed = true + + var self = this + process.nextTick(function() { + self._destroy(err) + }) +} + +Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain + this._ondrain = null + if (ondrain) ondrain(err) + else this.emit('error', err) + } + + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) this._readable.destroy() + if (this._writable && this._writable.destroy) this._writable.destroy() + } + + this.emit('close') +} + +Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) return cb() + if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) + if (data === SIGNAL_FLUSH) return this._finish(cb) + if (!this._writable) return cb() + + if (this._writable.write(data) === false) this._ondrain = cb + else cb() +} + +Duplexify.prototype._finish = function(cb) { + var self = this + this.emit('preend') + onuncork(this, function() { + end(self._forwardEnd && self._writable, function() { + // haxx to not emit prefinish twice + if (self._writableState.prefinished === false) self._writableState.prefinished = true + self.emit('prefinish') + onuncork(self, cb) + }) + }) +} + +Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + this._ended = true + if (data) this.write(data) + if (!this._writableState.ending) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} + +module.exports = Duplexify diff --git a/node_modules/duplexify/package.json b/node_modules/duplexify/package.json new file mode 100644 index 0000000..07effe4 --- /dev/null +++ b/node_modules/duplexify/package.json @@ -0,0 +1,39 @@ +{ + "name": "duplexify", + "version": "3.7.1", + "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input", + "main": "index.js", + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "devDependencies": { + "concat-stream": "^1.5.2", + "tape": "^4.0.0", + "through2": "^2.0.0" + }, + "scripts": { + "test": "tape test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/duplexify" + }, + "keywords": [ + "duplex", + "streams2", + "streams", + "stream", + "writable", + "readable", + "async" + ], + "author": "Mathias Buus", + "license": "MIT", + "bugs": { + "url": "https://github.com/mafintosh/duplexify/issues" + }, + "homepage": "https://github.com/mafintosh/duplexify" +} diff --git a/node_modules/duplexify/test.js b/node_modules/duplexify/test.js new file mode 100644 index 0000000..0074060 --- /dev/null +++ b/node_modules/duplexify/test.js @@ -0,0 +1,295 @@ +var tape = require('tape') +var through = require('through2') +var concat = require('concat-stream') +var net = require('net') +var duplexify = require('./') + +var HELLO_WORLD = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from('hello world') + : new Buffer('hello world') + +tape('passthrough', function(t) { + t.plan(2) + + var pt = through() + var dup = duplexify(pt, pt) + + dup.end('hello world') + dup.on('finish', function() { + t.ok(true, 'should finish') + }) + dup.pipe(concat(function(data) { + t.same(data.toString(), 'hello world', 'same in as out') + })) +}) + +tape('passthrough + double end', function(t) { + t.plan(2) + + var pt = through() + var dup = duplexify(pt, pt) + + dup.end('hello world') + dup.end() + + dup.on('finish', function() { + t.ok(true, 'should finish') + }) + dup.pipe(concat(function(data) { + t.same(data.toString(), 'hello world', 'same in as out') + })) +}) + +tape('async passthrough + end', function(t) { + t.plan(2) + + var pt = through.obj({highWaterMark:1}, function(data, enc, cb) { + setTimeout(function() { + cb(null, data) + }, 100) + }) + + var dup = duplexify(pt, pt) + + dup.write('hello ') + dup.write('world') + dup.end() + + dup.on('finish', function() { + t.ok(true, 'should finish') + }) + dup.pipe(concat(function(data) { + t.same(data.toString(), 'hello world', 'same in as out') + })) +}) + +tape('duplex', function(t) { + var readExpected = ['read-a', 'read-b', 'read-c'] + var writeExpected = ['write-a', 'write-b', 'write-c'] + + t.plan(readExpected.length+writeExpected.length+2) + + var readable = through.obj() + var writable = through.obj(function(data, enc, cb) { + t.same(data, writeExpected.shift(), 'onwrite should match') + cb() + }) + + var dup = duplexify.obj(writable, readable) + + readExpected.slice().forEach(function(data) { + readable.write(data) + }) + readable.end() + + writeExpected.slice().forEach(function(data) { + dup.write(data) + }) + dup.end() + + dup.on('data', function(data) { + t.same(data, readExpected.shift(), 'ondata should match') + }) + dup.on('end', function() { + t.ok(true, 'should end') + }) + dup.on('finish', function() { + t.ok(true, 'should finish') + }) +}) + +tape('async', function(t) { + var dup = duplexify() + var pt = through() + + dup.pipe(concat(function(data) { + t.same(data.toString(), 'i was async', 'same in as out') + t.end() + })) + + dup.write('i') + dup.write(' was ') + dup.end('async') + + setTimeout(function() { + dup.setWritable(pt) + setTimeout(function() { + dup.setReadable(pt) + }, 50) + }, 50) +}) + +tape('destroy', function(t) { + t.plan(2) + + var write = through() + var read = through() + var dup = duplexify(write, read) + + write.destroy = function() { + t.ok(true, 'write destroyed') + } + + dup.on('close', function() { + t.ok(true, 'close emitted') + }) + + dup.destroy() + dup.destroy() // should only work once +}) + +tape('destroy both', function(t) { + t.plan(3) + + var write = through() + var read = through() + var dup = duplexify(write, read) + + write.destroy = function() { + t.ok(true, 'write destroyed') + } + + read.destroy = function() { + t.ok(true, 'read destroyed') + } + + dup.on('close', function() { + t.ok(true, 'close emitted') + }) + + dup.destroy() + dup.destroy() // should only work once +}) + +tape('bubble read errors', function(t) { + t.plan(2) + + var write = through() + var read = through() + var dup = duplexify(write, read) + + dup.on('error', function(err) { + t.same(err.message, 'read-error', 'received read error') + }) + dup.on('close', function() { + t.ok(true, 'close emitted') + }) + + read.emit('error', new Error('read-error')) + write.emit('error', new Error('write-error')) // only emit first error +}) + +tape('bubble write errors', function(t) { + t.plan(2) + + var write = through() + var read = through() + var dup = duplexify(write, read) + + dup.on('error', function(err) { + t.same(err.message, 'write-error', 'received write error') + }) + dup.on('close', function() { + t.ok(true, 'close emitted') + }) + + write.emit('error', new Error('write-error')) + read.emit('error', new Error('read-error')) // only emit first error +}) + +tape('reset writable / readable', function(t) { + t.plan(3) + + var toUpperCase = function(data, enc, cb) { + cb(null, data.toString().toUpperCase()) + } + + var passthrough = through() + var upper = through(toUpperCase) + var dup = duplexify(passthrough, passthrough) + + dup.once('data', function(data) { + t.same(data.toString(), 'hello') + dup.setWritable(upper) + dup.setReadable(upper) + dup.once('data', function(data) { + t.same(data.toString(), 'HELLO') + dup.once('data', function(data) { + t.same(data.toString(), 'HI') + t.end() + }) + }) + dup.write('hello') + dup.write('hi') + }) + dup.write('hello') +}) + +tape('cork', function(t) { + var passthrough = through() + var dup = duplexify(passthrough, passthrough) + var ok = false + + dup.on('prefinish', function() { + dup.cork() + setTimeout(function() { + ok = true + dup.uncork() + }, 100) + }) + dup.on('finish', function() { + t.ok(ok) + t.end() + }) + dup.end() +}) + +tape('prefinish not twice', function(t) { + var passthrough = through() + var dup = duplexify(passthrough, passthrough) + var prefinished = false + + dup.on('prefinish', function() { + t.ok(!prefinished, 'only prefinish once') + prefinished = true + }) + + dup.on('finish', function() { + t.end() + }) + + dup.end() +}) + +tape('close', function(t) { + var passthrough = through() + var dup = duplexify(passthrough, passthrough) + + passthrough.emit('close') + dup.on('close', function() { + t.ok(true, 'should forward close') + t.end() + }) +}) + +tape('works with node native streams (net)', function(t) { + t.plan(1) + + var server = net.createServer(function(socket) { + var dup = duplexify(socket, socket) + + dup.once('data', function(chunk) { + t.same(chunk, HELLO_WORLD) + server.close() + socket.end() + t.end() + }) + }) + + server.listen(0, function () { + var socket = net.connect(server.address().port) + var dup = duplexify(socket, socket) + + dup.write(HELLO_WORLD) + }) +}) diff --git a/node_modules/each-props/LICENSE b/node_modules/each-props/LICENSE new file mode 100644 index 0000000..39223b4 --- /dev/null +++ b/node_modules/each-props/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Takayuki Sato + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/each-props/README.md b/node_modules/each-props/README.md new file mode 100644 index 0000000..4ba167b --- /dev/null +++ b/node_modules/each-props/README.md @@ -0,0 +1,125 @@ +# [each-props][repo-url] [![NPM][npm-img]][npm-url] [![MIT License][mit-img]][mit-url] [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage Status][coverage-img]][coverage-url] + +Processes each properties of an object deeply. + +## Install + +To install from npm: + +```sh +$ npm i each-props --save +``` + +## Load this module + +For Node.js: + +```js +const eachProps = require('each-props'); +``` + +For Web browser: + +```html + +``` + +## Usage + +Apply a function to all (non plain object) properties. + +```js +var obj = { a: 1, b: { c: 'CCC', d: { e: 'EEE' } } }; + +eachProps(obj, function(value, keyChain, nodeInfo) { + if (keyChain === 'a') { + nodeInfo.parent['a'] = value * 2; + } else if (keyChain === 'b.c') { + nodeInfo.parent['c'] = value.toLowerCase(); + } else if (keyChain === 'b.d') { + return true; // stop to dig + } else if (keyChain === 'b.d.e') { + nodeInfo.parent['e'] = value.toLowerCase(); + } +}); + +console.log(obj); +// => { a: 2, b: { c: 'ccc', d: { e: 'EEE' } } }; +``` + +## API + +### eachProps(obj, fn [, opts]) : void + +Executes the *fn* function for all properties. + +#### Parameters: + +| Parameter | Type | Description | +|:------------|:------:|:-----------------------------------------------| +| *obj* | object | A plain object to be treated. | +| *fn* |function| A function to operate each properties. | +| *opts* | object | An object to pass any data to each properties. | + +* **API of *fn* function** + + #### fn(value, keyChain, nodeInfo) : boolean + + This function is applied to all properties in an object. + + ##### Parameters: + + | Parameter | Type | Description | + |:------------|:------:|:-----------------------------------------------| + | *value* | any | A property value. | + | *keyChain* | string | A string concatenating the hierarchical keys with dots. | + | *nodeInfo* | object | An object which contains node informations (See [below](#nodeinfo)). | + + ##### Returns: + + True, if stops digging child properties. + + **Type:** boolean + + + +* **Properties of nodeInfo** + + | Properties | Type | Description | + |:-------------|:------:|:-----------------------------------------| + | *name* | string | The property name of this node. | + | *index* | number | The index of the property among the sibling properties. | + | *count* | number | The count of the sibling properties. | + | *depth* | number | The depth of the property. | + | *parent* | object | The parent node of the property. | + | *sort* |function| A sort function which orders the child properties. This function is inherited from *opts*, if be specified. | + + ... and any properties inherited from *opts*. + +* **Properties of opts** + + | Properties | Type | Description | + |:-------------|:------:|:-----------------------------------------| + | *sort* |function| A sort function which orders the same level properties. (Optional) | + + ... and any properties you want to pass to each node. + +## License + +Copyright (C) 2016-2018 Takayuki Sato + +This program is free software under [MIT][mit-url] License. +See the file LICENSE in this distribution for more details. + +[repo-url]: https://github.com/sttk/each-props/ +[npm-img]: https://img.shields.io/badge/npm-v1.3.2-blue.svg +[npm-url]: https://www.npmjs.org/package/each-props/ +[mit-img]: https://img.shields.io/badge/license-MIT-green.svg +[mit-url]: https://opensource.org/licenses.MIT +[travis-img]: https://travis-ci.org/sttk/each-props.svg?branch=master +[travis-url]: https://travis-ci.org/sttk/each-props +[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/sttk/each-props?branch=master&svg=true +[appveyor-url]: https://ci.appveyor.com/project/sttk/each-props +[coverage-img]: https://coveralls.io/repos/github/sttk/each-props/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/sttk/each-props?branch=master + diff --git a/node_modules/each-props/index.js b/node_modules/each-props/index.js new file mode 100644 index 0000000..ce61aeb --- /dev/null +++ b/node_modules/each-props/index.js @@ -0,0 +1,57 @@ +'use strict'; + +var isPlainObject = require('is-plain-object'); +var defaults = require('object.defaults/immutable'); + +module.exports = function(obj, fn, opts) { + if (!isObject(obj)) { + return; + } + + if (typeof fn !== 'function') { + return; + } + + if (!isPlainObject(opts)) { + opts = {}; + } + + forEachChild(obj, '', fn, 0, opts); +}; + +function forEachChild(node, baseKey, fn, depth, opts) { + var keys = Object.keys(node); + if (typeof opts.sort === 'function') { + var sortedKeys = opts.sort(keys); + if (Array.isArray(sortedKeys)) { + keys = sortedKeys; + } + } + + depth += 1; + + for (var i = 0, n = keys.length; i < n; i++) { + var key = keys[i]; + var keyChain = baseKey + '.' + key; + var value = node[key]; + + var nodeInfo = defaults(opts); + nodeInfo.name = key; + nodeInfo.index = i; + nodeInfo.count = n; + nodeInfo.depth = depth; + nodeInfo.parent = node; + + var notDigg = fn(value, keyChain.slice(1), nodeInfo); + if (notDigg || !isPlainObject(value)) { + continue; + } + + forEachChild(value, keyChain, fn, depth, opts); + } +} + +function isObject(v) { + return Object.prototype.toString.call(v) === '[object Object]'; +} + diff --git a/node_modules/each-props/node_modules/is-plain-object/LICENSE b/node_modules/each-props/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/each-props/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/each-props/node_modules/is-plain-object/README.md b/node_modules/each-props/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/each-props/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/each-props/node_modules/is-plain-object/index.d.ts b/node_modules/each-props/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/each-props/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/each-props/node_modules/is-plain-object/index.js b/node_modules/each-props/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/each-props/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/each-props/node_modules/is-plain-object/package.json b/node_modules/each-props/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/each-props/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/each-props/package.json b/node_modules/each-props/package.json new file mode 100644 index 0000000..d6476e9 --- /dev/null +++ b/node_modules/each-props/package.json @@ -0,0 +1,50 @@ +{ + "name": "each-props", + "version": "1.3.2", + "description": "Processes each properties of an object deeply.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha", + "coverage": "nyc --reporter=lcov --reporter=text-summary npm test", + "coveralls": "nyc --reporter=text-lcov npm test | coveralls", + "web:build": "browserify index.js --standalone eachProps -o web/each-props.js && cd web && uglifyjs each-props.js --compress --mangle -o each-props.min.js --source-map url=each-props.min.js.map", + "chrome:install": "npm i --no-save mocha-chrome", + "chrome:test": "mocha-chrome test/web/browser-test.html", + "build": "npm run lint && npm run coverage && npm run web:build && node test/web/make.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sttk/each-props.git" + }, + "keywords": [ + "deep", + "each", + "object", + "property", + "properties", + "props" + ], + "author": "Takayuki Sato", + "license": "MIT", + "bugs": { + "url": "https://github.com/sttk/each-props/issues" + }, + "homepage": "https://github.com/sttk/each-props#readme", + "dependencies": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + }, + "devDependencies": { + "browserify": "^16.2.2", + "chai": "^3.5.0", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "mocha": "^3.2.0", + "nyc": "^11.7.2", + "uglify-js": "^3.3.24" + } +} diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE new file mode 100644 index 0000000..757562e --- /dev/null +++ b/node_modules/end-of-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. \ No newline at end of file diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md new file mode 100644 index 0000000..857b14b --- /dev/null +++ b/node_modules/end-of-stream/README.md @@ -0,0 +1,54 @@ +# end-of-stream + +A node module that calls a callback when a readable/writable/duplex stream has completed or failed. + + npm install end-of-stream + +[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream) + +## Usage + +Simply pass a stream and a callback to the `eos`. +Both legacy streams, streams2 and stream3 are supported. + +``` js +var eos = require('end-of-stream'); + +eos(readableStream, function(err) { + // this will be set to the stream instance + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended', this === readableStream); +}); + +eos(writableStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished', this === writableStream); +}); + +eos(duplexStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended and finished', this === duplexStream); +}); + +eos(duplexStream, {readable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished but might still be readable'); +}); + +eos(duplexStream, {writable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended but might still be writable'); +}); + +eos(readableStream, {error:false}, function(err) { + // do not treat emit('error', err) as a end-of-stream +}); +``` + +## License + +MIT + +## Related + +`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js new file mode 100644 index 0000000..c77f0d5 --- /dev/null +++ b/node_modules/end-of-stream/index.js @@ -0,0 +1,94 @@ +var once = require('once'); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + process.nextTick(onclosenexttick); + }; + + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json new file mode 100644 index 0000000..b75bbf0 --- /dev/null +++ b/node_modules/end-of-stream/package.json @@ -0,0 +1,37 @@ +{ + "name": "end-of-stream", + "version": "1.4.4", + "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/end-of-stream.git" + }, + "dependencies": { + "once": "^1.4.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "stream", + "streams", + "callback", + "finish", + "close", + "end", + "wait" + ], + "bugs": { + "url": "https://github.com/mafintosh/end-of-stream/issues" + }, + "homepage": "https://github.com/mafintosh/end-of-stream", + "main": "index.js", + "author": "Mathias Buus ", + "license": "MIT", + "devDependencies": { + "tape": "^4.11.0" + } +} diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/error-ex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/error-ex/README.md b/node_modules/error-ex/README.md new file mode 100644 index 0000000..97f744a --- /dev/null +++ b/node_modules/error-ex/README.md @@ -0,0 +1,144 @@ +# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex) +> Easily subclass and customize new Error types + +## Examples +To include in your project: +```javascript +var errorEx = require('error-ex'); +``` + +To create an error message type with a specific name (note, that `ErrorFn.name` +will not reflect this): +```javascript +var JSONError = errorEx('JSONError'); + +var err = new JSONError('error'); +err.name; //-> JSONError +throw err; //-> JSONError: error +``` + +To add a stack line: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')}); + +var err = new JSONError('error') +err.fileName = '/a/b/c/foo.json'; +throw err; //-> (line 2)-> in /a/b/c/foo.json +``` + +To append to the error message: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')}); + +var err = new JSONError('error'); +err.fileName = '/a/b/c/foo.json'; +throw err; //-> JSONError: error in /a/b/c/foo.json +``` + +## API + +#### `errorEx([name], [properties])` +Creates a new ErrorEx error type + +- `name`: the name of the new type (appears in the error message upon throw; + defaults to `Error.name`) +- `properties`: if supplied, used as a key/value dictionary of properties to + use when building up the stack message. Keys are property names that are + looked up on the error message, and then passed to function values. + - `line`: if specified and is a function, return value is added as a stack + entry (error-ex will indent for you). Passed the property value given + the key. + - `stack`: if specified and is a function, passed the value of the property + using the key, and the raw stack lines as a second argument. Takes no + return value (but the stack can be modified directly). + - `message`: if specified and is a function, return value is used as new + `.message` value upon get. Passed the property value of the property named + by key, and the existing message is passed as the second argument as an + array of lines (suitable for multi-line messages). + +Returns a constructor (Function) that can be used just like the regular Error +constructor. + +```javascript +var errorEx = require('error-ex'); + +var BasicError = errorEx(); + +var NamedError = errorEx('NamedError'); + +// -- + +var AdvancedError = errorEx('AdvancedError', { + foo: { + line: function (value, stack) { + if (value) { + return 'bar ' + value; + } + return null; + } + } +} + +var err = new AdvancedError('hello, world'); +err.foo = 'baz'; +throw err; + +/* + AdvancedError: hello, world + bar baz + at tryReadme() (readme.js:20:1) +*/ +``` + +#### `errorEx.line(str)` +Creates a stack line using a delimiter + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to create + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')}); + +var err = new FileError('problem reading file'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + FileError: problem reading file + in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +#### `errorEx.append(str)` +Appends to the `error.message` string + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to append + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')}); + +var err = new SyntaxError('improper indentation'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + SyntaxError: improper indentation in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js new file mode 100644 index 0000000..4fb20b4 --- /dev/null +++ b/node_modules/error-ex/index.js @@ -0,0 +1,141 @@ +'use strict'; + +var util = require('util'); +var isArrayish = require('is-arrayish'); + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +module.exports = errorEx; diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json new file mode 100644 index 0000000..f3d9ae0 --- /dev/null +++ b/node_modules/error-ex/package.json @@ -0,0 +1,46 @@ +{ + "name": "error-ex", + "description": "Easy error subclassing and stack customization", + "version": "1.3.2", + "maintainers": [ + "Josh Junon (github.com/qix-)", + "Sindre Sorhus (sindresorhus.com)" + ], + "keywords": [ + "error", + "errors", + "extend", + "extending", + "extension", + "subclass", + "stack", + "custom" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "xo": { + "rules": { + "operator-linebreak": [ + 0 + ] + } + }, + "repository": "qix-/node-error-ex", + "files": [ + "index.js" + ], + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.7.1" + }, + "dependencies": { + "is-arrayish": "^0.2.1" + } +} diff --git a/node_modules/es5-ext/CHANGELOG.md b/node_modules/es5-ext/CHANGELOG.md new file mode 100644 index 0000000..60bcd02 --- /dev/null +++ b/node_modules/es5-ext/CHANGELOG.md @@ -0,0 +1,389 @@ +# 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. + +### [0.10.62](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.62) (2022-08-02) + +### Maintenance Improvements + +- **Manifest improvements:** + - ([#190](https://github.com/medikoo/es5-ext/issues/190)) ([b8dc53f](https://github.com/medikoo/es5-ext/commit/b8dc53fa439b98541644c64c1275f25d9f2e2235)) + - ([c51d552](https://github.com/medikoo/es5-ext/commit/c51d552c03967858b8f14a4afa305338ba648cce)) + +### [0.10.61](https://github.com/medikoo/es5-ext/compare/v0.10.60...v0.10.61) (2022-04-20) + +### Bug Fixes + +- Ensure postinstall script does not error ([a0be4fd](https://github.com/medikoo/es5-ext/commit/a0be4fdacdbc3aefd6f2952b7b9215827d362bbb)) + +### Maintenance Improvements + +- Bump dependencies ([d7e0a61](https://github.com/medikoo/es5-ext/commit/d7e0a612b7d895c1c7238c779feae1e39d4634c4)) + +### [0.10.60](https://github.com/medikoo/es5-ext/compare/v0.10.59...v0.10.60) (2022-04-07) + +### Maintenance Improvements + +- Improve `postinstall` script configuration ([ab6b121](https://github.com/medikoo/es5-ext/commit/ab6b121f0ca4f033bba9b6f400b24d07869bd716)) + +### [0.10.59](https://github.com/medikoo/es5-ext/compare/v0.10.58...v0.10.59) (2022-03-17) + +### Maintenance Improvements + +- Improve manifest wording ([#122](https://github.com/medikoo/es5-ext/issues/122)) ([eb7ae59](https://github.com/medikoo/es5-ext/commit/eb7ae59966774a8c26f1717415c627d90bb3d954)) +- Update data in manifest ([3d2935a](https://github.com/medikoo/es5-ext/commit/3d2935ac6f1a0969c7569840d5b3bdeed6940e56)) + +### [0.10.58](https://github.com/medikoo/es5-ext/compare/v0.10.57...v0.10.58) (2022-03-11) + +### Maintenance Improvements + +- Improve "call for peace" manifest ([3beace4](https://github.com/medikoo/es5-ext/commit/3beace4b3d00f02da61b72dd328f90cf069d46de)) + +### [0.10.57](https://github.com/medikoo/es5-ext/compare/v0.10.56...v0.10.57) (2022-03-08) + +### Bug Fixes + +- Workaround `postinstall` script prevent npx error ([#110](https://github.com/medikoo/es5-ext/issues/110)) ([e212d5a](https://github.com/medikoo/es5-ext/commit/e212d5a0adf186f1fadf85fdc07aab25085ee097)) ([martindrq](https://github.com/martindrq)) + +### [0.10.56](https://github.com/medikoo/es5-ext/compare/v0.10.55...v0.10.56) (2022-03-07) + +### Maintenance Improvements + +- Add missing shebang to postinstall script ([e423fd7](https://github.com/medikoo/es5-ext/commit/e423fd7264c4f145921e461037d571b35b6a9833)) + +### [0.10.55](https://github.com/medikoo/es5-ext/compare/v0.10.54...v0.10.55) (2022-03-07) + +### Maintenance Improvements + +- Configure `.npmignore` file (exclude tests from publication) ([d3ed4b6](https://github.com/medikoo/es5-ext/commit/d3ed4b6a873900a2abf3957bbebdcf18c4e564e0)) + +### [0.10.54](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.54) (2022-03-07) + +### Maintenance Improvements + +- Convert dependency ranges ([765eb8e](https://github.com/medikoo/es5-ext/commit/765eb8e897cabc76f0351443d84b4843a1187b27)) +- Give Peace a Chance ([28de285](https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2)) + +### [0.10.53](https://github.com/medikoo/es5-ext/compare/v0.10.52...v0.10.53) (2019-11-21) + +_Maintenance improvements_ + +### [0.10.52](https://github.com/medikoo/es5-ext/compare/v0.10.51...v0.10.52) (2019-10-29) + +### Bug Fixes + +- Fix global resolution for Safari ([00731d2](https://github.com/medikoo/es5-ext/commit/00731d2)) +- Keep support for old Node.js versions ([2fa2a11](https://github.com/medikoo/es5-ext/commit/2fa2a11)) + +### [0.10.51](https://github.com/medikoo/es5-ext/compare/v0.10.50...v0.10.51) (2019-08-30) + +### Bug Fixes + +- Ensure Function.isFunction recognizes async functions ([6f06e66](https://github.com/medikoo/es5-ext/commit/6f06e66)) + +### Tests + +- Fix after prettification changes ([dd6fc3f](https://github.com/medikoo/es5-ext/commit/dd6fc3f)) + +## [0.10.50](https://github.com/medikoo/es5-ext/compare/v0.10.49...v0.10.50) (2019-04-30) + +### Bug Fixes + +- maximum time value reference ([708202d](https://github.com/medikoo/es5-ext/commit/708202d)) + +### Features + +- ensure global resolves in strict mode ([c6a19d7](https://github.com/medikoo/es5-ext/commit/c6a19d7)), closes [#86](https://github.com/medikoo/es5-ext/issues/86) + +## [0.10.49](https://github.com/medikoo/es5-ext/compare/v0.10.48...v0.10.49) (2019-03-11) + +### Features + +- allow plain function usage of fn.compose ([2bafef7](https://github.com/medikoo/es5-ext/commit/2bafef7)) + +## [0.10.48](https://github.com/medikoo/es5-ext/compare/v0.10.47...v0.10.48) (2019-02-22) + +### Features + +- Object.ensurePlainObject util ([f48fbcf](https://github.com/medikoo/es5-ext/commit/f48fbcf)) + + + +## [0.10.47](https://github.com/medikoo/es5-ext/compare/v0.10.46...v0.10.47) (2019-01-16) + +### Features + +- Promise.prototype.finally shim ([4dadbc7](https://github.com/medikoo/es5-ext/commit/4dadbc7)) + + + +## [0.10.46](https://github.com/medikoo/es5-ext/compare/v0.10.45...v0.10.46) (2018-08-13) + +### Bug Fixes + +- assign-deep to not modify following arguments ([bf43d57](https://github.com/medikoo/es5-ext/commit/bf43d57)) + + + +## [0.10.45](https://github.com/medikoo/es5-ext/compare/v0.10.44...v0.10.45) (2018-06-01) + +### Bug Fixes + +- improve error message readbility ([adc91b9](https://github.com/medikoo/es5-ext/commit/adc91b9)) + + + +## [0.10.44](https://github.com/medikoo/es5-ext/compare/v0.10.43...v0.10.44) (2018-05-30) + +### Features + +- add Object.entries ([51d2f43](https://github.com/medikoo/es5-ext/commit/51d2f43)) + + + +## [0.10.43](https://github.com/medikoo/es5-ext/compare/v0.10.42...v0.10.43) (2018-05-28) + +### Features + +- improve patch string ([6a25b10](https://github.com/medikoo/es5-ext/commit/6a25b10)) + + + +## [0.10.42](https://github.com/medikoo/es5-ext/compare/v0.10.41...v0.10.42) (2018-03-28) + +### Bug Fixes + +- Date.isDate to exclude NaN dates ([3b61bc6](https://github.com/medikoo/es5-ext/commit/3b61bc6)) + +### Features + +- improve non-coercible string representation ([20bfb78](https://github.com/medikoo/es5-ext/commit/20bfb78)) +- improve non-stringifiable string representation ([2e4512d](https://github.com/medikoo/es5-ext/commit/2e4512d)) + + + +## [0.10.41](https://github.com/medikoo/es5-ext/compare/v0.10.40...v0.10.41) (2018-03-16) + +### Features + +- Add function.microtaskDelay method ([66481c0](https://github.com/medikoo/es5-ext/commit/66481c0)) +- Add Object.isThenable ([8d5a45c](https://github.com/medikoo/es5-ext/commit/8d5a45c)) +- Add promise.asCallback method ([dcc1451](https://github.com/medikoo/es5-ext/commit/dcc1451)) +- Object.ensurePlainFunction ([2682be6](https://github.com/medikoo/es5-ext/commit/2682be6)) + + + +## [0.10.40](https://github.com/medikoo/es5-ext/compare/v0.10.39...v0.10.40) (2018-03-09) + +### Features + +- **math:** decimal round, floor and ceil ([39290c6](https://github.com/medikoo/es5-ext/commit/39290c6)) +- **object:** isInteger and ensureInteger ([a5f7d04](https://github.com/medikoo/es5-ext/commit/a5f7d04)) + + + +## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16) + +### Features + +- Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78)) + + + +## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16) + +### Features + +- Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af)) + + + +## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23) + +### Features + +- String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739)) + + + +## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23) + +### Features + +- **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5)) + + + +## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13) + +### Bug Fixes + +- **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f)) + + + +## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13) + +### Features + +- **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a)) + + + +## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13) + +### Bug Fixes + +- **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d)) + + + +## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13) + +### Features + +- Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b)) + + + +## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09) + +### Features + +- Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a)) + + + +## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25) + +### Bug Fixes + +- value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b)) + + + +## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18) + +### Bug Fixes + +- string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4)) + + + +## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18) + +### Features + +- array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd)) +- improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b)) +- Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341)) +- toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06)) + + + +## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11) + +### Bug Fixes + +- isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e)) + +### Features + +- add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5)) +- add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a)) + + + +## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02) + +### Bug Fixes + +- **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a)) + + + +## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02) + +### Features + +- **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5)) + + + +## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10) + +### Features + +- resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449)) + + + +## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05) + +### Bug Fixes + +- **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0)) +- **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc)) + + + +## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31) + +### Bug Fixes + +- ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900)) + + + +## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22) + +### Features + +- support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e)) + + + +## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17) + +### Features + +- if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef)) +- support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f)) + + + +## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17) + +### Features + +- support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279)) + + + +## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15) + +### Bug Fixes + +- take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12)) + + + +## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15) + +### Features + +- introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45)) +- introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8)) +- introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b)) + + + +## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09) + +### Features + +- add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es5-ext/LICENSE b/node_modules/es5-ext/LICENSE new file mode 100644 index 0000000..7df6b3d --- /dev/null +++ b/node_modules/es5-ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2011-2022, 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/node_modules/es5-ext/README.md b/node_modules/es5-ext/README.md new file mode 100644 index 0000000..56918cf --- /dev/null +++ b/node_modules/es5-ext/README.md @@ -0,0 +1,1039 @@ +[![Build status][build-image]][build-url] +[![Tests coverage][cov-image]][cov-url] +[![npm version][npm-image]][npm-url] + +# es5-ext + +## ECMAScript 5 extensions + +### (with respect to ECMAScript 6 standard) + +Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. + +It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. + +When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. + +### Installation + +```bash +npm install es5-ext +``` + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +#### ECMAScript 6 features + +You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). + +```javascript +require("es5-ext/array/from/implement"); +Array.from("foo"); // ['f', 'o', 'o'] +``` + +You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. + +```javascript +var aFrom = require("es5-ext/array/from"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +If you want to use shim unconditionally (even if native implementation exists) do: + +```javascript +var aFrom = require("es5-ext/array/from/shim"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +##### List of ES6 shims + +It's about properties introduced with ES6 and those that have been updated in new spec. + +- `Array.from` -> `require('es5-ext/array/from')` +- `Array.of` -> `require('es5-ext/array/of')` +- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` +- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` +- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` +- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` +- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` +- `Array.prototype.find` -> `require('es5-ext/array/#/find')` +- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` +- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` +- `Array.prototype.map` -> `require('es5-ext/array/#/map')` +- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` +- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` +- `Array.prototype.values` -> `require('es5-ext/array/#/values')` +- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` +- `Math.acosh` -> `require('es5-ext/math/acosh')` +- `Math.asinh` -> `require('es5-ext/math/asinh')` +- `Math.atanh` -> `require('es5-ext/math/atanh')` +- `Math.cbrt` -> `require('es5-ext/math/cbrt')` +- `Math.clz32` -> `require('es5-ext/math/clz32')` +- `Math.cosh` -> `require('es5-ext/math/cosh')` +- `Math.exmp1` -> `require('es5-ext/math/expm1')` +- `Math.fround` -> `require('es5-ext/math/fround')` +- `Math.hypot` -> `require('es5-ext/math/hypot')` +- `Math.imul` -> `require('es5-ext/math/imul')` +- `Math.log1p` -> `require('es5-ext/math/log1p')` +- `Math.log2` -> `require('es5-ext/math/log2')` +- `Math.log10` -> `require('es5-ext/math/log10')` +- `Math.sign` -> `require('es5-ext/math/sign')` +- `Math.signh` -> `require('es5-ext/math/signh')` +- `Math.tanh` -> `require('es5-ext/math/tanh')` +- `Math.trunc` -> `require('es5-ext/math/trunc')` +- `Number.EPSILON` -> `require('es5-ext/number/epsilon')` +- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` +- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` +- `Number.isFinite` -> `require('es5-ext/number/is-finite')` +- `Number.isInteger` -> `require('es5-ext/number/is-integer')` +- `Number.isNaN` -> `require('es5-ext/number/is-nan')` +- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` +- `Object.assign` -> `require('es5-ext/object/assign')` +- `Object.keys` -> `require('es5-ext/object/keys')` +- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` +- `Promise.prototype.finally` -> `require('es5-ext/promise/#/finally')` +- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` +- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` +- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` +- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` +- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` +- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` +- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` +- `String.raw` -> `require('es5-ext/string/raw')` +- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` +- `String.prototype.contains` -> `require('es5-ext/string/#/contains')` +- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` +- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` +- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` +- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` +- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` + +#### Non ECMAScript standard features + +**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: + +```javascript +Object.defineProperty(Function.prototype, "partial", { + value: require("es5-ext/function/#/partial"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(Array.prototype, "flatten", { + value: require("es5-ext/array/#/flatten"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(String.prototype, "capitalize", { + value: require("es5-ext/string/#/capitalize"), + configurable: true, + enumerable: false, + writable: true +}); +``` + +See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. + +**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of. + +When you're in situation when native extensions are not good idea, then you should use methods indirectly: + +```javascript +var flatten = require("es5-ext/array/#/flatten"); + +flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +for better convenience you can turn methods into functions: + +```javascript +var call = Function.prototype.call; +var flatten = call.bind(require("es5-ext/array/#/flatten")); + +flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application + +```javascript +var util = {}; +util.partial = call.bind(require("es5-ext/function/#/partial")); +util.flatten = call.bind(require("es5-ext/array/#/flatten")); +util.startsWith = call.bind(require("es5-ext/string/#/starts-with")); + +util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +As with native ones most methods are generic and can be run on any type of object. + +## API + +### Global extensions + +#### global _(es5-ext/global)_ + +Object that represents global scope + +### Array Constructor extensions + +#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). +Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. + +#### generate([length[, …fill]]) _(es5-ext/array/generate)_ + +Generate an array of pre-given _length_ built of repeated arguments. + +#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ + +Returns true if object is plain array (not instance of one of the Array's extensions). + +#### of([…items]) _(es5-ext/array/of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). +Create an array from given arguments. + +#### toArray(obj) _(es5-ext/array/to-array)_ + +Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. + +#### validArray(obj) _(es5-ext/array/valid-array)_ + +Returns `obj` if it's an array, otherwise throws `TypeError` + +### Array Prototype extensions + +#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ + +In **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. +It's variant of binary search algorithm + +#### arr.clear() _(es5-ext/array/#/clear)_ + +Clears the array + +#### arr.compact() _(es5-ext/array/#/compact)_ + +Returns a copy of the context with all non-values (`null` or `undefined`) removed. + +#### arr.concat() _(es5-ext/array/#/concat)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). +ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. + +#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ + +Whether list contains the given value. + +#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). + +#### arr.diff(other) _(es5-ext/array/#/diff)_ + +Returns the array of elements that are present in context list but not present in other list. + +#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ + +_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ + +_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.entries() _(es5-ext/array/#/entries)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). +Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. + +#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ + +Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). + +#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). + +#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). +ES6's version of `filter`, returns array of same type as the context. + +#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). +Return first element for which given function returns true + +#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). +Return first index for which given function returns true + +#### arr.first() _(es5-ext/array/#/first)_ + +Returns value for first defined index + +#### arr.firstIndex() _(es5-ext/array/#/first-index)_ + +Returns first declared index of the array + +#### arr.flatten() _(es5-ext/array/#/flatten)_ + +Returns flattened version of the array + +#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ + +`forEach` starting from last element + +#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ + +Group list elements by value returned by _cb_ function + +#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ + +Returns array of all indexes of given value + +#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ + +Computes the array of values that are the intersection of all lists (context list and lists given in arguments) + +#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ + +Returns true if both context and _other_ lists have same content + +#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ + +Returns true if all values in array are unique + +#### arr.keys() _(es5-ext/array/#/keys)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). +Returns iterator object, which traverses all array indexes. + +#### arr.last() _(es5-ext/array/#/last)_ + +Returns value of last defined index + +#### arr.lastIndex() _(es5-ext/array/#/last)_ + +Returns last defined index of the array + +#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). +ES6's version of `map`, returns array of same type as the context. + +#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ + +Remove values from the array + +#### arr.separate(sep) _(es5-ext/array/#/separate)_ + +Returns array with items separated with `sep` value + +#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). +ES6's version of `slice`, returns array of same type as the context. + +#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ + +`some` starting from last element + +#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). +ES6's version of `splice`, returns array of same type as the context. + +#### arr.uniq() _(es5-ext/array/#/uniq)_ + +Returns duplicate-free version of the array + +#### arr.values() _(es5-ext/array/#/values)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). +Returns iterator object which traverses all array values. + +#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). +Returns iterator object which traverses all array values. + +### Boolean Constructor extensions + +#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ + +Whether value is boolean + +### Date Constructor extensions + +#### isDate(x) _(es5-ext/date/is-date)_ + +Whether value is date instance + +#### validDate(x) _(es5-ext/date/valid-date)_ + +If given object is not date throw TypeError in other case return it. + +### Date Prototype extensions + +#### date.copy(date) _(es5-ext/date/#/copy)_ + +Returns a copy of the date object + +#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ + +Returns number of days of date's month + +#### date.floorDay() _(es5-ext/date/#/floor-day)_ + +Sets the date time to 00:00:00.000 + +#### date.floorMonth() _(es5-ext/date/#/floor-month)_ + +Sets date day to 1 and date time to 00:00:00.000 + +#### date.floorYear() _(es5-ext/date/#/floor-year)_ + +Sets date month to 0, day to 1 and date time to 00:00:00.000 + +#### date.format(pattern) _(es5-ext/date/#/format)_ + +Formats date up to given string. Supported patterns: + +- `%Y` - Year with century, 1999, 2003 +- `%y` - Year without century, 99, 03 +- `%m` - Month, 01..12 +- `%d` - Day of the month 01..31 +- `%H` - Hour (24-hour clock), 00..23 +- `%M` - Minute, 00..59 +- `%S` - Second, 00..59 +- `%L` - Milliseconds, 000..999 + +### Error Constructor extensions + +#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_ + +Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) + +#### isError(x) _(es5-ext/error/is-error)_ + +Whether value is an error (instance of `Error`). + +#### validError(x) _(es5-ext/error/valid-error)_ + +If given object is not error throw TypeError in other case return it. + +### Error Prototype extensions + +#### err.throw() _(es5-ext/error/#/throw)_ + +Throws error + +### Function Constructor extensions + +Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### constant(x) _(es5-ext/function/constant)_ + +Returns a constant function that returns pregiven argument + +_k(x)(y) =def x_ + +#### identity(x) _(es5-ext/function/identity)_ + +Identity function. Returns first argument + +_i(x) =def x_ + +#### invoke(name[, …args]) _(es5-ext/function/invoke)_ + +Returns a function that takes an object as an argument, and applies object's +_name_ method to arguments. +_name_ can be name of the method or method itself. + +_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ + +#### isArguments(x) _(es5-ext/function/is-arguments)_ + +Whether value is arguments object + +#### isFunction(arg) _(es5-ext/function/is-function)_ + +Whether value is instance of function + +#### noop() _(es5-ext/function/noop)_ + +No operation function + +#### pluck(name) _(es5-ext/function/pluck)_ + +Returns a function that takes an object, and returns the value of its _name_ +property + +_pluck(name)(obj) =def obj[name]_ + +#### validFunction(arg) _(es5-ext/function/valid-function)_ + +If given object is not function throw TypeError in other case return it. + +### Function Prototype extensions + +Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ + +Applies the functions in reverse argument-list order. + +_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +`compose` can also be used in plain function form as: + +_compose(f1, f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +#### fn.copy() _(es5-ext/function/#/copy)_ + +Produces copy of given function + +#### fn.curry([n]) _(es5-ext/function/#/curry)_ + +Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. +If _n_ is not provided then it defaults to context function length + +_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ + +#### fn.lock([…args]) _(es5-ext/function/#/lock)_ + +Returns a function that applies the underlying function to _args_, and ignores its own arguments. + +_f.lock(…args)(…args2) =def f(…args)_ + +_Named after it's counterpart in Google Closure_ + +#### fn.not() _(es5-ext/function/#/not)_ + +Returns a function that returns boolean negation of value returned by underlying function. + +_f.not()(…args) =def !f(…args)_ + +#### fn.partial([…args]) _(es5-ext/function/#/partial)_ + +Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. + +_f.partial(…args1)(…args2) =def f(…args1, …args2)_ + +#### fn.spread() _(es5-ext/function/#/spread)_ + +Returns a function that applies underlying function with first list argument + +_f.match()(args) =def f.apply(null, args)_ + +#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ + +Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. + +### Math extensions + +#### acosh(x) _(es5-ext/math/acosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). + +#### asinh(x) _(es5-ext/math/asinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). + +#### atanh(x) _(es5-ext/math/atanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). + +#### cbrt(x) _(es5-ext/math/cbrt)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). + +#### clz32(x) _(es5-ext/math/clz32)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). + +#### cosh(x) _(es5-ext/math/cosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). + +#### expm1(x) _(es5-ext/math/expm1)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). + +#### fround(x) _(es5-ext/math/fround)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). + +#### hypot([…values]) _(es5-ext/math/hypot)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). + +#### imul(x, y) _(es5-ext/math/imul)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). + +#### log1p(x) _(es5-ext/math/log1p)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). + +#### log2(x) _(es5-ext/math/log2)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). + +#### log10(x) _(es5-ext/math/log10)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). + +#### sign(x) _(es5-ext/math/sign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). + +#### sinh(x) _(es5-ext/math/sinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). + +#### tanh(x) _(es5-ext/math/tanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). + +#### trunc(x) _(es5-ext/math/trunc)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). + +### Number Constructor extensions + +#### EPSILON _(es5-ext/number/epsilon)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). + +The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. + +#### isFinite(x) _(es5-ext/number/is-finite)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). +Whether value is finite. Differs from global isNaN that it doesn't do type coercion. + +#### isInteger(x) _(es5-ext/number/is-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). +Whether value is integer. + +#### isNaN(x) _(es5-ext/number/is-nan)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). +Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. + +#### isNumber(x) _(es5-ext/number/is-number)_ + +Whether given value is number + +#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). + +#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). +The value of Number.MAX_SAFE_INTEGER is 9007199254740991. + +#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). +The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). + +#### toInteger(x) _(es5-ext/number/to-integer)_ + +Converts value to integer + +#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ + +Converts value to positive integer. If provided value is less than 0, then 0 is returned + +#### toUint32(x) _(es5-ext/number/to-uint32)_ + +Converts value to unsigned 32 bit integer. This type is used for array lengths. +See: http://www.2ality.com/2012/02/js-integers.html + +### Number Prototype extensions + +#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ + +Pad given number with zeros. Returns string + +### Object Constructor extensions + +#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). +Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. + +#### clear(obj) _(es5-ext/object/clear)_ + +Remove all enumerable own properties of the object + +#### compact(obj) _(es5-ext/object/compact)_ + +Returns copy of the object with all enumerable properties that have no falsy values + +#### compare(obj1, obj2) _(es5-ext/object/compare)_ + +Universal cross-type compare function. To be used for e.g. array sort. + +#### copy(obj) _(es5-ext/object/copy)_ + +Returns copy of the object with all enumerable properties. + +#### copyDeep(obj) _(es5-ext/object/copy-deep)_ + +Returns deep copy of the object with all enumerable properties. + +#### count(obj) _(es5-ext/object/count)_ + +Counts number of enumerable own properties on object + +#### create(obj[, properties]) _(es5-ext/object/create)_ + +`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). + +When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. + +It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. + +Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. + +#### eq(x, y) _(es5-ext/object/eq)_ + +Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ + +Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ + +Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. + +#### firstKey(obj) _(es5-ext/object/first-key)_ + +Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. + +#### flatten(obj) _(es5-ext/object/flatten)_ + +Returns new object, with flatten properties of input object + +_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ + +#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ + +Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object +Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### getPropertyNames() _(es5-ext/object/get-property-names)_ + +Get all (not just own) property names of the object + +#### is(x, y) _(es5-ext/object/is)_ + +Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### isArrayLike(x) _(es5-ext/object/is-array-like)_ + +Whether object is array-like object + +#### isCopy(x, y) _(es5-ext/object/is-copy)_ + +Two values are considered a copy of same value when all of their own enumerable properties have same values. + +#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ + +Deep comparision of objects + +#### isEmpty(obj) _(es5-ext/object/is-empty)_ + +True if object doesn't have any own enumerable property + +#### isObject(arg) _(es5-ext/object/is-object)_ + +Whether value is not primitive + +#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ + +Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. + +#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ + +Search object for value + +#### keys(obj) _(es5-ext/object/keys)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). +ES6's version of `keys`, doesn't throw on primitive input + +#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ + +Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. + +#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ + +Create new object with same values, but remapped keys + +#### mixin(target, source) _(es5-ext/object/mixin)_ + +Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). +_It was for a moment part of ECMAScript 6 draft._ + +#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ + +Extends _target_, with all source and source's prototype properties. +Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). + +#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ + +Normalizes options object into flat plain object. + +Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. + +- It never returns input `options` object back (always a copy is created) +- `options` can be undefined in such case empty plain object is returned. +- Copies all enumerable properties found down prototype chain. + +#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ + +Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. + +#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ + +Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator + +#### serialize(value) _(es5-ext/object/serialize)_ + +Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. + +#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). +If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. + +#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ + +Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided +testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ + +Creates an array of results of calling a provided function on every key-value pair in this object. +Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### unserialize(str) _(es5-ext/object/unserialize)_ + +Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) + +#### validCallable(x) _(es5-ext/object/valid-callable)_ + +If given object is not callable throw TypeError in other case return it. + +#### validObject(x) _(es5-ext/object/valid-object)_ + +Throws error if given value is not an object, otherwise it is returned. + +#### validValue(x) _(es5-ext/object/valid-value)_ + +Throws error if given value is `null` or `undefined`, otherwise returns value. + +### Promise Prototype extensions + +#### promise.finally(onFinally) _(es5-ext/promise/#/finally)_ + +[_Introduced with ECMAScript 2018_](https://tc39.github.io/ecma262/#sec-promise.prototype.finally). + +### RegExp Constructor extensions + +#### escape(str) _(es5-ext/reg-exp/escape)_ + +Escapes string to be used in regular expression + +#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ + +Whether object is regular expression + +#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ + +If object is regular expression it is returned, otherwise TypeError is thrown. + +### RegExp Prototype extensions + +#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ + +Whether regular expression has `sticky` flag. + +It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. + +#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ + +Whether regular expression has `unicode` flag. + +It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. + +#### re.match(string) _(es5-ext/reg-exp/#/match)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). + +#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). + +#### re.search(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). + +#### re.split(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). + +#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +### String Constructor extensions + +#### formatMethod(fMap) _(es5-ext/string/format-method)_ + +Creates format method. It's used e.g. to create `Date.prototype.format` method + +#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) + +#### isString(x) _(es5-ext/string/is-string)_ + +Whether object is string + +#### randomUniq() _(es5-ext/string/random-uniq)_ + +Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) + +#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) + +### String Prototype extensions + +#### str.at(pos) _(es5-ext/string/#/at)_ + +_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ + +Returns a string at given position in Unicode-safe manner. +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). + +#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. +Useful when converting names from js property convention into filename convention. + +#### str.capitalize() _(es5-ext/string/#/capitalize)_ + +Capitalize first character of a string + +#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ + +Case insensitive compare + +#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) + +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). + +#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) + +Whether string contains given string. + +#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). +Whether strings ends with given string + +#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ + +Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. +Useful when converting names from filename convention to js property name convention. + +#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ + +Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). + +#### str.last() _(es5-ext/string/#/last)_ + +Return last character + +#### str.normalize([form]) _(es5-ext/string/#/normalize)_ + +[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). +Returns the Unicode Normalization Form of a given string. +Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) + +#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ + +Pad string with _fill_. +If _length_ si given than _fill_ is reapated _length_ times. +If _length_ is negative then pad is applied from right. + +#### str.repeat(n) _(es5-ext/string/#/repeat)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). +Repeat given string _n_ times + +#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). +Whether strings starts with given string + +#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). +Returns iterator object which traverses all string characters (with respect to unicode symbols) + +### Tests + + $ npm test + +## 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. + +## es5-ext for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of es5-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-es5-ext?utm_source=npm-es5-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate/badge.svg +[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate +[cov-image]: https://img.shields.io/codecov/c/github/medikoo/es5-ext.svg +[cov-url]: https://codecov.io/gh/medikoo/es5-ext +[npm-image]: https://img.shields.io/npm/v/es5-ext.svg +[npm-url]: https://www.npmjs.com/package/es5-ext diff --git a/node_modules/es5-ext/_postinstall.js b/node_modules/es5-ext/_postinstall.js new file mode 100755 index 0000000..f11ce4c --- /dev/null +++ b/node_modules/es5-ext/_postinstall.js @@ -0,0 +1,73 @@ +#!/usr/bin/env node + +// Broadcasts "Call for peace" message when package is installed in Russia, otherwise no-op + +"use strict"; + +try { + if ( + [ + "Asia/Anadyr", "Asia/Barnaul", "Asia/Chita", "Asia/Irkutsk", "Asia/Kamchatka", + "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Magadan", "Asia/Novokuznetsk", + "Asia/Novosibirsk", "Asia/Omsk", "Asia/Sakhalin", "Asia/Srednekolymsk", "Asia/Tomsk", + "Asia/Ust-Nera", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", + "Europe/Astrakhan", "Europe/Kaliningrad", "Europe/Kirov", "Europe/Moscow", + "Europe/Samara", "Europe/Saratov", "Europe/Simferopol", "Europe/Ulyanovsk", + "Europe/Volgograd", "W-SU" + ].indexOf(new Intl.DateTimeFormat().resolvedOptions().timeZone) === -1 + ) { + return; + } + + var bold = function (msg) { return "\x1b[97m\x1b[1m" + msg + "\x1b[22m\x1b[37m"; }; + + var flags = function () { + return ( + "🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" + + " 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" + ); + }; + + process._rawDebug( + [ + "", flags(), "", + "\x1b[37m24 февраля " + + bold("Россия напала на Украину") + + ", что уже стало причиной " + + bold("15000+ жертв среди российских военных") + + " и примерно " + + bold("10000+ - среди украинских") + + ", а также " + + bold("5000+ убитых граждан, в том числе 300+ детей") + + ".", + "", + "Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского" + + " вторжения. " + + bold( + "91% украинцев полностью поддерживает своего президента Владимира Зеленского" + ) + + " и его ответные действия на нападение России.", + "", + "Весь мир осудил необоснованное вторжение и решил ввести " + + bold("невиданные ранее санкции против России") + + ". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных" + + " граждан.", + "", + "В то же время, " + + bold("российское правительство ограничивает доступ граждан к внешней информации") + + ", насаждая однобокие формулировки и версии происходящего.", + "", "В качестве надежного источника информации загрузите безопасный браузер Tor:", "", + bold( + "https://forum.torproject.net/t/tor-blocked-in-russia-how-to-circumvent-censorship/982" + ), + "", "И посетите:", "", + bold( + "https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian" + ), + bold("https://www.dwnewsgngmhlplxy6o2twtfgjnrnjxbegbwqx6wnotdhkzt562tszfid.onion/ru/"), + "", flags(), "" + ].join("\n") + ); +} catch (error) { + // ignore +} diff --git a/node_modules/es5-ext/array/#/@@iterator/implement.js b/node_modules/es5-ext/array/#/@@iterator/implement.js new file mode 100644 index 0000000..8073f2b --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/@@iterator/index.js b/node_modules/es5-ext/array/#/@@iterator/index.js new file mode 100644 index 0000000..1d0a389 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype[require("es6-symbol").iterator] + : require("./shim"); diff --git a/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..6445c04 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr[iteratorSymbol] !== "function") return false; + iterator = arr[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/@@iterator/shim.js b/node_modules/es5-ext/array/#/@@iterator/shim.js new file mode 100644 index 0000000..307b1c0 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../values/shim"); diff --git a/node_modules/es5-ext/array/#/_compare-by-length.js b/node_modules/es5-ext/array/#/_compare-by-length.js new file mode 100644 index 0000000..db5a040 --- /dev/null +++ b/node_modules/es5-ext/array/#/_compare-by-length.js @@ -0,0 +1,7 @@ +// Used internally to sort array of lists by length + +"use strict"; + +var toPosInt = require("../../number/to-pos-integer"); + +module.exports = function (arr1, arr2) { return toPosInt(arr1.length) - toPosInt(arr2.length); }; diff --git a/node_modules/es5-ext/array/#/binary-search.js b/node_modules/es5-ext/array/#/binary-search.js new file mode 100644 index 0000000..bdabe27 --- /dev/null +++ b/node_modules/es5-ext/array/#/binary-search.js @@ -0,0 +1,27 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , floor = Math.floor; + +module.exports = function (compareFn) { + var length, low, high, middle; + + value(this); + callable(compareFn); + + length = toPosInt(this.length); + low = 0; + high = length - 1; + + while (low <= high) { + middle = floor((low + high) / 2); + if (compareFn(this[middle]) < 0) high = middle - 1; + else low = middle + 1; + } + + if (high < 0) return 0; + if (high >= length) return length - 1; + return high; +}; diff --git a/node_modules/es5-ext/array/#/clear.js b/node_modules/es5-ext/array/#/clear.js new file mode 100644 index 0000000..fd539c9 --- /dev/null +++ b/node_modules/es5-ext/array/#/clear.js @@ -0,0 +1,12 @@ +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + value(this).length = 0; + return this; +}; diff --git a/node_modules/es5-ext/array/#/compact.js b/node_modules/es5-ext/array/#/compact.js new file mode 100644 index 0000000..462e100 --- /dev/null +++ b/node_modules/es5-ext/array/#/compact.js @@ -0,0 +1,11 @@ +// Inspired by: http://documentcloud.github.com/underscore/#compact + +"use strict"; + +var isValue = require("../../object/is-value"); + +var filter = Array.prototype.filter; + +module.exports = function () { + return filter.call(this, function (val) { return isValue(val); }); +}; diff --git a/node_modules/es5-ext/array/#/concat/implement.js b/node_modules/es5-ext/array/#/concat/implement.js new file mode 100644 index 0000000..714a3c1 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "concat", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/concat/index.js b/node_modules/es5-ext/array/#/concat/index.js new file mode 100644 index 0000000..deac0ee --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.concat : require("./shim"); diff --git a/node_modules/es5-ext/array/#/concat/is-implemented.js b/node_modules/es5-ext/array/#/concat/is-implemented.js new file mode 100644 index 0000000..ba5a154 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().concat("foo") instanceof SubArray; }; diff --git a/node_modules/es5-ext/array/#/concat/shim.js b/node_modules/es5-ext/array/#/concat/shim.js new file mode 100644 index 0000000..e4cfacc --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/shim.js @@ -0,0 +1,44 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , toPosInt = require("../../../number/to-pos-integer") + , isObject = require("../../../object/is-object") + , isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , isArray = Array.isArray + , concat = Array.prototype.concat + , forEach = Array.prototype.forEach + , isSpreadable; + +isSpreadable = function (value) { + if (!value) return false; + if (!isObject(value)) return false; + if (value[isConcatSpreadable] !== undefined) { + return Boolean(value[isConcatSpreadable]); + } + return isArray(value); +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (item /*, …items*/) { + var result; + if (!this || !isArray(this) || isPlainArray(this)) { + return concat.apply(this, arguments); + } + result = new this.constructor(); + if (isSpreadable(this)) { + forEach.call(this, function (val, i) { result[i] = val; }); + } else { + result[0] = this; + } + forEach.call(arguments, function (arg) { + var base; + if (isSpreadable(arg)) { + base = result.length; + result.length += toPosInt(arg.length); + forEach.call(arg, function (val, i) { result[base + i] = val; }); + return; + } + result.push(arg); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/contains.js b/node_modules/es5-ext/array/#/contains.js new file mode 100644 index 0000000..6dda9c4 --- /dev/null +++ b/node_modules/es5-ext/array/#/contains.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (searchElement /*, position*/) { + return indexOf.call(this, searchElement, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/implement.js b/node_modules/es5-ext/array/#/copy-within/implement.js new file mode 100644 index 0000000..4658fcb --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "copyWithin", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/copy-within/index.js b/node_modules/es5-ext/array/#/copy-within/index.js new file mode 100644 index 0000000..37db0ec --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.copyWithin : require("./shim"); diff --git a/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/node_modules/es5-ext/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..40c499e --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5]; + if (typeof arr.copyWithin !== "function") return false; + return String(arr.copyWithin(1, 3)) === "1,4,5,4,5"; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/shim.js b/node_modules/es5-ext/array/#/copy-within/shim.js new file mode 100644 index 0000000..aad220c --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/shim.js @@ -0,0 +1,45 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max + , min = Math.min; + +module.exports = function (target, start /*, end*/) { + var arr = validValue(this) + , end = arguments[2] + , length = toPosInt(arr.length) + , to + , from + , fin + , count + , direction; + + target = toInteger(target); + start = toInteger(start); + end = end === undefined ? length : toInteger(end); + + to = target < 0 ? max(length + target, 0) : min(target, length); + from = start < 0 ? max(length + start, 0) : min(start, length); + fin = end < 0 ? max(length + end, 0) : min(end, length); + count = min(fin - from, length - to); + direction = 1; + + if (from < to && to < from + count) { + direction = -1; + from += count - 1; + to += count - 1; + } + while (count > 0) { + if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from]; + else delete arr[from]; + from += direction; + to += direction; + count -= 1; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/#/diff.js b/node_modules/es5-ext/array/#/diff.js new file mode 100644 index 0000000..002e6a3 --- /dev/null +++ b/node_modules/es5-ext/array/#/diff.js @@ -0,0 +1,11 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , filter = Array.prototype.filter; + +module.exports = function (other) { + value(this); + value(other); + return filter.call(this, function (item) { return !contains.call(other, item); }); +}; diff --git a/node_modules/es5-ext/array/#/e-index-of.js b/node_modules/es5-ext/array/#/e-index-of.js new file mode 100644 index 0000000..8b07011 --- /dev/null +++ b/node_modules/es5-ext/array/#/e-index-of.js @@ -0,0 +1,28 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , indexOf = Array.prototype.indexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, length, fromIndex, val; + if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); + + length = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < length; ++i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/e-last-index-of.js b/node_modules/es5-ext/array/#/e-last-index-of.js new file mode 100644 index 0000000..15dbe05 --- /dev/null +++ b/node_modules/es5-ext/array/#/e-last-index-of.js @@ -0,0 +1,31 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , lastIndexOf = Array.prototype.lastIndexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, fromIndex, val; + if (!numberIsNaN(searchElement)) { + // Jslint: ignore + return lastIndexOf.apply(this, arguments); + } + + value(this); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i >= 0; --i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/entries/implement.js b/node_modules/es5-ext/array/#/entries/implement.js new file mode 100644 index 0000000..b89ce44 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "entries", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/entries/index.js b/node_modules/es5-ext/array/#/entries/index.js new file mode 100644 index 0000000..e7588f7 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.entries : require("./shim"); diff --git a/node_modules/es5-ext/array/#/entries/is-implemented.js b/node_modules/es5-ext/array/#/entries/is-implemented.js new file mode 100644 index 0000000..335f1c2 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.entries !== "function") return false; + iterator = arr.entries(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result || !result.value) return false; + if (result.value[0] !== 0) return false; + if (result.value[1] !== 1) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/entries/shim.js b/node_modules/es5-ext/array/#/entries/shim.js new file mode 100644 index 0000000..f47af86 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "key+value"); }; diff --git a/node_modules/es5-ext/array/#/exclusion.js b/node_modules/es5-ext/array/#/exclusion.js new file mode 100644 index 0000000..4e9e71d --- /dev/null +++ b/node_modules/es5-ext/array/#/exclusion.js @@ -0,0 +1,25 @@ +"use strict"; + +var value = require("../../object/valid-value") + , aFrom = require("../from") + , toArray = require("../to-array") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push; + +module.exports = function (/* …lists*/) { + var lists, seen, result; + if (!arguments.length) return aFrom(this); + push.apply((lists = [this]), arguments); + lists.forEach(value); + seen = []; + result = []; + lists.sort(byLength).forEach(function (list) { + result = result + .filter(function (item) { return !contains.call(list, item); }) + .concat(filter.call(list, function (item) { return !contains.call(seen, item); })); + push.apply(seen, toArray(list)); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/fill/implement.js b/node_modules/es5-ext/array/#/fill/implement.js new file mode 100644 index 0000000..0efad16 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "fill", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/fill/index.js b/node_modules/es5-ext/array/#/fill/index.js new file mode 100644 index 0000000..6a66ae1 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim"); diff --git a/node_modules/es5-ext/array/#/fill/is-implemented.js b/node_modules/es5-ext/array/#/fill/is-implemented.js new file mode 100644 index 0000000..5d6d02e --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.fill !== "function") return false; + return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1"; +}; diff --git a/node_modules/es5-ext/array/#/fill/shim.js b/node_modules/es5-ext/array/#/fill/shim.js new file mode 100644 index 0000000..0040bf8 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/shim.js @@ -0,0 +1,25 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , max = Math.max + , min = Math.min; + +module.exports = function (value /*, start, end*/) { + var arr = validValue(this) + , start = arguments[1] + , end = arguments[2] + , length = toPosInt(arr.length) + , relativeStart + , i; + + start = start === undefined ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + + relativeStart = start < 0 ? max(length + start, 0) : min(start, length); + for (i = relativeStart; i < length && i < end; ++i) arr[i] = value; + return arr; +}; diff --git a/node_modules/es5-ext/array/#/filter/implement.js b/node_modules/es5-ext/array/#/filter/implement.js new file mode 100644 index 0000000..76f4a5e --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "filter", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/filter/index.js b/node_modules/es5-ext/array/#/filter/index.js new file mode 100644 index 0000000..9a25c9b --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.filter : require("./shim"); diff --git a/node_modules/es5-ext/array/#/filter/is-implemented.js b/node_modules/es5-ext/array/#/filter/is-implemented.js new file mode 100644 index 0000000..6082513 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe") + , pass = function () { return true; }; + +module.exports = function () { return new SubArray().filter(pass) instanceof SubArray; }; diff --git a/node_modules/es5-ext/array/#/filter/shim.js b/node_modules/es5-ext/array/#/filter/shim.js new file mode 100644 index 0000000..38304e4 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , filter = Array.prototype.filter + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return filter.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(); + i = 0; + forEach.call(this, function (val, j, self) { + if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/find-index/implement.js b/node_modules/es5-ext/array/#/find-index/implement.js new file mode 100644 index 0000000..4e14e29 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "findIndex", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/find-index/index.js b/node_modules/es5-ext/array/#/find-index/index.js new file mode 100644 index 0000000..5e07d8d --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.findIndex : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find-index/is-implemented.js b/node_modules/es5-ext/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..72aa28f --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var fn = function (value) { return value > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.findIndex !== "function") return false; + return arr.findIndex(fn) === 3; +}; diff --git a/node_modules/es5-ext/array/#/find-index/shim.js b/node_modules/es5-ext/array/#/find-index/shim.js new file mode 100644 index 0000000..bc82827 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var callable = require("../../../object/valid-callable") + , ensureValue = require("../../../object/valid-value") + , some = Array.prototype.some + , apply = Function.prototype.apply; + +module.exports = function (predicate /*, thisArg*/) { + var k, self; + self = Object(ensureValue(this)); + callable(predicate); + + return some.call( + self, + function (value, index) { + if (apply.call(predicate, this, arguments)) { + k = index; + return true; + } + return false; + }, + arguments[1] + ) + ? k + : -1; +}; diff --git a/node_modules/es5-ext/array/#/find/implement.js b/node_modules/es5-ext/array/#/find/implement.js new file mode 100644 index 0000000..66035a5 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "find", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/find/index.js b/node_modules/es5-ext/array/#/find/index.js new file mode 100644 index 0000000..2f9d0d6 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.find : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find/is-implemented.js b/node_modules/es5-ext/array/#/find/is-implemented.js new file mode 100644 index 0000000..8fdacb1 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var fn = function (value) { return value > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.find !== "function") return false; + return arr.find(fn) === 4; +}; diff --git a/node_modules/es5-ext/array/#/find/shim.js b/node_modules/es5-ext/array/#/find/shim.js new file mode 100644 index 0000000..c45a938 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +var findIndex = require("../find-index/shim"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (predicate /*, thisArg*/) { + var index = findIndex.apply(this, arguments); + return index === -1 ? undefined : this[index]; +}; diff --git a/node_modules/es5-ext/array/#/first-index.js b/node_modules/es5-ext/array/#/first-index.js new file mode 100644 index 0000000..19bff54 --- /dev/null +++ b/node_modules/es5-ext/array/#/first-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = 0; + while (!objHasOwnProperty.call(this, i)) { + if (++i === length) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/first.js b/node_modules/es5-ext/array/#/first.js new file mode 100644 index 0000000..ca76833 --- /dev/null +++ b/node_modules/es5-ext/array/#/first.js @@ -0,0 +1,9 @@ +"use strict"; + +var firstIndex = require("./first-index"); + +module.exports = function () { + var i; + if ((i = firstIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/flatten.js b/node_modules/es5-ext/array/#/flatten.js new file mode 100644 index 0000000..4016727 --- /dev/null +++ b/node_modules/es5-ext/array/#/flatten.js @@ -0,0 +1,40 @@ +// Stack grow safe implementation + +"use strict"; + +var ensureValue = require("../../object/valid-value") + , isArray = Array.isArray + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = []; + // Jslint: ignore + main: while (input) { + length = input.length; + for (i = index; i < length; ++i) { + if (!objHasOwnProperty.call(input, i)) continue; + if (isArray(input[i])) { + if (i < length - 1) { + // eslint-disable-next-line max-depth + if (!remaining) { + remaining = []; + remainingIndexes = []; + } + remaining.push(input); + remainingIndexes.push(i + 1); + } + input = input[i]; + index = 0; + continue main; + } + result.push(input[i]); + } + if (remaining) { + input = remaining.pop(); + index = remainingIndexes.pop(); + } else { + input = null; + } + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/for-each-right.js b/node_modules/es5-ext/array/#/for-each-right.js new file mode 100644 index 0000000..ebf076b --- /dev/null +++ b/node_modules/es5-ext/array/#/for-each-right.js @@ -0,0 +1,19 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); + } +}; diff --git a/node_modules/es5-ext/array/#/group.js b/node_modules/es5-ext/array/#/group.js new file mode 100644 index 0000000..711eb58 --- /dev/null +++ b/node_modules/es5-ext/array/#/group.js @@ -0,0 +1,28 @@ +// Inspired by Underscore's groupBy: +// http://documentcloud.github.com/underscore/#groupBy + +"use strict"; + +var callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , forEach = Array.prototype.forEach + , apply = Function.prototype.apply; + +module.exports = function (cb /*, thisArg*/) { + var result; + + value(this); + callable(cb); + + result = Object.create(null); + forEach.call( + this, + function (item) { + var key = apply.call(cb, this, arguments); + if (!result[key]) result[key] = []; + result[key].push(item); + }, + arguments[1] + ); + return result; +}; diff --git a/node_modules/es5-ext/array/#/index.js b/node_modules/es5-ext/array/#/index.js new file mode 100644 index 0000000..596e83b --- /dev/null +++ b/node_modules/es5-ext/array/#/index.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "binarySearch": require("./binary-search"), + "clear": require("./clear"), + "compact": require("./compact"), + "concat": require("./concat"), + "contains": require("./contains"), + "copyWithin": require("./copy-within"), + "diff": require("./diff"), + "eIndexOf": require("./e-index-of"), + "eLastIndexOf": require("./e-last-index-of"), + "entries": require("./entries"), + "exclusion": require("./exclusion"), + "fill": require("./fill"), + "filter": require("./filter"), + "find": require("./find"), + "findIndex": require("./find-index"), + "first": require("./first"), + "firstIndex": require("./first-index"), + "flatten": require("./flatten"), + "forEachRight": require("./for-each-right"), + "keys": require("./keys"), + "group": require("./group"), + "indexesOf": require("./indexes-of"), + "intersection": require("./intersection"), + "isCopy": require("./is-copy"), + "isEmpty": require("./is-empty"), + "isUniq": require("./is-uniq"), + "last": require("./last"), + "lastIndex": require("./last-index"), + "map": require("./map"), + "remove": require("./remove"), + "separate": require("./separate"), + "slice": require("./slice"), + "someRight": require("./some-right"), + "splice": require("./splice"), + "uniq": require("./uniq"), + "values": require("./values") +}; diff --git a/node_modules/es5-ext/array/#/indexes-of.js b/node_modules/es5-ext/array/#/indexes-of.js new file mode 100644 index 0000000..6c39cd9 --- /dev/null +++ b/node_modules/es5-ext/array/#/indexes-of.js @@ -0,0 +1,12 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (value /*, fromIndex*/) { + var result = [], i, fromIndex = arguments[1]; + while ((i = indexOf.call(this, value, fromIndex)) !== -1) { + result.push(i); + fromIndex = i + 1; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/intersection.js b/node_modules/es5-ext/array/#/intersection.js new file mode 100644 index 0000000..7dca9dc --- /dev/null +++ b/node_modules/es5-ext/array/#/intersection.js @@ -0,0 +1,19 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push + , slice = Array.prototype.slice; + +module.exports = function (/* …list*/) { + var lists; + if (!arguments.length) slice.call(this); + push.apply((lists = [this]), arguments); + lists.forEach(value); + lists.sort(byLength); + return lists.reduce(function (list1, list2) { + return filter.call(list1, function (item) { return contains.call(list2, item); }); + }); +}; diff --git a/node_modules/es5-ext/array/#/is-copy.js b/node_modules/es5-ext/array/#/is-copy.js new file mode 100644 index 0000000..1413b95 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-copy.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , eq = require("../../object/eq") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (other) { + var i, length; + value(this); + value(other); + length = toPosInt(this.length); + if (length !== toPosInt(other.length)) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) { + return false; + } + if (!eq(this[i], other[i])) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/array/#/is-empty.js b/node_modules/es5-ext/array/#/is-empty.js new file mode 100644 index 0000000..9b336fe --- /dev/null +++ b/node_modules/es5-ext/array/#/is-empty.js @@ -0,0 +1,6 @@ +"use strict"; + +var ensureArray = require("../../object/ensure-array") + , firstIndex = require("./first-index"); + +module.exports = function () { return firstIndex.call(ensureArray(this)) === null; }; diff --git a/node_modules/es5-ext/array/#/is-uniq.js b/node_modules/es5-ext/array/#/is-uniq.js new file mode 100644 index 0000000..75f7734 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-uniq.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , every = Array.prototype.every + , isFirst; + +isFirst = function (value, index) { return indexOf.call(this, value) === index; }; + +module.exports = function () { return every.call(this, isFirst, this); }; diff --git a/node_modules/es5-ext/array/#/keys/implement.js b/node_modules/es5-ext/array/#/keys/implement.js new file mode 100644 index 0000000..101a5e3 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "keys", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/keys/index.js b/node_modules/es5-ext/array/#/keys/index.js new file mode 100644 index 0000000..c8753e5 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.keys : require("./shim"); diff --git a/node_modules/es5-ext/array/#/keys/is-implemented.js b/node_modules/es5-ext/array/#/keys/is-implemented.js new file mode 100644 index 0000000..70a171f --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.keys !== "function") return false; + iterator = arr.keys(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 0) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/keys/shim.js b/node_modules/es5-ext/array/#/keys/shim.js new file mode 100644 index 0000000..8136cdc --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "key"); }; diff --git a/node_modules/es5-ext/array/#/last-index.js b/node_modules/es5-ext/array/#/last-index.js new file mode 100644 index 0000000..74aaba4 --- /dev/null +++ b/node_modules/es5-ext/array/#/last-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = length - 1; + while (!objHasOwnProperty.call(this, i)) { + if (--i === -1) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/last.js b/node_modules/es5-ext/array/#/last.js new file mode 100644 index 0000000..38bb359 --- /dev/null +++ b/node_modules/es5-ext/array/#/last.js @@ -0,0 +1,9 @@ +"use strict"; + +var lastIndex = require("./last-index"); + +module.exports = function () { + var i; + if ((i = lastIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/map/implement.js b/node_modules/es5-ext/array/#/map/implement.js new file mode 100644 index 0000000..42e0b47 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "map", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/map/index.js b/node_modules/es5-ext/array/#/map/index.js new file mode 100644 index 0000000..49e0267 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.map : require("./shim"); diff --git a/node_modules/es5-ext/array/#/map/is-implemented.js b/node_modules/es5-ext/array/#/map/is-implemented.js new file mode 100644 index 0000000..f09bd7d --- /dev/null +++ b/node_modules/es5-ext/array/#/map/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +var identity = require("../../../function/identity") + , SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().map(identity) instanceof SubArray; }; diff --git a/node_modules/es5-ext/array/#/map/shim.js b/node_modules/es5-ext/array/#/map/shim.js new file mode 100644 index 0000000..6e935d3 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/shim.js @@ -0,0 +1,22 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , map = Array.prototype.map + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg; + if (!this || !isArray(this) || isPlainArray(this)) { + return map.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(this.length); + forEach.call(this, function (val, i, self) { + result[i] = call.call(callbackFn, thisArg, val, i, self); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/remove.js b/node_modules/es5-ext/array/#/remove.js new file mode 100644 index 0000000..6a8a086 --- /dev/null +++ b/node_modules/es5-ext/array/#/remove.js @@ -0,0 +1,17 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , forEach = Array.prototype.forEach + , splice = Array.prototype.splice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (itemToRemove /*, …item*/) { + forEach.call( + arguments, + function (item) { + var index = indexOf.call(this, item); + if (index !== -1) splice.call(this, index, 1); + }, + this + ); +}; diff --git a/node_modules/es5-ext/array/#/separate.js b/node_modules/es5-ext/array/#/separate.js new file mode 100644 index 0000000..248662f --- /dev/null +++ b/node_modules/es5-ext/array/#/separate.js @@ -0,0 +1,10 @@ +"use strict"; + +var forEach = Array.prototype.forEach; + +module.exports = function (sep) { + var result = []; + forEach.call(this, function (val) { result.push(val, sep); }); + result.pop(); + return result; +}; diff --git a/node_modules/es5-ext/array/#/slice/implement.js b/node_modules/es5-ext/array/#/slice/implement.js new file mode 100644 index 0000000..113d34d --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "slice", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/slice/index.js b/node_modules/es5-ext/array/#/slice/index.js new file mode 100644 index 0000000..716b7e0 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.slice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/slice/is-implemented.js b/node_modules/es5-ext/array/#/slice/is-implemented.js new file mode 100644 index 0000000..4c83bfa --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().slice() instanceof SubArray; }; diff --git a/node_modules/es5-ext/array/#/slice/shim.js b/node_modules/es5-ext/array/#/slice/shim.js new file mode 100644 index 0000000..ff13085 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/shim.js @@ -0,0 +1,36 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , slice = Array.prototype.slice + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max; + +module.exports = function (start, end) { + var length, result, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return slice.apply(this, arguments); + } + length = toPosInt(this.length); + start = toInteger(start); + if (start < 0) start = max(length + start, 0); + else if (start > length) start = length; + if (end === undefined) { + end = length; + } else { + end = toInteger(end); + if (end < 0) end = max(length + end, 0); + else if (end > length) end = length; + } + if (start > end) start = end; + result = new this.constructor(end - start); + i = 0; + while (start !== end) { + if (objHasOwnProperty.call(this, start)) result[i] = this[start]; + ++i; + ++start; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/some-right.js b/node_modules/es5-ext/array/#/some-right.js new file mode 100644 index 0000000..d9a665f --- /dev/null +++ b/node_modules/es5-ext/array/#/some-right.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) { + return true; + } + } + return false; +}; diff --git a/node_modules/es5-ext/array/#/splice/implement.js b/node_modules/es5-ext/array/#/splice/implement.js new file mode 100644 index 0000000..236b1cb --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "splice", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/splice/index.js b/node_modules/es5-ext/array/#/splice/index.js new file mode 100644 index 0000000..cd5c3ec --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.splice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/splice/is-implemented.js b/node_modules/es5-ext/array/#/splice/is-implemented.js new file mode 100644 index 0000000..085cba5 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().splice(0) instanceof SubArray; }; diff --git a/node_modules/es5-ext/array/#/splice/shim.js b/node_modules/es5-ext/array/#/splice/shim.js new file mode 100644 index 0000000..fe1f8c2 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , splice = Array.prototype.splice + , forEach = Array.prototype.forEach; + +// eslint-disable-next-line no-unused-vars +module.exports = function (start, deleteCount /*, …items*/) { + var arr = splice.apply(this, arguments), result; + if (!this || !isArray(this) || isPlainArray(this)) return arr; + result = new this.constructor(arr.length); + forEach.call(arr, function (val, i) { result[i] = val; }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/uniq.js b/node_modules/es5-ext/array/#/uniq.js new file mode 100644 index 0000000..2d28bf5 --- /dev/null +++ b/node_modules/es5-ext/array/#/uniq.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , filter = Array.prototype.filter + , isFirst; + +isFirst = function (value, index) { return indexOf.call(this, value) === index; }; + +module.exports = function () { return filter.call(this, isFirst, this); }; diff --git a/node_modules/es5-ext/array/#/values/implement.js b/node_modules/es5-ext/array/#/values/implement.js new file mode 100644 index 0000000..dce17ac --- /dev/null +++ b/node_modules/es5-ext/array/#/values/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "values", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/values/index.js b/node_modules/es5-ext/array/#/values/index.js new file mode 100644 index 0000000..30a50ba --- /dev/null +++ b/node_modules/es5-ext/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim"); diff --git a/node_modules/es5-ext/array/#/values/is-implemented.js b/node_modules/es5-ext/array/#/values/is-implemented.js new file mode 100644 index 0000000..8b72568 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr.values !== "function") return false; + iterator = arr.values(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/values/shim.js b/node_modules/es5-ext/array/#/values/shim.js new file mode 100644 index 0000000..5d013ab --- /dev/null +++ b/node_modules/es5-ext/array/#/values/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "value"); }; diff --git a/node_modules/es5-ext/array/_is-extensible.js b/node_modules/es5-ext/array/_is-extensible.js new file mode 100644 index 0000000..c475711 --- /dev/null +++ b/node_modules/es5-ext/array/_is-extensible.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = (function () { + var SubArray = require("./_sub-array-dummy") + , arr; + + if (!SubArray) return false; + arr = new SubArray(); + if (!Array.isArray(arr)) return false; + if (!(arr instanceof SubArray)) return false; + + arr[34] = "foo"; + return arr.length === 35; +})(); diff --git a/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/node_modules/es5-ext/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..bef50be --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy-safe.js @@ -0,0 +1,22 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of") + , isExtensible = require("./_is-extensible"); + +module.exports = (function () { + var SubArray; + + if (isExtensible) return require("./_sub-array-dummy"); + + if (!setPrototypeOf) return null; + SubArray = function () { + var arr = Array.apply(this, arguments); + setPrototypeOf(arr, SubArray.prototype); + return arr; + }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } + }); + return SubArray; +})(); diff --git a/node_modules/es5-ext/array/_sub-array-dummy.js b/node_modules/es5-ext/array/_sub-array-dummy.js new file mode 100644 index 0000000..5969309 --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy.js @@ -0,0 +1,15 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of"); + +module.exports = (function () { + var SubArray; + + if (!setPrototypeOf) return null; + SubArray = function () { Array.apply(this, arguments); }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } + }); + return SubArray; +})(); diff --git a/node_modules/es5-ext/array/from/implement.js b/node_modules/es5-ext/array/from/implement.js new file mode 100644 index 0000000..c08d407 --- /dev/null +++ b/node_modules/es5-ext/array/from/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "from", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/from/index.js b/node_modules/es5-ext/array/from/index.js new file mode 100644 index 0000000..81cf8d9 --- /dev/null +++ b/node_modules/es5-ext/array/from/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.from : require("./shim"); diff --git a/node_modules/es5-ext/array/from/is-implemented.js b/node_modules/es5-ext/array/from/is-implemented.js new file mode 100644 index 0000000..a786c76 --- /dev/null +++ b/node_modules/es5-ext/array/from/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== "function") return false; + arr = ["raz", "dwa"]; + result = from(arr); + return Boolean(result && result !== arr && result[1] === "dwa"); +}; diff --git a/node_modules/es5-ext/array/from/shim.js b/node_modules/es5-ext/array/from/shim.js new file mode 100644 index 0000000..bf660b6 --- /dev/null +++ b/node_modules/es5-ext/array/from/shim.js @@ -0,0 +1,119 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isArguments = require("../../function/is-arguments") + , isFunction = require("../../function/is-function") + , toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , validValue = require("../../object/valid-value") + , isValue = require("../../object/is-value") + , isString = require("../../string/is-string") + , isArray = Array.isArray + , call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +// eslint-disable-next-line complexity, max-lines-per-function +module.exports = function (arrayLike /*, mapFn, thisArg*/) { + var mapFn = arguments[1] + , thisArg = arguments[2] + , Context + , i + , j + , arr + , length + , code + , iterator + , result + , getIterator + , value; + + arrayLike = Object(validValue(arrayLike)); + + if (isValue(mapFn)) callable(mapFn); + if (!this || this === Array || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + length = arrayLike.length; + if (length !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array((length = arrayLike.length)); + for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Context = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Context) arr = new Context(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + result = iterator.next(); + ++i; + } + length = i; + } else if (isString(arrayLike)) { + // Source: String + length = arrayLike.length; + if (Context) arr = new Context(); + for (i = 0, j = 0; i < length; ++i) { + value = arrayLike[i]; + if (i + 1 < length) { + code = value.charCodeAt(0); + // eslint-disable-next-line max-depth + if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (Context) { + desc.value = value; + defineProperty(arr, j, desc); + } else { + arr[j] = value; + } + ++j; + } + length = j; + } + } + if (length === undefined) { + // Source: array or array-like + length = toPosInt(arrayLike.length); + if (Context) arr = new Context(length); + for (i = 0; i < length; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + } + } + if (Context) { + desc.value = null; + arr.length = length; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/generate.js b/node_modules/es5-ext/array/generate.js new file mode 100644 index 0000000..42b6930 --- /dev/null +++ b/node_modules/es5-ext/array/generate.js @@ -0,0 +1,18 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer") + , value = require("../object/valid-value") + , slice = Array.prototype.slice; + +module.exports = function (length /*, …fill*/) { + var arr, currentLength; + length = toPosInt(value(length)); + if (length === 0) return []; + + arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length); + + while ((currentLength = arr.length) < length) { + arr = arr.concat(arr.slice(0, length - currentLength)); + } + return arr; +}; diff --git a/node_modules/es5-ext/array/index.js b/node_modules/es5-ext/array/index.js new file mode 100644 index 0000000..49ff58e --- /dev/null +++ b/node_modules/es5-ext/array/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "from": require("./from"), + "generate": require("./generate"), + "isPlainArray": require("./is-plain-array"), + "of": require("./of"), + "toArray": require("./to-array"), + "validArray": require("./valid-array") +}; diff --git a/node_modules/es5-ext/array/is-plain-array.js b/node_modules/es5-ext/array/is-plain-array.js new file mode 100644 index 0000000..ca3d25b --- /dev/null +++ b/node_modules/es5-ext/array/is-plain-array.js @@ -0,0 +1,11 @@ +"use strict"; + +var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var proto; + if (!obj || !isArray(obj)) return false; + proto = getPrototypeOf(obj); + if (!isArray(proto)) return false; + return !isArray(getPrototypeOf(proto)); +}; diff --git a/node_modules/es5-ext/array/of/implement.js b/node_modules/es5-ext/array/of/implement.js new file mode 100644 index 0000000..6665c77 --- /dev/null +++ b/node_modules/es5-ext/array/of/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "of", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/of/index.js b/node_modules/es5-ext/array/of/index.js new file mode 100644 index 0000000..503c749 --- /dev/null +++ b/node_modules/es5-ext/array/of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.of : require("./shim"); diff --git a/node_modules/es5-ext/array/of/is-implemented.js b/node_modules/es5-ext/array/of/is-implemented.js new file mode 100644 index 0000000..3f232ca --- /dev/null +++ b/node_modules/es5-ext/array/of/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var of = Array.of, result; + if (typeof of !== "function") return false; + result = of("foo", "bar"); + return Boolean(result && result[1] === "bar"); +}; diff --git a/node_modules/es5-ext/array/of/shim.js b/node_modules/es5-ext/array/of/shim.js new file mode 100644 index 0000000..0202a8a --- /dev/null +++ b/node_modules/es5-ext/array/of/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var isFunction = require("../../function/is-function") + , slice = Array.prototype.slice + , defineProperty = Object.defineProperty + , desc = { configurable: true, enumerable: true, writable: true, value: null }; + +module.exports = function (/* …items*/) { + var result, i, length; + if (!this || this === Array || !isFunction(this)) return slice.call(arguments); + result = new this((length = arguments.length)); + for (i = 0; i < length; ++i) { + desc.value = arguments[i]; + defineProperty(result, i, desc); + } + desc.value = null; + result.length = length; + return result; +}; diff --git a/node_modules/es5-ext/array/to-array.js b/node_modules/es5-ext/array/to-array.js new file mode 100644 index 0000000..2515e02 --- /dev/null +++ b/node_modules/es5-ext/array/to-array.js @@ -0,0 +1,6 @@ +"use strict"; + +var from = require("./from") + , isArray = Array.isArray; + +module.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); }; diff --git a/node_modules/es5-ext/array/valid-array.js b/node_modules/es5-ext/array/valid-array.js new file mode 100644 index 0000000..1e58c39 --- /dev/null +++ b/node_modules/es5-ext/array/valid-array.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(value + " is not an array"); +}; diff --git a/node_modules/es5-ext/boolean/index.js b/node_modules/es5-ext/boolean/index.js new file mode 100644 index 0000000..3513642 --- /dev/null +++ b/node_modules/es5-ext/boolean/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { isBoolean: require("./is-boolean") }; diff --git a/node_modules/es5-ext/boolean/is-boolean.js b/node_modules/es5-ext/boolean/is-boolean.js new file mode 100644 index 0000000..394845f --- /dev/null +++ b/node_modules/es5-ext/boolean/is-boolean.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(true); + +module.exports = function (value) { + return ( + typeof value === "boolean" || + (typeof value === "object" && (value instanceof Boolean || objToString.call(value) === id)) + ); +}; diff --git a/node_modules/es5-ext/date/#/copy.js b/node_modules/es5-ext/date/#/copy.js new file mode 100644 index 0000000..1262ae0 --- /dev/null +++ b/node_modules/es5-ext/date/#/copy.js @@ -0,0 +1,5 @@ +"use strict"; + +var getTime = Date.prototype.getTime; + +module.exports = function () { return new Date(getTime.call(this)); }; diff --git a/node_modules/es5-ext/date/#/days-in-month.js b/node_modules/es5-ext/date/#/days-in-month.js new file mode 100644 index 0000000..731d4d5 --- /dev/null +++ b/node_modules/es5-ext/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +var getMonth = Date.prototype.getMonth; + +module.exports = function () { + switch (getMonth.call(this)) { + case 1: + return this.getFullYear() % 4 ? 28 : 29; + case 3: + case 5: + case 8: + case 10: + return 30; + default: + return 31; + } +}; diff --git a/node_modules/es5-ext/date/#/floor-day.js b/node_modules/es5-ext/date/#/floor-day.js new file mode 100644 index 0000000..db696d3 --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-day.js @@ -0,0 +1,8 @@ +"use strict"; + +var setHours = Date.prototype.setHours; + +module.exports = function () { + setHours.call(this, 0, 0, 0, 0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-month.js b/node_modules/es5-ext/date/#/floor-month.js new file mode 100644 index 0000000..c9c0460 --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-month.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorDay = require("./floor-day"); + +module.exports = function () { + floorDay.call(this).setDate(1); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-year.js b/node_modules/es5-ext/date/#/floor-year.js new file mode 100644 index 0000000..e9b6f0f --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-year.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorMonth = require("./floor-month"); + +module.exports = function () { + floorMonth.call(this).setMonth(0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/format.js b/node_modules/es5-ext/date/#/format.js new file mode 100644 index 0000000..8474dbb --- /dev/null +++ b/node_modules/es5-ext/date/#/format.js @@ -0,0 +1,20 @@ +/* eslint id-length: "off" */ + +"use strict"; + +var pad = require("../../number/#/pad") + , date = require("../valid-date") + , format; + +format = require("../../string/format-method")({ + Y: function () { return String(this.getFullYear()); }, + y: function () { return String(this.getFullYear()).slice(-2); }, + m: function () { return pad.call(this.getMonth() + 1, 2); }, + d: function () { return pad.call(this.getDate(), 2); }, + H: function () { return pad.call(this.getHours(), 2); }, + M: function () { return pad.call(this.getMinutes(), 2); }, + S: function () { return pad.call(this.getSeconds(), 2); }, + L: function () { return pad.call(this.getMilliseconds(), 3); } +}); + +module.exports = function (pattern) { return format.call(date(this), pattern); }; diff --git a/node_modules/es5-ext/date/#/index.js b/node_modules/es5-ext/date/#/index.js new file mode 100644 index 0000000..1781e21 --- /dev/null +++ b/node_modules/es5-ext/date/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + copy: require("./copy"), + daysInMonth: require("./days-in-month"), + floorDay: require("./floor-day"), + floorMonth: require("./floor-month"), + floorYear: require("./floor-year"), + format: require("./format") +}; diff --git a/node_modules/es5-ext/date/ensure-time-value.js b/node_modules/es5-ext/date/ensure-time-value.js new file mode 100644 index 0000000..09f5afc --- /dev/null +++ b/node_modules/es5-ext/date/ensure-time-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , toInteger = require("../number/to-integer") + , isTimeValue = require("./is-time-value"); + +module.exports = function (value) { + if (isTimeValue(value)) return toInteger(value); + throw new TypeError(safeToString(value) + " is not a valid time value"); +}; diff --git a/node_modules/es5-ext/date/index.js b/node_modules/es5-ext/date/index.js new file mode 100644 index 0000000..c143149 --- /dev/null +++ b/node_modules/es5-ext/date/index.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "ensureTimeValue": require("./ensure-time-value"), + "isDate": require("./is-date"), + "isTimeValue": require("./is-time-value"), + "validDate": require("./valid-date") +}; diff --git a/node_modules/es5-ext/date/is-date.js b/node_modules/es5-ext/date/is-date.js new file mode 100644 index 0000000..f45bde4 --- /dev/null +++ b/node_modules/es5-ext/date/is-date.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Date()); + +module.exports = function (value) { + return ( + (value && !isNaN(value) && (value instanceof Date || objToString.call(value) === id)) || + false + ); +}; diff --git a/node_modules/es5-ext/date/is-time-value.js b/node_modules/es5-ext/date/is-time-value.js new file mode 100644 index 0000000..0deb0b9 --- /dev/null +++ b/node_modules/es5-ext/date/is-time-value.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (value) { + try { value = Number(value); } + catch (e) { return false; } + if (isNaN(value)) return false; + if (Math.abs(value) > 8.64e15) return false; + return true; +}; diff --git a/node_modules/es5-ext/date/valid-date.js b/node_modules/es5-ext/date/valid-date.js new file mode 100644 index 0000000..0c73dc5 --- /dev/null +++ b/node_modules/es5-ext/date/valid-date.js @@ -0,0 +1,8 @@ +"use strict"; + +var isDate = require("./is-date"); + +module.exports = function (value) { + if (!isDate(value)) throw new TypeError(value + " is not valid Date object"); + return value; +}; diff --git a/node_modules/es5-ext/error/#/index.js b/node_modules/es5-ext/error/#/index.js new file mode 100644 index 0000000..973a9d4 --- /dev/null +++ b/node_modules/es5-ext/error/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { throw: require("./throw") }; diff --git a/node_modules/es5-ext/error/#/throw.js b/node_modules/es5-ext/error/#/throw.js new file mode 100644 index 0000000..3eb196d --- /dev/null +++ b/node_modules/es5-ext/error/#/throw.js @@ -0,0 +1,5 @@ +"use strict"; + +var error = require("../valid-error"); + +module.exports = function () { throw error(this); }; diff --git a/node_modules/es5-ext/error/custom.js b/node_modules/es5-ext/error/custom.js new file mode 100644 index 0000000..22ea5d8 --- /dev/null +++ b/node_modules/es5-ext/error/custom.js @@ -0,0 +1,20 @@ +"use strict"; + +var assign = require("../object/assign") + , isObject = require("../object/is-object") + , isValue = require("../object/is-value") + , captureStackTrace = Error.captureStackTrace; + +module.exports = function (message /*, code, ext*/) { + var err = new Error(message), code = arguments[1], ext = arguments[2]; + if (!isValue(ext)) { + if (isObject(code)) { + ext = code; + code = null; + } + } + if (isValue(ext)) assign(err, ext); + if (isValue(code)) err.code = code; + if (captureStackTrace) captureStackTrace(err, module.exports); + return err; +}; diff --git a/node_modules/es5-ext/error/index.js b/node_modules/es5-ext/error/index.js new file mode 100644 index 0000000..cb7054a --- /dev/null +++ b/node_modules/es5-ext/error/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "custom": require("./custom"), + "isError": require("./is-error"), + "validError": require("./valid-error") +}; diff --git a/node_modules/es5-ext/error/is-error.js b/node_modules/es5-ext/error/is-error.js new file mode 100644 index 0000000..aad67ed --- /dev/null +++ b/node_modules/es5-ext/error/is-error.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Error()); + +module.exports = function (value) { + return (value && (value instanceof Error || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/error/valid-error.js b/node_modules/es5-ext/error/valid-error.js new file mode 100644 index 0000000..432f7ba --- /dev/null +++ b/node_modules/es5-ext/error/valid-error.js @@ -0,0 +1,8 @@ +"use strict"; + +var isError = require("./is-error"); + +module.exports = function (value) { + if (!isError(value)) throw new TypeError(value + " is not an Error object"); + return value; +}; diff --git a/node_modules/es5-ext/function/#/compose.js b/node_modules/es5-ext/function/#/compose.js new file mode 100644 index 0000000..d16b2b1 --- /dev/null +++ b/node_modules/es5-ext/function/#/compose.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , callable = require("../../object/valid-callable") + , aFrom = require("../../array/from"); + +var apply = Function.prototype.apply + , call = Function.prototype.call + , callFn = function (arg, fn) { return call.call(fn, this, arg); }; + +module.exports = function (fnIgnored /*, …fnn*/) { + var fns, first; + var args = aFrom(arguments); + fns = isValue(this) ? [this].concat(args) : args; + fns.forEach(callable); + fns = fns.reverse(); + first = fns[0]; + fns = fns.slice(1); + return function (argIgnored) { return fns.reduce(callFn, apply.call(first, this, arguments)); }; +}; diff --git a/node_modules/es5-ext/function/#/copy.js b/node_modules/es5-ext/function/#/copy.js new file mode 100644 index 0000000..81ae783 --- /dev/null +++ b/node_modules/es5-ext/function/#/copy.js @@ -0,0 +1,22 @@ +"use strict"; + +var mixin = require("../../object/mixin") + , validFunction = require("../valid-function") + , re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/; + +module.exports = function () { + var match = String(validFunction(this)).match(re), fn; + + // eslint-disable-next-line no-new-func + fn = new Function( + "fn", + "return function " + + match[1].trim() + + "(" + + match[2] + + ") { return fn.apply(this, arguments); };" + )(this); + try { mixin(fn, this); } + catch (ignore) {} + return fn; +}; diff --git a/node_modules/es5-ext/function/#/curry.js b/node_modules/es5-ext/function/#/curry.js new file mode 100644 index 0000000..9296458 --- /dev/null +++ b/node_modules/es5-ext/function/#/curry.js @@ -0,0 +1,25 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + , slice = Array.prototype.slice + , apply = Function.prototype.apply + , curry; + +curry = function self(fn, length, preArgs) { + return defineLength( + function () { + var args = preArgs + ? preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) + : slice.call(arguments, 0, length); + return args.length === length ? apply.call(fn, this, args) : self(fn, length, args); + }, + preArgs ? length - preArgs.length : length + ); +}; + +module.exports = function (/* Length*/) { + var length = arguments[0]; + return curry(callable(this), isNaN(length) ? toPosInt(this.length) : toPosInt(length)); +}; diff --git a/node_modules/es5-ext/function/#/index.js b/node_modules/es5-ext/function/#/index.js new file mode 100644 index 0000000..02ae9f4 --- /dev/null +++ b/node_modules/es5-ext/function/#/index.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = { + compose: require("./compose"), + copy: require("./copy"), + curry: require("./curry"), + lock: require("./lock"), + microtaskDelay: require("./microtask-delay"), + not: require("./not"), + partial: require("./partial"), + spread: require("./spread"), + toStringTokens: require("./to-string-tokens") +}; diff --git a/node_modules/es5-ext/function/#/lock.js b/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 0000000..afd83b9 --- /dev/null +++ b/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,10 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this), args = arguments; + + return function () { return apply.call(fn, this, args); }; +}; diff --git a/node_modules/es5-ext/function/#/microtask-delay.js b/node_modules/es5-ext/function/#/microtask-delay.js new file mode 100644 index 0000000..3741ebe --- /dev/null +++ b/node_modules/es5-ext/function/#/microtask-delay.js @@ -0,0 +1,12 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , defineLength = require("../_define-length") + , nextTick = require("next-tick"); + +var apply = Function.prototype.apply; + +module.exports = function () { + var src = ensurePlainFunction(this); + return defineLength(function () { nextTick(apply.bind(src, this, arguments)); }, this.length); +}; diff --git a/node_modules/es5-ext/function/#/not.js b/node_modules/es5-ext/function/#/not.js new file mode 100644 index 0000000..b3b7d62 --- /dev/null +++ b/node_modules/es5-ext/function/#/not.js @@ -0,0 +1,11 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + + return defineLength(function () { return !apply.call(fn, this, arguments); }, fn.length); +}; diff --git a/node_modules/es5-ext/function/#/partial.js b/node_modules/es5-ext/function/#/partial.js new file mode 100644 index 0000000..8f09c4f --- /dev/null +++ b/node_modules/es5-ext/function/#/partial.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , aFrom = require("../../array/from") + , defineLength = require("../_define-length") + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this), args = aFrom(arguments); + + return defineLength(function () { + return apply.call(fn, this, args.concat(aFrom(arguments))); + }, fn.length - args.length); +}; diff --git a/node_modules/es5-ext/function/#/spread.js b/node_modules/es5-ext/function/#/spread.js new file mode 100644 index 0000000..555d991 --- /dev/null +++ b/node_modules/es5-ext/function/#/spread.js @@ -0,0 +1,9 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + return function (args) { return apply.call(fn, this, args); }; +}; diff --git a/node_modules/es5-ext/function/#/to-string-tokens.js b/node_modules/es5-ext/function/#/to-string-tokens.js new file mode 100644 index 0000000..4ce026a --- /dev/null +++ b/node_modules/es5-ext/function/#/to-string-tokens.js @@ -0,0 +1,17 @@ +"use strict"; + +var validFunction = require("../valid-function"); + +var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/ + , re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/; + +module.exports = function () { + var str = String(validFunction(this)), data = str.match(re1); + if (!data) { + data = str.match(re2); + if (!data) throw new Error("Unrecognized string format"); + data[1] = data[1].trim(); + if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1); + } + return { args: data[1], body: data[2] }; +}; diff --git a/node_modules/es5-ext/function/_define-length.js b/node_modules/es5-ext/function/_define-length.js new file mode 100644 index 0000000..d77a433 --- /dev/null +++ b/node_modules/es5-ext/function/_define-length.js @@ -0,0 +1,54 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer"); + +var test = function (arg1, arg2) { return arg2; }; + +var desc, defineProperty, generate, mixin; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} +catch (ignore) {} + +if (test.length === 1) { + // ES6 + desc = { configurable: true, writable: false, enumerable: false }; + defineProperty = Object.defineProperty; + module.exports = function (fn, length) { + length = toPosInt(length); + if (fn.length === length) return fn; + desc.value = length; + return defineProperty(fn, "length", desc); + }; +} else { + mixin = require("../object/mixin"); + generate = (function () { + var cache = []; + return function (length) { + var args, i = 0; + if (cache[length]) return cache[length]; + args = []; + while (length--) args.push("a" + (++i).toString(36)); + // eslint-disable-next-line no-new-func + return new Function( + "fn", + "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };" + ); + }; + })(); + module.exports = function (src, length) { + var target; + length = toPosInt(length); + if (src.length === length) return src; + target = generate(length)(src); + try { mixin(target, src); } + catch (ignore) {} + return target; + }; +} diff --git a/node_modules/es5-ext/function/constant.js b/node_modules/es5-ext/function/constant.js new file mode 100644 index 0000000..79d81e4 --- /dev/null +++ b/node_modules/es5-ext/function/constant.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return function () { return value; }; +}; diff --git a/node_modules/es5-ext/function/identity.js b/node_modules/es5-ext/function/identity.js new file mode 100644 index 0000000..cde213f --- /dev/null +++ b/node_modules/es5-ext/function/identity.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return value; }; diff --git a/node_modules/es5-ext/function/index.js b/node_modules/es5-ext/function/index.js new file mode 100644 index 0000000..1574fbb --- /dev/null +++ b/node_modules/es5-ext/function/index.js @@ -0,0 +1,15 @@ +// Export all modules. + +"use strict"; + +module.exports = { + "#": require("./#"), + "constant": require("./constant"), + "identity": require("./identity"), + "invoke": require("./invoke"), + "isArguments": require("./is-arguments"), + "isFunction": require("./is-function"), + "noop": require("./noop"), + "pluck": require("./pluck"), + "validFunction": require("./valid-function") +}; diff --git a/node_modules/es5-ext/function/invoke.js b/node_modules/es5-ext/function/invoke.js new file mode 100644 index 0000000..8fdb32b --- /dev/null +++ b/node_modules/es5-ext/function/invoke.js @@ -0,0 +1,14 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , slice = Array.prototype.slice + , apply = Function.prototype.apply; + +module.exports = function (name /*, …args*/) { + var args = slice.call(arguments, 1), isFn = isCallable(name); + return function (obj) { + value(obj); + return apply.call(isFn ? name : obj[name], obj, args.concat(slice.call(arguments, 1))); + }; +}; diff --git a/node_modules/es5-ext/function/is-arguments.js b/node_modules/es5-ext/function/is-arguments.js new file mode 100644 index 0000000..833a747 --- /dev/null +++ b/node_modules/es5-ext/function/is-arguments.js @@ -0,0 +1,6 @@ +"use strict"; + +var objToString = Object.prototype.toString + , id = objToString.call((function () { return arguments; })()); + +module.exports = function (value) { return objToString.call(value) === id; }; diff --git a/node_modules/es5-ext/function/is-function.js b/node_modules/es5-ext/function/is-function.js new file mode 100644 index 0000000..0d7cab3 --- /dev/null +++ b/node_modules/es5-ext/function/is-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var objToString = Object.prototype.toString + , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/); + +module.exports = function (value) { + return typeof value === "function" && isFunctionStringTag(objToString.call(value)); +}; diff --git a/node_modules/es5-ext/function/noop.js b/node_modules/es5-ext/function/noop.js new file mode 100644 index 0000000..6174f03 --- /dev/null +++ b/node_modules/es5-ext/function/noop.js @@ -0,0 +1,4 @@ +"use strict"; + +// eslint-disable-next-line no-empty-function +module.exports = function () {}; diff --git a/node_modules/es5-ext/function/pluck.js b/node_modules/es5-ext/function/pluck.js new file mode 100644 index 0000000..432cd46 --- /dev/null +++ b/node_modules/es5-ext/function/pluck.js @@ -0,0 +1,7 @@ +"use strict"; + +var value = require("../object/valid-value"); + +module.exports = function (name) { + return function (obj) { return value(obj)[name]; }; +}; diff --git a/node_modules/es5-ext/function/valid-function.js b/node_modules/es5-ext/function/valid-function.js new file mode 100644 index 0000000..060bd64 --- /dev/null +++ b/node_modules/es5-ext/function/valid-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var isFunction = require("./is-function"); + +module.exports = function (value) { + if (!isFunction(value)) throw new TypeError(value + " is not a function"); + return value; +}; diff --git a/node_modules/es5-ext/global.js b/node_modules/es5-ext/global.js new file mode 100644 index 0000000..61071e6 --- /dev/null +++ b/node_modules/es5-ext/global.js @@ -0,0 +1,35 @@ +var naiveFallback = function () { + if (typeof self === "object" && self) return self; + if (typeof window === "object" && window) return window; + throw new Error("Unable to resolve global `this`"); +}; + +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) + + // Fallback to standard globalThis if available + if (typeof globalThis === "object" && globalThis) return globalThis; + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5+ engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + try { + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + } catch (error) { + // Unfortunate case of updates to Object.prototype being restricted + // via preventExtensions, seal or freeze + return naiveFallback(); + } + try { + // Safari case (window.__global__ works, but __global__ does not) + if (!__global__) return naiveFallback(); + return __global__; + } finally { + delete Object.prototype.__global__; + } +})(); diff --git a/node_modules/es5-ext/index.js b/node_modules/es5-ext/index.js new file mode 100644 index 0000000..0919764 --- /dev/null +++ b/node_modules/es5-ext/index.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = { + global: require("./global"), + optionalChaining: require("./optional-chaining"), + safeToString: require("./safe-to-string"), + toShortStringRepresentation: require("./to-short-string-representation"), + + array: require("./array"), + boolean: require("./boolean"), + date: require("./date"), + error: require("./error"), + function: require("./function"), + iterable: require("./iterable"), + json: require("./json"), + math: require("./math"), + number: require("./number"), + object: require("./object"), + promise: require("./promise"), + regExp: require("./reg-exp"), + string: require("./string") +}; diff --git a/node_modules/es5-ext/iterable/for-each.js b/node_modules/es5-ext/iterable/for-each.js new file mode 100644 index 0000000..9157f65 --- /dev/null +++ b/node_modules/es5-ext/iterable/for-each.js @@ -0,0 +1,11 @@ +"use strict"; + +var forOf = require("es6-iterator/for-of") + , isIterable = require("es6-iterator/is-iterable") + , iterable = require("./validate") + , forEach = Array.prototype.forEach; + +module.exports = function (target, cb /*, thisArg*/) { + if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); + else forEach.call(target, cb, arguments[2]); +}; diff --git a/node_modules/es5-ext/iterable/index.js b/node_modules/es5-ext/iterable/index.js new file mode 100644 index 0000000..4b898fc --- /dev/null +++ b/node_modules/es5-ext/iterable/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + forEach: require("./for-each"), + is: require("./is"), + validate: require("./validate"), + validateObject: require("./validate-object") +}; diff --git a/node_modules/es5-ext/iterable/is.js b/node_modules/es5-ext/iterable/is.js new file mode 100644 index 0000000..aa5a9b9 --- /dev/null +++ b/node_modules/es5-ext/iterable/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isValue = require("../object/is-value") + , isArrayLike = require("../object/is-array-like"); + +module.exports = function (value) { + if (!isValue(value)) return false; + if (typeof value[iteratorSymbol] === "function") return true; + return isArrayLike(value); +}; diff --git a/node_modules/es5-ext/iterable/validate-object.js b/node_modules/es5-ext/iterable/validate-object.js new file mode 100644 index 0000000..26e622b --- /dev/null +++ b/node_modules/es5-ext/iterable/validate-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is-object") + , is = require("./is"); + +module.exports = function (value) { + if (is(value) && isObject(value)) return value; + throw new TypeError(value + " is not an iterable or array-like object"); +}; diff --git a/node_modules/es5-ext/iterable/validate.js b/node_modules/es5-ext/iterable/validate.js new file mode 100644 index 0000000..94a91c4 --- /dev/null +++ b/node_modules/es5-ext/iterable/validate.js @@ -0,0 +1,8 @@ +"use strict"; + +var is = require("./is"); + +module.exports = function (value) { + if (is(value)) return value; + throw new TypeError(value + " is not an iterable or array-like"); +}; diff --git a/node_modules/es5-ext/json/index.js b/node_modules/es5-ext/json/index.js new file mode 100644 index 0000000..d26ac56 --- /dev/null +++ b/node_modules/es5-ext/json/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { safeStringify: require("./safe-stringify") }; diff --git a/node_modules/es5-ext/json/safe-stringify.js b/node_modules/es5-ext/json/safe-stringify.js new file mode 100644 index 0000000..28169f1 --- /dev/null +++ b/node_modules/es5-ext/json/safe-stringify.js @@ -0,0 +1,37 @@ +"use strict"; + +var compact = require("../array/#/compact") + , isObject = require("../object/is-object") + , toArray = require("../object/to-array") + , isArray = Array.isArray + , stringify = JSON.stringify; + +module.exports = function self(value /*, replacer, space*/) { + var replacer = arguments[1], space = arguments[2]; + try { + return stringify(value, replacer, space); + } catch (e) { + if (!isObject(value)) return null; + if (typeof value.toJSON === "function") return null; + if (isArray(value)) { + return ( + "[" + + compact.call(value.map(function (item) { return self(item, replacer, space); })) + + "]" + ); + } + return ( + "{" + + compact + .call( + toArray(value, function (item, key) { + item = self(item, replacer, space); + if (!item) return null; + return stringify(key) + ":" + item; + }) + ) + .join(",") + + "}" + ); + } +}; diff --git a/node_modules/es5-ext/math/_decimal-adjust.js b/node_modules/es5-ext/math/_decimal-adjust.js new file mode 100644 index 0000000..c6374d6 --- /dev/null +++ b/node_modules/es5-ext/math/_decimal-adjust.js @@ -0,0 +1,29 @@ +// Credit: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +// #Decimal_rounding + +"use strict"; + +var isValue = require("../object/is-value") + , ensureInteger = require("../object/ensure-integer"); + +var split = String.prototype.split; + +module.exports = function (type) { + return function (value /*, exp*/) { + value = Number(value); + var exp = arguments[1]; + if (isValue(exp)) exp = ensureInteger(exp); + if (!value) return value; + if (!exp) return Math[type](value); + if (!isFinite(value)) return value; + + // Shift + var tokens = split.call(value, "e"); + value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); + + // Shift back + tokens = value.toString().split("e"); + return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); + }; +}; diff --git a/node_modules/es5-ext/math/_pack-ieee754.js b/node_modules/es5-ext/math/_pack-ieee754.js new file mode 100644 index 0000000..b3edf8d --- /dev/null +++ b/node_modules/es5-ext/math/_pack-ieee754.js @@ -0,0 +1,88 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var abs = Math.abs + , floor = Math.floor + , log = Math.log + , min = Math.min + , pow = Math.pow + , LN2 = Math.LN2 + , roundToEven; + +roundToEven = function (num) { + var whole = floor(num), fraction = num - whole; + if (fraction < 0.5) return whole; + if (fraction > 0.5) return whole + 1; + return whole % 2 ? whole + 1 : whole; +}; + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function (value, ebits, fbits) { + var bias = (1 << (ebits - 1)) - 1, sign, e, fraction, i, bits, str, bytes; + + // Compute sign, exponent, fraction + if (isNaN(value)) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; + fraction = pow(2, fbits - 1); + sign = 0; + } else if (value === Infinity || value === -Infinity) { + e = (1 << ebits) - 1; + fraction = 0; + sign = value < 0 ? 1 : 0; + } else if (value === 0) { + e = 0; + fraction = 0; + sign = 1 / value === -Infinity ? 1 : 0; + } else { + sign = value < 0; + value = abs(value); + + if (value >= pow(2, 1 - bias)) { + e = min(floor(log(value) / LN2), 1023); + fraction = roundToEven((value / pow(2, e)) * pow(2, fbits)); + if (fraction / pow(2, fbits) >= 2) { + e += 1; + fraction = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + fraction = 0; + } else { + // Normal + e += bias; + fraction -= pow(2, fbits); + } + } else { + // Subnormal + e = 0; + fraction = roundToEven(value / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(fraction % 2 ? 1 : 0); + fraction = floor(fraction / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(sign ? 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; +}; diff --git a/node_modules/es5-ext/math/_unpack-ieee754.js b/node_modules/es5-ext/math/_unpack-ieee754.js new file mode 100644 index 0000000..83fa947 --- /dev/null +++ b/node_modules/es5-ext/math/_unpack-ieee754.js @@ -0,0 +1,33 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var pow = Math.pow; + +module.exports = function (bytes, ebits, fbits) { + // Bytes to bits + var bits = [], i, j, bit, str, bias, sign, e, fraction; + + for (i = bytes.length; i; i -= 1) { + bit = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(bit % 2 ? 1 : 0); + bit >>= 1; + } + } + bits.reverse(); + str = bits.join(""); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + sign = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + fraction = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) return fraction === 0 ? sign * Infinity : NaN; + if (e > 0) return sign * pow(2, e - bias) * (1 + fraction / pow(2, fbits)); + if (fraction !== 0) return sign * pow(2, -(bias - 1)) * (fraction / pow(2, fbits)); + return sign < 0 ? -0 : 0; +}; diff --git a/node_modules/es5-ext/math/acosh/implement.js b/node_modules/es5-ext/math/acosh/implement.js new file mode 100644 index 0000000..9e4582f --- /dev/null +++ b/node_modules/es5-ext/math/acosh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "acosh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/acosh/index.js b/node_modules/es5-ext/math/acosh/index.js new file mode 100644 index 0000000..da176cb --- /dev/null +++ b/node_modules/es5-ext/math/acosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.acosh : require("./shim"); diff --git a/node_modules/es5-ext/math/acosh/is-implemented.js b/node_modules/es5-ext/math/acosh/is-implemented.js new file mode 100644 index 0000000..2e97301 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var acosh = Math.acosh; + if (typeof acosh !== "function") return false; + return acosh(2) === 1.3169578969248166; +}; diff --git a/node_modules/es5-ext/math/acosh/shim.js b/node_modules/es5-ext/math/acosh/shim.js new file mode 100644 index 0000000..3e632ff --- /dev/null +++ b/node_modules/es5-ext/math/acosh/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 1) return NaN; + if (value === 1) return 0; + if (value === Infinity) return value; + return log(value + sqrt(value * value - 1)); +}; diff --git a/node_modules/es5-ext/math/asinh/implement.js b/node_modules/es5-ext/math/asinh/implement.js new file mode 100644 index 0000000..1c0d7e4 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "asinh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/asinh/index.js b/node_modules/es5-ext/math/asinh/index.js new file mode 100644 index 0000000..8ca3026 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.asinh : require("./shim"); diff --git a/node_modules/es5-ext/math/asinh/is-implemented.js b/node_modules/es5-ext/math/asinh/is-implemented.js new file mode 100644 index 0000000..a7e0f20 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var asinh = Math.asinh; + if (typeof asinh !== "function") return false; + return asinh(2) === 1.4436354751788103; +}; diff --git a/node_modules/es5-ext/math/asinh/shim.js b/node_modules/es5-ext/math/asinh/shim.js new file mode 100644 index 0000000..30ce2e4 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) { + value = -value; + return -log(value + sqrt(value * value + 1)); + } + return log(value + sqrt(value * value + 1)); +}; diff --git a/node_modules/es5-ext/math/atanh/implement.js b/node_modules/es5-ext/math/atanh/implement.js new file mode 100644 index 0000000..53f5871 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "atanh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/atanh/index.js b/node_modules/es5-ext/math/atanh/index.js new file mode 100644 index 0000000..feff0a7 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.atanh : require("./shim"); diff --git a/node_modules/es5-ext/math/atanh/is-implemented.js b/node_modules/es5-ext/math/atanh/is-implemented.js new file mode 100644 index 0000000..4787c4f --- /dev/null +++ b/node_modules/es5-ext/math/atanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var atanh = Math.atanh; + if (typeof atanh !== "function") return false; + return Math.round(atanh(0.5) * 1e15) === 549306144334055; +}; diff --git a/node_modules/es5-ext/math/atanh/shim.js b/node_modules/es5-ext/math/atanh/shim.js new file mode 100644 index 0000000..9383e97 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value > 1) return NaN; + if (value === -1) return -Infinity; + if (value === 1) return Infinity; + if (value === 0) return value; + return 0.5 * log((1 + value) / (1 - value)); +}; diff --git a/node_modules/es5-ext/math/cbrt/implement.js b/node_modules/es5-ext/math/cbrt/implement.js new file mode 100644 index 0000000..826314c --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cbrt", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/cbrt/index.js b/node_modules/es5-ext/math/cbrt/index.js new file mode 100644 index 0000000..a6c71c6 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.cbrt : require("./shim"); diff --git a/node_modules/es5-ext/math/cbrt/is-implemented.js b/node_modules/es5-ext/math/cbrt/is-implemented.js new file mode 100644 index 0000000..a8ac0db --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cbrt = Math.cbrt; + if (typeof cbrt !== "function") return false; + return cbrt(2) === 1.2599210498948732; +}; diff --git a/node_modules/es5-ext/math/cbrt/shim.js b/node_modules/es5-ext/math/cbrt/shim.js new file mode 100644 index 0000000..8871c55 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var pow = Math.pow; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) return -pow(-value, 1 / 3); + return pow(value, 1 / 3); +}; diff --git a/node_modules/es5-ext/math/ceil-10.js b/node_modules/es5-ext/math/ceil-10.js new file mode 100644 index 0000000..351221f --- /dev/null +++ b/node_modules/es5-ext/math/ceil-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("ceil"); diff --git a/node_modules/es5-ext/math/clz32/implement.js b/node_modules/es5-ext/math/clz32/implement.js new file mode 100644 index 0000000..70562df --- /dev/null +++ b/node_modules/es5-ext/math/clz32/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "clz32", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/clz32/index.js b/node_modules/es5-ext/math/clz32/index.js new file mode 100644 index 0000000..2380335 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.clz32 : require("./shim"); diff --git a/node_modules/es5-ext/math/clz32/is-implemented.js b/node_modules/es5-ext/math/clz32/is-implemented.js new file mode 100644 index 0000000..ee6d882 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var clz32 = Math.clz32; + if (typeof clz32 !== "function") return false; + return clz32(1000) === 22; +}; diff --git a/node_modules/es5-ext/math/clz32/shim.js b/node_modules/es5-ext/math/clz32/shim.js new file mode 100644 index 0000000..2b526c2 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + value >>>= 0; + return value ? 32 - value.toString(2).length : 32; +}; diff --git a/node_modules/es5-ext/math/cosh/implement.js b/node_modules/es5-ext/math/cosh/implement.js new file mode 100644 index 0000000..74e7eea --- /dev/null +++ b/node_modules/es5-ext/math/cosh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cosh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/cosh/index.js b/node_modules/es5-ext/math/cosh/index.js new file mode 100644 index 0000000..c7a7167 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.cosh : require("./shim"); diff --git a/node_modules/es5-ext/math/cosh/is-implemented.js b/node_modules/es5-ext/math/cosh/is-implemented.js new file mode 100644 index 0000000..7173054 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cosh = Math.cosh; + if (typeof cosh !== "function") return false; + return cosh(1) === 1.5430806348152437; +}; diff --git a/node_modules/es5-ext/math/cosh/shim.js b/node_modules/es5-ext/math/cosh/shim.js new file mode 100644 index 0000000..c762c84 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return 1; + if (!isFinite(value)) return Infinity; + return (exp(value) + exp(-value)) / 2; +}; diff --git a/node_modules/es5-ext/math/expm1/implement.js b/node_modules/es5-ext/math/expm1/implement.js new file mode 100644 index 0000000..9739bf5 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "expm1", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/expm1/index.js b/node_modules/es5-ext/math/expm1/index.js new file mode 100644 index 0000000..daf4395 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.expm1 : require("./shim"); diff --git a/node_modules/es5-ext/math/expm1/is-implemented.js b/node_modules/es5-ext/math/expm1/is-implemented.js new file mode 100644 index 0000000..dfd056e --- /dev/null +++ b/node_modules/es5-ext/math/expm1/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var expm1 = Math.expm1; + if (typeof expm1 !== "function") return false; + return expm1(1).toFixed(15) === "1.718281828459045"; +}; diff --git a/node_modules/es5-ext/math/expm1/shim.js b/node_modules/es5-ext/math/expm1/shim.js new file mode 100644 index 0000000..6daf2bf --- /dev/null +++ b/node_modules/es5-ext/math/expm1/shim.js @@ -0,0 +1,16 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6 + +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -1; + + if (value > -1.0e-6 && value < 1.0e-6) return value + (value * value) / 2; + return exp(value) - 1; +}; diff --git a/node_modules/es5-ext/math/floor-10.js b/node_modules/es5-ext/math/floor-10.js new file mode 100644 index 0000000..3cb0c11 --- /dev/null +++ b/node_modules/es5-ext/math/floor-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("floor"); diff --git a/node_modules/es5-ext/math/fround/implement.js b/node_modules/es5-ext/math/fround/implement.js new file mode 100644 index 0000000..9ce9cf2 --- /dev/null +++ b/node_modules/es5-ext/math/fround/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "fround", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/fround/index.js b/node_modules/es5-ext/math/fround/index.js new file mode 100644 index 0000000..9f0dbc0 --- /dev/null +++ b/node_modules/es5-ext/math/fround/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.fround : require("./shim"); diff --git a/node_modules/es5-ext/math/fround/is-implemented.js b/node_modules/es5-ext/math/fround/is-implemented.js new file mode 100644 index 0000000..ad2b705 --- /dev/null +++ b/node_modules/es5-ext/math/fround/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fround = Math.fround; + if (typeof fround !== "function") return false; + return fround(1.337) === 1.3370000123977661; +}; diff --git a/node_modules/es5-ext/math/fround/shim.js b/node_modules/es5-ext/math/fround/shim.js new file mode 100644 index 0000000..b0dfaab --- /dev/null +++ b/node_modules/es5-ext/math/fround/shim.js @@ -0,0 +1,33 @@ +/* global Float32Array */ + +// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var toFloat32; + +if (typeof Float32Array === "undefined") { + toFloat32 = (function () { + var pack = require("../_pack-ieee754") + , unpack = require("../_unpack-ieee754"); + + return function (value) { return unpack(pack(value, 8, 23), 8, 23); }; + })(); +} else { + toFloat32 = (function () { + var float32Array = new Float32Array(1); + return function (num) { + float32Array[0] = num; + return float32Array[0]; + }; + })(); +} + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + + return toFloat32(value); +}; diff --git a/node_modules/es5-ext/math/hypot/implement.js b/node_modules/es5-ext/math/hypot/implement.js new file mode 100644 index 0000000..e051add --- /dev/null +++ b/node_modules/es5-ext/math/hypot/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "hypot", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/hypot/index.js b/node_modules/es5-ext/math/hypot/index.js new file mode 100644 index 0000000..f8de46b --- /dev/null +++ b/node_modules/es5-ext/math/hypot/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.hypot : require("./shim"); diff --git a/node_modules/es5-ext/math/hypot/is-implemented.js b/node_modules/es5-ext/math/hypot/is-implemented.js new file mode 100644 index 0000000..d317bc7 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var hypot = Math.hypot; + if (typeof hypot !== "function") return false; + return hypot(3, 4) === 5; +}; diff --git a/node_modules/es5-ext/math/hypot/shim.js b/node_modules/es5-ext/math/hypot/shim.js new file mode 100644 index 0000000..2d0eec7 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/shim.js @@ -0,0 +1,37 @@ +// Thanks for hints: https://github.com/paulmillr/es6-shim + +"use strict"; + +var some = Array.prototype.some + , abs = Math.abs + , sqrt = Math.sqrt + , compare = function (val1, val2) { return val2 - val1; } + , divide = function (value) { return value / this; } + , add = function (sum, number) { return sum + number * number; }; + +// eslint-disable-next-line no-unused-vars +module.exports = function (val1, val2 /*, …valn*/) { + var result, numbers; + if (!arguments.length) return 0; + some.call(arguments, function (val) { + if (isNaN(val)) { + result = NaN; + return false; + } + if (!isFinite(val)) { + result = Infinity; + return true; + } + if (result !== undefined) return false; + val = Number(val); + if (val === 0) return false; + if (numbers) numbers.push(abs(val)); + else numbers = [abs(val)]; + return false; + }); + if (result !== undefined) return result; + if (!numbers) return 0; + + numbers.sort(compare); + return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); +}; diff --git a/node_modules/es5-ext/math/imul/implement.js b/node_modules/es5-ext/math/imul/implement.js new file mode 100644 index 0000000..3aff479 --- /dev/null +++ b/node_modules/es5-ext/math/imul/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "imul", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/imul/index.js b/node_modules/es5-ext/math/imul/index.js new file mode 100644 index 0000000..969124c --- /dev/null +++ b/node_modules/es5-ext/math/imul/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.imul : require("./shim"); diff --git a/node_modules/es5-ext/math/imul/is-implemented.js b/node_modules/es5-ext/math/imul/is-implemented.js new file mode 100644 index 0000000..0f32919 --- /dev/null +++ b/node_modules/es5-ext/math/imul/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var imul = Math.imul; + if (typeof imul !== "function") return false; + return imul(-1, 8) === -8; +}; diff --git a/node_modules/es5-ext/math/imul/shim.js b/node_modules/es5-ext/math/imul/shim.js new file mode 100644 index 0000000..7511707 --- /dev/null +++ b/node_modules/es5-ext/math/imul/shim.js @@ -0,0 +1,17 @@ +/* eslint no-bitwise: "off" */ + +// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference +// /Global_Objects/Math/imul + +"use strict"; + +module.exports = function (val1, val2) { + var xh = (val1 >>> 16) & 0xffff + , xl = val1 & 0xffff + , yh = (val2 >>> 16) & 0xffff + , yl = val2 & 0xffff; + + // The shift by 0 fixes the sign on the high part + // the final |0 converts the unsigned value into a signed value + return (xl * yl + (((xh * yl + xl * yh) << 16) >>> 0)) | 0; +}; diff --git a/node_modules/es5-ext/math/index.js b/node_modules/es5-ext/math/index.js new file mode 100644 index 0000000..a59269c --- /dev/null +++ b/node_modules/es5-ext/math/index.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + acosh: require("./acosh"), + asinh: require("./asinh"), + atanh: require("./atanh"), + cbrt: require("./cbrt"), + ceil10: require("./ceil-10"), + clz32: require("./clz32"), + cosh: require("./cosh"), + expm1: require("./expm1"), + floor10: require("./floor-10"), + fround: require("./fround"), + hypot: require("./hypot"), + imul: require("./imul"), + log10: require("./log10"), + log2: require("./log2"), + log1p: require("./log1p"), + round10: require("./round-10"), + sign: require("./sign"), + sinh: require("./sinh"), + tanh: require("./tanh"), + trunc: require("./trunc") +}; diff --git a/node_modules/es5-ext/math/log10/implement.js b/node_modules/es5-ext/math/log10/implement.js new file mode 100644 index 0000000..f6153c1 --- /dev/null +++ b/node_modules/es5-ext/math/log10/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log10", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/log10/index.js b/node_modules/es5-ext/math/log10/index.js new file mode 100644 index 0000000..abda55b --- /dev/null +++ b/node_modules/es5-ext/math/log10/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log10 : require("./shim"); diff --git a/node_modules/es5-ext/math/log10/is-implemented.js b/node_modules/es5-ext/math/log10/is-implemented.js new file mode 100644 index 0000000..f221759 --- /dev/null +++ b/node_modules/es5-ext/math/log10/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log10 = Math.log10; + if (typeof log10 !== "function") return false; + return log10(2) === 0.3010299956639812; +}; diff --git a/node_modules/es5-ext/math/log10/shim.js b/node_modules/es5-ext/math/log10/shim.js new file mode 100644 index 0000000..e8599a2 --- /dev/null +++ b/node_modules/es5-ext/math/log10/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG10E = Math.LOG10E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG10E; +}; diff --git a/node_modules/es5-ext/math/log1p/implement.js b/node_modules/es5-ext/math/log1p/implement.js new file mode 100644 index 0000000..21e94e6 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log1p", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/log1p/index.js b/node_modules/es5-ext/math/log1p/index.js new file mode 100644 index 0000000..76eacc5 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log1p : require("./shim"); diff --git a/node_modules/es5-ext/math/log1p/is-implemented.js b/node_modules/es5-ext/math/log1p/is-implemented.js new file mode 100644 index 0000000..7626ab4 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log1p = Math.log1p; + if (typeof log1p !== "function") return false; + return log1p(1) === 0.6931471805599453; +}; diff --git a/node_modules/es5-ext/math/log1p/shim.js b/node_modules/es5-ext/math/log1p/shim.js new file mode 100644 index 0000000..15f1182 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/shim.js @@ -0,0 +1,17 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js + +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value === -1) return -Infinity; + if (value === 0) return value; + if (value === Infinity) return Infinity; + + if (value > -1.0e-8 && value < 1.0e-8) return value - (value * value) / 2; + return log(1 + value); +}; diff --git a/node_modules/es5-ext/math/log2/implement.js b/node_modules/es5-ext/math/log2/implement.js new file mode 100644 index 0000000..91c06b1 --- /dev/null +++ b/node_modules/es5-ext/math/log2/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log2", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/log2/index.js b/node_modules/es5-ext/math/log2/index.js new file mode 100644 index 0000000..a561977 --- /dev/null +++ b/node_modules/es5-ext/math/log2/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log2 : require("./shim"); diff --git a/node_modules/es5-ext/math/log2/is-implemented.js b/node_modules/es5-ext/math/log2/is-implemented.js new file mode 100644 index 0000000..c70963f --- /dev/null +++ b/node_modules/es5-ext/math/log2/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log2 = Math.log2; + if (typeof log2 !== "function") return false; + return log2(3).toFixed(15) === "1.584962500721156"; +}; diff --git a/node_modules/es5-ext/math/log2/shim.js b/node_modules/es5-ext/math/log2/shim.js new file mode 100644 index 0000000..51fcdae --- /dev/null +++ b/node_modules/es5-ext/math/log2/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG2E = Math.LOG2E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG2E; +}; diff --git a/node_modules/es5-ext/math/round-10.js b/node_modules/es5-ext/math/round-10.js new file mode 100644 index 0000000..228c235 --- /dev/null +++ b/node_modules/es5-ext/math/round-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("round"); diff --git a/node_modules/es5-ext/math/sign/implement.js b/node_modules/es5-ext/math/sign/implement.js new file mode 100644 index 0000000..daf1769 --- /dev/null +++ b/node_modules/es5-ext/math/sign/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sign", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/sign/index.js b/node_modules/es5-ext/math/sign/index.js new file mode 100644 index 0000000..d2659cb --- /dev/null +++ b/node_modules/es5-ext/math/sign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.sign : require("./shim"); diff --git a/node_modules/es5-ext/math/sign/is-implemented.js b/node_modules/es5-ext/math/sign/is-implemented.js new file mode 100644 index 0000000..4318cf2 --- /dev/null +++ b/node_modules/es5-ext/math/sign/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== "function") return false; + return sign(10) === 1 && sign(-20) === -1; +}; diff --git a/node_modules/es5-ext/math/sign/shim.js b/node_modules/es5-ext/math/sign/shim.js new file mode 100644 index 0000000..9acb495 --- /dev/null +++ b/node_modules/es5-ext/math/sign/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || value === 0) return value; + return value > 0 ? 1 : -1; +}; diff --git a/node_modules/es5-ext/math/sinh/implement.js b/node_modules/es5-ext/math/sinh/implement.js new file mode 100644 index 0000000..4655f6b --- /dev/null +++ b/node_modules/es5-ext/math/sinh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sinh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/sinh/index.js b/node_modules/es5-ext/math/sinh/index.js new file mode 100644 index 0000000..107ef2e --- /dev/null +++ b/node_modules/es5-ext/math/sinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.sinh : require("./shim"); diff --git a/node_modules/es5-ext/math/sinh/is-implemented.js b/node_modules/es5-ext/math/sinh/is-implemented.js new file mode 100644 index 0000000..aad22b0 --- /dev/null +++ b/node_modules/es5-ext/math/sinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sinh = Math.sinh; + if (typeof sinh !== "function") return false; + return sinh(1) === 1.1752011936438014 && sinh(Number.MIN_VALUE) === 5e-324; +}; diff --git a/node_modules/es5-ext/math/sinh/shim.js b/node_modules/es5-ext/math/sinh/shim.js new file mode 100644 index 0000000..b161eca --- /dev/null +++ b/node_modules/es5-ext/math/sinh/shim.js @@ -0,0 +1,18 @@ +// Parts of implementation taken from es6-shim project +// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var expm1 = require("../expm1") + , abs = Math.abs + , exp = Math.exp + , e = Math.E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (abs(value) < 1) return (expm1(value) - expm1(-value)) / 2; + return ((exp(value - 1) - exp(-value - 1)) * e) / 2; +}; diff --git a/node_modules/es5-ext/math/tanh/implement.js b/node_modules/es5-ext/math/tanh/implement.js new file mode 100644 index 0000000..52d2957 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "tanh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/tanh/index.js b/node_modules/es5-ext/math/tanh/index.js new file mode 100644 index 0000000..54b3251 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.tanh : require("./shim"); diff --git a/node_modules/es5-ext/math/tanh/is-implemented.js b/node_modules/es5-ext/math/tanh/is-implemented.js new file mode 100644 index 0000000..b6226b4 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var tanh = Math.tanh; + if (typeof tanh !== "function") return false; + return tanh(1) === 0.7615941559557649 && tanh(Number.MAX_VALUE) === 1; +}; diff --git a/node_modules/es5-ext/math/tanh/shim.js b/node_modules/es5-ext/math/tanh/shim.js new file mode 100644 index 0000000..974dd7c --- /dev/null +++ b/node_modules/es5-ext/math/tanh/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + var num1, num2; + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return 1; + if (value === -Infinity) return -1; + num1 = exp(value); + if (num1 === Infinity) return 1; + num2 = exp(-value); + if (num2 === Infinity) return -1; + return (num1 - num2) / (num1 + num2); +}; diff --git a/node_modules/es5-ext/math/trunc/implement.js b/node_modules/es5-ext/math/trunc/implement.js new file mode 100644 index 0000000..bf1bf64 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "trunc", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/math/trunc/index.js b/node_modules/es5-ext/math/trunc/index.js new file mode 100644 index 0000000..8e3874c --- /dev/null +++ b/node_modules/es5-ext/math/trunc/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.trunc : require("./shim"); diff --git a/node_modules/es5-ext/math/trunc/is-implemented.js b/node_modules/es5-ext/math/trunc/is-implemented.js new file mode 100644 index 0000000..861b5c0 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var trunc = Math.trunc; + if (typeof trunc !== "function") return false; + return trunc(13.67) === 13 && trunc(-13.67) === -13; +}; diff --git a/node_modules/es5-ext/math/trunc/shim.js b/node_modules/es5-ext/math/trunc/shim.js new file mode 100644 index 0000000..bf6ac8c --- /dev/null +++ b/node_modules/es5-ext/math/trunc/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +var floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -Infinity; + if (value > 0) return floor(value); + return -floor(-value); +}; diff --git a/node_modules/es5-ext/number/#/index.js b/node_modules/es5-ext/number/#/index.js new file mode 100644 index 0000000..50b6418 --- /dev/null +++ b/node_modules/es5-ext/number/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { pad: require("./pad") }; diff --git a/node_modules/es5-ext/number/#/pad.js b/node_modules/es5-ext/number/#/pad.js new file mode 100644 index 0000000..f5af869 --- /dev/null +++ b/node_modules/es5-ext/number/#/pad.js @@ -0,0 +1,16 @@ +"use strict"; + +var pad = require("../../string/#/pad") + , toPosInt = require("../to-pos-integer") + , toFixed = Number.prototype.toFixed; + +module.exports = function (length /*, precision*/) { + var precision; + length = toPosInt(length); + precision = toPosInt(arguments[1]); + + return pad.call( + precision ? toFixed.call(this, precision) : this, "0", + length + (precision ? 1 + precision : 0) + ); +}; diff --git a/node_modules/es5-ext/number/epsilon/implement.js b/node_modules/es5-ext/number/epsilon/implement.js new file mode 100644 index 0000000..5a22cf5 --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "EPSILON", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/node_modules/es5-ext/number/epsilon/index.js b/node_modules/es5-ext/number/epsilon/index.js new file mode 100644 index 0000000..12e8a8d --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = 2.220446049250313e-16; diff --git a/node_modules/es5-ext/number/epsilon/is-implemented.js b/node_modules/es5-ext/number/epsilon/is-implemented.js new file mode 100644 index 0000000..5ddc9d6 --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.EPSILON === "number"; }; diff --git a/node_modules/es5-ext/number/index.js b/node_modules/es5-ext/number/index.js new file mode 100644 index 0000000..b57ff15 --- /dev/null +++ b/node_modules/es5-ext/number/index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "EPSILON": require("./epsilon"), + "isFinite": require("./is-finite"), + "isInteger": require("./is-integer"), + "isNaN": require("./is-nan"), + "isNatural": require("./is-natural"), + "isNumber": require("./is-number"), + "isSafeInteger": require("./is-safe-integer"), + "MAX_SAFE_INTEGER": require("./max-safe-integer"), + "MIN_SAFE_INTEGER": require("./min-safe-integer"), + "toInteger": require("./to-integer"), + "toPosInteger": require("./to-pos-integer"), + "toUint32": require("./to-uint32") +}; diff --git a/node_modules/es5-ext/number/is-finite/implement.js b/node_modules/es5-ext/number/is-finite/implement.js new file mode 100644 index 0000000..41109fb --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isFinite", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/number/is-finite/index.js b/node_modules/es5-ext/number/is-finite/index.js new file mode 100644 index 0000000..f3a7112 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isFinite : require("./shim"); diff --git a/node_modules/es5-ext/number/is-finite/is-implemented.js b/node_modules/es5-ext/number/is-finite/is-implemented.js new file mode 100644 index 0000000..eadd050 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsFinite = Number.isFinite; + if (typeof numberIsFinite !== "function") return false; + return !numberIsFinite("23") && numberIsFinite(34) && !numberIsFinite(Infinity); +}; diff --git a/node_modules/es5-ext/number/is-finite/shim.js b/node_modules/es5-ext/number/is-finite/shim.js new file mode 100644 index 0000000..ce700f6 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return typeof value === "number" && isFinite(value); }; diff --git a/node_modules/es5-ext/number/is-integer/implement.js b/node_modules/es5-ext/number/is-integer/implement.js new file mode 100644 index 0000000..48b4cd2 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isInteger", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/number/is-integer/index.js b/node_modules/es5-ext/number/is-integer/index.js new file mode 100644 index 0000000..2805b11 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isInteger : require("./shim"); diff --git a/node_modules/es5-ext/number/is-integer/is-implemented.js b/node_modules/es5-ext/number/is-integer/is-implemented.js new file mode 100644 index 0000000..f357c71 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isInteger = Number.isInteger; + if (typeof isInteger !== "function") return false; + return !isInteger("23") && isInteger(34) && !isInteger(32.34); +}; diff --git a/node_modules/es5-ext/number/is-integer/shim.js b/node_modules/es5-ext/number/is-integer/shim.js new file mode 100644 index 0000000..12058b5 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/shim.js @@ -0,0 +1,8 @@ +// Credit: http://www.2ality.com/2014/05/is-integer.html + +"use strict"; + +module.exports = function (value) { + if (typeof value !== "number") return false; + return value % 1 === 0; +}; diff --git a/node_modules/es5-ext/number/is-nan/implement.js b/node_modules/es5-ext/number/is-nan/implement.js new file mode 100644 index 0000000..f704e4c --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isNaN", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/number/is-nan/index.js b/node_modules/es5-ext/number/is-nan/index.js new file mode 100644 index 0000000..2cec8fc --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isNaN : require("./shim"); diff --git a/node_modules/es5-ext/number/is-nan/is-implemented.js b/node_modules/es5-ext/number/is-nan/is-implemented.js new file mode 100644 index 0000000..756838a --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsNaN = Number.isNaN; + if (typeof numberIsNaN !== "function") return false; + return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); +}; diff --git a/node_modules/es5-ext/number/is-nan/shim.js b/node_modules/es5-ext/number/is-nan/shim.js new file mode 100644 index 0000000..b5730d1 --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-self-compare + return value !== value; +}; diff --git a/node_modules/es5-ext/number/is-natural.js b/node_modules/es5-ext/number/is-natural.js new file mode 100644 index 0000000..2bbb5a2 --- /dev/null +++ b/node_modules/es5-ext/number/is-natural.js @@ -0,0 +1,5 @@ +"use strict"; + +var isInteger = require("./is-integer"); + +module.exports = function (num) { return isInteger(num) && num >= 0; }; diff --git a/node_modules/es5-ext/number/is-number.js b/node_modules/es5-ext/number/is-number.js new file mode 100644 index 0000000..5c11a52 --- /dev/null +++ b/node_modules/es5-ext/number/is-number.js @@ -0,0 +1,11 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(1); + +module.exports = function (value) { + return ( + typeof value === "number" || + value instanceof Number || + (typeof value === "object" && objToString.call(value) === id) + ); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/implement.js b/node_modules/es5-ext/number/is-safe-integer/implement.js new file mode 100644 index 0000000..571b214 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isSafeInteger", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/number/is-safe-integer/index.js b/node_modules/es5-ext/number/is-safe-integer/index.js new file mode 100644 index 0000000..26c2b9f --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isSafeInteger : require("./shim"); diff --git a/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..5ed3763 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isSafeInteger = Number.isSafeInteger; + if (typeof isSafeInteger !== "function") return false; + return !isSafeInteger("23") && isSafeInteger(34232322323) && !isSafeInteger(9007199254740992); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/shim.js b/node_modules/es5-ext/number/is-safe-integer/shim.js new file mode 100644 index 0000000..fb4f4d5 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +var isInteger = require("../is-integer/shim") + , maxValue = require("../max-safe-integer") + , abs = Math.abs; + +module.exports = function (value) { + if (!isInteger(value)) return false; + return abs(value) <= maxValue; +}; diff --git a/node_modules/es5-ext/number/max-safe-integer/implement.js b/node_modules/es5-ext/number/max-safe-integer/implement.js new file mode 100644 index 0000000..4ee3231 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MAX_SAFE_INTEGER", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/node_modules/es5-ext/number/max-safe-integer/index.js b/node_modules/es5-ext/number/max-safe-integer/index.js new file mode 100644 index 0000000..75a41e7 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Math.pow(2, 53) - 1; diff --git a/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..3d6e914 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.MAX_SAFE_INTEGER === "number"; }; diff --git a/node_modules/es5-ext/number/min-safe-integer/implement.js b/node_modules/es5-ext/number/min-safe-integer/implement.js new file mode 100644 index 0000000..979dc39 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MIN_SAFE_INTEGER", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/node_modules/es5-ext/number/min-safe-integer/index.js b/node_modules/es5-ext/number/min-safe-integer/index.js new file mode 100644 index 0000000..cde4514 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = -(Math.pow(2, 53) - 1); diff --git a/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..71e6a31 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.MIN_SAFE_INTEGER === "number"; }; diff --git a/node_modules/es5-ext/number/to-integer.js b/node_modules/es5-ext/number/to-integer.js new file mode 100644 index 0000000..4df5572 --- /dev/null +++ b/node_modules/es5-ext/number/to-integer.js @@ -0,0 +1,12 @@ +"use strict"; + +var sign = require("../math/sign") + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if (value === 0 || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; diff --git a/node_modules/es5-ext/number/to-pos-integer.js b/node_modules/es5-ext/number/to-pos-integer.js new file mode 100644 index 0000000..28f6d40 --- /dev/null +++ b/node_modules/es5-ext/number/to-pos-integer.js @@ -0,0 +1,6 @@ +"use strict"; + +var toInteger = require("./to-integer") + , max = Math.max; + +module.exports = function (value) { return max(0, toInteger(value)); }; diff --git a/node_modules/es5-ext/number/to-uint32.js b/node_modules/es5-ext/number/to-uint32.js new file mode 100644 index 0000000..cb3590a --- /dev/null +++ b/node_modules/es5-ext/number/to-uint32.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + return value >>> 0; +}; diff --git a/node_modules/es5-ext/object/_iterate.js b/node_modules/es5-ext/object/_iterate.js new file mode 100644 index 0000000..1f0c85f --- /dev/null +++ b/node_modules/es5-ext/object/_iterate.js @@ -0,0 +1,30 @@ +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + +"use strict"; + +var callable = require("./valid-callable") + , value = require("./valid-value") + , bind = Function.prototype.bind + , call = Function.prototype.call + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb /*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); + } + if (typeof method !== "function") method = list[method]; + return call.call(method, list, function (key, index) { + if (!objPropertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; diff --git a/node_modules/es5-ext/object/assign-deep.js b/node_modules/es5-ext/object/assign-deep.js new file mode 100644 index 0000000..87fd78b --- /dev/null +++ b/node_modules/es5-ext/object/assign-deep.js @@ -0,0 +1,34 @@ +"use strict"; + +var includes = require("../array/#/contains") + , uniq = require("../array/#/uniq") + , copyDeep = require("./copy-deep") + , objForEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value"); + +var isArray = Array.isArray, slice = Array.prototype.slice; + +var deepAssign = function (target, source) { + if (target === source) return target; + if (isPlainObject(target) && isPlainObject(source)) { + objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); + return target; + } + if (isArray(target) && isArray(source)) { + source.forEach(function (item) { + if (includes.call(target, item)) return; + if (isArray(item) || isPlainObject(item)) item = copyDeep(item); + target.push(item); + }); + return target; + } + if (isPlainObject(source) || isArray(source)) return copyDeep(source); + return source; +}; + +module.exports = function (target /*, ...objects*/) { + return uniq + .call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue))) + .reduce(deepAssign); +}; diff --git a/node_modules/es5-ext/object/assign/implement.js b/node_modules/es5-ext/object/assign/implement.js new file mode 100644 index 0000000..f20371d --- /dev/null +++ b/node_modules/es5-ext/object/assign/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "assign", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/assign/index.js b/node_modules/es5-ext/object/assign/index.js new file mode 100644 index 0000000..9585b55 --- /dev/null +++ b/node_modules/es5-ext/object/assign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.assign : require("./shim"); diff --git a/node_modules/es5-ext/object/assign/is-implemented.js b/node_modules/es5-ext/object/assign/is-implemented.js new file mode 100644 index 0000000..8bf71ae --- /dev/null +++ b/node_modules/es5-ext/object/assign/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; +}; diff --git a/node_modules/es5-ext/object/assign/shim.js b/node_modules/es5-ext/object/assign/shim.js new file mode 100644 index 0000000..afa58f2 --- /dev/null +++ b/node_modules/es5-ext/object/assign/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var keys = require("../keys") + , value = require("../valid-value") + , max = Math.max; + +module.exports = function (dest, src /*, …srcn*/) { + var error, i, length = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; diff --git a/node_modules/es5-ext/object/clear.js b/node_modules/es5-ext/object/clear.js new file mode 100644 index 0000000..268cc5b --- /dev/null +++ b/node_modules/es5-ext/object/clear.js @@ -0,0 +1,16 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + var error; + keys(obj).forEach(function (key) { + try { + delete this[key]; + } catch (e) { + if (!error) error = e; + } + }, obj); + if (error !== undefined) throw error; + return obj; +}; diff --git a/node_modules/es5-ext/object/compact.js b/node_modules/es5-ext/object/compact.js new file mode 100644 index 0000000..a1794bb --- /dev/null +++ b/node_modules/es5-ext/object/compact.js @@ -0,0 +1,8 @@ +"use strict"; + +var filter = require("./filter") + , isValue = require("./is-value"); + +module.exports = function (obj) { + return filter(obj, function (val) { return isValue(val); }); +}; diff --git a/node_modules/es5-ext/object/compare.js b/node_modules/es5-ext/object/compare.js new file mode 100644 index 0000000..261a732 --- /dev/null +++ b/node_modules/es5-ext/object/compare.js @@ -0,0 +1,39 @@ +"use strict"; + +var strCompare = require("../string/#/case-insensitive-compare") + , isObject = require("./is-object") + , isValue = require("./is-value") + , numIsNaN = require("../number/is-nan") + , resolve + , typeMap; + +typeMap = { undefined: 0, object: 1, boolean: 2, string: 3, number: 4 }; + +resolve = function (a) { + if (isObject(a)) { + if (typeof a.valueOf !== "function") return NaN; + a = a.valueOf(); + if (isObject(a)) { + if (typeof a.toString !== "function") return NaN; + a = a.toString(); + if (typeof a !== "string") return NaN; + } + } + return a; +}; + +module.exports = function (val1, val2) { + if (val1 === val2) return 0; // Same + + val1 = resolve(val1); + val2 = resolve(val2); + // eslint-disable-next-line eqeqeq + if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; + if (!isValue(val1)) return -1; + if (!isValue(val2)) return 1; + if (typeof val1 === "string" || typeof val2 === "string") { + return strCompare.call(val1, val2); + } + if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore + return Number(val1) - Number(val2); +}; diff --git a/node_modules/es5-ext/object/copy-deep.js b/node_modules/es5-ext/object/copy-deep.js new file mode 100644 index 0000000..1d1bed2 --- /dev/null +++ b/node_modules/es5-ext/object/copy-deep.js @@ -0,0 +1,35 @@ +"use strict"; + +var forEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value") + , isArray = Array.isArray; + +var copyValue = function (value, ancestors, ancestorsCopy) { + var mode; + if (isPlainObject(value)) mode = "object"; + else if (isArray(value)) mode = "array"; + if (!mode) return value; + + var copy = ancestorsCopy[ancestors.indexOf(value)]; + if (copy) return copy; + copy = mode === "object" ? {} : []; + + ancestors.push(value); + ancestorsCopy.push(copy); + if (mode === "object") { + forEach(value, function (item, key) { + copy[key] = copyValue(item, ancestors, ancestorsCopy); + }); + } else { + value.forEach(function (item, index) { + copy[index] = copyValue(item, ancestors, ancestorsCopy); + }); + } + ancestors.pop(); + ancestorsCopy.pop(); + + return copy; +}; + +module.exports = function (source) { return copyValue(ensureValue(source), [], []); }; diff --git a/node_modules/es5-ext/object/copy.js b/node_modules/es5-ext/object/copy.js new file mode 100644 index 0000000..2bd591d --- /dev/null +++ b/node_modules/es5-ext/object/copy.js @@ -0,0 +1,19 @@ +"use strict"; + +var aFrom = require("../array/from") + , assign = require("./assign") + , value = require("./valid-value"); + +module.exports = function (obj /*, propertyNames, options*/) { + var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); + if (copy !== obj && !propertyNames) return copy; + var result = {}; + if (propertyNames) { + aFrom(propertyNames, function (propertyName) { + if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; + }); + } else { + assign(result, obj); + } + return result; +}; diff --git a/node_modules/es5-ext/object/count.js b/node_modules/es5-ext/object/count.js new file mode 100644 index 0000000..6c018bb --- /dev/null +++ b/node_modules/es5-ext/object/count.js @@ -0,0 +1,5 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { return keys(obj).length; }; diff --git a/node_modules/es5-ext/object/create.js b/node_modules/es5-ext/object/create.js new file mode 100644 index 0000000..a391ec1 --- /dev/null +++ b/node_modules/es5-ext/object/create.js @@ -0,0 +1,43 @@ +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + +"use strict"; + +var create = Object.create, shim; + +if (!require("./set-prototype-of/is-implemented")()) { + shim = require("./set-prototype-of/shim"); +} + +module.exports = (function () { + var nullObject, polyProps, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + polyProps = {}; + desc = { configurable: false, enumerable: false, writable: true, value: undefined }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === "__proto__") { + polyProps[name] = { + configurable: true, + enumerable: false, + writable: true, + value: undefined + }; + return; + } + polyProps[name] = desc; + }); + Object.defineProperties(nullObject, polyProps); + + Object.defineProperty(shim, "nullPolyfill", { + configurable: false, + enumerable: false, + writable: false, + value: nullObject + }); + + return function (prototype, props) { + return create(prototype === null ? nullObject : prototype, props); + }; +})(); diff --git a/node_modules/es5-ext/object/ensure-array.js b/node_modules/es5-ext/object/ensure-array.js new file mode 100644 index 0000000..5ca7a94 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isArray = require("./is-array-like"); + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(toShortString(value) + " is not a array"); +}; diff --git a/node_modules/es5-ext/object/ensure-finite-number.js b/node_modules/es5-ext/object/ensure-finite-number.js new file mode 100644 index 0000000..4f6e4b4 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-finite-number.js @@ -0,0 +1,9 @@ +"use strict"; + +var isFiniteNumber = require("./is-finite-number") + , safeToString = require("../safe-to-string"); + +module.exports = function (value) { + if (isFiniteNumber(value)) return Number(value); + throw new TypeError(safeToString(value) + " does not represent a finite number value"); +}; diff --git a/node_modules/es5-ext/object/ensure-integer.js b/node_modules/es5-ext/object/ensure-integer.js new file mode 100644 index 0000000..9ec64b5 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-integer.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isInteger = require("./is-integer"); + +module.exports = function (num) { + if (!isInteger(num)) throw new TypeError(toShortString(num) + " is not a integer"); + return Number(num); +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number-value.js b/node_modules/es5-ext/object/ensure-natural-number-value.js new file mode 100644 index 0000000..1a901aa --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNaturalValue = require("./is-natural-number-value") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number.js b/node_modules/es5-ext/object/ensure-natural-number.js new file mode 100644 index 0000000..ec7e514 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNatural = require("../number/is-natural") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNatural(num)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-plain-function.js b/node_modules/es5-ext/object/ensure-plain-function.js new file mode 100644 index 0000000..6cd9853 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainFunction = require("./is-plain-function"); + +module.exports = function (value) { + if (!isPlainFunction(value)) { + throw new TypeError(safeToString(value) + " is not a plain function"); + } + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-plain-object.js b/node_modules/es5-ext/object/ensure-plain-object.js new file mode 100644 index 0000000..7fb2b93 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-plain-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainObject = require("./is-plain-object"); + +module.exports = function (value) { + if (!isPlainObject(value)) throw new TypeError(safeToString(value) + " is not a plain object"); + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-promise.js b/node_modules/es5-ext/object/ensure-promise.js new file mode 100644 index 0000000..b5b5356 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-promise.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPromise = require("./is-promise"); + +module.exports = function (value) { + if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a promise"); + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-thenable.js b/node_modules/es5-ext/object/ensure-thenable.js new file mode 100644 index 0000000..c55c17a --- /dev/null +++ b/node_modules/es5-ext/object/ensure-thenable.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isThenable = require("./is-thenable"); + +module.exports = function (value) { + if (!isThenable(value)) throw new TypeError(safeToString(value) + " is not a thenable"); + return value; +}; diff --git a/node_modules/es5-ext/object/entries/implement.js b/node_modules/es5-ext/object/entries/implement.js new file mode 100644 index 0000000..5c2a246 --- /dev/null +++ b/node_modules/es5-ext/object/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "entries", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/entries/index.js b/node_modules/es5-ext/object/entries/index.js new file mode 100644 index 0000000..4a297d6 --- /dev/null +++ b/node_modules/es5-ext/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.entries : require("./shim"); diff --git a/node_modules/es5-ext/object/entries/is-implemented.js b/node_modules/es5-ext/object/entries/is-implemented.js new file mode 100644 index 0000000..aad52b2 --- /dev/null +++ b/node_modules/es5-ext/object/entries/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + try { return Object.entries({ foo: 12 })[0][0] === "foo"; } + catch (e) { return false; } +}; diff --git a/node_modules/es5-ext/object/entries/shim.js b/node_modules/es5-ext/object/entries/shim.js new file mode 100644 index 0000000..2348e44 --- /dev/null +++ b/node_modules/es5-ext/object/entries/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var ensureValue = require("../valid-value"); + +module.exports = function (object) { + ensureValue(object); + var result = []; + object = Object(object); + for (var key in object) { + if (!propertyIsEnumerable.call(object, key)) continue; + result.push([key, object[key]]); + } + return result; +}; diff --git a/node_modules/es5-ext/object/eq.js b/node_modules/es5-ext/object/eq.js new file mode 100644 index 0000000..0312468 --- /dev/null +++ b/node_modules/es5-ext/object/eq.js @@ -0,0 +1,7 @@ +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 || (numIsNaN(val1) && numIsNaN(val2)); +}; diff --git a/node_modules/es5-ext/object/every.js b/node_modules/es5-ext/object/every.js new file mode 100644 index 0000000..892b548 --- /dev/null +++ b/node_modules/es5-ext/object/every.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("every", true); diff --git a/node_modules/es5-ext/object/filter.js b/node_modules/es5-ext/object/filter.js new file mode 100644 index 0000000..c7dd969 --- /dev/null +++ b/node_modules/es5-ext/object/filter.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key]; + }); + return result; +}; diff --git a/node_modules/es5-ext/object/find-key.js b/node_modules/es5-ext/object/find-key.js new file mode 100644 index 0000000..6da6ba6 --- /dev/null +++ b/node_modules/es5-ext/object/find-key.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")(require("../array/#/find"), false); diff --git a/node_modules/es5-ext/object/find.js b/node_modules/es5-ext/object/find.js new file mode 100644 index 0000000..5960421 --- /dev/null +++ b/node_modules/es5-ext/object/find.js @@ -0,0 +1,10 @@ +"use strict"; + +var findKey = require("./find-key") + , isValue = require("./is-value"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (obj, cb /*, thisArg, compareFn*/) { + var key = findKey.apply(this, arguments); + return isValue(key) ? obj[key] : key; +}; diff --git a/node_modules/es5-ext/object/first-key.js b/node_modules/es5-ext/object/first-key.js new file mode 100644 index 0000000..3666de5 --- /dev/null +++ b/node_modules/es5-ext/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + if (objPropertyIsEnumerable.call(obj, i)) return i; + } + return null; +}; diff --git a/node_modules/es5-ext/object/flatten.js b/node_modules/es5-ext/object/flatten.js new file mode 100644 index 0000000..cda7475 --- /dev/null +++ b/node_modules/es5-ext/object/flatten.js @@ -0,0 +1,16 @@ +"use strict"; + +var isPlainObject = require("./is-plain-object") + , forEach = require("./for-each") + , process; + +process = function self(value, key) { + if (isPlainObject(value)) forEach(value, self, this); + else this[key] = value; +}; + +module.exports = function (obj) { + var flattened = {}; + forEach(obj, process, flattened); + return flattened; +}; diff --git a/node_modules/es5-ext/object/for-each.js b/node_modules/es5-ext/object/for-each.js new file mode 100644 index 0000000..d282956 --- /dev/null +++ b/node_modules/es5-ext/object/for-each.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("forEach"); diff --git a/node_modules/es5-ext/object/get-property-names.js b/node_modules/es5-ext/object/get-property-names.js new file mode 100644 index 0000000..7dfef27 --- /dev/null +++ b/node_modules/es5-ext/object/get-property-names.js @@ -0,0 +1,17 @@ +"use strict"; + +var uniq = require("../array/#/uniq") + , value = require("./valid-value") + , push = Array.prototype.push + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var keys; + obj = Object(value(obj)); + keys = getOwnPropertyNames(obj); + while ((obj = getPrototypeOf(obj))) { + push.apply(keys, getOwnPropertyNames(obj)); + } + return uniq.call(keys); +}; diff --git a/node_modules/es5-ext/object/index.js b/node_modules/es5-ext/object/index.js new file mode 100644 index 0000000..13cfb95 --- /dev/null +++ b/node_modules/es5-ext/object/index.js @@ -0,0 +1,70 @@ +"use strict"; + +module.exports = { + assign: require("./assign"), + assignDeep: require("./assign-deep"), + clear: require("./clear"), + compact: require("./compact"), + compare: require("./compare"), + copy: require("./copy"), + copyDeep: require("./copy-deep"), + count: require("./count"), + create: require("./create"), + ensureArray: require("./ensure-array"), + ensureFiniteNumber: require("./ensure-finite-number"), + ensureInteger: require("./ensure-integer"), + ensureNaturalNumber: require("./ensure-natural-number"), + ensureNaturalNumberValue: require("./ensure-natural-number-value"), + ensurePlainFunction: require("./ensure-plain-function"), + ensurePlainObject: require("./ensure-plain-object"), + ensurePromise: require("./ensure-promise"), + ensureThenable: require("./ensure-thenable"), + entries: require("./entries"), + eq: require("./eq"), + every: require("./every"), + filter: require("./filter"), + find: require("./find"), + findKey: require("./find-key"), + firstKey: require("./first-key"), + flatten: require("./flatten"), + forEach: require("./for-each"), + getPropertyNames: require("./get-property-names"), + is: require("./is"), + isArrayLike: require("./is-array-like"), + isCallable: require("./is-callable"), + isCopy: require("./is-copy"), + isCopyDeep: require("./is-copy-deep"), + isEmpty: require("./is-empty"), + isFiniteNumber: require("./is-finite-number"), + isInteger: require("./is-integer"), + isNaturalNumber: require("./is-natural-number"), + isNaturalNumberValue: require("./is-natural-number-value"), + isNumberValue: require("./is-number-value"), + isObject: require("./is-object"), + isPlainFunction: require("./is-plain-function"), + isPlainObject: require("./is-plain-object"), + isPromise: require("./is-promise"), + isThenable: require("./is-thenable"), + isValue: require("./is-value"), + keyOf: require("./key-of"), + keys: require("./keys"), + map: require("./map"), + mapKeys: require("./map-keys"), + normalizeOptions: require("./normalize-options"), + mixin: require("./mixin"), + mixinPrototypes: require("./mixin-prototypes"), + primitiveSet: require("./primitive-set"), + safeTraverse: require("./safe-traverse"), + serialize: require("./serialize"), + setPrototypeOf: require("./set-prototype-of"), + some: require("./some"), + toArray: require("./to-array"), + unserialize: require("./unserialize"), + validateArrayLike: require("./validate-array-like"), + validateArrayLikeObject: require("./validate-array-like-object"), + validCallable: require("./valid-callable"), + validObject: require("./valid-object"), + validateStringifiable: require("./validate-stringifiable"), + validateStringifiableValue: require("./validate-stringifiable-value"), + validValue: require("./valid-value") +}; diff --git a/node_modules/es5-ext/object/is-array-like.js b/node_modules/es5-ext/object/is-array-like.js new file mode 100644 index 0000000..fcb9115 --- /dev/null +++ b/node_modules/es5-ext/object/is-array-like.js @@ -0,0 +1,17 @@ +"use strict"; + +var isFunction = require("../function/is-function") + , isObject = require("./is-object") + , isValue = require("./is-value"); + +module.exports = function (value) { + return ( + (isValue(value) && + typeof value.length === "number" && + // Just checking ((typeof x === 'object') && (typeof x !== 'function')) + // won't work right for some cases, e.g.: + // type of instance of NodeList in Safari is a 'function' + ((isObject(value) && !isFunction(value)) || typeof value === "string")) || + false + ); +}; diff --git a/node_modules/es5-ext/object/is-callable.js b/node_modules/es5-ext/object/is-callable.js new file mode 100644 index 0000000..927e5e8 --- /dev/null +++ b/node_modules/es5-ext/object/is-callable.js @@ -0,0 +1,5 @@ +// Deprecated + +"use strict"; + +module.exports = function (obj) { return typeof obj === "function"; }; diff --git a/node_modules/es5-ext/object/is-copy-deep.js b/node_modules/es5-ext/object/is-copy-deep.js new file mode 100644 index 0000000..a1206ae --- /dev/null +++ b/node_modules/es5-ext/object/is-copy-deep.js @@ -0,0 +1,59 @@ +"use strict"; + +var eq = require("./eq") + , isPlainObject = require("./is-plain-object") + , value = require("./valid-value"); + +var isArray = Array.isArray + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable + , objHasOwnProperty = Object.prototype.hasOwnProperty + , eqArr + , eqVal + , eqObj; + +eqArr = function (arr1, arr2, recMap) { + var i, length = arr1.length; + if (length !== arr2.length) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(arr1, i) !== objHasOwnProperty.call(arr2, i)) return false; + if (!eqVal(arr1[i], arr2[i], recMap)) return false; + } + return true; +}; + +eqObj = function (obj1, obj2, recMap) { + var k1 = keys(obj1), k2 = keys(obj2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(obj2, key)) return false; + return eqVal(obj1[key], obj2[key], recMap); + }); +}; + +eqVal = function (val1, val2, recMap) { + var i, eqX, c1, c2; + if (eq(val1, val2)) return true; + if (isPlainObject(val1)) { + if (!isPlainObject(val2)) return false; + eqX = eqObj; + } else if (isArray(val1) && isArray(val2)) { + eqX = eqArr; + } else { + return false; + } + c1 = recMap[0]; + c2 = recMap[1]; + i = c1.indexOf(val1); + if (i === -1) { + i = c1.push(val1) - 1; + c2[i] = []; + } else if (c2[i].indexOf(val2) !== -1) return true; + c2[i].push(val2); + return eqX(val1, val2, recMap); +}; + +module.exports = function (val1, val2) { + if (eq(value(val1), value(val2))) return true; + return eqVal(Object(val1), Object(val2), [[], []]); +}; diff --git a/node_modules/es5-ext/object/is-copy.js b/node_modules/es5-ext/object/is-copy.js new file mode 100644 index 0000000..8c6ae5e --- /dev/null +++ b/node_modules/es5-ext/object/is-copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var eq = require("./eq") + , value = require("./valid-value") + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (val1, val2) { + var k1, k2; + + if (eq(value(val1), value(val2))) return true; + + val1 = Object(val1); + val2 = Object(val2); + + k1 = keys(val1); + k2 = keys(val2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(val2, key)) return false; + return eq(val1[key], val2[key]); + }); +}; diff --git a/node_modules/es5-ext/object/is-empty.js b/node_modules/es5-ext/object/is-empty.js new file mode 100644 index 0000000..dbc52d0 --- /dev/null +++ b/node_modules/es5-ext/object/is-empty.js @@ -0,0 +1,14 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + // Jslint: ignore + if (objPropertyIsEnumerable.call(obj, i)) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/object/is-finite-number.js b/node_modules/es5-ext/object/is-finite-number.js new file mode 100644 index 0000000..e016f8d --- /dev/null +++ b/node_modules/es5-ext/object/is-finite-number.js @@ -0,0 +1,5 @@ +"use strict"; + +var isNumber = require("./is-number-value"); + +module.exports = function (value) { return isNumber(value) && isFinite(value); }; diff --git a/node_modules/es5-ext/object/is-integer.js b/node_modules/es5-ext/object/is-integer.js new file mode 100644 index 0000000..1745b82 --- /dev/null +++ b/node_modules/es5-ext/object/is-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +var isInteger = require("../number/is-integer") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + arg = Number(arg); + return isInteger(arg); +}; diff --git a/node_modules/es5-ext/object/is-natural-number-value.js b/node_modules/es5-ext/object/is-natural-number-value.js new file mode 100644 index 0000000..c744521 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isNaturalNumber = require("./is-natural-number") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + return isNaturalNumber(arg); +}; diff --git a/node_modules/es5-ext/object/is-natural-number.js b/node_modules/es5-ext/object/is-natural-number.js new file mode 100644 index 0000000..3e2c1f5 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number.js @@ -0,0 +1,5 @@ +"use strict"; + +var isNatural = require("../number/is-natural"); + +module.exports = function (arg) { return isNatural(Number(arg)); }; diff --git a/node_modules/es5-ext/object/is-number-value.js b/node_modules/es5-ext/object/is-number-value.js new file mode 100644 index 0000000..f701bf5 --- /dev/null +++ b/node_modules/es5-ext/object/is-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) return false; + try { return !isNaN(value); } + catch (e) { return false; } +}; diff --git a/node_modules/es5-ext/object/is-object.js b/node_modules/es5-ext/object/is-object.js new file mode 100644 index 0000000..0e576d7 --- /dev/null +++ b/node_modules/es5-ext/object/is-object.js @@ -0,0 +1,7 @@ +"use strict"; + +var isValue = require("./is-value"); + +var map = { function: true, object: true }; + +module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; }; diff --git a/node_modules/es5-ext/object/is-plain-function.js b/node_modules/es5-ext/object/is-plain-function.js new file mode 100644 index 0000000..a2f3234 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var isClassStr = RegExp.prototype.test.bind(/^\s*class[\s{/}]/) + , fnToString = Function.prototype.toString; + +module.exports = function (fn) { + if (typeof fn !== "function") return false; + if (typeof fn.call !== "function") return false; + if (typeof fn.apply !== "function") return false; + return !isClassStr(fnToString.call(fn)); +}; diff --git a/node_modules/es5-ext/object/is-plain-object.js b/node_modules/es5-ext/object/is-plain-object.js new file mode 100644 index 0000000..ff15328 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-object.js @@ -0,0 +1,20 @@ +"use strict"; + +var getPrototypeOf = Object.getPrototypeOf + , prototype = Object.prototype + , objToString = prototype.toString + , id = Object().toString(); + +module.exports = function (value) { + var proto, valueConstructor; + if (!value || typeof value !== "object" || objToString.call(value) !== id) { + return false; + } + proto = getPrototypeOf(value); + if (proto === null) { + valueConstructor = value.constructor; + if (typeof valueConstructor !== "function") return true; + return valueConstructor.prototype !== value; + } + return proto === prototype || getPrototypeOf(proto) === null; +}; diff --git a/node_modules/es5-ext/object/is-promise.js b/node_modules/es5-ext/object/is-promise.js new file mode 100644 index 0000000..33d6df1 --- /dev/null +++ b/node_modules/es5-ext/object/is-promise.js @@ -0,0 +1,4 @@ +"use strict"; + +// In next major this check will also confirm on promise constructor +module.exports = require("./is-thenable"); diff --git a/node_modules/es5-ext/object/is-thenable.js b/node_modules/es5-ext/object/is-thenable.js new file mode 100644 index 0000000..06db0fd --- /dev/null +++ b/node_modules/es5-ext/object/is-thenable.js @@ -0,0 +1,6 @@ +"use strict"; + +var isCallable = require("./is-callable") + , isObject = require("./is-object"); + +module.exports = function (value) { return isObject(value) && isCallable(value.then); }; diff --git a/node_modules/es5-ext/object/is-value.js b/node_modules/es5-ext/object/is-value.js new file mode 100644 index 0000000..4ee3805 --- /dev/null +++ b/node_modules/es5-ext/object/is-value.js @@ -0,0 +1,5 @@ +"use strict"; + +var _undefined = require("../function/noop")(); // Support ES3 engines + +module.exports = function (val) { return val !== _undefined && val !== null; }; diff --git a/node_modules/es5-ext/object/is.js b/node_modules/es5-ext/object/is.js new file mode 100644 index 0000000..54baade --- /dev/null +++ b/node_modules/es5-ext/object/is.js @@ -0,0 +1,10 @@ +// Implementation credits go to: +// http://wiki.ecmascript.org/doku.php?id=harmony:egal + +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2); +}; diff --git a/node_modules/es5-ext/object/key-of.js b/node_modules/es5-ext/object/key-of.js new file mode 100644 index 0000000..dc640e4 --- /dev/null +++ b/node_modules/es5-ext/object/key-of.js @@ -0,0 +1,17 @@ +"use strict"; + +var eq = require("./eq") + , some = require("./some"); + +module.exports = function (obj, searchValue) { + var result; + return some(obj, function (value, name) { + if (eq(value, searchValue)) { + result = name; + return true; + } + return false; + }) + ? result + : null; +}; diff --git a/node_modules/es5-ext/object/keys/implement.js b/node_modules/es5-ext/object/keys/implement.js new file mode 100644 index 0000000..72ecfbd --- /dev/null +++ b/node_modules/es5-ext/object/keys/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "keys", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/keys/index.js b/node_modules/es5-ext/object/keys/index.js new file mode 100644 index 0000000..d194227 --- /dev/null +++ b/node_modules/es5-ext/object/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); diff --git a/node_modules/es5-ext/object/keys/is-implemented.js b/node_modules/es5-ext/object/keys/is-implemented.js new file mode 100644 index 0000000..2dfcf1b --- /dev/null +++ b/node_modules/es5-ext/object/keys/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; + } +}; diff --git a/node_modules/es5-ext/object/keys/shim.js b/node_modules/es5-ext/object/keys/shim.js new file mode 100644 index 0000000..a8908d5 --- /dev/null +++ b/node_modules/es5-ext/object/keys/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var isValue = require("../is-value"); + +var keys = Object.keys; + +module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; diff --git a/node_modules/es5-ext/object/map-keys.js b/node_modules/es5-ext/object/map-keys.js new file mode 100644 index 0000000..72dada0 --- /dev/null +++ b/node_modules/es5-ext/object/map-keys.js @@ -0,0 +1,18 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach( + obj, + function (value, key, targetObj, index) { + result[call.call(cb, thisArg, key, value, this, index)] = value; + }, + obj + ); + return result; +}; diff --git a/node_modules/es5-ext/object/map.js b/node_modules/es5-ext/object/map.js new file mode 100644 index 0000000..7b718db --- /dev/null +++ b/node_modules/es5-ext/object/map.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + result[key] = call.call(cb, thisArg, value, key, targetObj, index); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/mixin-prototypes.js b/node_modules/es5-ext/object/mixin-prototypes.js new file mode 100644 index 0000000..81e27c7 --- /dev/null +++ b/node_modules/es5-ext/object/mixin-prototypes.js @@ -0,0 +1,25 @@ +"use strict"; + +var value = require("./valid-value") + , mixin = require("./mixin"); + +var getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (target, source) { + target = Object(value(target)); + source = Object(value(source)); + if (target === source) return target; + + var sources = []; + while (source && !isPrototypeOf.call(source, target)) { + sources.unshift(source); + source = getPrototypeOf(source); + } + + var error; + sources.forEach(function (sourceProto) { + try { mixin(target, sourceProto); } catch (mixinError) { error = mixinError; } + }); + if (error) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/mixin.js b/node_modules/es5-ext/object/mixin.js new file mode 100644 index 0000000..f5cf9dd --- /dev/null +++ b/node_modules/es5-ext/object/mixin.js @@ -0,0 +1,26 @@ +"use strict"; + +var value = require("./valid-value") + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getOwnPropertySymbols = Object.getOwnPropertySymbols; + +module.exports = function (target, source) { + var error, sourceObject = Object(value(source)); + target = Object(value(target)); + getOwnPropertyNames(sourceObject).forEach(function (name) { + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { error = e; } + }); + if (typeof getOwnPropertySymbols === "function") { + getOwnPropertySymbols(sourceObject).forEach(function (symbol) { + try { + defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); + } catch (e) { error = e; } + }); + } + if (error !== undefined) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/normalize-options.js b/node_modules/es5-ext/object/normalize-options.js new file mode 100644 index 0000000..6c394fe --- /dev/null +++ b/node_modules/es5-ext/object/normalize-options.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("./is-value"); + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (opts1 /*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/primitive-set.js b/node_modules/es5-ext/object/primitive-set.js new file mode 100644 index 0000000..840808d --- /dev/null +++ b/node_modules/es5-ext/object/primitive-set.js @@ -0,0 +1,10 @@ +"use strict"; + +var forEach = Array.prototype.forEach, create = Object.create; + +// eslint-disable-next-line no-unused-vars +module.exports = function (arg /*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { set[name] = true; }); + return set; +}; diff --git a/node_modules/es5-ext/object/safe-traverse.js b/node_modules/es5-ext/object/safe-traverse.js new file mode 100644 index 0000000..7b72d55 --- /dev/null +++ b/node_modules/es5-ext/object/safe-traverse.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("./valid-value") + , isValue = require("./is-value"); + +module.exports = function (obj /*, …names*/) { + var length, current = 1; + value(obj); + length = arguments.length - 1; + if (!length) return obj; + while (current < length) { + obj = obj[arguments[current++]]; + if (!isValue(obj)) return undefined; + } + return obj[arguments[current]]; +}; diff --git a/node_modules/es5-ext/object/serialize.js b/node_modules/es5-ext/object/serialize.js new file mode 100644 index 0000000..ec868c1 --- /dev/null +++ b/node_modules/es5-ext/object/serialize.js @@ -0,0 +1,41 @@ +"use strict"; + +var toArray = require("./to-array") + , isDate = require("../date/is-date") + , isValue = require("../object/is-value") + , isRegExp = require("../reg-exp/is-reg-exp"); + +var isArray = Array.isArray + , stringify = JSON.stringify + , objHasOwnProperty = Object.prototype.hasOwnProperty; +var keyValueToString = function (value, key) { + return stringify(key) + ":" + module.exports(value); +}; + +var sparseMap = function (arr) { + var i, length = arr.length, result = new Array(length); + for (i = 0; i < length; ++i) { + if (!objHasOwnProperty.call(arr, i)) continue; + result[i] = module.exports(arr[i]); + } + return result; +}; + +module.exports = function (obj) { + if (!isValue(obj)) return String(obj); + switch (typeof obj) { + case "string": + return stringify(obj); + case "number": + case "boolean": + case "function": + return String(obj); + case "object": + if (isArray(obj)) return "[" + sparseMap(obj) + "]"; + if (isRegExp(obj)) return String(obj); + if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; + return "{" + toArray(obj, keyValueToString) + "}"; + default: + throw new TypeError("Serialization of " + String(obj) + "is unsupported"); + } +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/implement.js b/node_modules/es5-ext/object/set-prototype-of/implement.js new file mode 100644 index 0000000..386a300 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/implement.js @@ -0,0 +1,12 @@ +"use strict"; + +var shim; + +if (!require("./is-implemented")() && (shim = require("./shim"))) { + Object.defineProperty(Object, "setPrototypeOf", { + value: shim, + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/set-prototype-of/index.js b/node_modules/es5-ext/object/set-prototype-of/index.js new file mode 100644 index 0000000..ac07b99 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.setPrototypeOf : require("./shim"); diff --git a/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..1a00627 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; + +module.exports = function (/* CustomCreate*/) { + var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== "function") return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/shim.js b/node_modules/es5-ext/object/set-prototype-of/shim.js new file mode 100644 index 0000000..97b0b50 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/shim.js @@ -0,0 +1,81 @@ +/* eslint no-proto: "off" */ + +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + +"use strict"; + +var isObject = require("../is-object") + , value = require("../valid-value") + , objIsPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined } + , validate; + +validate = function (obj, prototype) { + value(obj); + if (prototype === null || isObject(prototype)) return obj; + throw new TypeError("Prototype must be null or an object"); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, "level", { + configurable: false, + enumerable: false, + writable: false, + value: status.level + }); +})( + (function () { + var tmpObj1 = Object.create(null) + , tmpObj2 = {} + , set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(tmpObj1, tmpObj2); + } catch (ignore) {} + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; + } + + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; + + tmpObj1 = {}; + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; + + return false; + })() +); + +require("../create"); diff --git a/node_modules/es5-ext/object/some.js b/node_modules/es5-ext/object/some.js new file mode 100644 index 0000000..c919466 --- /dev/null +++ b/node_modules/es5-ext/object/some.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("some", false); diff --git a/node_modules/es5-ext/object/to-array.js b/node_modules/es5-ext/object/to-array.js new file mode 100644 index 0000000..8912b45 --- /dev/null +++ b/node_modules/es5-ext/object/to-array.js @@ -0,0 +1,21 @@ +"use strict"; + +var callable = require("./valid-callable") + , isValue = require("./is-value") + , forEach = require("./for-each") + , call = Function.prototype.call + , defaultCb = function (value, key) { return [key, value]; }; + +module.exports = function (obj /*, cb, thisArg, compareFn*/) { + var a = [], cb = arguments[1], thisArg = arguments[2]; + cb = isValue(cb) ? callable(cb) : defaultCb; + + forEach( + obj, + function (value, key, targetObj, index) { + a.push(call.call(cb, thisArg, value, key, this, index)); + }, + obj, arguments[3] + ); + return a; +}; diff --git a/node_modules/es5-ext/object/unserialize.js b/node_modules/es5-ext/object/unserialize.js new file mode 100644 index 0000000..f62ea78 --- /dev/null +++ b/node_modules/es5-ext/object/unserialize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("./valid-value"); + +module.exports = function (code) { + // eslint-disable-next-line no-new-func + return new Function("return " + value(code))(); +}; diff --git a/node_modules/es5-ext/object/valid-callable.js b/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 0000000..a97fb3e --- /dev/null +++ b/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; diff --git a/node_modules/es5-ext/object/valid-object.js b/node_modules/es5-ext/object/valid-object.js new file mode 100644 index 0000000..74b5e5f --- /dev/null +++ b/node_modules/es5-ext/object/valid-object.js @@ -0,0 +1,8 @@ +"use strict"; + +var isObject = require("./is-object"); + +module.exports = function (value) { + if (!isObject(value)) throw new TypeError(value + " is not an Object"); + return value; +}; diff --git a/node_modules/es5-ext/object/valid-value.js b/node_modules/es5-ext/object/valid-value.js new file mode 100644 index 0000000..d0ced8a --- /dev/null +++ b/node_modules/es5-ext/object/valid-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; +}; diff --git a/node_modules/es5-ext/object/validate-array-like-object.js b/node_modules/es5-ext/object/validate-array-like-object.js new file mode 100644 index 0000000..d7c45b3 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isArrayLike = require("./is-array-like") + , isObject = require("./is-object"); + +module.exports = function (obj) { + if (isObject(obj) && isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like object"); +}; diff --git a/node_modules/es5-ext/object/validate-array-like.js b/node_modules/es5-ext/object/validate-array-like.js new file mode 100644 index 0000000..07aa794 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArrayLike = require("./is-array-like"); + +module.exports = function (obj) { + if (isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like value"); +}; diff --git a/node_modules/es5-ext/object/validate-stringifiable-value.js b/node_modules/es5-ext/object/validate-stringifiable-value.js new file mode 100644 index 0000000..b58f18c --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable-value.js @@ -0,0 +1,6 @@ +"use strict"; + +var ensureValue = require("./valid-value") + , stringifiable = require("./validate-stringifiable"); + +module.exports = function (value) { return stringifiable(ensureValue(value)); }; diff --git a/node_modules/es5-ext/object/validate-stringifiable.js b/node_modules/es5-ext/object/validate-stringifiable.js new file mode 100644 index 0000000..2b1f127 --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./is-callable"); + +module.exports = function (stringifiable) { + try { + if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString(); + return String(stringifiable); + } catch (e) { + throw new TypeError("Passed argument cannot be stringifed"); + } +}; diff --git a/node_modules/es5-ext/optional-chaining.js b/node_modules/es5-ext/optional-chaining.js new file mode 100644 index 0000000..f181127 --- /dev/null +++ b/node_modules/es5-ext/optional-chaining.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./object/is-value"); + +var slice = Array.prototype.slice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (value, propertyName1 /*, …propertyNamen*/) { + var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length; + while (isValue(value) && index < length) value = value[propertyNames[index++]]; + return index === length ? value : undefined; +}; diff --git a/node_modules/es5-ext/package.json b/node_modules/es5-ext/package.json new file mode 100644 index 0000000..b91b917 --- /dev/null +++ b/node_modules/es5-ext/package.json @@ -0,0 +1,126 @@ +{ + "name": "es5-ext", + "version": "0.10.62", + "description": "ECMAScript extensions and shims", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ecmascript", + "ecmascript5", + "ecmascript6", + "es5", + "es6", + "extensions", + "ext", + "addons", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": "medikoo/es5-ext", + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "devDependencies": { + "eslint": "^8.13.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": "^12.3.8", + "nyc": "^15.1.0", + "plain-promise": "^0.1.1", + "prettier-elastic": "^2.2.1", + "tad": "^3.1.0" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true, + "rules": { + "no-extend-native": "off" + }, + "overrides": [ + { + "files": "global.js", + "globals": { + "__global__": true, + "globalThis": true, + "self": true, + "window": true + }, + "rules": { + "strict": "off" + } + }, + { + "files": "_postinstall.js", + "env": { + "node": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "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": "eslint --ignore-path=.gitignore .", + "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", + "postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0", + "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": "node ./node_modules/tad/bin/tad" + }, + "engines": { + "node": ">=0.10" + }, + "license": "ISC" +} diff --git a/node_modules/es5-ext/promise/#/as-callback.js b/node_modules/es5-ext/promise/#/as-callback.js new file mode 100644 index 0000000..ba310b3 --- /dev/null +++ b/node_modules/es5-ext/promise/#/as-callback.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , ensureThenable = require("../../object/ensure-thenable") + , microtaskDelay = require("../../function/#/microtask-delay"); + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + // Rely on microtaskDelay to escape eventual error swallowing + this.then( + microtaskDelay.call(function (value) { callback(null, value); }), + microtaskDelay.call(function (reason) { callback(reason); }) + ); +}; diff --git a/node_modules/es5-ext/promise/#/finally/implement.js b/node_modules/es5-ext/promise/#/finally/implement.js new file mode 100644 index 0000000..77592b3 --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Promise.prototype, "finally", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/promise/#/finally/index.js b/node_modules/es5-ext/promise/#/finally/index.js new file mode 100644 index 0000000..f6bb447 --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Promise.prototype.finally : require("./shim"); diff --git a/node_modules/es5-ext/promise/#/finally/is-implemented.js b/node_modules/es5-ext/promise/#/finally/is-implemented.js new file mode 100644 index 0000000..0534ce6 --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + if (typeof Promise !== "function") return false; + if (typeof Promise.prototype.finally !== "function") return false; + return true; +}; diff --git a/node_modules/es5-ext/promise/#/finally/shim.js b/node_modules/es5-ext/promise/#/finally/shim.js new file mode 100644 index 0000000..f29f5b3 --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/shim.js @@ -0,0 +1,24 @@ +"use strict"; + +var ensurePlainFunction = require("../../../object/ensure-plain-function") + , isThenable = require("../../../object/is-thenable") + , ensureThenable = require("../../../object/ensure-thenable"); + +var resolveCallback = function (callback, next) { + var callbackResult = callback(); + if (!isThenable(callbackResult)) return next(); + return callbackResult.then(next); +}; + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + return this.then( + function (result) { + return resolveCallback(callback, function () { return result; }); + }, + function (error) { + return resolveCallback(callback, function () { throw error; }); + } + ); +}; diff --git a/node_modules/es5-ext/promise/#/index.js b/node_modules/es5-ext/promise/#/index.js new file mode 100644 index 0000000..4601803 --- /dev/null +++ b/node_modules/es5-ext/promise/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { asCallback: require("./as-callback"), finally: require("./finally") }; diff --git a/node_modules/es5-ext/promise/.eslintrc.json b/node_modules/es5-ext/promise/.eslintrc.json new file mode 100644 index 0000000..0d86fe7 --- /dev/null +++ b/node_modules/es5-ext/promise/.eslintrc.json @@ -0,0 +1 @@ +{ "globals": { "Promise": true } } diff --git a/node_modules/es5-ext/promise/index.js b/node_modules/es5-ext/promise/index.js new file mode 100644 index 0000000..6aa66bb --- /dev/null +++ b/node_modules/es5-ext/promise/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { "#": require("./#"), "lazy": require("./lazy") }; diff --git a/node_modules/es5-ext/promise/lazy.js b/node_modules/es5-ext/promise/lazy.js new file mode 100644 index 0000000..ad97a53 --- /dev/null +++ b/node_modules/es5-ext/promise/lazy.js @@ -0,0 +1,35 @@ +"use strict"; + +var isFunction = require("../function/is-function"); + +module.exports = function (executor) { + var Constructor; + if (isFunction(this)) { + Constructor = this; + } else if (typeof Promise === "function") { + Constructor = Promise; + } else { + throw new TypeError("Could not resolve Promise constuctor"); + } + + var lazyThen; + var promise = new Constructor(function (resolve, reject) { + lazyThen = function (onSuccess, onFailure) { + if (!hasOwnProperty.call(this, "then")) { + // Sanity check + throw new Error("Unexpected (inherited) lazy then invocation"); + } + + try { executor(resolve, reject); } + catch (reason) { reject(reason); } + delete this.then; + return this.then(onSuccess, onFailure); + }; + }); + + return Object.defineProperty(promise, "then", { + configurable: true, + writable: true, + value: lazyThen + }); +}; diff --git a/node_modules/es5-ext/reg-exp/#/index.js b/node_modules/es5-ext/reg-exp/#/index.js new file mode 100644 index 0000000..9b098e0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + isSticky: require("./is-sticky"), + isUnicode: require("./is-unicode"), + match: require("./match"), + replace: require("./replace"), + search: require("./search"), + split: require("./split") +}; diff --git a/node_modules/es5-ext/reg-exp/#/is-sticky.js b/node_modules/es5-ext/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..6e99533 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-sticky.js @@ -0,0 +1,6 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + , re = /\/[a-xz]*y[a-xz]*$/; + +module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git a/node_modules/es5-ext/reg-exp/#/is-unicode.js b/node_modules/es5-ext/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..63a457f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-unicode.js @@ -0,0 +1,6 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + , re = /\/[a-xz]*u[a-xz]*$/; + +module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git a/node_modules/es5-ext/reg-exp/#/match/implement.js b/node_modules/es5-ext/reg-exp/#/match/implement.js new file mode 100644 index 0000000..68dcd55 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "match", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/match/index.js b/node_modules/es5-ext/reg-exp/#/match/index.js new file mode 100644 index 0000000..4b33296 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.match : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..a5065fc --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.match !== "function") return false; + return re.match("barfoobar") && !re.match("elo"); +}; diff --git a/node_modules/es5-ext/reg-exp/#/match/shim.js b/node_modules/es5-ext/reg-exp/#/match/shim.js new file mode 100644 index 0000000..2955821 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).match(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/implement.js b/node_modules/es5-ext/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..f990c4f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "replace", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/replace/index.js b/node_modules/es5-ext/reg-exp/#/replace/index.js new file mode 100644 index 0000000..be54b52 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.replace : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..0a2e7c2 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.replace !== "function") return false; + return re.replace("foobar", "mar") === "marbar"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/shim.js b/node_modules/es5-ext/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..66f5d5b --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string, replaceValue) { + validRegExp(this); + return String(string).replace(this, replaceValue); +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/implement.js b/node_modules/es5-ext/reg-exp/#/search/implement.js new file mode 100644 index 0000000..df4a337 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "search", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/search/index.js b/node_modules/es5-ext/reg-exp/#/search/index.js new file mode 100644 index 0000000..25ca76a --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.search : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..7f38669 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.search !== "function") return false; + return re.search("barfoo") === 3; +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/shim.js b/node_modules/es5-ext/reg-exp/#/search/shim.js new file mode 100644 index 0000000..c97a787 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).search(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/implement.js b/node_modules/es5-ext/reg-exp/#/split/implement.js new file mode 100644 index 0000000..b979db0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "split", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/split/index.js b/node_modules/es5-ext/reg-exp/#/split/index.js new file mode 100644 index 0000000..6d4f177 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.split : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..90fca0c --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /\|/; + +module.exports = function () { + if (typeof re.split !== "function") return false; + return re.split("bar|foo")[1] === "foo"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/shim.js b/node_modules/es5-ext/reg-exp/#/split/shim.js new file mode 100644 index 0000000..c9c73cc --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).split(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/node_modules/es5-ext/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..7864c6c --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +var isSticky = require("../is-sticky"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "sticky", { + configurable: true, + enumerable: false, + get: isSticky + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..a1ade11 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "sticky" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/node_modules/es5-ext/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..8b99be5 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +var isUnicode = require("../is-unicode"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "unicode", { + configurable: true, + enumerable: false, + get: isUnicode + }); +} diff --git a/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..48605d7 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "unicode" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/escape.js b/node_modules/es5-ext/reg-exp/escape.js new file mode 100644 index 0000000..b65b351 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/escape.js @@ -0,0 +1,9 @@ +// Thanks to Andrew Clover: +// http://stackoverflow.com/questions/3561493 +// /is-there-a-regexp-escape-function-in-javascript + +"use strict"; + +var re = /[-/\\^$*+?.()|[\]{}]/g; + +module.exports = function (str) { return String(str).replace(re, "\\$&"); }; diff --git a/node_modules/es5-ext/reg-exp/index.js b/node_modules/es5-ext/reg-exp/index.js new file mode 100644 index 0000000..f023fe0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "escape": require("./escape"), + "isRegExp": require("./is-reg-exp"), + "validRegExp": require("./valid-reg-exp") +}; diff --git a/node_modules/es5-ext/reg-exp/is-reg-exp.js b/node_modules/es5-ext/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..b966b0f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/is-reg-exp.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(/a/); + +module.exports = function (value) { + return (value && (value instanceof RegExp || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/node_modules/es5-ext/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..a05927a --- /dev/null +++ b/node_modules/es5-ext/reg-exp/valid-reg-exp.js @@ -0,0 +1,8 @@ +"use strict"; + +var isRegExp = require("./is-reg-exp"); + +module.exports = function (value) { + if (!isRegExp(value)) throw new TypeError(value + " is not a RegExp object"); + return value; +}; diff --git a/node_modules/es5-ext/safe-to-string.js b/node_modules/es5-ext/safe-to-string.js new file mode 100644 index 0000000..f49a238 --- /dev/null +++ b/node_modules/es5-ext/safe-to-string.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./object/is-callable"); + +module.exports = function (value) { + try { + if (value && isCallable(value.toString)) return value.toString(); + return String(value); + } catch (e) { + return ""; + } +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/implement.js b/node_modules/es5-ext/string/#/@@iterator/implement.js new file mode 100644 index 0000000..b51ad9f --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/@@iterator/index.js b/node_modules/es5-ext/string/#/@@iterator/index.js new file mode 100644 index 0000000..4572443 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype[require("es6-symbol").iterator] + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..bb8a8d6 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var str = "🙈f", iterator, result; + if (typeof str[iteratorSymbol] !== "function") return false; + iterator = str[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "🙈") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/shim.js b/node_modules/es5-ext/string/#/@@iterator/shim.js new file mode 100644 index 0000000..2160619 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var StringIterator = require("es6-iterator/string") + , value = require("../../../object/valid-value"); + +module.exports = function () { return new StringIterator(value(this)); }; diff --git a/node_modules/es5-ext/string/#/at.js b/node_modules/es5-ext/string/#/at.js new file mode 100644 index 0000000..a8c2917 --- /dev/null +++ b/node_modules/es5-ext/string/#/at.js @@ -0,0 +1,35 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.at +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../number/to-integer") + , validValue = require("../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), size = str.length, cuFirst, cuSecond, nextPos, len; + pos = toInteger(pos); + + // Account for out-of-bounds indices + // The odd lower bound is because the ToInteger operation is + // going to round `n` to `0` for `-1 < n <= 0`. + if (pos <= -1 || pos >= size) return ""; + + // Second half of `ToInteger` + // eslint-disable-next-line no-bitwise + pos |= 0; + // Get the first code unit and code unit value + cuFirst = str.charCodeAt(pos); + nextPos = pos + 1; + len = 1; + if ( + // Check if it’s the start of a surrogate pair + cuFirst >= 0xd800 && + cuFirst <= 0xdbff && // High surrogate + size > nextPos // There is a next code unit + ) { + cuSecond = str.charCodeAt(nextPos); + if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) len = 2; // Low surrogate + } + return str.slice(pos, pos + len); +}; diff --git a/node_modules/es5-ext/string/#/camel-to-hyphen.js b/node_modules/es5-ext/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..5add3ed --- /dev/null +++ b/node_modules/es5-ext/string/#/camel-to-hyphen.js @@ -0,0 +1,9 @@ +"use strict"; + +var replace = String.prototype.replace, re = /([A-Z])/g; + +module.exports = function () { + var str = replace.call(this, re, "-$1").toLowerCase(); + if (str[0] === "-") str = str.slice(1); + return str; +}; diff --git a/node_modules/es5-ext/string/#/capitalize.js b/node_modules/es5-ext/string/#/capitalize.js new file mode 100644 index 0000000..fc92a9f --- /dev/null +++ b/node_modules/es5-ext/string/#/capitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var str = String(value(this)); + return str.charAt(0).toUpperCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/#/case-insensitive-compare.js b/node_modules/es5-ext/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..5d961a5 --- /dev/null +++ b/node_modules/es5-ext/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +var toLowerCase = String.prototype.toLowerCase; + +module.exports = function (other) { + return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/implement.js b/node_modules/es5-ext/string/#/code-point-at/implement.js new file mode 100644 index 0000000..25752f9 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "codePointAt", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/code-point-at/index.js b/node_modules/es5-ext/string/#/code-point-at/index.js new file mode 100644 index 0000000..0a22f84 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.codePointAt : require("./shim"); diff --git a/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..47e4c93 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "abc\uD834\uDF06def"; + +module.exports = function () { + if (typeof str.codePointAt !== "function") return false; + return str.codePointAt(3) === 0x1d306; +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/shim.js b/node_modules/es5-ext/string/#/code-point-at/shim.js new file mode 100644 index 0000000..0f331c3 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/shim.js @@ -0,0 +1,26 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , validValue = require("../../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), length = str.length, first, second; + pos = toInteger(pos); + + // Account for out-of-bounds indices: + if (pos < 0 || pos >= length) return undefined; + + // Get the first code unit + first = str.charCodeAt(pos); + if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) { + second = str.charCodeAt(pos + 1); + if (second >= 0xdc00 && second <= 0xdfff) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; + } + } + return first; +}; diff --git a/node_modules/es5-ext/string/#/contains/implement.js b/node_modules/es5-ext/string/#/contains/implement.js new file mode 100644 index 0000000..03cc091 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "contains", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/contains/index.js b/node_modules/es5-ext/string/#/contains/index.js new file mode 100644 index 0000000..5f8d993 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.contains : require("./shim"); diff --git a/node_modules/es5-ext/string/#/contains/is-implemented.js b/node_modules/es5-ext/string/#/contains/is-implemented.js new file mode 100644 index 0000000..d9b3e9a --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.contains !== "function") return false; + return str.contains("dwa") === true && str.contains("foo") === false; +}; diff --git a/node_modules/es5-ext/string/#/contains/shim.js b/node_modules/es5-ext/string/#/contains/shim.js new file mode 100644 index 0000000..de2483d --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString /*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/string/#/count.js b/node_modules/es5-ext/string/#/count.js new file mode 100644 index 0000000..7607013 --- /dev/null +++ b/node_modules/es5-ext/string/#/count.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureString = require("../../object/validate-stringifiable-value"); + +module.exports = function (search) { + var string = ensureString(this), count = 0, index = 0; + + search = ensureString(search); + if (!search) throw new TypeError("Search string cannot be empty"); + while ((index = string.indexOf(search, index)) !== -1) { + ++count; + index += search.length; + } + return count; +}; diff --git a/node_modules/es5-ext/string/#/ends-with/implement.js b/node_modules/es5-ext/string/#/ends-with/implement.js new file mode 100644 index 0000000..62457cc --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "endsWith", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/ends-with/index.js b/node_modules/es5-ext/string/#/ends-with/index.js new file mode 100644 index 0000000..04c8264 --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.endsWith : require("./shim"); diff --git a/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/node_modules/es5-ext/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..1abaff7 --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.endsWith !== "function") return false; + return str.endsWith("trzy") === true && str.endsWith("raz") === false; +}; diff --git a/node_modules/es5-ext/string/#/ends-with/shim.js b/node_modules/es5-ext/string/#/ends-with/shim.js new file mode 100644 index 0000000..c5371aa --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/shim.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , value = require("../../../object/valid-value") + , isValue = require("../../../object/is-value") + , min = Math.min + , max = Math.max; + +module.exports = function (searchString /*, endPosition*/) { + var self, start, endPos; + self = String(value(this)); + searchString = String(searchString); + endPos = arguments[1]; + start = + (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - + searchString.length; + return start < 0 ? false : self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/hyphen-to-camel.js b/node_modules/es5-ext/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..9feef5b --- /dev/null +++ b/node_modules/es5-ext/string/#/hyphen-to-camel.js @@ -0,0 +1,6 @@ +"use strict"; + +var replace = String.prototype.replace, re = /-([a-z0-9])/g; +var toUpperCase = function (ignored, a) { return a.toUpperCase(); }; + +module.exports = function () { return replace.call(this, re, toUpperCase); }; diff --git a/node_modules/es5-ext/string/#/indent.js b/node_modules/es5-ext/string/#/indent.js new file mode 100644 index 0000000..df8869d --- /dev/null +++ b/node_modules/es5-ext/string/#/indent.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , repeat = require("./repeat") + , replace = String.prototype.replace + , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; + +module.exports = function (indent /*, count*/) { + var count = arguments[1]; + indent = repeat.call(String(indent), isValue(count) ? count : 1); + return indent + replace.call(this, re, "$1" + indent + "$2"); +}; diff --git a/node_modules/es5-ext/string/#/index.js b/node_modules/es5-ext/string/#/index.js new file mode 100644 index 0000000..2344489 --- /dev/null +++ b/node_modules/es5-ext/string/#/index.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "at": require("./at"), + "count": require("./count"), + "camelToHyphen": require("./camel-to-hyphen"), + "capitalize": require("./capitalize"), + "caseInsensitiveCompare": require("./case-insensitive-compare"), + "codePointAt": require("./code-point-at"), + "contains": require("./contains"), + "hyphenToCamel": require("./hyphen-to-camel"), + "endsWith": require("./ends-with"), + "indent": require("./indent"), + "last": require("./last"), + "normalize": require("./normalize"), + "pad": require("./pad"), + "plainReplace": require("./plain-replace"), + "plainReplaceAll": require("./plain-replace-all"), + "repeat": require("./repeat"), + "startsWith": require("./starts-with"), + "uncapitalize": require("./uncapitalize") +}; diff --git a/node_modules/es5-ext/string/#/last.js b/node_modules/es5-ext/string/#/last.js new file mode 100644 index 0000000..f5c957f --- /dev/null +++ b/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var self = String(value(this)), length = self.length; + return length ? self[length - 1] : null; +}; diff --git a/node_modules/es5-ext/string/#/normalize/_data.js b/node_modules/es5-ext/string/#/normalize/_data.js new file mode 100644 index 0000000..ae4f153 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/_data.js @@ -0,0 +1,6988 @@ +/* eslint max-lines: "off", no-sparse-arrays: "off", comma-style: "off" */ + +"use strict"; + +module.exports = { + 0: { + 60: [, , { 824: 8814 }], + 61: [, , { 824: 8800 }], + 62: [, , { 824: 8815 }], + 65: [ + , , + { + 768: 192, + 769: 193, + 770: 194, + 771: 195, + 772: 256, + 774: 258, + 775: 550, + 776: 196, + 777: 7842, + 778: 197, + 780: 461, + 783: 512, + 785: 514, + 803: 7840, + 805: 7680, + 808: 260 + } + ], + 66: [, , { 775: 7682, 803: 7684, 817: 7686 }], + 67: [, , { 769: 262, 770: 264, 775: 266, 780: 268, 807: 199 }], + 68: [, , { 775: 7690, 780: 270, 803: 7692, 807: 7696, 813: 7698, 817: 7694 }], + 69: [ + , , + { + 768: 200, + 769: 201, + 770: 202, + 771: 7868, + 772: 274, + 774: 276, + 775: 278, + 776: 203, + 777: 7866, + 780: 282, + 783: 516, + 785: 518, + 803: 7864, + 807: 552, + 808: 280, + 813: 7704, + 816: 7706 + } + ], + 70: [, , { 775: 7710 }], + 71: [, , { 769: 500, 770: 284, 772: 7712, 774: 286, 775: 288, 780: 486, 807: 290 }], + 72: [, , { 770: 292, 775: 7714, 776: 7718, 780: 542, 803: 7716, 807: 7720, 814: 7722 }], + 73: [ + , , + { + 768: 204, + 769: 205, + 770: 206, + 771: 296, + 772: 298, + 774: 300, + 775: 304, + 776: 207, + 777: 7880, + 780: 463, + 783: 520, + 785: 522, + 803: 7882, + 808: 302, + 816: 7724 + } + ], + 74: [, , { 770: 308 }], + 75: [, , { 769: 7728, 780: 488, 803: 7730, 807: 310, 817: 7732 }], + 76: [, , { 769: 313, 780: 317, 803: 7734, 807: 315, 813: 7740, 817: 7738 }], + 77: [, , { 769: 7742, 775: 7744, 803: 7746 }], + 78: [ + , , + { + 768: 504, + 769: 323, + 771: 209, + 775: 7748, + 780: 327, + 803: 7750, + 807: 325, + 813: 7754, + 817: 7752 + } + ], + 79: [ + , , + { + 768: 210, + 769: 211, + 770: 212, + 771: 213, + 772: 332, + 774: 334, + 775: 558, + 776: 214, + 777: 7886, + 779: 336, + 780: 465, + 783: 524, + 785: 526, + 795: 416, + 803: 7884, + 808: 490 + } + ], + 80: [, , { 769: 7764, 775: 7766 }], + 82: [ + , , + { 769: 340, 775: 7768, 780: 344, 783: 528, 785: 530, 803: 7770, 807: 342, 817: 7774 } + ], + 83: [, , { 769: 346, 770: 348, 775: 7776, 780: 352, 803: 7778, 806: 536, 807: 350 }], + 84: [, , { 775: 7786, 780: 356, 803: 7788, 806: 538, 807: 354, 813: 7792, 817: 7790 }], + 85: [ + , , + { + 768: 217, + 769: 218, + 770: 219, + 771: 360, + 772: 362, + 774: 364, + 776: 220, + 777: 7910, + 778: 366, + 779: 368, + 780: 467, + 783: 532, + 785: 534, + 795: 431, + 803: 7908, + 804: 7794, + 808: 370, + 813: 7798, + 816: 7796 + } + ], + 86: [, , { 771: 7804, 803: 7806 }], + 87: [, , { 768: 7808, 769: 7810, 770: 372, 775: 7814, 776: 7812, 803: 7816 }], + 88: [, , { 775: 7818, 776: 7820 }], + 89: [ + , , + { + 768: 7922, + 769: 221, + 770: 374, + 771: 7928, + 772: 562, + 775: 7822, + 776: 376, + 777: 7926, + 803: 7924 + } + ], + 90: [, , { 769: 377, 770: 7824, 775: 379, 780: 381, 803: 7826, 817: 7828 }], + 97: [ + , , + { + 768: 224, + 769: 225, + 770: 226, + 771: 227, + 772: 257, + 774: 259, + 775: 551, + 776: 228, + 777: 7843, + 778: 229, + 780: 462, + 783: 513, + 785: 515, + 803: 7841, + 805: 7681, + 808: 261 + } + ], + 98: [, , { 775: 7683, 803: 7685, 817: 7687 }], + 99: [, , { 769: 263, 770: 265, 775: 267, 780: 269, 807: 231 }], + 100: [, , { 775: 7691, 780: 271, 803: 7693, 807: 7697, 813: 7699, 817: 7695 }], + 101: [ + , , + { + 768: 232, + 769: 233, + 770: 234, + 771: 7869, + 772: 275, + 774: 277, + 775: 279, + 776: 235, + 777: 7867, + 780: 283, + 783: 517, + 785: 519, + 803: 7865, + 807: 553, + 808: 281, + 813: 7705, + 816: 7707 + } + ], + 102: [, , { 775: 7711 }], + 103: [, , { 769: 501, 770: 285, 772: 7713, 774: 287, 775: 289, 780: 487, 807: 291 }], + 104: [ + , , + { 770: 293, 775: 7715, 776: 7719, 780: 543, 803: 7717, 807: 7721, 814: 7723, 817: 7830 } + ], + 105: [ + , , + { + 768: 236, + 769: 237, + 770: 238, + 771: 297, + 772: 299, + 774: 301, + 776: 239, + 777: 7881, + 780: 464, + 783: 521, + 785: 523, + 803: 7883, + 808: 303, + 816: 7725 + } + ], + 106: [, , { 770: 309, 780: 496 }], + 107: [, , { 769: 7729, 780: 489, 803: 7731, 807: 311, 817: 7733 }], + 108: [, , { 769: 314, 780: 318, 803: 7735, 807: 316, 813: 7741, 817: 7739 }], + 109: [, , { 769: 7743, 775: 7745, 803: 7747 }], + 110: [ + , , + { + 768: 505, + 769: 324, + 771: 241, + 775: 7749, + 780: 328, + 803: 7751, + 807: 326, + 813: 7755, + 817: 7753 + } + ], + 111: [ + , , + { + 768: 242, + 769: 243, + 770: 244, + 771: 245, + 772: 333, + 774: 335, + 775: 559, + 776: 246, + 777: 7887, + 779: 337, + 780: 466, + 783: 525, + 785: 527, + 795: 417, + 803: 7885, + 808: 491 + } + ], + 112: [, , { 769: 7765, 775: 7767 }], + 114: [ + , , + { 769: 341, 775: 7769, 780: 345, 783: 529, 785: 531, 803: 7771, 807: 343, 817: 7775 } + ], + 115: [, , { 769: 347, 770: 349, 775: 7777, 780: 353, 803: 7779, 806: 537, 807: 351 }], + 116: [ + , , + { 775: 7787, 776: 7831, 780: 357, 803: 7789, 806: 539, 807: 355, 813: 7793, 817: 7791 } + ], + 117: [ + , , + { + 768: 249, + 769: 250, + 770: 251, + 771: 361, + 772: 363, + 774: 365, + 776: 252, + 777: 7911, + 778: 367, + 779: 369, + 780: 468, + 783: 533, + 785: 535, + 795: 432, + 803: 7909, + 804: 7795, + 808: 371, + 813: 7799, + 816: 7797 + } + ], + 118: [, , { 771: 7805, 803: 7807 }], + 119: [, , { 768: 7809, 769: 7811, 770: 373, 775: 7815, 776: 7813, 778: 7832, 803: 7817 }], + 120: [, , { 775: 7819, 776: 7821 }], + 121: [ + , , + { + 768: 7923, + 769: 253, + 770: 375, + 771: 7929, + 772: 563, + 775: 7823, + 776: 255, + 777: 7927, + 778: 7833, + 803: 7925 + } + ], + 122: [, , { 769: 378, 770: 7825, 775: 380, 780: 382, 803: 7827, 817: 7829 }], + 160: [[32], 256], + 168: [[32, 776], 256, { 768: 8173, 769: 901, 834: 8129 }], + 170: [[97], 256], + 175: [[32, 772], 256], + 178: [[50], 256], + 179: [[51], 256], + 180: [[32, 769], 256], + 181: [[956], 256], + 184: [[32, 807], 256], + 185: [[49], 256], + 186: [[111], 256], + 188: [[49, 8260, 52], 256], + 189: [[49, 8260, 50], 256], + 190: [[51, 8260, 52], 256], + 192: [[65, 768]], + 193: [[65, 769]], + 194: [[65, 770], , { 768: 7846, 769: 7844, 771: 7850, 777: 7848 }], + 195: [[65, 771]], + 196: [[65, 776], , { 772: 478 }], + 197: [[65, 778], , { 769: 506 }], + 198: [, , { 769: 508, 772: 482 }], + 199: [[67, 807], , { 769: 7688 }], + 200: [[69, 768]], + 201: [[69, 769]], + 202: [[69, 770], , { 768: 7872, 769: 7870, 771: 7876, 777: 7874 }], + 203: [[69, 776]], + 204: [[73, 768]], + 205: [[73, 769]], + 206: [[73, 770]], + 207: [[73, 776], , { 769: 7726 }], + 209: [[78, 771]], + 210: [[79, 768]], + 211: [[79, 769]], + 212: [[79, 770], , { 768: 7890, 769: 7888, 771: 7894, 777: 7892 }], + 213: [[79, 771], , { 769: 7756, 772: 556, 776: 7758 }], + 214: [[79, 776], , { 772: 554 }], + 216: [, , { 769: 510 }], + 217: [[85, 768]], + 218: [[85, 769]], + 219: [[85, 770]], + 220: [[85, 776], , { 768: 475, 769: 471, 772: 469, 780: 473 }], + 221: [[89, 769]], + 224: [[97, 768]], + 225: [[97, 769]], + 226: [[97, 770], , { 768: 7847, 769: 7845, 771: 7851, 777: 7849 }], + 227: [[97, 771]], + 228: [[97, 776], , { 772: 479 }], + 229: [[97, 778], , { 769: 507 }], + 230: [, , { 769: 509, 772: 483 }], + 231: [[99, 807], , { 769: 7689 }], + 232: [[101, 768]], + 233: [[101, 769]], + 234: [[101, 770], , { 768: 7873, 769: 7871, 771: 7877, 777: 7875 }], + 235: [[101, 776]], + 236: [[105, 768]], + 237: [[105, 769]], + 238: [[105, 770]], + 239: [[105, 776], , { 769: 7727 }], + 241: [[110, 771]], + 242: [[111, 768]], + 243: [[111, 769]], + 244: [[111, 770], , { 768: 7891, 769: 7889, 771: 7895, 777: 7893 }], + 245: [[111, 771], , { 769: 7757, 772: 557, 776: 7759 }], + 246: [[111, 776], , { 772: 555 }], + 248: [, , { 769: 511 }], + 249: [[117, 768]], + 250: [[117, 769]], + 251: [[117, 770]], + 252: [[117, 776], , { 768: 476, 769: 472, 772: 470, 780: 474 }], + 253: [[121, 769]], + 255: [[121, 776]] + }, + 256: { + 256: [[65, 772]], + 257: [[97, 772]], + 258: [[65, 774], , { 768: 7856, 769: 7854, 771: 7860, 777: 7858 }], + 259: [[97, 774], , { 768: 7857, 769: 7855, 771: 7861, 777: 7859 }], + 260: [[65, 808]], + 261: [[97, 808]], + 262: [[67, 769]], + 263: [[99, 769]], + 264: [[67, 770]], + 265: [[99, 770]], + 266: [[67, 775]], + 267: [[99, 775]], + 268: [[67, 780]], + 269: [[99, 780]], + 270: [[68, 780]], + 271: [[100, 780]], + 274: [[69, 772], , { 768: 7700, 769: 7702 }], + 275: [[101, 772], , { 768: 7701, 769: 7703 }], + 276: [[69, 774]], + 277: [[101, 774]], + 278: [[69, 775]], + 279: [[101, 775]], + 280: [[69, 808]], + 281: [[101, 808]], + 282: [[69, 780]], + 283: [[101, 780]], + 284: [[71, 770]], + 285: [[103, 770]], + 286: [[71, 774]], + 287: [[103, 774]], + 288: [[71, 775]], + 289: [[103, 775]], + 290: [[71, 807]], + 291: [[103, 807]], + 292: [[72, 770]], + 293: [[104, 770]], + 296: [[73, 771]], + 297: [[105, 771]], + 298: [[73, 772]], + 299: [[105, 772]], + 300: [[73, 774]], + 301: [[105, 774]], + 302: [[73, 808]], + 303: [[105, 808]], + 304: [[73, 775]], + 306: [[73, 74], 256], + 307: [[105, 106], 256], + 308: [[74, 770]], + 309: [[106, 770]], + 310: [[75, 807]], + 311: [[107, 807]], + 313: [[76, 769]], + 314: [[108, 769]], + 315: [[76, 807]], + 316: [[108, 807]], + 317: [[76, 780]], + 318: [[108, 780]], + 319: [[76, 183], 256], + 320: [[108, 183], 256], + 323: [[78, 769]], + 324: [[110, 769]], + 325: [[78, 807]], + 326: [[110, 807]], + 327: [[78, 780]], + 328: [[110, 780]], + 329: [[700, 110], 256], + 332: [[79, 772], , { 768: 7760, 769: 7762 }], + 333: [[111, 772], , { 768: 7761, 769: 7763 }], + 334: [[79, 774]], + 335: [[111, 774]], + 336: [[79, 779]], + 337: [[111, 779]], + 340: [[82, 769]], + 341: [[114, 769]], + 342: [[82, 807]], + 343: [[114, 807]], + 344: [[82, 780]], + 345: [[114, 780]], + 346: [[83, 769], , { 775: 7780 }], + 347: [[115, 769], , { 775: 7781 }], + 348: [[83, 770]], + 349: [[115, 770]], + 350: [[83, 807]], + 351: [[115, 807]], + 352: [[83, 780], , { 775: 7782 }], + 353: [[115, 780], , { 775: 7783 }], + 354: [[84, 807]], + 355: [[116, 807]], + 356: [[84, 780]], + 357: [[116, 780]], + 360: [[85, 771], , { 769: 7800 }], + 361: [[117, 771], , { 769: 7801 }], + 362: [[85, 772], , { 776: 7802 }], + 363: [[117, 772], , { 776: 7803 }], + 364: [[85, 774]], + 365: [[117, 774]], + 366: [[85, 778]], + 367: [[117, 778]], + 368: [[85, 779]], + 369: [[117, 779]], + 370: [[85, 808]], + 371: [[117, 808]], + 372: [[87, 770]], + 373: [[119, 770]], + 374: [[89, 770]], + 375: [[121, 770]], + 376: [[89, 776]], + 377: [[90, 769]], + 378: [[122, 769]], + 379: [[90, 775]], + 380: [[122, 775]], + 381: [[90, 780]], + 382: [[122, 780]], + 383: [[115], 256, { 775: 7835 }], + 416: [[79, 795], , { 768: 7900, 769: 7898, 771: 7904, 777: 7902, 803: 7906 }], + 417: [[111, 795], , { 768: 7901, 769: 7899, 771: 7905, 777: 7903, 803: 7907 }], + 431: [[85, 795], , { 768: 7914, 769: 7912, 771: 7918, 777: 7916, 803: 7920 }], + 432: [[117, 795], , { 768: 7915, 769: 7913, 771: 7919, 777: 7917, 803: 7921 }], + 439: [, , { 780: 494 }], + 452: [[68, 381], 256], + 453: [[68, 382], 256], + 454: [[100, 382], 256], + 455: [[76, 74], 256], + 456: [[76, 106], 256], + 457: [[108, 106], 256], + 458: [[78, 74], 256], + 459: [[78, 106], 256], + 460: [[110, 106], 256], + 461: [[65, 780]], + 462: [[97, 780]], + 463: [[73, 780]], + 464: [[105, 780]], + 465: [[79, 780]], + 466: [[111, 780]], + 467: [[85, 780]], + 468: [[117, 780]], + 469: [[220, 772]], + 470: [[252, 772]], + 471: [[220, 769]], + 472: [[252, 769]], + 473: [[220, 780]], + 474: [[252, 780]], + 475: [[220, 768]], + 476: [[252, 768]], + 478: [[196, 772]], + 479: [[228, 772]], + 480: [[550, 772]], + 481: [[551, 772]], + 482: [[198, 772]], + 483: [[230, 772]], + 486: [[71, 780]], + 487: [[103, 780]], + 488: [[75, 780]], + 489: [[107, 780]], + 490: [[79, 808], , { 772: 492 }], + 491: [[111, 808], , { 772: 493 }], + 492: [[490, 772]], + 493: [[491, 772]], + 494: [[439, 780]], + 495: [[658, 780]], + 496: [[106, 780]], + 497: [[68, 90], 256], + 498: [[68, 122], 256], + 499: [[100, 122], 256], + 500: [[71, 769]], + 501: [[103, 769]], + 504: [[78, 768]], + 505: [[110, 768]], + 506: [[197, 769]], + 507: [[229, 769]], + 508: [[198, 769]], + 509: [[230, 769]], + 510: [[216, 769]], + 511: [[248, 769]], + 66045: [, 220] + }, + 512: { + 512: [[65, 783]], + 513: [[97, 783]], + 514: [[65, 785]], + 515: [[97, 785]], + 516: [[69, 783]], + 517: [[101, 783]], + 518: [[69, 785]], + 519: [[101, 785]], + 520: [[73, 783]], + 521: [[105, 783]], + 522: [[73, 785]], + 523: [[105, 785]], + 524: [[79, 783]], + 525: [[111, 783]], + 526: [[79, 785]], + 527: [[111, 785]], + 528: [[82, 783]], + 529: [[114, 783]], + 530: [[82, 785]], + 531: [[114, 785]], + 532: [[85, 783]], + 533: [[117, 783]], + 534: [[85, 785]], + 535: [[117, 785]], + 536: [[83, 806]], + 537: [[115, 806]], + 538: [[84, 806]], + 539: [[116, 806]], + 542: [[72, 780]], + 543: [[104, 780]], + 550: [[65, 775], , { 772: 480 }], + 551: [[97, 775], , { 772: 481 }], + 552: [[69, 807], , { 774: 7708 }], + 553: [[101, 807], , { 774: 7709 }], + 554: [[214, 772]], + 555: [[246, 772]], + 556: [[213, 772]], + 557: [[245, 772]], + 558: [[79, 775], , { 772: 560 }], + 559: [[111, 775], , { 772: 561 }], + 560: [[558, 772]], + 561: [[559, 772]], + 562: [[89, 772]], + 563: [[121, 772]], + 658: [, , { 780: 495 }], + 688: [[104], 256], + 689: [[614], 256], + 690: [[106], 256], + 691: [[114], 256], + 692: [[633], 256], + 693: [[635], 256], + 694: [[641], 256], + 695: [[119], 256], + 696: [[121], 256], + 728: [[32, 774], 256], + 729: [[32, 775], 256], + 730: [[32, 778], 256], + 731: [[32, 808], 256], + 732: [[32, 771], 256], + 733: [[32, 779], 256], + 736: [[611], 256], + 737: [[108], 256], + 738: [[115], 256], + 739: [[120], 256], + 740: [[661], 256] + }, + 768: { + 768: [, 230], + 769: [, 230], + 770: [, 230], + 771: [, 230], + 772: [, 230], + 773: [, 230], + 774: [, 230], + 775: [, 230], + 776: [, 230, { 769: 836 }], + 777: [, 230], + 778: [, 230], + 779: [, 230], + 780: [, 230], + 781: [, 230], + 782: [, 230], + 783: [, 230], + 784: [, 230], + 785: [, 230], + 786: [, 230], + 787: [, 230], + 788: [, 230], + 789: [, 232], + 790: [, 220], + 791: [, 220], + 792: [, 220], + 793: [, 220], + 794: [, 232], + 795: [, 216], + 796: [, 220], + 797: [, 220], + 798: [, 220], + 799: [, 220], + 800: [, 220], + 801: [, 202], + 802: [, 202], + 803: [, 220], + 804: [, 220], + 805: [, 220], + 806: [, 220], + 807: [, 202], + 808: [, 202], + 809: [, 220], + 810: [, 220], + 811: [, 220], + 812: [, 220], + 813: [, 220], + 814: [, 220], + 815: [, 220], + 816: [, 220], + 817: [, 220], + 818: [, 220], + 819: [, 220], + 820: [, 1], + 821: [, 1], + 822: [, 1], + 823: [, 1], + 824: [, 1], + 825: [, 220], + 826: [, 220], + 827: [, 220], + 828: [, 220], + 829: [, 230], + 830: [, 230], + 831: [, 230], + 832: [[768], 230], + 833: [[769], 230], + 834: [, 230], + 835: [[787], 230], + 836: [[776, 769], 230], + 837: [, 240], + 838: [, 230], + 839: [, 220], + 840: [, 220], + 841: [, 220], + 842: [, 230], + 843: [, 230], + 844: [, 230], + 845: [, 220], + 846: [, 220], + 848: [, 230], + 849: [, 230], + 850: [, 230], + 851: [, 220], + 852: [, 220], + 853: [, 220], + 854: [, 220], + 855: [, 230], + 856: [, 232], + 857: [, 220], + 858: [, 220], + 859: [, 230], + 860: [, 233], + 861: [, 234], + 862: [, 234], + 863: [, 233], + 864: [, 234], + 865: [, 234], + 866: [, 233], + 867: [, 230], + 868: [, 230], + 869: [, 230], + 870: [, 230], + 871: [, 230], + 872: [, 230], + 873: [, 230], + 874: [, 230], + 875: [, 230], + 876: [, 230], + 877: [, 230], + 878: [, 230], + 879: [, 230], + 884: [[697]], + 890: [[32, 837], 256], + 894: [[59]], + 900: [[32, 769], 256], + 901: [[168, 769]], + 902: [[913, 769]], + 903: [[183]], + 904: [[917, 769]], + 905: [[919, 769]], + 906: [[921, 769]], + 908: [[927, 769]], + 910: [[933, 769]], + 911: [[937, 769]], + 912: [[970, 769]], + 913: [, , { 768: 8122, 769: 902, 772: 8121, 774: 8120, 787: 7944, 788: 7945, 837: 8124 }], + 917: [, , { 768: 8136, 769: 904, 787: 7960, 788: 7961 }], + 919: [, , { 768: 8138, 769: 905, 787: 7976, 788: 7977, 837: 8140 }], + 921: [, , { 768: 8154, 769: 906, 772: 8153, 774: 8152, 776: 938, 787: 7992, 788: 7993 }], + 927: [, , { 768: 8184, 769: 908, 787: 8008, 788: 8009 }], + 929: [, , { 788: 8172 }], + 933: [, , { 768: 8170, 769: 910, 772: 8169, 774: 8168, 776: 939, 788: 8025 }], + 937: [, , { 768: 8186, 769: 911, 787: 8040, 788: 8041, 837: 8188 }], + 938: [[921, 776]], + 939: [[933, 776]], + 940: [[945, 769], , { 837: 8116 }], + 941: [[949, 769]], + 942: [[951, 769], , { 837: 8132 }], + 943: [[953, 769]], + 944: [[971, 769]], + 945: [ + , , + { + 768: 8048, + 769: 940, + 772: 8113, + 774: 8112, + 787: 7936, + 788: 7937, + 834: 8118, + 837: 8115 + } + ], + 949: [, , { 768: 8050, 769: 941, 787: 7952, 788: 7953 }], + 951: [, , { 768: 8052, 769: 942, 787: 7968, 788: 7969, 834: 8134, 837: 8131 }], + 953: [ + , , + { 768: 8054, 769: 943, 772: 8145, 774: 8144, 776: 970, 787: 7984, 788: 7985, 834: 8150 } + ], + 959: [, , { 768: 8056, 769: 972, 787: 8000, 788: 8001 }], + 961: [, , { 787: 8164, 788: 8165 }], + 965: [ + , , + { 768: 8058, 769: 973, 772: 8161, 774: 8160, 776: 971, 787: 8016, 788: 8017, 834: 8166 } + ], + 969: [, , { 768: 8060, 769: 974, 787: 8032, 788: 8033, 834: 8182, 837: 8179 }], + 970: [[953, 776], , { 768: 8146, 769: 912, 834: 8151 }], + 971: [[965, 776], , { 768: 8162, 769: 944, 834: 8167 }], + 972: [[959, 769]], + 973: [[965, 769]], + 974: [[969, 769], , { 837: 8180 }], + 976: [[946], 256], + 977: [[952], 256], + 978: [[933], 256, { 769: 979, 776: 980 }], + 979: [[978, 769]], + 980: [[978, 776]], + 981: [[966], 256], + 982: [[960], 256], + 1008: [[954], 256], + 1009: [[961], 256], + 1010: [[962], 256], + 1012: [[920], 256], + 1013: [[949], 256], + 1017: [[931], 256] + }, + 1024: { + 1024: [[1045, 768]], + 1025: [[1045, 776]], + 1027: [[1043, 769]], + 1030: [, , { 776: 1031 }], + 1031: [[1030, 776]], + 1036: [[1050, 769]], + 1037: [[1048, 768]], + 1038: [[1059, 774]], + 1040: [, , { 774: 1232, 776: 1234 }], + 1043: [, , { 769: 1027 }], + 1045: [, , { 768: 1024, 774: 1238, 776: 1025 }], + 1046: [, , { 774: 1217, 776: 1244 }], + 1047: [, , { 776: 1246 }], + 1048: [, , { 768: 1037, 772: 1250, 774: 1049, 776: 1252 }], + 1049: [[1048, 774]], + 1050: [, , { 769: 1036 }], + 1054: [, , { 776: 1254 }], + 1059: [, , { 772: 1262, 774: 1038, 776: 1264, 779: 1266 }], + 1063: [, , { 776: 1268 }], + 1067: [, , { 776: 1272 }], + 1069: [, , { 776: 1260 }], + 1072: [, , { 774: 1233, 776: 1235 }], + 1075: [, , { 769: 1107 }], + 1077: [, , { 768: 1104, 774: 1239, 776: 1105 }], + 1078: [, , { 774: 1218, 776: 1245 }], + 1079: [, , { 776: 1247 }], + 1080: [, , { 768: 1117, 772: 1251, 774: 1081, 776: 1253 }], + 1081: [[1080, 774]], + 1082: [, , { 769: 1116 }], + 1086: [, , { 776: 1255 }], + 1091: [, , { 772: 1263, 774: 1118, 776: 1265, 779: 1267 }], + 1095: [, , { 776: 1269 }], + 1099: [, , { 776: 1273 }], + 1101: [, , { 776: 1261 }], + 1104: [[1077, 768]], + 1105: [[1077, 776]], + 1107: [[1075, 769]], + 1110: [, , { 776: 1111 }], + 1111: [[1110, 776]], + 1116: [[1082, 769]], + 1117: [[1080, 768]], + 1118: [[1091, 774]], + 1140: [, , { 783: 1142 }], + 1141: [, , { 783: 1143 }], + 1142: [[1140, 783]], + 1143: [[1141, 783]], + 1155: [, 230], + 1156: [, 230], + 1157: [, 230], + 1158: [, 230], + 1159: [, 230], + 1217: [[1046, 774]], + 1218: [[1078, 774]], + 1232: [[1040, 774]], + 1233: [[1072, 774]], + 1234: [[1040, 776]], + 1235: [[1072, 776]], + 1238: [[1045, 774]], + 1239: [[1077, 774]], + 1240: [, , { 776: 1242 }], + 1241: [, , { 776: 1243 }], + 1242: [[1240, 776]], + 1243: [[1241, 776]], + 1244: [[1046, 776]], + 1245: [[1078, 776]], + 1246: [[1047, 776]], + 1247: [[1079, 776]], + 1250: [[1048, 772]], + 1251: [[1080, 772]], + 1252: [[1048, 776]], + 1253: [[1080, 776]], + 1254: [[1054, 776]], + 1255: [[1086, 776]], + 1256: [, , { 776: 1258 }], + 1257: [, , { 776: 1259 }], + 1258: [[1256, 776]], + 1259: [[1257, 776]], + 1260: [[1069, 776]], + 1261: [[1101, 776]], + 1262: [[1059, 772]], + 1263: [[1091, 772]], + 1264: [[1059, 776]], + 1265: [[1091, 776]], + 1266: [[1059, 779]], + 1267: [[1091, 779]], + 1268: [[1063, 776]], + 1269: [[1095, 776]], + 1272: [[1067, 776]], + 1273: [[1099, 776]] + }, + 1280: { + 1415: [[1381, 1410], 256], + 1425: [, 220], + 1426: [, 230], + 1427: [, 230], + 1428: [, 230], + 1429: [, 230], + 1430: [, 220], + 1431: [, 230], + 1432: [, 230], + 1433: [, 230], + 1434: [, 222], + 1435: [, 220], + 1436: [, 230], + 1437: [, 230], + 1438: [, 230], + 1439: [, 230], + 1440: [, 230], + 1441: [, 230], + 1442: [, 220], + 1443: [, 220], + 1444: [, 220], + 1445: [, 220], + 1446: [, 220], + 1447: [, 220], + 1448: [, 230], + 1449: [, 230], + 1450: [, 220], + 1451: [, 230], + 1452: [, 230], + 1453: [, 222], + 1454: [, 228], + 1455: [, 230], + 1456: [, 10], + 1457: [, 11], + 1458: [, 12], + 1459: [, 13], + 1460: [, 14], + 1461: [, 15], + 1462: [, 16], + 1463: [, 17], + 1464: [, 18], + 1465: [, 19], + 1466: [, 19], + 1467: [, 20], + 1468: [, 21], + 1469: [, 22], + 1471: [, 23], + 1473: [, 24], + 1474: [, 25], + 1476: [, 230], + 1477: [, 220], + 1479: [, 18] + }, + 1536: { + 1552: [, 230], + 1553: [, 230], + 1554: [, 230], + 1555: [, 230], + 1556: [, 230], + 1557: [, 230], + 1558: [, 230], + 1559: [, 230], + 1560: [, 30], + 1561: [, 31], + 1562: [, 32], + 1570: [[1575, 1619]], + 1571: [[1575, 1620]], + 1572: [[1608, 1620]], + 1573: [[1575, 1621]], + 1574: [[1610, 1620]], + 1575: [, , { 1619: 1570, 1620: 1571, 1621: 1573 }], + 1608: [, , { 1620: 1572 }], + 1610: [, , { 1620: 1574 }], + 1611: [, 27], + 1612: [, 28], + 1613: [, 29], + 1614: [, 30], + 1615: [, 31], + 1616: [, 32], + 1617: [, 33], + 1618: [, 34], + 1619: [, 230], + 1620: [, 230], + 1621: [, 220], + 1622: [, 220], + 1623: [, 230], + 1624: [, 230], + 1625: [, 230], + 1626: [, 230], + 1627: [, 230], + 1628: [, 220], + 1629: [, 230], + 1630: [, 230], + 1631: [, 220], + 1648: [, 35], + 1653: [[1575, 1652], 256], + 1654: [[1608, 1652], 256], + 1655: [[1735, 1652], 256], + 1656: [[1610, 1652], 256], + 1728: [[1749, 1620]], + 1729: [, , { 1620: 1730 }], + 1730: [[1729, 1620]], + 1746: [, , { 1620: 1747 }], + 1747: [[1746, 1620]], + 1749: [, , { 1620: 1728 }], + 1750: [, 230], + 1751: [, 230], + 1752: [, 230], + 1753: [, 230], + 1754: [, 230], + 1755: [, 230], + 1756: [, 230], + 1759: [, 230], + 1760: [, 230], + 1761: [, 230], + 1762: [, 230], + 1763: [, 220], + 1764: [, 230], + 1767: [, 230], + 1768: [, 230], + 1770: [, 220], + 1771: [, 230], + 1772: [, 230], + 1773: [, 220] + }, + 1792: { + 1809: [, 36], + 1840: [, 230], + 1841: [, 220], + 1842: [, 230], + 1843: [, 230], + 1844: [, 220], + 1845: [, 230], + 1846: [, 230], + 1847: [, 220], + 1848: [, 220], + 1849: [, 220], + 1850: [, 230], + 1851: [, 220], + 1852: [, 220], + 1853: [, 230], + 1854: [, 220], + 1855: [, 230], + 1856: [, 230], + 1857: [, 230], + 1858: [, 220], + 1859: [, 230], + 1860: [, 220], + 1861: [, 230], + 1862: [, 220], + 1863: [, 230], + 1864: [, 220], + 1865: [, 230], + 1866: [, 230], + 2027: [, 230], + 2028: [, 230], + 2029: [, 230], + 2030: [, 230], + 2031: [, 230], + 2032: [, 230], + 2033: [, 230], + 2034: [, 220], + 2035: [, 230] + }, + 2048: { + 2070: [, 230], + 2071: [, 230], + 2072: [, 230], + 2073: [, 230], + 2075: [, 230], + 2076: [, 230], + 2077: [, 230], + 2078: [, 230], + 2079: [, 230], + 2080: [, 230], + 2081: [, 230], + 2082: [, 230], + 2083: [, 230], + 2085: [, 230], + 2086: [, 230], + 2087: [, 230], + 2089: [, 230], + 2090: [, 230], + 2091: [, 230], + 2092: [, 230], + 2093: [, 230], + 2137: [, 220], + 2138: [, 220], + 2139: [, 220], + 2276: [, 230], + 2277: [, 230], + 2278: [, 220], + 2279: [, 230], + 2280: [, 230], + 2281: [, 220], + 2282: [, 230], + 2283: [, 230], + 2284: [, 230], + 2285: [, 220], + 2286: [, 220], + 2287: [, 220], + 2288: [, 27], + 2289: [, 28], + 2290: [, 29], + 2291: [, 230], + 2292: [, 230], + 2293: [, 230], + 2294: [, 220], + 2295: [, 230], + 2296: [, 230], + 2297: [, 220], + 2298: [, 220], + 2299: [, 230], + 2300: [, 230], + 2301: [, 230], + 2302: [, 230] + }, + 2304: { + 2344: [, , { 2364: 2345 }], + 2345: [[2344, 2364]], + 2352: [, , { 2364: 2353 }], + 2353: [[2352, 2364]], + 2355: [, , { 2364: 2356 }], + 2356: [[2355, 2364]], + 2364: [, 7], + 2381: [, 9], + 2385: [, 230], + 2386: [, 220], + 2387: [, 230], + 2388: [, 230], + 2392: [[2325, 2364], 512], + 2393: [[2326, 2364], 512], + 2394: [[2327, 2364], 512], + 2395: [[2332, 2364], 512], + 2396: [[2337, 2364], 512], + 2397: [[2338, 2364], 512], + 2398: [[2347, 2364], 512], + 2399: [[2351, 2364], 512], + 2492: [, 7], + 2503: [, , { 2494: 2507, 2519: 2508 }], + 2507: [[2503, 2494]], + 2508: [[2503, 2519]], + 2509: [, 9], + 2524: [[2465, 2492], 512], + 2525: [[2466, 2492], 512], + 2527: [[2479, 2492], 512] + }, + 2560: { + 2611: [[2610, 2620], 512], + 2614: [[2616, 2620], 512], + 2620: [, 7], + 2637: [, 9], + 2649: [[2582, 2620], 512], + 2650: [[2583, 2620], 512], + 2651: [[2588, 2620], 512], + 2654: [[2603, 2620], 512], + 2748: [, 7], + 2765: [, 9], + 68109: [, 220], + 68111: [, 230], + 68152: [, 230], + 68153: [, 1], + 68154: [, 220], + 68159: [, 9] + }, + 2816: { + 2876: [, 7], + 2887: [, , { 2878: 2891, 2902: 2888, 2903: 2892 }], + 2888: [[2887, 2902]], + 2891: [[2887, 2878]], + 2892: [[2887, 2903]], + 2893: [, 9], + 2908: [[2849, 2876], 512], + 2909: [[2850, 2876], 512], + 2962: [, , { 3031: 2964 }], + 2964: [[2962, 3031]], + 3014: [, , { 3006: 3018, 3031: 3020 }], + 3015: [, , { 3006: 3019 }], + 3018: [[3014, 3006]], + 3019: [[3015, 3006]], + 3020: [[3014, 3031]], + 3021: [, 9] + }, + 3072: { + 3142: [, , { 3158: 3144 }], + 3144: [[3142, 3158]], + 3149: [, 9], + 3157: [, 84], + 3158: [, 91], + 3260: [, 7], + 3263: [, , { 3285: 3264 }], + 3264: [[3263, 3285]], + 3270: [, , { 3266: 3274, 3285: 3271, 3286: 3272 }], + 3271: [[3270, 3285]], + 3272: [[3270, 3286]], + 3274: [[3270, 3266], , { 3285: 3275 }], + 3275: [[3274, 3285]], + 3277: [, 9] + }, + 3328: { + 3398: [, , { 3390: 3402, 3415: 3404 }], + 3399: [, , { 3390: 3403 }], + 3402: [[3398, 3390]], + 3403: [[3399, 3390]], + 3404: [[3398, 3415]], + 3405: [, 9], + 3530: [, 9], + 3545: [, , { 3530: 3546, 3535: 3548, 3551: 3550 }], + 3546: [[3545, 3530]], + 3548: [[3545, 3535], , { 3530: 3549 }], + 3549: [[3548, 3530]], + 3550: [[3545, 3551]] + }, + 3584: { + 3635: [[3661, 3634], 256], + 3640: [, 103], + 3641: [, 103], + 3642: [, 9], + 3656: [, 107], + 3657: [, 107], + 3658: [, 107], + 3659: [, 107], + 3763: [[3789, 3762], 256], + 3768: [, 118], + 3769: [, 118], + 3784: [, 122], + 3785: [, 122], + 3786: [, 122], + 3787: [, 122], + 3804: [[3755, 3737], 256], + 3805: [[3755, 3745], 256] + }, + 3840: { + 3852: [[3851], 256], + 3864: [, 220], + 3865: [, 220], + 3893: [, 220], + 3895: [, 220], + 3897: [, 216], + 3907: [[3906, 4023], 512], + 3917: [[3916, 4023], 512], + 3922: [[3921, 4023], 512], + 3927: [[3926, 4023], 512], + 3932: [[3931, 4023], 512], + 3945: [[3904, 4021], 512], + 3953: [, 129], + 3954: [, 130], + 3955: [[3953, 3954], 512], + 3956: [, 132], + 3957: [[3953, 3956], 512], + 3958: [[4018, 3968], 512], + 3959: [[4018, 3969], 256], + 3960: [[4019, 3968], 512], + 3961: [[4019, 3969], 256], + 3962: [, 130], + 3963: [, 130], + 3964: [, 130], + 3965: [, 130], + 3968: [, 130], + 3969: [[3953, 3968], 512], + 3970: [, 230], + 3971: [, 230], + 3972: [, 9], + 3974: [, 230], + 3975: [, 230], + 3987: [[3986, 4023], 512], + 3997: [[3996, 4023], 512], + 4002: [[4001, 4023], 512], + 4007: [[4006, 4023], 512], + 4012: [[4011, 4023], 512], + 4025: [[3984, 4021], 512], + 4038: [, 220] + }, + 4096: { + 4133: [, , { 4142: 4134 }], + 4134: [[4133, 4142]], + 4151: [, 7], + 4153: [, 9], + 4154: [, 9], + 4237: [, 220], + 4348: [[4316], 256], + 69702: [, 9], + 69785: [, , { 69818: 69786 }], + 69786: [[69785, 69818]], + 69787: [, , { 69818: 69788 }], + 69788: [[69787, 69818]], + 69797: [, , { 69818: 69803 }], + 69803: [[69797, 69818]], + 69817: [, 9], + 69818: [, 7] + }, + 4352: { + 69888: [, 230], + 69889: [, 230], + 69890: [, 230], + 69934: [[69937, 69927]], + 69935: [[69938, 69927]], + 69937: [, , { 69927: 69934 }], + 69938: [, , { 69927: 69935 }], + 69939: [, 9], + 69940: [, 9], + 70080: [, 9] + }, + 4864: { 4957: [, 230], 4958: [, 230], 4959: [, 230] }, + 5632: { 71350: [, 9], 71351: [, 7] }, + 5888: { 5908: [, 9], 5940: [, 9], 6098: [, 9], 6109: [, 230] }, + 6144: { 6313: [, 228] }, + 6400: { 6457: [, 222], 6458: [, 230], 6459: [, 220] }, + 6656: { + 6679: [, 230], + 6680: [, 220], + 6752: [, 9], + 6773: [, 230], + 6774: [, 230], + 6775: [, 230], + 6776: [, 230], + 6777: [, 230], + 6778: [, 230], + 6779: [, 230], + 6780: [, 230], + 6783: [, 220] + }, + 6912: { + 6917: [, , { 6965: 6918 }], + 6918: [[6917, 6965]], + 6919: [, , { 6965: 6920 }], + 6920: [[6919, 6965]], + 6921: [, , { 6965: 6922 }], + 6922: [[6921, 6965]], + 6923: [, , { 6965: 6924 }], + 6924: [[6923, 6965]], + 6925: [, , { 6965: 6926 }], + 6926: [[6925, 6965]], + 6929: [, , { 6965: 6930 }], + 6930: [[6929, 6965]], + 6964: [, 7], + 6970: [, , { 6965: 6971 }], + 6971: [[6970, 6965]], + 6972: [, , { 6965: 6973 }], + 6973: [[6972, 6965]], + 6974: [, , { 6965: 6976 }], + 6975: [, , { 6965: 6977 }], + 6976: [[6974, 6965]], + 6977: [[6975, 6965]], + 6978: [, , { 6965: 6979 }], + 6979: [[6978, 6965]], + 6980: [, 9], + 7019: [, 230], + 7020: [, 220], + 7021: [, 230], + 7022: [, 230], + 7023: [, 230], + 7024: [, 230], + 7025: [, 230], + 7026: [, 230], + 7027: [, 230], + 7082: [, 9], + 7083: [, 9], + 7142: [, 7], + 7154: [, 9], + 7155: [, 9] + }, + 7168: { + 7223: [, 7], + 7376: [, 230], + 7377: [, 230], + 7378: [, 230], + 7380: [, 1], + 7381: [, 220], + 7382: [, 220], + 7383: [, 220], + 7384: [, 220], + 7385: [, 220], + 7386: [, 230], + 7387: [, 230], + 7388: [, 220], + 7389: [, 220], + 7390: [, 220], + 7391: [, 220], + 7392: [, 230], + 7394: [, 1], + 7395: [, 1], + 7396: [, 1], + 7397: [, 1], + 7398: [, 1], + 7399: [, 1], + 7400: [, 1], + 7405: [, 220], + 7412: [, 230] + }, + 7424: { + 7468: [[65], 256], + 7469: [[198], 256], + 7470: [[66], 256], + 7472: [[68], 256], + 7473: [[69], 256], + 7474: [[398], 256], + 7475: [[71], 256], + 7476: [[72], 256], + 7477: [[73], 256], + 7478: [[74], 256], + 7479: [[75], 256], + 7480: [[76], 256], + 7481: [[77], 256], + 7482: [[78], 256], + 7484: [[79], 256], + 7485: [[546], 256], + 7486: [[80], 256], + 7487: [[82], 256], + 7488: [[84], 256], + 7489: [[85], 256], + 7490: [[87], 256], + 7491: [[97], 256], + 7492: [[592], 256], + 7493: [[593], 256], + 7494: [[7426], 256], + 7495: [[98], 256], + 7496: [[100], 256], + 7497: [[101], 256], + 7498: [[601], 256], + 7499: [[603], 256], + 7500: [[604], 256], + 7501: [[103], 256], + 7503: [[107], 256], + 7504: [[109], 256], + 7505: [[331], 256], + 7506: [[111], 256], + 7507: [[596], 256], + 7508: [[7446], 256], + 7509: [[7447], 256], + 7510: [[112], 256], + 7511: [[116], 256], + 7512: [[117], 256], + 7513: [[7453], 256], + 7514: [[623], 256], + 7515: [[118], 256], + 7516: [[7461], 256], + 7517: [[946], 256], + 7518: [[947], 256], + 7519: [[948], 256], + 7520: [[966], 256], + 7521: [[967], 256], + 7522: [[105], 256], + 7523: [[114], 256], + 7524: [[117], 256], + 7525: [[118], 256], + 7526: [[946], 256], + 7527: [[947], 256], + 7528: [[961], 256], + 7529: [[966], 256], + 7530: [[967], 256], + 7544: [[1085], 256], + 7579: [[594], 256], + 7580: [[99], 256], + 7581: [[597], 256], + 7582: [[240], 256], + 7583: [[604], 256], + 7584: [[102], 256], + 7585: [[607], 256], + 7586: [[609], 256], + 7587: [[613], 256], + 7588: [[616], 256], + 7589: [[617], 256], + 7590: [[618], 256], + 7591: [[7547], 256], + 7592: [[669], 256], + 7593: [[621], 256], + 7594: [[7557], 256], + 7595: [[671], 256], + 7596: [[625], 256], + 7597: [[624], 256], + 7598: [[626], 256], + 7599: [[627], 256], + 7600: [[628], 256], + 7601: [[629], 256], + 7602: [[632], 256], + 7603: [[642], 256], + 7604: [[643], 256], + 7605: [[427], 256], + 7606: [[649], 256], + 7607: [[650], 256], + 7608: [[7452], 256], + 7609: [[651], 256], + 7610: [[652], 256], + 7611: [[122], 256], + 7612: [[656], 256], + 7613: [[657], 256], + 7614: [[658], 256], + 7615: [[952], 256], + 7616: [, 230], + 7617: [, 230], + 7618: [, 220], + 7619: [, 230], + 7620: [, 230], + 7621: [, 230], + 7622: [, 230], + 7623: [, 230], + 7624: [, 230], + 7625: [, 230], + 7626: [, 220], + 7627: [, 230], + 7628: [, 230], + 7629: [, 234], + 7630: [, 214], + 7631: [, 220], + 7632: [, 202], + 7633: [, 230], + 7634: [, 230], + 7635: [, 230], + 7636: [, 230], + 7637: [, 230], + 7638: [, 230], + 7639: [, 230], + 7640: [, 230], + 7641: [, 230], + 7642: [, 230], + 7643: [, 230], + 7644: [, 230], + 7645: [, 230], + 7646: [, 230], + 7647: [, 230], + 7648: [, 230], + 7649: [, 230], + 7650: [, 230], + 7651: [, 230], + 7652: [, 230], + 7653: [, 230], + 7654: [, 230], + 7676: [, 233], + 7677: [, 220], + 7678: [, 230], + 7679: [, 220] + }, + 7680: { + 7680: [[65, 805]], + 7681: [[97, 805]], + 7682: [[66, 775]], + 7683: [[98, 775]], + 7684: [[66, 803]], + 7685: [[98, 803]], + 7686: [[66, 817]], + 7687: [[98, 817]], + 7688: [[199, 769]], + 7689: [[231, 769]], + 7690: [[68, 775]], + 7691: [[100, 775]], + 7692: [[68, 803]], + 7693: [[100, 803]], + 7694: [[68, 817]], + 7695: [[100, 817]], + 7696: [[68, 807]], + 7697: [[100, 807]], + 7698: [[68, 813]], + 7699: [[100, 813]], + 7700: [[274, 768]], + 7701: [[275, 768]], + 7702: [[274, 769]], + 7703: [[275, 769]], + 7704: [[69, 813]], + 7705: [[101, 813]], + 7706: [[69, 816]], + 7707: [[101, 816]], + 7708: [[552, 774]], + 7709: [[553, 774]], + 7710: [[70, 775]], + 7711: [[102, 775]], + 7712: [[71, 772]], + 7713: [[103, 772]], + 7714: [[72, 775]], + 7715: [[104, 775]], + 7716: [[72, 803]], + 7717: [[104, 803]], + 7718: [[72, 776]], + 7719: [[104, 776]], + 7720: [[72, 807]], + 7721: [[104, 807]], + 7722: [[72, 814]], + 7723: [[104, 814]], + 7724: [[73, 816]], + 7725: [[105, 816]], + 7726: [[207, 769]], + 7727: [[239, 769]], + 7728: [[75, 769]], + 7729: [[107, 769]], + 7730: [[75, 803]], + 7731: [[107, 803]], + 7732: [[75, 817]], + 7733: [[107, 817]], + 7734: [[76, 803], , { 772: 7736 }], + 7735: [[108, 803], , { 772: 7737 }], + 7736: [[7734, 772]], + 7737: [[7735, 772]], + 7738: [[76, 817]], + 7739: [[108, 817]], + 7740: [[76, 813]], + 7741: [[108, 813]], + 7742: [[77, 769]], + 7743: [[109, 769]], + 7744: [[77, 775]], + 7745: [[109, 775]], + 7746: [[77, 803]], + 7747: [[109, 803]], + 7748: [[78, 775]], + 7749: [[110, 775]], + 7750: [[78, 803]], + 7751: [[110, 803]], + 7752: [[78, 817]], + 7753: [[110, 817]], + 7754: [[78, 813]], + 7755: [[110, 813]], + 7756: [[213, 769]], + 7757: [[245, 769]], + 7758: [[213, 776]], + 7759: [[245, 776]], + 7760: [[332, 768]], + 7761: [[333, 768]], + 7762: [[332, 769]], + 7763: [[333, 769]], + 7764: [[80, 769]], + 7765: [[112, 769]], + 7766: [[80, 775]], + 7767: [[112, 775]], + 7768: [[82, 775]], + 7769: [[114, 775]], + 7770: [[82, 803], , { 772: 7772 }], + 7771: [[114, 803], , { 772: 7773 }], + 7772: [[7770, 772]], + 7773: [[7771, 772]], + 7774: [[82, 817]], + 7775: [[114, 817]], + 7776: [[83, 775]], + 7777: [[115, 775]], + 7778: [[83, 803], , { 775: 7784 }], + 7779: [[115, 803], , { 775: 7785 }], + 7780: [[346, 775]], + 7781: [[347, 775]], + 7782: [[352, 775]], + 7783: [[353, 775]], + 7784: [[7778, 775]], + 7785: [[7779, 775]], + 7786: [[84, 775]], + 7787: [[116, 775]], + 7788: [[84, 803]], + 7789: [[116, 803]], + 7790: [[84, 817]], + 7791: [[116, 817]], + 7792: [[84, 813]], + 7793: [[116, 813]], + 7794: [[85, 804]], + 7795: [[117, 804]], + 7796: [[85, 816]], + 7797: [[117, 816]], + 7798: [[85, 813]], + 7799: [[117, 813]], + 7800: [[360, 769]], + 7801: [[361, 769]], + 7802: [[362, 776]], + 7803: [[363, 776]], + 7804: [[86, 771]], + 7805: [[118, 771]], + 7806: [[86, 803]], + 7807: [[118, 803]], + 7808: [[87, 768]], + 7809: [[119, 768]], + 7810: [[87, 769]], + 7811: [[119, 769]], + 7812: [[87, 776]], + 7813: [[119, 776]], + 7814: [[87, 775]], + 7815: [[119, 775]], + 7816: [[87, 803]], + 7817: [[119, 803]], + 7818: [[88, 775]], + 7819: [[120, 775]], + 7820: [[88, 776]], + 7821: [[120, 776]], + 7822: [[89, 775]], + 7823: [[121, 775]], + 7824: [[90, 770]], + 7825: [[122, 770]], + 7826: [[90, 803]], + 7827: [[122, 803]], + 7828: [[90, 817]], + 7829: [[122, 817]], + 7830: [[104, 817]], + 7831: [[116, 776]], + 7832: [[119, 778]], + 7833: [[121, 778]], + 7834: [[97, 702], 256], + 7835: [[383, 775]], + 7840: [[65, 803], , { 770: 7852, 774: 7862 }], + 7841: [[97, 803], , { 770: 7853, 774: 7863 }], + 7842: [[65, 777]], + 7843: [[97, 777]], + 7844: [[194, 769]], + 7845: [[226, 769]], + 7846: [[194, 768]], + 7847: [[226, 768]], + 7848: [[194, 777]], + 7849: [[226, 777]], + 7850: [[194, 771]], + 7851: [[226, 771]], + 7852: [[7840, 770]], + 7853: [[7841, 770]], + 7854: [[258, 769]], + 7855: [[259, 769]], + 7856: [[258, 768]], + 7857: [[259, 768]], + 7858: [[258, 777]], + 7859: [[259, 777]], + 7860: [[258, 771]], + 7861: [[259, 771]], + 7862: [[7840, 774]], + 7863: [[7841, 774]], + 7864: [[69, 803], , { 770: 7878 }], + 7865: [[101, 803], , { 770: 7879 }], + 7866: [[69, 777]], + 7867: [[101, 777]], + 7868: [[69, 771]], + 7869: [[101, 771]], + 7870: [[202, 769]], + 7871: [[234, 769]], + 7872: [[202, 768]], + 7873: [[234, 768]], + 7874: [[202, 777]], + 7875: [[234, 777]], + 7876: [[202, 771]], + 7877: [[234, 771]], + 7878: [[7864, 770]], + 7879: [[7865, 770]], + 7880: [[73, 777]], + 7881: [[105, 777]], + 7882: [[73, 803]], + 7883: [[105, 803]], + 7884: [[79, 803], , { 770: 7896 }], + 7885: [[111, 803], , { 770: 7897 }], + 7886: [[79, 777]], + 7887: [[111, 777]], + 7888: [[212, 769]], + 7889: [[244, 769]], + 7890: [[212, 768]], + 7891: [[244, 768]], + 7892: [[212, 777]], + 7893: [[244, 777]], + 7894: [[212, 771]], + 7895: [[244, 771]], + 7896: [[7884, 770]], + 7897: [[7885, 770]], + 7898: [[416, 769]], + 7899: [[417, 769]], + 7900: [[416, 768]], + 7901: [[417, 768]], + 7902: [[416, 777]], + 7903: [[417, 777]], + 7904: [[416, 771]], + 7905: [[417, 771]], + 7906: [[416, 803]], + 7907: [[417, 803]], + 7908: [[85, 803]], + 7909: [[117, 803]], + 7910: [[85, 777]], + 7911: [[117, 777]], + 7912: [[431, 769]], + 7913: [[432, 769]], + 7914: [[431, 768]], + 7915: [[432, 768]], + 7916: [[431, 777]], + 7917: [[432, 777]], + 7918: [[431, 771]], + 7919: [[432, 771]], + 7920: [[431, 803]], + 7921: [[432, 803]], + 7922: [[89, 768]], + 7923: [[121, 768]], + 7924: [[89, 803]], + 7925: [[121, 803]], + 7926: [[89, 777]], + 7927: [[121, 777]], + 7928: [[89, 771]], + 7929: [[121, 771]] + }, + 7936: { + 7936: [[945, 787], , { 768: 7938, 769: 7940, 834: 7942, 837: 8064 }], + 7937: [[945, 788], , { 768: 7939, 769: 7941, 834: 7943, 837: 8065 }], + 7938: [[7936, 768], , { 837: 8066 }], + 7939: [[7937, 768], , { 837: 8067 }], + 7940: [[7936, 769], , { 837: 8068 }], + 7941: [[7937, 769], , { 837: 8069 }], + 7942: [[7936, 834], , { 837: 8070 }], + 7943: [[7937, 834], , { 837: 8071 }], + 7944: [[913, 787], , { 768: 7946, 769: 7948, 834: 7950, 837: 8072 }], + 7945: [[913, 788], , { 768: 7947, 769: 7949, 834: 7951, 837: 8073 }], + 7946: [[7944, 768], , { 837: 8074 }], + 7947: [[7945, 768], , { 837: 8075 }], + 7948: [[7944, 769], , { 837: 8076 }], + 7949: [[7945, 769], , { 837: 8077 }], + 7950: [[7944, 834], , { 837: 8078 }], + 7951: [[7945, 834], , { 837: 8079 }], + 7952: [[949, 787], , { 768: 7954, 769: 7956 }], + 7953: [[949, 788], , { 768: 7955, 769: 7957 }], + 7954: [[7952, 768]], + 7955: [[7953, 768]], + 7956: [[7952, 769]], + 7957: [[7953, 769]], + 7960: [[917, 787], , { 768: 7962, 769: 7964 }], + 7961: [[917, 788], , { 768: 7963, 769: 7965 }], + 7962: [[7960, 768]], + 7963: [[7961, 768]], + 7964: [[7960, 769]], + 7965: [[7961, 769]], + 7968: [[951, 787], , { 768: 7970, 769: 7972, 834: 7974, 837: 8080 }], + 7969: [[951, 788], , { 768: 7971, 769: 7973, 834: 7975, 837: 8081 }], + 7970: [[7968, 768], , { 837: 8082 }], + 7971: [[7969, 768], , { 837: 8083 }], + 7972: [[7968, 769], , { 837: 8084 }], + 7973: [[7969, 769], , { 837: 8085 }], + 7974: [[7968, 834], , { 837: 8086 }], + 7975: [[7969, 834], , { 837: 8087 }], + 7976: [[919, 787], , { 768: 7978, 769: 7980, 834: 7982, 837: 8088 }], + 7977: [[919, 788], , { 768: 7979, 769: 7981, 834: 7983, 837: 8089 }], + 7978: [[7976, 768], , { 837: 8090 }], + 7979: [[7977, 768], , { 837: 8091 }], + 7980: [[7976, 769], , { 837: 8092 }], + 7981: [[7977, 769], , { 837: 8093 }], + 7982: [[7976, 834], , { 837: 8094 }], + 7983: [[7977, 834], , { 837: 8095 }], + 7984: [[953, 787], , { 768: 7986, 769: 7988, 834: 7990 }], + 7985: [[953, 788], , { 768: 7987, 769: 7989, 834: 7991 }], + 7986: [[7984, 768]], + 7987: [[7985, 768]], + 7988: [[7984, 769]], + 7989: [[7985, 769]], + 7990: [[7984, 834]], + 7991: [[7985, 834]], + 7992: [[921, 787], , { 768: 7994, 769: 7996, 834: 7998 }], + 7993: [[921, 788], , { 768: 7995, 769: 7997, 834: 7999 }], + 7994: [[7992, 768]], + 7995: [[7993, 768]], + 7996: [[7992, 769]], + 7997: [[7993, 769]], + 7998: [[7992, 834]], + 7999: [[7993, 834]], + 8000: [[959, 787], , { 768: 8002, 769: 8004 }], + 8001: [[959, 788], , { 768: 8003, 769: 8005 }], + 8002: [[8000, 768]], + 8003: [[8001, 768]], + 8004: [[8000, 769]], + 8005: [[8001, 769]], + 8008: [[927, 787], , { 768: 8010, 769: 8012 }], + 8009: [[927, 788], , { 768: 8011, 769: 8013 }], + 8010: [[8008, 768]], + 8011: [[8009, 768]], + 8012: [[8008, 769]], + 8013: [[8009, 769]], + 8016: [[965, 787], , { 768: 8018, 769: 8020, 834: 8022 }], + 8017: [[965, 788], , { 768: 8019, 769: 8021, 834: 8023 }], + 8018: [[8016, 768]], + 8019: [[8017, 768]], + 8020: [[8016, 769]], + 8021: [[8017, 769]], + 8022: [[8016, 834]], + 8023: [[8017, 834]], + 8025: [[933, 788], , { 768: 8027, 769: 8029, 834: 8031 }], + 8027: [[8025, 768]], + 8029: [[8025, 769]], + 8031: [[8025, 834]], + 8032: [[969, 787], , { 768: 8034, 769: 8036, 834: 8038, 837: 8096 }], + 8033: [[969, 788], , { 768: 8035, 769: 8037, 834: 8039, 837: 8097 }], + 8034: [[8032, 768], , { 837: 8098 }], + 8035: [[8033, 768], , { 837: 8099 }], + 8036: [[8032, 769], , { 837: 8100 }], + 8037: [[8033, 769], , { 837: 8101 }], + 8038: [[8032, 834], , { 837: 8102 }], + 8039: [[8033, 834], , { 837: 8103 }], + 8040: [[937, 787], , { 768: 8042, 769: 8044, 834: 8046, 837: 8104 }], + 8041: [[937, 788], , { 768: 8043, 769: 8045, 834: 8047, 837: 8105 }], + 8042: [[8040, 768], , { 837: 8106 }], + 8043: [[8041, 768], , { 837: 8107 }], + 8044: [[8040, 769], , { 837: 8108 }], + 8045: [[8041, 769], , { 837: 8109 }], + 8046: [[8040, 834], , { 837: 8110 }], + 8047: [[8041, 834], , { 837: 8111 }], + 8048: [[945, 768], , { 837: 8114 }], + 8049: [[940]], + 8050: [[949, 768]], + 8051: [[941]], + 8052: [[951, 768], , { 837: 8130 }], + 8053: [[942]], + 8054: [[953, 768]], + 8055: [[943]], + 8056: [[959, 768]], + 8057: [[972]], + 8058: [[965, 768]], + 8059: [[973]], + 8060: [[969, 768], , { 837: 8178 }], + 8061: [[974]], + 8064: [[7936, 837]], + 8065: [[7937, 837]], + 8066: [[7938, 837]], + 8067: [[7939, 837]], + 8068: [[7940, 837]], + 8069: [[7941, 837]], + 8070: [[7942, 837]], + 8071: [[7943, 837]], + 8072: [[7944, 837]], + 8073: [[7945, 837]], + 8074: [[7946, 837]], + 8075: [[7947, 837]], + 8076: [[7948, 837]], + 8077: [[7949, 837]], + 8078: [[7950, 837]], + 8079: [[7951, 837]], + 8080: [[7968, 837]], + 8081: [[7969, 837]], + 8082: [[7970, 837]], + 8083: [[7971, 837]], + 8084: [[7972, 837]], + 8085: [[7973, 837]], + 8086: [[7974, 837]], + 8087: [[7975, 837]], + 8088: [[7976, 837]], + 8089: [[7977, 837]], + 8090: [[7978, 837]], + 8091: [[7979, 837]], + 8092: [[7980, 837]], + 8093: [[7981, 837]], + 8094: [[7982, 837]], + 8095: [[7983, 837]], + 8096: [[8032, 837]], + 8097: [[8033, 837]], + 8098: [[8034, 837]], + 8099: [[8035, 837]], + 8100: [[8036, 837]], + 8101: [[8037, 837]], + 8102: [[8038, 837]], + 8103: [[8039, 837]], + 8104: [[8040, 837]], + 8105: [[8041, 837]], + 8106: [[8042, 837]], + 8107: [[8043, 837]], + 8108: [[8044, 837]], + 8109: [[8045, 837]], + 8110: [[8046, 837]], + 8111: [[8047, 837]], + 8112: [[945, 774]], + 8113: [[945, 772]], + 8114: [[8048, 837]], + 8115: [[945, 837]], + 8116: [[940, 837]], + 8118: [[945, 834], , { 837: 8119 }], + 8119: [[8118, 837]], + 8120: [[913, 774]], + 8121: [[913, 772]], + 8122: [[913, 768]], + 8123: [[902]], + 8124: [[913, 837]], + 8125: [[32, 787], 256], + 8126: [[953]], + 8127: [[32, 787], 256, { 768: 8141, 769: 8142, 834: 8143 }], + 8128: [[32, 834], 256], + 8129: [[168, 834]], + 8130: [[8052, 837]], + 8131: [[951, 837]], + 8132: [[942, 837]], + 8134: [[951, 834], , { 837: 8135 }], + 8135: [[8134, 837]], + 8136: [[917, 768]], + 8137: [[904]], + 8138: [[919, 768]], + 8139: [[905]], + 8140: [[919, 837]], + 8141: [[8127, 768]], + 8142: [[8127, 769]], + 8143: [[8127, 834]], + 8144: [[953, 774]], + 8145: [[953, 772]], + 8146: [[970, 768]], + 8147: [[912]], + 8150: [[953, 834]], + 8151: [[970, 834]], + 8152: [[921, 774]], + 8153: [[921, 772]], + 8154: [[921, 768]], + 8155: [[906]], + 8157: [[8190, 768]], + 8158: [[8190, 769]], + 8159: [[8190, 834]], + 8160: [[965, 774]], + 8161: [[965, 772]], + 8162: [[971, 768]], + 8163: [[944]], + 8164: [[961, 787]], + 8165: [[961, 788]], + 8166: [[965, 834]], + 8167: [[971, 834]], + 8168: [[933, 774]], + 8169: [[933, 772]], + 8170: [[933, 768]], + 8171: [[910]], + 8172: [[929, 788]], + 8173: [[168, 768]], + 8174: [[901]], + 8175: [[96]], + 8178: [[8060, 837]], + 8179: [[969, 837]], + 8180: [[974, 837]], + 8182: [[969, 834], , { 837: 8183 }], + 8183: [[8182, 837]], + 8184: [[927, 768]], + 8185: [[908]], + 8186: [[937, 768]], + 8187: [[911]], + 8188: [[937, 837]], + 8189: [[180]], + 8190: [[32, 788], 256, { 768: 8157, 769: 8158, 834: 8159 }] + }, + 8192: { + 8192: [[8194]], + 8193: [[8195]], + 8194: [[32], 256], + 8195: [[32], 256], + 8196: [[32], 256], + 8197: [[32], 256], + 8198: [[32], 256], + 8199: [[32], 256], + 8200: [[32], 256], + 8201: [[32], 256], + 8202: [[32], 256], + 8209: [[8208], 256], + 8215: [[32, 819], 256], + 8228: [[46], 256], + 8229: [[46, 46], 256], + 8230: [[46, 46, 46], 256], + 8239: [[32], 256], + 8243: [[8242, 8242], 256], + 8244: [[8242, 8242, 8242], 256], + 8246: [[8245, 8245], 256], + 8247: [[8245, 8245, 8245], 256], + 8252: [[33, 33], 256], + 8254: [[32, 773], 256], + 8263: [[63, 63], 256], + 8264: [[63, 33], 256], + 8265: [[33, 63], 256], + 8279: [[8242, 8242, 8242, 8242], 256], + 8287: [[32], 256], + 8304: [[48], 256], + 8305: [[105], 256], + 8308: [[52], 256], + 8309: [[53], 256], + 8310: [[54], 256], + 8311: [[55], 256], + 8312: [[56], 256], + 8313: [[57], 256], + 8314: [[43], 256], + 8315: [[8722], 256], + 8316: [[61], 256], + 8317: [[40], 256], + 8318: [[41], 256], + 8319: [[110], 256], + 8320: [[48], 256], + 8321: [[49], 256], + 8322: [[50], 256], + 8323: [[51], 256], + 8324: [[52], 256], + 8325: [[53], 256], + 8326: [[54], 256], + 8327: [[55], 256], + 8328: [[56], 256], + 8329: [[57], 256], + 8330: [[43], 256], + 8331: [[8722], 256], + 8332: [[61], 256], + 8333: [[40], 256], + 8334: [[41], 256], + 8336: [[97], 256], + 8337: [[101], 256], + 8338: [[111], 256], + 8339: [[120], 256], + 8340: [[601], 256], + 8341: [[104], 256], + 8342: [[107], 256], + 8343: [[108], 256], + 8344: [[109], 256], + 8345: [[110], 256], + 8346: [[112], 256], + 8347: [[115], 256], + 8348: [[116], 256], + 8360: [[82, 115], 256], + 8400: [, 230], + 8401: [, 230], + 8402: [, 1], + 8403: [, 1], + 8404: [, 230], + 8405: [, 230], + 8406: [, 230], + 8407: [, 230], + 8408: [, 1], + 8409: [, 1], + 8410: [, 1], + 8411: [, 230], + 8412: [, 230], + 8417: [, 230], + 8421: [, 1], + 8422: [, 1], + 8423: [, 230], + 8424: [, 220], + 8425: [, 230], + 8426: [, 1], + 8427: [, 1], + 8428: [, 220], + 8429: [, 220], + 8430: [, 220], + 8431: [, 220], + 8432: [, 230] + }, + 8448: { + 8448: [[97, 47, 99], 256], + 8449: [[97, 47, 115], 256], + 8450: [[67], 256], + 8451: [[176, 67], 256], + 8453: [[99, 47, 111], 256], + 8454: [[99, 47, 117], 256], + 8455: [[400], 256], + 8457: [[176, 70], 256], + 8458: [[103], 256], + 8459: [[72], 256], + 8460: [[72], 256], + 8461: [[72], 256], + 8462: [[104], 256], + 8463: [[295], 256], + 8464: [[73], 256], + 8465: [[73], 256], + 8466: [[76], 256], + 8467: [[108], 256], + 8469: [[78], 256], + 8470: [[78, 111], 256], + 8473: [[80], 256], + 8474: [[81], 256], + 8475: [[82], 256], + 8476: [[82], 256], + 8477: [[82], 256], + 8480: [[83, 77], 256], + 8481: [[84, 69, 76], 256], + 8482: [[84, 77], 256], + 8484: [[90], 256], + 8486: [[937]], + 8488: [[90], 256], + 8490: [[75]], + 8491: [[197]], + 8492: [[66], 256], + 8493: [[67], 256], + 8495: [[101], 256], + 8496: [[69], 256], + 8497: [[70], 256], + 8499: [[77], 256], + 8500: [[111], 256], + 8501: [[1488], 256], + 8502: [[1489], 256], + 8503: [[1490], 256], + 8504: [[1491], 256], + 8505: [[105], 256], + 8507: [[70, 65, 88], 256], + 8508: [[960], 256], + 8509: [[947], 256], + 8510: [[915], 256], + 8511: [[928], 256], + 8512: [[8721], 256], + 8517: [[68], 256], + 8518: [[100], 256], + 8519: [[101], 256], + 8520: [[105], 256], + 8521: [[106], 256], + 8528: [[49, 8260, 55], 256], + 8529: [[49, 8260, 57], 256], + 8530: [[49, 8260, 49, 48], 256], + 8531: [[49, 8260, 51], 256], + 8532: [[50, 8260, 51], 256], + 8533: [[49, 8260, 53], 256], + 8534: [[50, 8260, 53], 256], + 8535: [[51, 8260, 53], 256], + 8536: [[52, 8260, 53], 256], + 8537: [[49, 8260, 54], 256], + 8538: [[53, 8260, 54], 256], + 8539: [[49, 8260, 56], 256], + 8540: [[51, 8260, 56], 256], + 8541: [[53, 8260, 56], 256], + 8542: [[55, 8260, 56], 256], + 8543: [[49, 8260], 256], + 8544: [[73], 256], + 8545: [[73, 73], 256], + 8546: [[73, 73, 73], 256], + 8547: [[73, 86], 256], + 8548: [[86], 256], + 8549: [[86, 73], 256], + 8550: [[86, 73, 73], 256], + 8551: [[86, 73, 73, 73], 256], + 8552: [[73, 88], 256], + 8553: [[88], 256], + 8554: [[88, 73], 256], + 8555: [[88, 73, 73], 256], + 8556: [[76], 256], + 8557: [[67], 256], + 8558: [[68], 256], + 8559: [[77], 256], + 8560: [[105], 256], + 8561: [[105, 105], 256], + 8562: [[105, 105, 105], 256], + 8563: [[105, 118], 256], + 8564: [[118], 256], + 8565: [[118, 105], 256], + 8566: [[118, 105, 105], 256], + 8567: [[118, 105, 105, 105], 256], + 8568: [[105, 120], 256], + 8569: [[120], 256], + 8570: [[120, 105], 256], + 8571: [[120, 105, 105], 256], + 8572: [[108], 256], + 8573: [[99], 256], + 8574: [[100], 256], + 8575: [[109], 256], + 8585: [[48, 8260, 51], 256], + 8592: [, , { 824: 8602 }], + 8594: [, , { 824: 8603 }], + 8596: [, , { 824: 8622 }], + 8602: [[8592, 824]], + 8603: [[8594, 824]], + 8622: [[8596, 824]], + 8653: [[8656, 824]], + 8654: [[8660, 824]], + 8655: [[8658, 824]], + 8656: [, , { 824: 8653 }], + 8658: [, , { 824: 8655 }], + 8660: [, , { 824: 8654 }] + }, + 8704: { + 8707: [, , { 824: 8708 }], + 8708: [[8707, 824]], + 8712: [, , { 824: 8713 }], + 8713: [[8712, 824]], + 8715: [, , { 824: 8716 }], + 8716: [[8715, 824]], + 8739: [, , { 824: 8740 }], + 8740: [[8739, 824]], + 8741: [, , { 824: 8742 }], + 8742: [[8741, 824]], + 8748: [[8747, 8747], 256], + 8749: [[8747, 8747, 8747], 256], + 8751: [[8750, 8750], 256], + 8752: [[8750, 8750, 8750], 256], + 8764: [, , { 824: 8769 }], + 8769: [[8764, 824]], + 8771: [, , { 824: 8772 }], + 8772: [[8771, 824]], + 8773: [, , { 824: 8775 }], + 8775: [[8773, 824]], + 8776: [, , { 824: 8777 }], + 8777: [[8776, 824]], + 8781: [, , { 824: 8813 }], + 8800: [[61, 824]], + 8801: [, , { 824: 8802 }], + 8802: [[8801, 824]], + 8804: [, , { 824: 8816 }], + 8805: [, , { 824: 8817 }], + 8813: [[8781, 824]], + 8814: [[60, 824]], + 8815: [[62, 824]], + 8816: [[8804, 824]], + 8817: [[8805, 824]], + 8818: [, , { 824: 8820 }], + 8819: [, , { 824: 8821 }], + 8820: [[8818, 824]], + 8821: [[8819, 824]], + 8822: [, , { 824: 8824 }], + 8823: [, , { 824: 8825 }], + 8824: [[8822, 824]], + 8825: [[8823, 824]], + 8826: [, , { 824: 8832 }], + 8827: [, , { 824: 8833 }], + 8828: [, , { 824: 8928 }], + 8829: [, , { 824: 8929 }], + 8832: [[8826, 824]], + 8833: [[8827, 824]], + 8834: [, , { 824: 8836 }], + 8835: [, , { 824: 8837 }], + 8836: [[8834, 824]], + 8837: [[8835, 824]], + 8838: [, , { 824: 8840 }], + 8839: [, , { 824: 8841 }], + 8840: [[8838, 824]], + 8841: [[8839, 824]], + 8849: [, , { 824: 8930 }], + 8850: [, , { 824: 8931 }], + 8866: [, , { 824: 8876 }], + 8872: [, , { 824: 8877 }], + 8873: [, , { 824: 8878 }], + 8875: [, , { 824: 8879 }], + 8876: [[8866, 824]], + 8877: [[8872, 824]], + 8878: [[8873, 824]], + 8879: [[8875, 824]], + 8882: [, , { 824: 8938 }], + 8883: [, , { 824: 8939 }], + 8884: [, , { 824: 8940 }], + 8885: [, , { 824: 8941 }], + 8928: [[8828, 824]], + 8929: [[8829, 824]], + 8930: [[8849, 824]], + 8931: [[8850, 824]], + 8938: [[8882, 824]], + 8939: [[8883, 824]], + 8940: [[8884, 824]], + 8941: [[8885, 824]] + }, + 8960: { 9001: [[12296]], 9002: [[12297]] }, + 9216: { + 9312: [[49], 256], + 9313: [[50], 256], + 9314: [[51], 256], + 9315: [[52], 256], + 9316: [[53], 256], + 9317: [[54], 256], + 9318: [[55], 256], + 9319: [[56], 256], + 9320: [[57], 256], + 9321: [[49, 48], 256], + 9322: [[49, 49], 256], + 9323: [[49, 50], 256], + 9324: [[49, 51], 256], + 9325: [[49, 52], 256], + 9326: [[49, 53], 256], + 9327: [[49, 54], 256], + 9328: [[49, 55], 256], + 9329: [[49, 56], 256], + 9330: [[49, 57], 256], + 9331: [[50, 48], 256], + 9332: [[40, 49, 41], 256], + 9333: [[40, 50, 41], 256], + 9334: [[40, 51, 41], 256], + 9335: [[40, 52, 41], 256], + 9336: [[40, 53, 41], 256], + 9337: [[40, 54, 41], 256], + 9338: [[40, 55, 41], 256], + 9339: [[40, 56, 41], 256], + 9340: [[40, 57, 41], 256], + 9341: [[40, 49, 48, 41], 256], + 9342: [[40, 49, 49, 41], 256], + 9343: [[40, 49, 50, 41], 256], + 9344: [[40, 49, 51, 41], 256], + 9345: [[40, 49, 52, 41], 256], + 9346: [[40, 49, 53, 41], 256], + 9347: [[40, 49, 54, 41], 256], + 9348: [[40, 49, 55, 41], 256], + 9349: [[40, 49, 56, 41], 256], + 9350: [[40, 49, 57, 41], 256], + 9351: [[40, 50, 48, 41], 256], + 9352: [[49, 46], 256], + 9353: [[50, 46], 256], + 9354: [[51, 46], 256], + 9355: [[52, 46], 256], + 9356: [[53, 46], 256], + 9357: [[54, 46], 256], + 9358: [[55, 46], 256], + 9359: [[56, 46], 256], + 9360: [[57, 46], 256], + 9361: [[49, 48, 46], 256], + 9362: [[49, 49, 46], 256], + 9363: [[49, 50, 46], 256], + 9364: [[49, 51, 46], 256], + 9365: [[49, 52, 46], 256], + 9366: [[49, 53, 46], 256], + 9367: [[49, 54, 46], 256], + 9368: [[49, 55, 46], 256], + 9369: [[49, 56, 46], 256], + 9370: [[49, 57, 46], 256], + 9371: [[50, 48, 46], 256], + 9372: [[40, 97, 41], 256], + 9373: [[40, 98, 41], 256], + 9374: [[40, 99, 41], 256], + 9375: [[40, 100, 41], 256], + 9376: [[40, 101, 41], 256], + 9377: [[40, 102, 41], 256], + 9378: [[40, 103, 41], 256], + 9379: [[40, 104, 41], 256], + 9380: [[40, 105, 41], 256], + 9381: [[40, 106, 41], 256], + 9382: [[40, 107, 41], 256], + 9383: [[40, 108, 41], 256], + 9384: [[40, 109, 41], 256], + 9385: [[40, 110, 41], 256], + 9386: [[40, 111, 41], 256], + 9387: [[40, 112, 41], 256], + 9388: [[40, 113, 41], 256], + 9389: [[40, 114, 41], 256], + 9390: [[40, 115, 41], 256], + 9391: [[40, 116, 41], 256], + 9392: [[40, 117, 41], 256], + 9393: [[40, 118, 41], 256], + 9394: [[40, 119, 41], 256], + 9395: [[40, 120, 41], 256], + 9396: [[40, 121, 41], 256], + 9397: [[40, 122, 41], 256], + 9398: [[65], 256], + 9399: [[66], 256], + 9400: [[67], 256], + 9401: [[68], 256], + 9402: [[69], 256], + 9403: [[70], 256], + 9404: [[71], 256], + 9405: [[72], 256], + 9406: [[73], 256], + 9407: [[74], 256], + 9408: [[75], 256], + 9409: [[76], 256], + 9410: [[77], 256], + 9411: [[78], 256], + 9412: [[79], 256], + 9413: [[80], 256], + 9414: [[81], 256], + 9415: [[82], 256], + 9416: [[83], 256], + 9417: [[84], 256], + 9418: [[85], 256], + 9419: [[86], 256], + 9420: [[87], 256], + 9421: [[88], 256], + 9422: [[89], 256], + 9423: [[90], 256], + 9424: [[97], 256], + 9425: [[98], 256], + 9426: [[99], 256], + 9427: [[100], 256], + 9428: [[101], 256], + 9429: [[102], 256], + 9430: [[103], 256], + 9431: [[104], 256], + 9432: [[105], 256], + 9433: [[106], 256], + 9434: [[107], 256], + 9435: [[108], 256], + 9436: [[109], 256], + 9437: [[110], 256], + 9438: [[111], 256], + 9439: [[112], 256], + 9440: [[113], 256], + 9441: [[114], 256], + 9442: [[115], 256], + 9443: [[116], 256], + 9444: [[117], 256], + 9445: [[118], 256], + 9446: [[119], 256], + 9447: [[120], 256], + 9448: [[121], 256], + 9449: [[122], 256], + 9450: [[48], 256] + }, + 10752: { + 10764: [[8747, 8747, 8747, 8747], 256], + 10868: [[58, 58, 61], 256], + 10869: [[61, 61], 256], + 10870: [[61, 61, 61], 256], + 10972: [[10973, 824], 512] + }, + 11264: { + 11388: [[106], 256], + 11389: [[86], 256], + 11503: [, 230], + 11504: [, 230], + 11505: [, 230] + }, + 11520: { + 11631: [[11617], 256], + 11647: [, 9], + 11744: [, 230], + 11745: [, 230], + 11746: [, 230], + 11747: [, 230], + 11748: [, 230], + 11749: [, 230], + 11750: [, 230], + 11751: [, 230], + 11752: [, 230], + 11753: [, 230], + 11754: [, 230], + 11755: [, 230], + 11756: [, 230], + 11757: [, 230], + 11758: [, 230], + 11759: [, 230], + 11760: [, 230], + 11761: [, 230], + 11762: [, 230], + 11763: [, 230], + 11764: [, 230], + 11765: [, 230], + 11766: [, 230], + 11767: [, 230], + 11768: [, 230], + 11769: [, 230], + 11770: [, 230], + 11771: [, 230], + 11772: [, 230], + 11773: [, 230], + 11774: [, 230], + 11775: [, 230] + }, + 11776: { 11935: [[27597], 256], 12019: [[40863], 256] }, + 12032: { + 12032: [[19968], 256], + 12033: [[20008], 256], + 12034: [[20022], 256], + 12035: [[20031], 256], + 12036: [[20057], 256], + 12037: [[20101], 256], + 12038: [[20108], 256], + 12039: [[20128], 256], + 12040: [[20154], 256], + 12041: [[20799], 256], + 12042: [[20837], 256], + 12043: [[20843], 256], + 12044: [[20866], 256], + 12045: [[20886], 256], + 12046: [[20907], 256], + 12047: [[20960], 256], + 12048: [[20981], 256], + 12049: [[20992], 256], + 12050: [[21147], 256], + 12051: [[21241], 256], + 12052: [[21269], 256], + 12053: [[21274], 256], + 12054: [[21304], 256], + 12055: [[21313], 256], + 12056: [[21340], 256], + 12057: [[21353], 256], + 12058: [[21378], 256], + 12059: [[21430], 256], + 12060: [[21448], 256], + 12061: [[21475], 256], + 12062: [[22231], 256], + 12063: [[22303], 256], + 12064: [[22763], 256], + 12065: [[22786], 256], + 12066: [[22794], 256], + 12067: [[22805], 256], + 12068: [[22823], 256], + 12069: [[22899], 256], + 12070: [[23376], 256], + 12071: [[23424], 256], + 12072: [[23544], 256], + 12073: [[23567], 256], + 12074: [[23586], 256], + 12075: [[23608], 256], + 12076: [[23662], 256], + 12077: [[23665], 256], + 12078: [[24027], 256], + 12079: [[24037], 256], + 12080: [[24049], 256], + 12081: [[24062], 256], + 12082: [[24178], 256], + 12083: [[24186], 256], + 12084: [[24191], 256], + 12085: [[24308], 256], + 12086: [[24318], 256], + 12087: [[24331], 256], + 12088: [[24339], 256], + 12089: [[24400], 256], + 12090: [[24417], 256], + 12091: [[24435], 256], + 12092: [[24515], 256], + 12093: [[25096], 256], + 12094: [[25142], 256], + 12095: [[25163], 256], + 12096: [[25903], 256], + 12097: [[25908], 256], + 12098: [[25991], 256], + 12099: [[26007], 256], + 12100: [[26020], 256], + 12101: [[26041], 256], + 12102: [[26080], 256], + 12103: [[26085], 256], + 12104: [[26352], 256], + 12105: [[26376], 256], + 12106: [[26408], 256], + 12107: [[27424], 256], + 12108: [[27490], 256], + 12109: [[27513], 256], + 12110: [[27571], 256], + 12111: [[27595], 256], + 12112: [[27604], 256], + 12113: [[27611], 256], + 12114: [[27663], 256], + 12115: [[27668], 256], + 12116: [[27700], 256], + 12117: [[28779], 256], + 12118: [[29226], 256], + 12119: [[29238], 256], + 12120: [[29243], 256], + 12121: [[29247], 256], + 12122: [[29255], 256], + 12123: [[29273], 256], + 12124: [[29275], 256], + 12125: [[29356], 256], + 12126: [[29572], 256], + 12127: [[29577], 256], + 12128: [[29916], 256], + 12129: [[29926], 256], + 12130: [[29976], 256], + 12131: [[29983], 256], + 12132: [[29992], 256], + 12133: [[30000], 256], + 12134: [[30091], 256], + 12135: [[30098], 256], + 12136: [[30326], 256], + 12137: [[30333], 256], + 12138: [[30382], 256], + 12139: [[30399], 256], + 12140: [[30446], 256], + 12141: [[30683], 256], + 12142: [[30690], 256], + 12143: [[30707], 256], + 12144: [[31034], 256], + 12145: [[31160], 256], + 12146: [[31166], 256], + 12147: [[31348], 256], + 12148: [[31435], 256], + 12149: [[31481], 256], + 12150: [[31859], 256], + 12151: [[31992], 256], + 12152: [[32566], 256], + 12153: [[32593], 256], + 12154: [[32650], 256], + 12155: [[32701], 256], + 12156: [[32769], 256], + 12157: [[32780], 256], + 12158: [[32786], 256], + 12159: [[32819], 256], + 12160: [[32895], 256], + 12161: [[32905], 256], + 12162: [[33251], 256], + 12163: [[33258], 256], + 12164: [[33267], 256], + 12165: [[33276], 256], + 12166: [[33292], 256], + 12167: [[33307], 256], + 12168: [[33311], 256], + 12169: [[33390], 256], + 12170: [[33394], 256], + 12171: [[33400], 256], + 12172: [[34381], 256], + 12173: [[34411], 256], + 12174: [[34880], 256], + 12175: [[34892], 256], + 12176: [[34915], 256], + 12177: [[35198], 256], + 12178: [[35211], 256], + 12179: [[35282], 256], + 12180: [[35328], 256], + 12181: [[35895], 256], + 12182: [[35910], 256], + 12183: [[35925], 256], + 12184: [[35960], 256], + 12185: [[35997], 256], + 12186: [[36196], 256], + 12187: [[36208], 256], + 12188: [[36275], 256], + 12189: [[36523], 256], + 12190: [[36554], 256], + 12191: [[36763], 256], + 12192: [[36784], 256], + 12193: [[36789], 256], + 12194: [[37009], 256], + 12195: [[37193], 256], + 12196: [[37318], 256], + 12197: [[37324], 256], + 12198: [[37329], 256], + 12199: [[38263], 256], + 12200: [[38272], 256], + 12201: [[38428], 256], + 12202: [[38582], 256], + 12203: [[38585], 256], + 12204: [[38632], 256], + 12205: [[38737], 256], + 12206: [[38750], 256], + 12207: [[38754], 256], + 12208: [[38761], 256], + 12209: [[38859], 256], + 12210: [[38893], 256], + 12211: [[38899], 256], + 12212: [[38913], 256], + 12213: [[39080], 256], + 12214: [[39131], 256], + 12215: [[39135], 256], + 12216: [[39318], 256], + 12217: [[39321], 256], + 12218: [[39340], 256], + 12219: [[39592], 256], + 12220: [[39640], 256], + 12221: [[39647], 256], + 12222: [[39717], 256], + 12223: [[39727], 256], + 12224: [[39730], 256], + 12225: [[39740], 256], + 12226: [[39770], 256], + 12227: [[40165], 256], + 12228: [[40565], 256], + 12229: [[40575], 256], + 12230: [[40613], 256], + 12231: [[40635], 256], + 12232: [[40643], 256], + 12233: [[40653], 256], + 12234: [[40657], 256], + 12235: [[40697], 256], + 12236: [[40701], 256], + 12237: [[40718], 256], + 12238: [[40723], 256], + 12239: [[40736], 256], + 12240: [[40763], 256], + 12241: [[40778], 256], + 12242: [[40786], 256], + 12243: [[40845], 256], + 12244: [[40860], 256], + 12245: [[40864], 256] + }, + 12288: { + 12288: [[32], 256], + 12330: [, 218], + 12331: [, 228], + 12332: [, 232], + 12333: [, 222], + 12334: [, 224], + 12335: [, 224], + 12342: [[12306], 256], + 12344: [[21313], 256], + 12345: [[21316], 256], + 12346: [[21317], 256], + 12358: [, , { 12441: 12436 }], + 12363: [, , { 12441: 12364 }], + 12364: [[12363, 12441]], + 12365: [, , { 12441: 12366 }], + 12366: [[12365, 12441]], + 12367: [, , { 12441: 12368 }], + 12368: [[12367, 12441]], + 12369: [, , { 12441: 12370 }], + 12370: [[12369, 12441]], + 12371: [, , { 12441: 12372 }], + 12372: [[12371, 12441]], + 12373: [, , { 12441: 12374 }], + 12374: [[12373, 12441]], + 12375: [, , { 12441: 12376 }], + 12376: [[12375, 12441]], + 12377: [, , { 12441: 12378 }], + 12378: [[12377, 12441]], + 12379: [, , { 12441: 12380 }], + 12380: [[12379, 12441]], + 12381: [, , { 12441: 12382 }], + 12382: [[12381, 12441]], + 12383: [, , { 12441: 12384 }], + 12384: [[12383, 12441]], + 12385: [, , { 12441: 12386 }], + 12386: [[12385, 12441]], + 12388: [, , { 12441: 12389 }], + 12389: [[12388, 12441]], + 12390: [, , { 12441: 12391 }], + 12391: [[12390, 12441]], + 12392: [, , { 12441: 12393 }], + 12393: [[12392, 12441]], + 12399: [, , { 12441: 12400, 12442: 12401 }], + 12400: [[12399, 12441]], + 12401: [[12399, 12442]], + 12402: [, , { 12441: 12403, 12442: 12404 }], + 12403: [[12402, 12441]], + 12404: [[12402, 12442]], + 12405: [, , { 12441: 12406, 12442: 12407 }], + 12406: [[12405, 12441]], + 12407: [[12405, 12442]], + 12408: [, , { 12441: 12409, 12442: 12410 }], + 12409: [[12408, 12441]], + 12410: [[12408, 12442]], + 12411: [, , { 12441: 12412, 12442: 12413 }], + 12412: [[12411, 12441]], + 12413: [[12411, 12442]], + 12436: [[12358, 12441]], + 12441: [, 8], + 12442: [, 8], + 12443: [[32, 12441], 256], + 12444: [[32, 12442], 256], + 12445: [, , { 12441: 12446 }], + 12446: [[12445, 12441]], + 12447: [[12424, 12426], 256], + 12454: [, , { 12441: 12532 }], + 12459: [, , { 12441: 12460 }], + 12460: [[12459, 12441]], + 12461: [, , { 12441: 12462 }], + 12462: [[12461, 12441]], + 12463: [, , { 12441: 12464 }], + 12464: [[12463, 12441]], + 12465: [, , { 12441: 12466 }], + 12466: [[12465, 12441]], + 12467: [, , { 12441: 12468 }], + 12468: [[12467, 12441]], + 12469: [, , { 12441: 12470 }], + 12470: [[12469, 12441]], + 12471: [, , { 12441: 12472 }], + 12472: [[12471, 12441]], + 12473: [, , { 12441: 12474 }], + 12474: [[12473, 12441]], + 12475: [, , { 12441: 12476 }], + 12476: [[12475, 12441]], + 12477: [, , { 12441: 12478 }], + 12478: [[12477, 12441]], + 12479: [, , { 12441: 12480 }], + 12480: [[12479, 12441]], + 12481: [, , { 12441: 12482 }], + 12482: [[12481, 12441]], + 12484: [, , { 12441: 12485 }], + 12485: [[12484, 12441]], + 12486: [, , { 12441: 12487 }], + 12487: [[12486, 12441]], + 12488: [, , { 12441: 12489 }], + 12489: [[12488, 12441]], + 12495: [, , { 12441: 12496, 12442: 12497 }], + 12496: [[12495, 12441]], + 12497: [[12495, 12442]], + 12498: [, , { 12441: 12499, 12442: 12500 }], + 12499: [[12498, 12441]], + 12500: [[12498, 12442]], + 12501: [, , { 12441: 12502, 12442: 12503 }], + 12502: [[12501, 12441]], + 12503: [[12501, 12442]], + 12504: [, , { 12441: 12505, 12442: 12506 }], + 12505: [[12504, 12441]], + 12506: [[12504, 12442]], + 12507: [, , { 12441: 12508, 12442: 12509 }], + 12508: [[12507, 12441]], + 12509: [[12507, 12442]], + 12527: [, , { 12441: 12535 }], + 12528: [, , { 12441: 12536 }], + 12529: [, , { 12441: 12537 }], + 12530: [, , { 12441: 12538 }], + 12532: [[12454, 12441]], + 12535: [[12527, 12441]], + 12536: [[12528, 12441]], + 12537: [[12529, 12441]], + 12538: [[12530, 12441]], + 12541: [, , { 12441: 12542 }], + 12542: [[12541, 12441]], + 12543: [[12467, 12488], 256] + }, + 12544: { + 12593: [[4352], 256], + 12594: [[4353], 256], + 12595: [[4522], 256], + 12596: [[4354], 256], + 12597: [[4524], 256], + 12598: [[4525], 256], + 12599: [[4355], 256], + 12600: [[4356], 256], + 12601: [[4357], 256], + 12602: [[4528], 256], + 12603: [[4529], 256], + 12604: [[4530], 256], + 12605: [[4531], 256], + 12606: [[4532], 256], + 12607: [[4533], 256], + 12608: [[4378], 256], + 12609: [[4358], 256], + 12610: [[4359], 256], + 12611: [[4360], 256], + 12612: [[4385], 256], + 12613: [[4361], 256], + 12614: [[4362], 256], + 12615: [[4363], 256], + 12616: [[4364], 256], + 12617: [[4365], 256], + 12618: [[4366], 256], + 12619: [[4367], 256], + 12620: [[4368], 256], + 12621: [[4369], 256], + 12622: [[4370], 256], + 12623: [[4449], 256], + 12624: [[4450], 256], + 12625: [[4451], 256], + 12626: [[4452], 256], + 12627: [[4453], 256], + 12628: [[4454], 256], + 12629: [[4455], 256], + 12630: [[4456], 256], + 12631: [[4457], 256], + 12632: [[4458], 256], + 12633: [[4459], 256], + 12634: [[4460], 256], + 12635: [[4461], 256], + 12636: [[4462], 256], + 12637: [[4463], 256], + 12638: [[4464], 256], + 12639: [[4465], 256], + 12640: [[4466], 256], + 12641: [[4467], 256], + 12642: [[4468], 256], + 12643: [[4469], 256], + 12644: [[4448], 256], + 12645: [[4372], 256], + 12646: [[4373], 256], + 12647: [[4551], 256], + 12648: [[4552], 256], + 12649: [[4556], 256], + 12650: [[4558], 256], + 12651: [[4563], 256], + 12652: [[4567], 256], + 12653: [[4569], 256], + 12654: [[4380], 256], + 12655: [[4573], 256], + 12656: [[4575], 256], + 12657: [[4381], 256], + 12658: [[4382], 256], + 12659: [[4384], 256], + 12660: [[4386], 256], + 12661: [[4387], 256], + 12662: [[4391], 256], + 12663: [[4393], 256], + 12664: [[4395], 256], + 12665: [[4396], 256], + 12666: [[4397], 256], + 12667: [[4398], 256], + 12668: [[4399], 256], + 12669: [[4402], 256], + 12670: [[4406], 256], + 12671: [[4416], 256], + 12672: [[4423], 256], + 12673: [[4428], 256], + 12674: [[4593], 256], + 12675: [[4594], 256], + 12676: [[4439], 256], + 12677: [[4440], 256], + 12678: [[4441], 256], + 12679: [[4484], 256], + 12680: [[4485], 256], + 12681: [[4488], 256], + 12682: [[4497], 256], + 12683: [[4498], 256], + 12684: [[4500], 256], + 12685: [[4510], 256], + 12686: [[4513], 256], + 12690: [[19968], 256], + 12691: [[20108], 256], + 12692: [[19977], 256], + 12693: [[22235], 256], + 12694: [[19978], 256], + 12695: [[20013], 256], + 12696: [[19979], 256], + 12697: [[30002], 256], + 12698: [[20057], 256], + 12699: [[19993], 256], + 12700: [[19969], 256], + 12701: [[22825], 256], + 12702: [[22320], 256], + 12703: [[20154], 256] + }, + 12800: { + 12800: [[40, 4352, 41], 256], + 12801: [[40, 4354, 41], 256], + 12802: [[40, 4355, 41], 256], + 12803: [[40, 4357, 41], 256], + 12804: [[40, 4358, 41], 256], + 12805: [[40, 4359, 41], 256], + 12806: [[40, 4361, 41], 256], + 12807: [[40, 4363, 41], 256], + 12808: [[40, 4364, 41], 256], + 12809: [[40, 4366, 41], 256], + 12810: [[40, 4367, 41], 256], + 12811: [[40, 4368, 41], 256], + 12812: [[40, 4369, 41], 256], + 12813: [[40, 4370, 41], 256], + 12814: [[40, 4352, 4449, 41], 256], + 12815: [[40, 4354, 4449, 41], 256], + 12816: [[40, 4355, 4449, 41], 256], + 12817: [[40, 4357, 4449, 41], 256], + 12818: [[40, 4358, 4449, 41], 256], + 12819: [[40, 4359, 4449, 41], 256], + 12820: [[40, 4361, 4449, 41], 256], + 12821: [[40, 4363, 4449, 41], 256], + 12822: [[40, 4364, 4449, 41], 256], + 12823: [[40, 4366, 4449, 41], 256], + 12824: [[40, 4367, 4449, 41], 256], + 12825: [[40, 4368, 4449, 41], 256], + 12826: [[40, 4369, 4449, 41], 256], + 12827: [[40, 4370, 4449, 41], 256], + 12828: [[40, 4364, 4462, 41], 256], + 12829: [[40, 4363, 4457, 4364, 4453, 4523, 41], 256], + 12830: [[40, 4363, 4457, 4370, 4462, 41], 256], + 12832: [[40, 19968, 41], 256], + 12833: [[40, 20108, 41], 256], + 12834: [[40, 19977, 41], 256], + 12835: [[40, 22235, 41], 256], + 12836: [[40, 20116, 41], 256], + 12837: [[40, 20845, 41], 256], + 12838: [[40, 19971, 41], 256], + 12839: [[40, 20843, 41], 256], + 12840: [[40, 20061, 41], 256], + 12841: [[40, 21313, 41], 256], + 12842: [[40, 26376, 41], 256], + 12843: [[40, 28779, 41], 256], + 12844: [[40, 27700, 41], 256], + 12845: [[40, 26408, 41], 256], + 12846: [[40, 37329, 41], 256], + 12847: [[40, 22303, 41], 256], + 12848: [[40, 26085, 41], 256], + 12849: [[40, 26666, 41], 256], + 12850: [[40, 26377, 41], 256], + 12851: [[40, 31038, 41], 256], + 12852: [[40, 21517, 41], 256], + 12853: [[40, 29305, 41], 256], + 12854: [[40, 36001, 41], 256], + 12855: [[40, 31069, 41], 256], + 12856: [[40, 21172, 41], 256], + 12857: [[40, 20195, 41], 256], + 12858: [[40, 21628, 41], 256], + 12859: [[40, 23398, 41], 256], + 12860: [[40, 30435, 41], 256], + 12861: [[40, 20225, 41], 256], + 12862: [[40, 36039, 41], 256], + 12863: [[40, 21332, 41], 256], + 12864: [[40, 31085, 41], 256], + 12865: [[40, 20241, 41], 256], + 12866: [[40, 33258, 41], 256], + 12867: [[40, 33267, 41], 256], + 12868: [[21839], 256], + 12869: [[24188], 256], + 12870: [[25991], 256], + 12871: [[31631], 256], + 12880: [[80, 84, 69], 256], + 12881: [[50, 49], 256], + 12882: [[50, 50], 256], + 12883: [[50, 51], 256], + 12884: [[50, 52], 256], + 12885: [[50, 53], 256], + 12886: [[50, 54], 256], + 12887: [[50, 55], 256], + 12888: [[50, 56], 256], + 12889: [[50, 57], 256], + 12890: [[51, 48], 256], + 12891: [[51, 49], 256], + 12892: [[51, 50], 256], + 12893: [[51, 51], 256], + 12894: [[51, 52], 256], + 12895: [[51, 53], 256], + 12896: [[4352], 256], + 12897: [[4354], 256], + 12898: [[4355], 256], + 12899: [[4357], 256], + 12900: [[4358], 256], + 12901: [[4359], 256], + 12902: [[4361], 256], + 12903: [[4363], 256], + 12904: [[4364], 256], + 12905: [[4366], 256], + 12906: [[4367], 256], + 12907: [[4368], 256], + 12908: [[4369], 256], + 12909: [[4370], 256], + 12910: [[4352, 4449], 256], + 12911: [[4354, 4449], 256], + 12912: [[4355, 4449], 256], + 12913: [[4357, 4449], 256], + 12914: [[4358, 4449], 256], + 12915: [[4359, 4449], 256], + 12916: [[4361, 4449], 256], + 12917: [[4363, 4449], 256], + 12918: [[4364, 4449], 256], + 12919: [[4366, 4449], 256], + 12920: [[4367, 4449], 256], + 12921: [[4368, 4449], 256], + 12922: [[4369, 4449], 256], + 12923: [[4370, 4449], 256], + 12924: [[4366, 4449, 4535, 4352, 4457], 256], + 12925: [[4364, 4462, 4363, 4468], 256], + 12926: [[4363, 4462], 256], + 12928: [[19968], 256], + 12929: [[20108], 256], + 12930: [[19977], 256], + 12931: [[22235], 256], + 12932: [[20116], 256], + 12933: [[20845], 256], + 12934: [[19971], 256], + 12935: [[20843], 256], + 12936: [[20061], 256], + 12937: [[21313], 256], + 12938: [[26376], 256], + 12939: [[28779], 256], + 12940: [[27700], 256], + 12941: [[26408], 256], + 12942: [[37329], 256], + 12943: [[22303], 256], + 12944: [[26085], 256], + 12945: [[26666], 256], + 12946: [[26377], 256], + 12947: [[31038], 256], + 12948: [[21517], 256], + 12949: [[29305], 256], + 12950: [[36001], 256], + 12951: [[31069], 256], + 12952: [[21172], 256], + 12953: [[31192], 256], + 12954: [[30007], 256], + 12955: [[22899], 256], + 12956: [[36969], 256], + 12957: [[20778], 256], + 12958: [[21360], 256], + 12959: [[27880], 256], + 12960: [[38917], 256], + 12961: [[20241], 256], + 12962: [[20889], 256], + 12963: [[27491], 256], + 12964: [[19978], 256], + 12965: [[20013], 256], + 12966: [[19979], 256], + 12967: [[24038], 256], + 12968: [[21491], 256], + 12969: [[21307], 256], + 12970: [[23447], 256], + 12971: [[23398], 256], + 12972: [[30435], 256], + 12973: [[20225], 256], + 12974: [[36039], 256], + 12975: [[21332], 256], + 12976: [[22812], 256], + 12977: [[51, 54], 256], + 12978: [[51, 55], 256], + 12979: [[51, 56], 256], + 12980: [[51, 57], 256], + 12981: [[52, 48], 256], + 12982: [[52, 49], 256], + 12983: [[52, 50], 256], + 12984: [[52, 51], 256], + 12985: [[52, 52], 256], + 12986: [[52, 53], 256], + 12987: [[52, 54], 256], + 12988: [[52, 55], 256], + 12989: [[52, 56], 256], + 12990: [[52, 57], 256], + 12991: [[53, 48], 256], + 12992: [[49, 26376], 256], + 12993: [[50, 26376], 256], + 12994: [[51, 26376], 256], + 12995: [[52, 26376], 256], + 12996: [[53, 26376], 256], + 12997: [[54, 26376], 256], + 12998: [[55, 26376], 256], + 12999: [[56, 26376], 256], + 13000: [[57, 26376], 256], + 13001: [[49, 48, 26376], 256], + 13002: [[49, 49, 26376], 256], + 13003: [[49, 50, 26376], 256], + 13004: [[72, 103], 256], + 13005: [[101, 114, 103], 256], + 13006: [[101, 86], 256], + 13007: [[76, 84, 68], 256], + 13008: [[12450], 256], + 13009: [[12452], 256], + 13010: [[12454], 256], + 13011: [[12456], 256], + 13012: [[12458], 256], + 13013: [[12459], 256], + 13014: [[12461], 256], + 13015: [[12463], 256], + 13016: [[12465], 256], + 13017: [[12467], 256], + 13018: [[12469], 256], + 13019: [[12471], 256], + 13020: [[12473], 256], + 13021: [[12475], 256], + 13022: [[12477], 256], + 13023: [[12479], 256], + 13024: [[12481], 256], + 13025: [[12484], 256], + 13026: [[12486], 256], + 13027: [[12488], 256], + 13028: [[12490], 256], + 13029: [[12491], 256], + 13030: [[12492], 256], + 13031: [[12493], 256], + 13032: [[12494], 256], + 13033: [[12495], 256], + 13034: [[12498], 256], + 13035: [[12501], 256], + 13036: [[12504], 256], + 13037: [[12507], 256], + 13038: [[12510], 256], + 13039: [[12511], 256], + 13040: [[12512], 256], + 13041: [[12513], 256], + 13042: [[12514], 256], + 13043: [[12516], 256], + 13044: [[12518], 256], + 13045: [[12520], 256], + 13046: [[12521], 256], + 13047: [[12522], 256], + 13048: [[12523], 256], + 13049: [[12524], 256], + 13050: [[12525], 256], + 13051: [[12527], 256], + 13052: [[12528], 256], + 13053: [[12529], 256], + 13054: [[12530], 256] + }, + 13056: { + 13056: [[12450, 12497, 12540, 12488], 256], + 13057: [[12450, 12523, 12501, 12449], 256], + 13058: [[12450, 12531, 12506, 12450], 256], + 13059: [[12450, 12540, 12523], 256], + 13060: [[12452, 12491, 12531, 12464], 256], + 13061: [[12452, 12531, 12481], 256], + 13062: [[12454, 12457, 12531], 256], + 13063: [[12456, 12473, 12463, 12540, 12489], 256], + 13064: [[12456, 12540, 12459, 12540], 256], + 13065: [[12458, 12531, 12473], 256], + 13066: [[12458, 12540, 12512], 256], + 13067: [[12459, 12452, 12522], 256], + 13068: [[12459, 12521, 12483, 12488], 256], + 13069: [[12459, 12525, 12522, 12540], 256], + 13070: [[12460, 12525, 12531], 256], + 13071: [[12460, 12531, 12510], 256], + 13072: [[12462, 12460], 256], + 13073: [[12462, 12491, 12540], 256], + 13074: [[12461, 12517, 12522, 12540], 256], + 13075: [[12462, 12523, 12480, 12540], 256], + 13076: [[12461, 12525], 256], + 13077: [[12461, 12525, 12464, 12521, 12512], 256], + 13078: [[12461, 12525, 12513, 12540, 12488, 12523], 256], + 13079: [[12461, 12525, 12527, 12483, 12488], 256], + 13080: [[12464, 12521, 12512], 256], + 13081: [[12464, 12521, 12512, 12488, 12531], 256], + 13082: [[12463, 12523, 12476, 12452, 12525], 256], + 13083: [[12463, 12525, 12540, 12493], 256], + 13084: [[12465, 12540, 12473], 256], + 13085: [[12467, 12523, 12490], 256], + 13086: [[12467, 12540, 12509], 256], + 13087: [[12469, 12452, 12463, 12523], 256], + 13088: [[12469, 12531, 12481, 12540, 12512], 256], + 13089: [[12471, 12522, 12531, 12464], 256], + 13090: [[12475, 12531, 12481], 256], + 13091: [[12475, 12531, 12488], 256], + 13092: [[12480, 12540, 12473], 256], + 13093: [[12487, 12471], 256], + 13094: [[12489, 12523], 256], + 13095: [[12488, 12531], 256], + 13096: [[12490, 12494], 256], + 13097: [[12494, 12483, 12488], 256], + 13098: [[12495, 12452, 12484], 256], + 13099: [[12497, 12540, 12475, 12531, 12488], 256], + 13100: [[12497, 12540, 12484], 256], + 13101: [[12496, 12540, 12524, 12523], 256], + 13102: [[12500, 12450, 12473, 12488, 12523], 256], + 13103: [[12500, 12463, 12523], 256], + 13104: [[12500, 12467], 256], + 13105: [[12499, 12523], 256], + 13106: [[12501, 12449, 12521, 12483, 12489], 256], + 13107: [[12501, 12451, 12540, 12488], 256], + 13108: [[12502, 12483, 12471, 12455, 12523], 256], + 13109: [[12501, 12521, 12531], 256], + 13110: [[12504, 12463, 12479, 12540, 12523], 256], + 13111: [[12506, 12477], 256], + 13112: [[12506, 12491, 12498], 256], + 13113: [[12504, 12523, 12484], 256], + 13114: [[12506, 12531, 12473], 256], + 13115: [[12506, 12540, 12472], 256], + 13116: [[12505, 12540, 12479], 256], + 13117: [[12509, 12452, 12531, 12488], 256], + 13118: [[12508, 12523, 12488], 256], + 13119: [[12507, 12531], 256], + 13120: [[12509, 12531, 12489], 256], + 13121: [[12507, 12540, 12523], 256], + 13122: [[12507, 12540, 12531], 256], + 13123: [[12510, 12452, 12463, 12525], 256], + 13124: [[12510, 12452, 12523], 256], + 13125: [[12510, 12483, 12495], 256], + 13126: [[12510, 12523, 12463], 256], + 13127: [[12510, 12531, 12471, 12519, 12531], 256], + 13128: [[12511, 12463, 12525, 12531], 256], + 13129: [[12511, 12522], 256], + 13130: [[12511, 12522, 12496, 12540, 12523], 256], + 13131: [[12513, 12460], 256], + 13132: [[12513, 12460, 12488, 12531], 256], + 13133: [[12513, 12540, 12488, 12523], 256], + 13134: [[12516, 12540, 12489], 256], + 13135: [[12516, 12540, 12523], 256], + 13136: [[12518, 12450, 12531], 256], + 13137: [[12522, 12483, 12488, 12523], 256], + 13138: [[12522, 12521], 256], + 13139: [[12523, 12500, 12540], 256], + 13140: [[12523, 12540, 12502, 12523], 256], + 13141: [[12524, 12512], 256], + 13142: [[12524, 12531, 12488, 12466, 12531], 256], + 13143: [[12527, 12483, 12488], 256], + 13144: [[48, 28857], 256], + 13145: [[49, 28857], 256], + 13146: [[50, 28857], 256], + 13147: [[51, 28857], 256], + 13148: [[52, 28857], 256], + 13149: [[53, 28857], 256], + 13150: [[54, 28857], 256], + 13151: [[55, 28857], 256], + 13152: [[56, 28857], 256], + 13153: [[57, 28857], 256], + 13154: [[49, 48, 28857], 256], + 13155: [[49, 49, 28857], 256], + 13156: [[49, 50, 28857], 256], + 13157: [[49, 51, 28857], 256], + 13158: [[49, 52, 28857], 256], + 13159: [[49, 53, 28857], 256], + 13160: [[49, 54, 28857], 256], + 13161: [[49, 55, 28857], 256], + 13162: [[49, 56, 28857], 256], + 13163: [[49, 57, 28857], 256], + 13164: [[50, 48, 28857], 256], + 13165: [[50, 49, 28857], 256], + 13166: [[50, 50, 28857], 256], + 13167: [[50, 51, 28857], 256], + 13168: [[50, 52, 28857], 256], + 13169: [[104, 80, 97], 256], + 13170: [[100, 97], 256], + 13171: [[65, 85], 256], + 13172: [[98, 97, 114], 256], + 13173: [[111, 86], 256], + 13174: [[112, 99], 256], + 13175: [[100, 109], 256], + 13176: [[100, 109, 178], 256], + 13177: [[100, 109, 179], 256], + 13178: [[73, 85], 256], + 13179: [[24179, 25104], 256], + 13180: [[26157, 21644], 256], + 13181: [[22823, 27491], 256], + 13182: [[26126, 27835], 256], + 13183: [[26666, 24335, 20250, 31038], 256], + 13184: [[112, 65], 256], + 13185: [[110, 65], 256], + 13186: [[956, 65], 256], + 13187: [[109, 65], 256], + 13188: [[107, 65], 256], + 13189: [[75, 66], 256], + 13190: [[77, 66], 256], + 13191: [[71, 66], 256], + 13192: [[99, 97, 108], 256], + 13193: [[107, 99, 97, 108], 256], + 13194: [[112, 70], 256], + 13195: [[110, 70], 256], + 13196: [[956, 70], 256], + 13197: [[956, 103], 256], + 13198: [[109, 103], 256], + 13199: [[107, 103], 256], + 13200: [[72, 122], 256], + 13201: [[107, 72, 122], 256], + 13202: [[77, 72, 122], 256], + 13203: [[71, 72, 122], 256], + 13204: [[84, 72, 122], 256], + 13205: [[956, 8467], 256], + 13206: [[109, 8467], 256], + 13207: [[100, 8467], 256], + 13208: [[107, 8467], 256], + 13209: [[102, 109], 256], + 13210: [[110, 109], 256], + 13211: [[956, 109], 256], + 13212: [[109, 109], 256], + 13213: [[99, 109], 256], + 13214: [[107, 109], 256], + 13215: [[109, 109, 178], 256], + 13216: [[99, 109, 178], 256], + 13217: [[109, 178], 256], + 13218: [[107, 109, 178], 256], + 13219: [[109, 109, 179], 256], + 13220: [[99, 109, 179], 256], + 13221: [[109, 179], 256], + 13222: [[107, 109, 179], 256], + 13223: [[109, 8725, 115], 256], + 13224: [[109, 8725, 115, 178], 256], + 13225: [[80, 97], 256], + 13226: [[107, 80, 97], 256], + 13227: [[77, 80, 97], 256], + 13228: [[71, 80, 97], 256], + 13229: [[114, 97, 100], 256], + 13230: [[114, 97, 100, 8725, 115], 256], + 13231: [[114, 97, 100, 8725, 115, 178], 256], + 13232: [[112, 115], 256], + 13233: [[110, 115], 256], + 13234: [[956, 115], 256], + 13235: [[109, 115], 256], + 13236: [[112, 86], 256], + 13237: [[110, 86], 256], + 13238: [[956, 86], 256], + 13239: [[109, 86], 256], + 13240: [[107, 86], 256], + 13241: [[77, 86], 256], + 13242: [[112, 87], 256], + 13243: [[110, 87], 256], + 13244: [[956, 87], 256], + 13245: [[109, 87], 256], + 13246: [[107, 87], 256], + 13247: [[77, 87], 256], + 13248: [[107, 937], 256], + 13249: [[77, 937], 256], + 13250: [[97, 46, 109, 46], 256], + 13251: [[66, 113], 256], + 13252: [[99, 99], 256], + 13253: [[99, 100], 256], + 13254: [[67, 8725, 107, 103], 256], + 13255: [[67, 111, 46], 256], + 13256: [[100, 66], 256], + 13257: [[71, 121], 256], + 13258: [[104, 97], 256], + 13259: [[72, 80], 256], + 13260: [[105, 110], 256], + 13261: [[75, 75], 256], + 13262: [[75, 77], 256], + 13263: [[107, 116], 256], + 13264: [[108, 109], 256], + 13265: [[108, 110], 256], + 13266: [[108, 111, 103], 256], + 13267: [[108, 120], 256], + 13268: [[109, 98], 256], + 13269: [[109, 105, 108], 256], + 13270: [[109, 111, 108], 256], + 13271: [[80, 72], 256], + 13272: [[112, 46, 109, 46], 256], + 13273: [[80, 80, 77], 256], + 13274: [[80, 82], 256], + 13275: [[115, 114], 256], + 13276: [[83, 118], 256], + 13277: [[87, 98], 256], + 13278: [[86, 8725, 109], 256], + 13279: [[65, 8725, 109], 256], + 13280: [[49, 26085], 256], + 13281: [[50, 26085], 256], + 13282: [[51, 26085], 256], + 13283: [[52, 26085], 256], + 13284: [[53, 26085], 256], + 13285: [[54, 26085], 256], + 13286: [[55, 26085], 256], + 13287: [[56, 26085], 256], + 13288: [[57, 26085], 256], + 13289: [[49, 48, 26085], 256], + 13290: [[49, 49, 26085], 256], + 13291: [[49, 50, 26085], 256], + 13292: [[49, 51, 26085], 256], + 13293: [[49, 52, 26085], 256], + 13294: [[49, 53, 26085], 256], + 13295: [[49, 54, 26085], 256], + 13296: [[49, 55, 26085], 256], + 13297: [[49, 56, 26085], 256], + 13298: [[49, 57, 26085], 256], + 13299: [[50, 48, 26085], 256], + 13300: [[50, 49, 26085], 256], + 13301: [[50, 50, 26085], 256], + 13302: [[50, 51, 26085], 256], + 13303: [[50, 52, 26085], 256], + 13304: [[50, 53, 26085], 256], + 13305: [[50, 54, 26085], 256], + 13306: [[50, 55, 26085], 256], + 13307: [[50, 56, 26085], 256], + 13308: [[50, 57, 26085], 256], + 13309: [[51, 48, 26085], 256], + 13310: [[51, 49, 26085], 256], + 13311: [[103, 97, 108], 256] + }, + 42496: { + 42607: [, 230], + 42612: [, 230], + 42613: [, 230], + 42614: [, 230], + 42615: [, 230], + 42616: [, 230], + 42617: [, 230], + 42618: [, 230], + 42619: [, 230], + 42620: [, 230], + 42621: [, 230], + 42655: [, 230], + 42736: [, 230], + 42737: [, 230] + }, + 42752: { 42864: [[42863], 256], 43000: [[294], 256], 43001: [[339], 256] }, + 43008: { + 43014: [, 9], + 43204: [, 9], + 43232: [, 230], + 43233: [, 230], + 43234: [, 230], + 43235: [, 230], + 43236: [, 230], + 43237: [, 230], + 43238: [, 230], + 43239: [, 230], + 43240: [, 230], + 43241: [, 230], + 43242: [, 230], + 43243: [, 230], + 43244: [, 230], + 43245: [, 230], + 43246: [, 230], + 43247: [, 230], + 43248: [, 230], + 43249: [, 230] + }, + 43264: { + 43307: [, 220], + 43308: [, 220], + 43309: [, 220], + 43347: [, 9], + 43443: [, 7], + 43456: [, 9] + }, + 43520: { + 43696: [, 230], + 43698: [, 230], + 43699: [, 230], + 43700: [, 220], + 43703: [, 230], + 43704: [, 230], + 43710: [, 230], + 43711: [, 230], + 43713: [, 230], + 43766: [, 9] + }, + 43776: { 44013: [, 9] }, + 53504: { + 119134: [[119127, 119141], 512], + 119135: [[119128, 119141], 512], + 119136: [[119135, 119150], 512], + 119137: [[119135, 119151], 512], + 119138: [[119135, 119152], 512], + 119139: [[119135, 119153], 512], + 119140: [[119135, 119154], 512], + 119141: [, 216], + 119142: [, 216], + 119143: [, 1], + 119144: [, 1], + 119145: [, 1], + 119149: [, 226], + 119150: [, 216], + 119151: [, 216], + 119152: [, 216], + 119153: [, 216], + 119154: [, 216], + 119163: [, 220], + 119164: [, 220], + 119165: [, 220], + 119166: [, 220], + 119167: [, 220], + 119168: [, 220], + 119169: [, 220], + 119170: [, 220], + 119173: [, 230], + 119174: [, 230], + 119175: [, 230], + 119176: [, 230], + 119177: [, 230], + 119178: [, 220], + 119179: [, 220], + 119210: [, 230], + 119211: [, 230], + 119212: [, 230], + 119213: [, 230], + 119227: [[119225, 119141], 512], + 119228: [[119226, 119141], 512], + 119229: [[119227, 119150], 512], + 119230: [[119228, 119150], 512], + 119231: [[119227, 119151], 512], + 119232: [[119228, 119151], 512] + }, + 53760: { 119362: [, 230], 119363: [, 230], 119364: [, 230] }, + 54272: { + 119808: [[65], 256], + 119809: [[66], 256], + 119810: [[67], 256], + 119811: [[68], 256], + 119812: [[69], 256], + 119813: [[70], 256], + 119814: [[71], 256], + 119815: [[72], 256], + 119816: [[73], 256], + 119817: [[74], 256], + 119818: [[75], 256], + 119819: [[76], 256], + 119820: [[77], 256], + 119821: [[78], 256], + 119822: [[79], 256], + 119823: [[80], 256], + 119824: [[81], 256], + 119825: [[82], 256], + 119826: [[83], 256], + 119827: [[84], 256], + 119828: [[85], 256], + 119829: [[86], 256], + 119830: [[87], 256], + 119831: [[88], 256], + 119832: [[89], 256], + 119833: [[90], 256], + 119834: [[97], 256], + 119835: [[98], 256], + 119836: [[99], 256], + 119837: [[100], 256], + 119838: [[101], 256], + 119839: [[102], 256], + 119840: [[103], 256], + 119841: [[104], 256], + 119842: [[105], 256], + 119843: [[106], 256], + 119844: [[107], 256], + 119845: [[108], 256], + 119846: [[109], 256], + 119847: [[110], 256], + 119848: [[111], 256], + 119849: [[112], 256], + 119850: [[113], 256], + 119851: [[114], 256], + 119852: [[115], 256], + 119853: [[116], 256], + 119854: [[117], 256], + 119855: [[118], 256], + 119856: [[119], 256], + 119857: [[120], 256], + 119858: [[121], 256], + 119859: [[122], 256], + 119860: [[65], 256], + 119861: [[66], 256], + 119862: [[67], 256], + 119863: [[68], 256], + 119864: [[69], 256], + 119865: [[70], 256], + 119866: [[71], 256], + 119867: [[72], 256], + 119868: [[73], 256], + 119869: [[74], 256], + 119870: [[75], 256], + 119871: [[76], 256], + 119872: [[77], 256], + 119873: [[78], 256], + 119874: [[79], 256], + 119875: [[80], 256], + 119876: [[81], 256], + 119877: [[82], 256], + 119878: [[83], 256], + 119879: [[84], 256], + 119880: [[85], 256], + 119881: [[86], 256], + 119882: [[87], 256], + 119883: [[88], 256], + 119884: [[89], 256], + 119885: [[90], 256], + 119886: [[97], 256], + 119887: [[98], 256], + 119888: [[99], 256], + 119889: [[100], 256], + 119890: [[101], 256], + 119891: [[102], 256], + 119892: [[103], 256], + 119894: [[105], 256], + 119895: [[106], 256], + 119896: [[107], 256], + 119897: [[108], 256], + 119898: [[109], 256], + 119899: [[110], 256], + 119900: [[111], 256], + 119901: [[112], 256], + 119902: [[113], 256], + 119903: [[114], 256], + 119904: [[115], 256], + 119905: [[116], 256], + 119906: [[117], 256], + 119907: [[118], 256], + 119908: [[119], 256], + 119909: [[120], 256], + 119910: [[121], 256], + 119911: [[122], 256], + 119912: [[65], 256], + 119913: [[66], 256], + 119914: [[67], 256], + 119915: [[68], 256], + 119916: [[69], 256], + 119917: [[70], 256], + 119918: [[71], 256], + 119919: [[72], 256], + 119920: [[73], 256], + 119921: [[74], 256], + 119922: [[75], 256], + 119923: [[76], 256], + 119924: [[77], 256], + 119925: [[78], 256], + 119926: [[79], 256], + 119927: [[80], 256], + 119928: [[81], 256], + 119929: [[82], 256], + 119930: [[83], 256], + 119931: [[84], 256], + 119932: [[85], 256], + 119933: [[86], 256], + 119934: [[87], 256], + 119935: [[88], 256], + 119936: [[89], 256], + 119937: [[90], 256], + 119938: [[97], 256], + 119939: [[98], 256], + 119940: [[99], 256], + 119941: [[100], 256], + 119942: [[101], 256], + 119943: [[102], 256], + 119944: [[103], 256], + 119945: [[104], 256], + 119946: [[105], 256], + 119947: [[106], 256], + 119948: [[107], 256], + 119949: [[108], 256], + 119950: [[109], 256], + 119951: [[110], 256], + 119952: [[111], 256], + 119953: [[112], 256], + 119954: [[113], 256], + 119955: [[114], 256], + 119956: [[115], 256], + 119957: [[116], 256], + 119958: [[117], 256], + 119959: [[118], 256], + 119960: [[119], 256], + 119961: [[120], 256], + 119962: [[121], 256], + 119963: [[122], 256], + 119964: [[65], 256], + 119966: [[67], 256], + 119967: [[68], 256], + 119970: [[71], 256], + 119973: [[74], 256], + 119974: [[75], 256], + 119977: [[78], 256], + 119978: [[79], 256], + 119979: [[80], 256], + 119980: [[81], 256], + 119982: [[83], 256], + 119983: [[84], 256], + 119984: [[85], 256], + 119985: [[86], 256], + 119986: [[87], 256], + 119987: [[88], 256], + 119988: [[89], 256], + 119989: [[90], 256], + 119990: [[97], 256], + 119991: [[98], 256], + 119992: [[99], 256], + 119993: [[100], 256], + 119995: [[102], 256], + 119997: [[104], 256], + 119998: [[105], 256], + 119999: [[106], 256], + 120000: [[107], 256], + 120001: [[108], 256], + 120002: [[109], 256], + 120003: [[110], 256], + 120005: [[112], 256], + 120006: [[113], 256], + 120007: [[114], 256], + 120008: [[115], 256], + 120009: [[116], 256], + 120010: [[117], 256], + 120011: [[118], 256], + 120012: [[119], 256], + 120013: [[120], 256], + 120014: [[121], 256], + 120015: [[122], 256], + 120016: [[65], 256], + 120017: [[66], 256], + 120018: [[67], 256], + 120019: [[68], 256], + 120020: [[69], 256], + 120021: [[70], 256], + 120022: [[71], 256], + 120023: [[72], 256], + 120024: [[73], 256], + 120025: [[74], 256], + 120026: [[75], 256], + 120027: [[76], 256], + 120028: [[77], 256], + 120029: [[78], 256], + 120030: [[79], 256], + 120031: [[80], 256], + 120032: [[81], 256], + 120033: [[82], 256], + 120034: [[83], 256], + 120035: [[84], 256], + 120036: [[85], 256], + 120037: [[86], 256], + 120038: [[87], 256], + 120039: [[88], 256], + 120040: [[89], 256], + 120041: [[90], 256], + 120042: [[97], 256], + 120043: [[98], 256], + 120044: [[99], 256], + 120045: [[100], 256], + 120046: [[101], 256], + 120047: [[102], 256], + 120048: [[103], 256], + 120049: [[104], 256], + 120050: [[105], 256], + 120051: [[106], 256], + 120052: [[107], 256], + 120053: [[108], 256], + 120054: [[109], 256], + 120055: [[110], 256], + 120056: [[111], 256], + 120057: [[112], 256], + 120058: [[113], 256], + 120059: [[114], 256], + 120060: [[115], 256], + 120061: [[116], 256], + 120062: [[117], 256], + 120063: [[118], 256] + }, + 54528: { + 120064: [[119], 256], + 120065: [[120], 256], + 120066: [[121], 256], + 120067: [[122], 256], + 120068: [[65], 256], + 120069: [[66], 256], + 120071: [[68], 256], + 120072: [[69], 256], + 120073: [[70], 256], + 120074: [[71], 256], + 120077: [[74], 256], + 120078: [[75], 256], + 120079: [[76], 256], + 120080: [[77], 256], + 120081: [[78], 256], + 120082: [[79], 256], + 120083: [[80], 256], + 120084: [[81], 256], + 120086: [[83], 256], + 120087: [[84], 256], + 120088: [[85], 256], + 120089: [[86], 256], + 120090: [[87], 256], + 120091: [[88], 256], + 120092: [[89], 256], + 120094: [[97], 256], + 120095: [[98], 256], + 120096: [[99], 256], + 120097: [[100], 256], + 120098: [[101], 256], + 120099: [[102], 256], + 120100: [[103], 256], + 120101: [[104], 256], + 120102: [[105], 256], + 120103: [[106], 256], + 120104: [[107], 256], + 120105: [[108], 256], + 120106: [[109], 256], + 120107: [[110], 256], + 120108: [[111], 256], + 120109: [[112], 256], + 120110: [[113], 256], + 120111: [[114], 256], + 120112: [[115], 256], + 120113: [[116], 256], + 120114: [[117], 256], + 120115: [[118], 256], + 120116: [[119], 256], + 120117: [[120], 256], + 120118: [[121], 256], + 120119: [[122], 256], + 120120: [[65], 256], + 120121: [[66], 256], + 120123: [[68], 256], + 120124: [[69], 256], + 120125: [[70], 256], + 120126: [[71], 256], + 120128: [[73], 256], + 120129: [[74], 256], + 120130: [[75], 256], + 120131: [[76], 256], + 120132: [[77], 256], + 120134: [[79], 256], + 120138: [[83], 256], + 120139: [[84], 256], + 120140: [[85], 256], + 120141: [[86], 256], + 120142: [[87], 256], + 120143: [[88], 256], + 120144: [[89], 256], + 120146: [[97], 256], + 120147: [[98], 256], + 120148: [[99], 256], + 120149: [[100], 256], + 120150: [[101], 256], + 120151: [[102], 256], + 120152: [[103], 256], + 120153: [[104], 256], + 120154: [[105], 256], + 120155: [[106], 256], + 120156: [[107], 256], + 120157: [[108], 256], + 120158: [[109], 256], + 120159: [[110], 256], + 120160: [[111], 256], + 120161: [[112], 256], + 120162: [[113], 256], + 120163: [[114], 256], + 120164: [[115], 256], + 120165: [[116], 256], + 120166: [[117], 256], + 120167: [[118], 256], + 120168: [[119], 256], + 120169: [[120], 256], + 120170: [[121], 256], + 120171: [[122], 256], + 120172: [[65], 256], + 120173: [[66], 256], + 120174: [[67], 256], + 120175: [[68], 256], + 120176: [[69], 256], + 120177: [[70], 256], + 120178: [[71], 256], + 120179: [[72], 256], + 120180: [[73], 256], + 120181: [[74], 256], + 120182: [[75], 256], + 120183: [[76], 256], + 120184: [[77], 256], + 120185: [[78], 256], + 120186: [[79], 256], + 120187: [[80], 256], + 120188: [[81], 256], + 120189: [[82], 256], + 120190: [[83], 256], + 120191: [[84], 256], + 120192: [[85], 256], + 120193: [[86], 256], + 120194: [[87], 256], + 120195: [[88], 256], + 120196: [[89], 256], + 120197: [[90], 256], + 120198: [[97], 256], + 120199: [[98], 256], + 120200: [[99], 256], + 120201: [[100], 256], + 120202: [[101], 256], + 120203: [[102], 256], + 120204: [[103], 256], + 120205: [[104], 256], + 120206: [[105], 256], + 120207: [[106], 256], + 120208: [[107], 256], + 120209: [[108], 256], + 120210: [[109], 256], + 120211: [[110], 256], + 120212: [[111], 256], + 120213: [[112], 256], + 120214: [[113], 256], + 120215: [[114], 256], + 120216: [[115], 256], + 120217: [[116], 256], + 120218: [[117], 256], + 120219: [[118], 256], + 120220: [[119], 256], + 120221: [[120], 256], + 120222: [[121], 256], + 120223: [[122], 256], + 120224: [[65], 256], + 120225: [[66], 256], + 120226: [[67], 256], + 120227: [[68], 256], + 120228: [[69], 256], + 120229: [[70], 256], + 120230: [[71], 256], + 120231: [[72], 256], + 120232: [[73], 256], + 120233: [[74], 256], + 120234: [[75], 256], + 120235: [[76], 256], + 120236: [[77], 256], + 120237: [[78], 256], + 120238: [[79], 256], + 120239: [[80], 256], + 120240: [[81], 256], + 120241: [[82], 256], + 120242: [[83], 256], + 120243: [[84], 256], + 120244: [[85], 256], + 120245: [[86], 256], + 120246: [[87], 256], + 120247: [[88], 256], + 120248: [[89], 256], + 120249: [[90], 256], + 120250: [[97], 256], + 120251: [[98], 256], + 120252: [[99], 256], + 120253: [[100], 256], + 120254: [[101], 256], + 120255: [[102], 256], + 120256: [[103], 256], + 120257: [[104], 256], + 120258: [[105], 256], + 120259: [[106], 256], + 120260: [[107], 256], + 120261: [[108], 256], + 120262: [[109], 256], + 120263: [[110], 256], + 120264: [[111], 256], + 120265: [[112], 256], + 120266: [[113], 256], + 120267: [[114], 256], + 120268: [[115], 256], + 120269: [[116], 256], + 120270: [[117], 256], + 120271: [[118], 256], + 120272: [[119], 256], + 120273: [[120], 256], + 120274: [[121], 256], + 120275: [[122], 256], + 120276: [[65], 256], + 120277: [[66], 256], + 120278: [[67], 256], + 120279: [[68], 256], + 120280: [[69], 256], + 120281: [[70], 256], + 120282: [[71], 256], + 120283: [[72], 256], + 120284: [[73], 256], + 120285: [[74], 256], + 120286: [[75], 256], + 120287: [[76], 256], + 120288: [[77], 256], + 120289: [[78], 256], + 120290: [[79], 256], + 120291: [[80], 256], + 120292: [[81], 256], + 120293: [[82], 256], + 120294: [[83], 256], + 120295: [[84], 256], + 120296: [[85], 256], + 120297: [[86], 256], + 120298: [[87], 256], + 120299: [[88], 256], + 120300: [[89], 256], + 120301: [[90], 256], + 120302: [[97], 256], + 120303: [[98], 256], + 120304: [[99], 256], + 120305: [[100], 256], + 120306: [[101], 256], + 120307: [[102], 256], + 120308: [[103], 256], + 120309: [[104], 256], + 120310: [[105], 256], + 120311: [[106], 256], + 120312: [[107], 256], + 120313: [[108], 256], + 120314: [[109], 256], + 120315: [[110], 256], + 120316: [[111], 256], + 120317: [[112], 256], + 120318: [[113], 256], + 120319: [[114], 256] + }, + 54784: { + 120320: [[115], 256], + 120321: [[116], 256], + 120322: [[117], 256], + 120323: [[118], 256], + 120324: [[119], 256], + 120325: [[120], 256], + 120326: [[121], 256], + 120327: [[122], 256], + 120328: [[65], 256], + 120329: [[66], 256], + 120330: [[67], 256], + 120331: [[68], 256], + 120332: [[69], 256], + 120333: [[70], 256], + 120334: [[71], 256], + 120335: [[72], 256], + 120336: [[73], 256], + 120337: [[74], 256], + 120338: [[75], 256], + 120339: [[76], 256], + 120340: [[77], 256], + 120341: [[78], 256], + 120342: [[79], 256], + 120343: [[80], 256], + 120344: [[81], 256], + 120345: [[82], 256], + 120346: [[83], 256], + 120347: [[84], 256], + 120348: [[85], 256], + 120349: [[86], 256], + 120350: [[87], 256], + 120351: [[88], 256], + 120352: [[89], 256], + 120353: [[90], 256], + 120354: [[97], 256], + 120355: [[98], 256], + 120356: [[99], 256], + 120357: [[100], 256], + 120358: [[101], 256], + 120359: [[102], 256], + 120360: [[103], 256], + 120361: [[104], 256], + 120362: [[105], 256], + 120363: [[106], 256], + 120364: [[107], 256], + 120365: [[108], 256], + 120366: [[109], 256], + 120367: [[110], 256], + 120368: [[111], 256], + 120369: [[112], 256], + 120370: [[113], 256], + 120371: [[114], 256], + 120372: [[115], 256], + 120373: [[116], 256], + 120374: [[117], 256], + 120375: [[118], 256], + 120376: [[119], 256], + 120377: [[120], 256], + 120378: [[121], 256], + 120379: [[122], 256], + 120380: [[65], 256], + 120381: [[66], 256], + 120382: [[67], 256], + 120383: [[68], 256], + 120384: [[69], 256], + 120385: [[70], 256], + 120386: [[71], 256], + 120387: [[72], 256], + 120388: [[73], 256], + 120389: [[74], 256], + 120390: [[75], 256], + 120391: [[76], 256], + 120392: [[77], 256], + 120393: [[78], 256], + 120394: [[79], 256], + 120395: [[80], 256], + 120396: [[81], 256], + 120397: [[82], 256], + 120398: [[83], 256], + 120399: [[84], 256], + 120400: [[85], 256], + 120401: [[86], 256], + 120402: [[87], 256], + 120403: [[88], 256], + 120404: [[89], 256], + 120405: [[90], 256], + 120406: [[97], 256], + 120407: [[98], 256], + 120408: [[99], 256], + 120409: [[100], 256], + 120410: [[101], 256], + 120411: [[102], 256], + 120412: [[103], 256], + 120413: [[104], 256], + 120414: [[105], 256], + 120415: [[106], 256], + 120416: [[107], 256], + 120417: [[108], 256], + 120418: [[109], 256], + 120419: [[110], 256], + 120420: [[111], 256], + 120421: [[112], 256], + 120422: [[113], 256], + 120423: [[114], 256], + 120424: [[115], 256], + 120425: [[116], 256], + 120426: [[117], 256], + 120427: [[118], 256], + 120428: [[119], 256], + 120429: [[120], 256], + 120430: [[121], 256], + 120431: [[122], 256], + 120432: [[65], 256], + 120433: [[66], 256], + 120434: [[67], 256], + 120435: [[68], 256], + 120436: [[69], 256], + 120437: [[70], 256], + 120438: [[71], 256], + 120439: [[72], 256], + 120440: [[73], 256], + 120441: [[74], 256], + 120442: [[75], 256], + 120443: [[76], 256], + 120444: [[77], 256], + 120445: [[78], 256], + 120446: [[79], 256], + 120447: [[80], 256], + 120448: [[81], 256], + 120449: [[82], 256], + 120450: [[83], 256], + 120451: [[84], 256], + 120452: [[85], 256], + 120453: [[86], 256], + 120454: [[87], 256], + 120455: [[88], 256], + 120456: [[89], 256], + 120457: [[90], 256], + 120458: [[97], 256], + 120459: [[98], 256], + 120460: [[99], 256], + 120461: [[100], 256], + 120462: [[101], 256], + 120463: [[102], 256], + 120464: [[103], 256], + 120465: [[104], 256], + 120466: [[105], 256], + 120467: [[106], 256], + 120468: [[107], 256], + 120469: [[108], 256], + 120470: [[109], 256], + 120471: [[110], 256], + 120472: [[111], 256], + 120473: [[112], 256], + 120474: [[113], 256], + 120475: [[114], 256], + 120476: [[115], 256], + 120477: [[116], 256], + 120478: [[117], 256], + 120479: [[118], 256], + 120480: [[119], 256], + 120481: [[120], 256], + 120482: [[121], 256], + 120483: [[122], 256], + 120484: [[305], 256], + 120485: [[567], 256], + 120488: [[913], 256], + 120489: [[914], 256], + 120490: [[915], 256], + 120491: [[916], 256], + 120492: [[917], 256], + 120493: [[918], 256], + 120494: [[919], 256], + 120495: [[920], 256], + 120496: [[921], 256], + 120497: [[922], 256], + 120498: [[923], 256], + 120499: [[924], 256], + 120500: [[925], 256], + 120501: [[926], 256], + 120502: [[927], 256], + 120503: [[928], 256], + 120504: [[929], 256], + 120505: [[1012], 256], + 120506: [[931], 256], + 120507: [[932], 256], + 120508: [[933], 256], + 120509: [[934], 256], + 120510: [[935], 256], + 120511: [[936], 256], + 120512: [[937], 256], + 120513: [[8711], 256], + 120514: [[945], 256], + 120515: [[946], 256], + 120516: [[947], 256], + 120517: [[948], 256], + 120518: [[949], 256], + 120519: [[950], 256], + 120520: [[951], 256], + 120521: [[952], 256], + 120522: [[953], 256], + 120523: [[954], 256], + 120524: [[955], 256], + 120525: [[956], 256], + 120526: [[957], 256], + 120527: [[958], 256], + 120528: [[959], 256], + 120529: [[960], 256], + 120530: [[961], 256], + 120531: [[962], 256], + 120532: [[963], 256], + 120533: [[964], 256], + 120534: [[965], 256], + 120535: [[966], 256], + 120536: [[967], 256], + 120537: [[968], 256], + 120538: [[969], 256], + 120539: [[8706], 256], + 120540: [[1013], 256], + 120541: [[977], 256], + 120542: [[1008], 256], + 120543: [[981], 256], + 120544: [[1009], 256], + 120545: [[982], 256], + 120546: [[913], 256], + 120547: [[914], 256], + 120548: [[915], 256], + 120549: [[916], 256], + 120550: [[917], 256], + 120551: [[918], 256], + 120552: [[919], 256], + 120553: [[920], 256], + 120554: [[921], 256], + 120555: [[922], 256], + 120556: [[923], 256], + 120557: [[924], 256], + 120558: [[925], 256], + 120559: [[926], 256], + 120560: [[927], 256], + 120561: [[928], 256], + 120562: [[929], 256], + 120563: [[1012], 256], + 120564: [[931], 256], + 120565: [[932], 256], + 120566: [[933], 256], + 120567: [[934], 256], + 120568: [[935], 256], + 120569: [[936], 256], + 120570: [[937], 256], + 120571: [[8711], 256], + 120572: [[945], 256], + 120573: [[946], 256], + 120574: [[947], 256], + 120575: [[948], 256] + }, + 55040: { + 120576: [[949], 256], + 120577: [[950], 256], + 120578: [[951], 256], + 120579: [[952], 256], + 120580: [[953], 256], + 120581: [[954], 256], + 120582: [[955], 256], + 120583: [[956], 256], + 120584: [[957], 256], + 120585: [[958], 256], + 120586: [[959], 256], + 120587: [[960], 256], + 120588: [[961], 256], + 120589: [[962], 256], + 120590: [[963], 256], + 120591: [[964], 256], + 120592: [[965], 256], + 120593: [[966], 256], + 120594: [[967], 256], + 120595: [[968], 256], + 120596: [[969], 256], + 120597: [[8706], 256], + 120598: [[1013], 256], + 120599: [[977], 256], + 120600: [[1008], 256], + 120601: [[981], 256], + 120602: [[1009], 256], + 120603: [[982], 256], + 120604: [[913], 256], + 120605: [[914], 256], + 120606: [[915], 256], + 120607: [[916], 256], + 120608: [[917], 256], + 120609: [[918], 256], + 120610: [[919], 256], + 120611: [[920], 256], + 120612: [[921], 256], + 120613: [[922], 256], + 120614: [[923], 256], + 120615: [[924], 256], + 120616: [[925], 256], + 120617: [[926], 256], + 120618: [[927], 256], + 120619: [[928], 256], + 120620: [[929], 256], + 120621: [[1012], 256], + 120622: [[931], 256], + 120623: [[932], 256], + 120624: [[933], 256], + 120625: [[934], 256], + 120626: [[935], 256], + 120627: [[936], 256], + 120628: [[937], 256], + 120629: [[8711], 256], + 120630: [[945], 256], + 120631: [[946], 256], + 120632: [[947], 256], + 120633: [[948], 256], + 120634: [[949], 256], + 120635: [[950], 256], + 120636: [[951], 256], + 120637: [[952], 256], + 120638: [[953], 256], + 120639: [[954], 256], + 120640: [[955], 256], + 120641: [[956], 256], + 120642: [[957], 256], + 120643: [[958], 256], + 120644: [[959], 256], + 120645: [[960], 256], + 120646: [[961], 256], + 120647: [[962], 256], + 120648: [[963], 256], + 120649: [[964], 256], + 120650: [[965], 256], + 120651: [[966], 256], + 120652: [[967], 256], + 120653: [[968], 256], + 120654: [[969], 256], + 120655: [[8706], 256], + 120656: [[1013], 256], + 120657: [[977], 256], + 120658: [[1008], 256], + 120659: [[981], 256], + 120660: [[1009], 256], + 120661: [[982], 256], + 120662: [[913], 256], + 120663: [[914], 256], + 120664: [[915], 256], + 120665: [[916], 256], + 120666: [[917], 256], + 120667: [[918], 256], + 120668: [[919], 256], + 120669: [[920], 256], + 120670: [[921], 256], + 120671: [[922], 256], + 120672: [[923], 256], + 120673: [[924], 256], + 120674: [[925], 256], + 120675: [[926], 256], + 120676: [[927], 256], + 120677: [[928], 256], + 120678: [[929], 256], + 120679: [[1012], 256], + 120680: [[931], 256], + 120681: [[932], 256], + 120682: [[933], 256], + 120683: [[934], 256], + 120684: [[935], 256], + 120685: [[936], 256], + 120686: [[937], 256], + 120687: [[8711], 256], + 120688: [[945], 256], + 120689: [[946], 256], + 120690: [[947], 256], + 120691: [[948], 256], + 120692: [[949], 256], + 120693: [[950], 256], + 120694: [[951], 256], + 120695: [[952], 256], + 120696: [[953], 256], + 120697: [[954], 256], + 120698: [[955], 256], + 120699: [[956], 256], + 120700: [[957], 256], + 120701: [[958], 256], + 120702: [[959], 256], + 120703: [[960], 256], + 120704: [[961], 256], + 120705: [[962], 256], + 120706: [[963], 256], + 120707: [[964], 256], + 120708: [[965], 256], + 120709: [[966], 256], + 120710: [[967], 256], + 120711: [[968], 256], + 120712: [[969], 256], + 120713: [[8706], 256], + 120714: [[1013], 256], + 120715: [[977], 256], + 120716: [[1008], 256], + 120717: [[981], 256], + 120718: [[1009], 256], + 120719: [[982], 256], + 120720: [[913], 256], + 120721: [[914], 256], + 120722: [[915], 256], + 120723: [[916], 256], + 120724: [[917], 256], + 120725: [[918], 256], + 120726: [[919], 256], + 120727: [[920], 256], + 120728: [[921], 256], + 120729: [[922], 256], + 120730: [[923], 256], + 120731: [[924], 256], + 120732: [[925], 256], + 120733: [[926], 256], + 120734: [[927], 256], + 120735: [[928], 256], + 120736: [[929], 256], + 120737: [[1012], 256], + 120738: [[931], 256], + 120739: [[932], 256], + 120740: [[933], 256], + 120741: [[934], 256], + 120742: [[935], 256], + 120743: [[936], 256], + 120744: [[937], 256], + 120745: [[8711], 256], + 120746: [[945], 256], + 120747: [[946], 256], + 120748: [[947], 256], + 120749: [[948], 256], + 120750: [[949], 256], + 120751: [[950], 256], + 120752: [[951], 256], + 120753: [[952], 256], + 120754: [[953], 256], + 120755: [[954], 256], + 120756: [[955], 256], + 120757: [[956], 256], + 120758: [[957], 256], + 120759: [[958], 256], + 120760: [[959], 256], + 120761: [[960], 256], + 120762: [[961], 256], + 120763: [[962], 256], + 120764: [[963], 256], + 120765: [[964], 256], + 120766: [[965], 256], + 120767: [[966], 256], + 120768: [[967], 256], + 120769: [[968], 256], + 120770: [[969], 256], + 120771: [[8706], 256], + 120772: [[1013], 256], + 120773: [[977], 256], + 120774: [[1008], 256], + 120775: [[981], 256], + 120776: [[1009], 256], + 120777: [[982], 256], + 120778: [[988], 256], + 120779: [[989], 256], + 120782: [[48], 256], + 120783: [[49], 256], + 120784: [[50], 256], + 120785: [[51], 256], + 120786: [[52], 256], + 120787: [[53], 256], + 120788: [[54], 256], + 120789: [[55], 256], + 120790: [[56], 256], + 120791: [[57], 256], + 120792: [[48], 256], + 120793: [[49], 256], + 120794: [[50], 256], + 120795: [[51], 256], + 120796: [[52], 256], + 120797: [[53], 256], + 120798: [[54], 256], + 120799: [[55], 256], + 120800: [[56], 256], + 120801: [[57], 256], + 120802: [[48], 256], + 120803: [[49], 256], + 120804: [[50], 256], + 120805: [[51], 256], + 120806: [[52], 256], + 120807: [[53], 256], + 120808: [[54], 256], + 120809: [[55], 256], + 120810: [[56], 256], + 120811: [[57], 256], + 120812: [[48], 256], + 120813: [[49], 256], + 120814: [[50], 256], + 120815: [[51], 256], + 120816: [[52], 256], + 120817: [[53], 256], + 120818: [[54], 256], + 120819: [[55], 256], + 120820: [[56], 256], + 120821: [[57], 256], + 120822: [[48], 256], + 120823: [[49], 256], + 120824: [[50], 256], + 120825: [[51], 256], + 120826: [[52], 256], + 120827: [[53], 256], + 120828: [[54], 256], + 120829: [[55], 256], + 120830: [[56], 256], + 120831: [[57], 256] + }, + 60928: { + 126464: [[1575], 256], + 126465: [[1576], 256], + 126466: [[1580], 256], + 126467: [[1583], 256], + 126469: [[1608], 256], + 126470: [[1586], 256], + 126471: [[1581], 256], + 126472: [[1591], 256], + 126473: [[1610], 256], + 126474: [[1603], 256], + 126475: [[1604], 256], + 126476: [[1605], 256], + 126477: [[1606], 256], + 126478: [[1587], 256], + 126479: [[1593], 256], + 126480: [[1601], 256], + 126481: [[1589], 256], + 126482: [[1602], 256], + 126483: [[1585], 256], + 126484: [[1588], 256], + 126485: [[1578], 256], + 126486: [[1579], 256], + 126487: [[1582], 256], + 126488: [[1584], 256], + 126489: [[1590], 256], + 126490: [[1592], 256], + 126491: [[1594], 256], + 126492: [[1646], 256], + 126493: [[1722], 256], + 126494: [[1697], 256], + 126495: [[1647], 256], + 126497: [[1576], 256], + 126498: [[1580], 256], + 126500: [[1607], 256], + 126503: [[1581], 256], + 126505: [[1610], 256], + 126506: [[1603], 256], + 126507: [[1604], 256], + 126508: [[1605], 256], + 126509: [[1606], 256], + 126510: [[1587], 256], + 126511: [[1593], 256], + 126512: [[1601], 256], + 126513: [[1589], 256], + 126514: [[1602], 256], + 126516: [[1588], 256], + 126517: [[1578], 256], + 126518: [[1579], 256], + 126519: [[1582], 256], + 126521: [[1590], 256], + 126523: [[1594], 256], + 126530: [[1580], 256], + 126535: [[1581], 256], + 126537: [[1610], 256], + 126539: [[1604], 256], + 126541: [[1606], 256], + 126542: [[1587], 256], + 126543: [[1593], 256], + 126545: [[1589], 256], + 126546: [[1602], 256], + 126548: [[1588], 256], + 126551: [[1582], 256], + 126553: [[1590], 256], + 126555: [[1594], 256], + 126557: [[1722], 256], + 126559: [[1647], 256], + 126561: [[1576], 256], + 126562: [[1580], 256], + 126564: [[1607], 256], + 126567: [[1581], 256], + 126568: [[1591], 256], + 126569: [[1610], 256], + 126570: [[1603], 256], + 126572: [[1605], 256], + 126573: [[1606], 256], + 126574: [[1587], 256], + 126575: [[1593], 256], + 126576: [[1601], 256], + 126577: [[1589], 256], + 126578: [[1602], 256], + 126580: [[1588], 256], + 126581: [[1578], 256], + 126582: [[1579], 256], + 126583: [[1582], 256], + 126585: [[1590], 256], + 126586: [[1592], 256], + 126587: [[1594], 256], + 126588: [[1646], 256], + 126590: [[1697], 256], + 126592: [[1575], 256], + 126593: [[1576], 256], + 126594: [[1580], 256], + 126595: [[1583], 256], + 126596: [[1607], 256], + 126597: [[1608], 256], + 126598: [[1586], 256], + 126599: [[1581], 256], + 126600: [[1591], 256], + 126601: [[1610], 256], + 126603: [[1604], 256], + 126604: [[1605], 256], + 126605: [[1606], 256], + 126606: [[1587], 256], + 126607: [[1593], 256], + 126608: [[1601], 256], + 126609: [[1589], 256], + 126610: [[1602], 256], + 126611: [[1585], 256], + 126612: [[1588], 256], + 126613: [[1578], 256], + 126614: [[1579], 256], + 126615: [[1582], 256], + 126616: [[1584], 256], + 126617: [[1590], 256], + 126618: [[1592], 256], + 126619: [[1594], 256], + 126625: [[1576], 256], + 126626: [[1580], 256], + 126627: [[1583], 256], + 126629: [[1608], 256], + 126630: [[1586], 256], + 126631: [[1581], 256], + 126632: [[1591], 256], + 126633: [[1610], 256], + 126635: [[1604], 256], + 126636: [[1605], 256], + 126637: [[1606], 256], + 126638: [[1587], 256], + 126639: [[1593], 256], + 126640: [[1601], 256], + 126641: [[1589], 256], + 126642: [[1602], 256], + 126643: [[1585], 256], + 126644: [[1588], 256], + 126645: [[1578], 256], + 126646: [[1579], 256], + 126647: [[1582], 256], + 126648: [[1584], 256], + 126649: [[1590], 256], + 126650: [[1592], 256], + 126651: [[1594], 256] + }, + 61696: { + 127232: [[48, 46], 256], + 127233: [[48, 44], 256], + 127234: [[49, 44], 256], + 127235: [[50, 44], 256], + 127236: [[51, 44], 256], + 127237: [[52, 44], 256], + 127238: [[53, 44], 256], + 127239: [[54, 44], 256], + 127240: [[55, 44], 256], + 127241: [[56, 44], 256], + 127242: [[57, 44], 256], + 127248: [[40, 65, 41], 256], + 127249: [[40, 66, 41], 256], + 127250: [[40, 67, 41], 256], + 127251: [[40, 68, 41], 256], + 127252: [[40, 69, 41], 256], + 127253: [[40, 70, 41], 256], + 127254: [[40, 71, 41], 256], + 127255: [[40, 72, 41], 256], + 127256: [[40, 73, 41], 256], + 127257: [[40, 74, 41], 256], + 127258: [[40, 75, 41], 256], + 127259: [[40, 76, 41], 256], + 127260: [[40, 77, 41], 256], + 127261: [[40, 78, 41], 256], + 127262: [[40, 79, 41], 256], + 127263: [[40, 80, 41], 256], + 127264: [[40, 81, 41], 256], + 127265: [[40, 82, 41], 256], + 127266: [[40, 83, 41], 256], + 127267: [[40, 84, 41], 256], + 127268: [[40, 85, 41], 256], + 127269: [[40, 86, 41], 256], + 127270: [[40, 87, 41], 256], + 127271: [[40, 88, 41], 256], + 127272: [[40, 89, 41], 256], + 127273: [[40, 90, 41], 256], + 127274: [[12308, 83, 12309], 256], + 127275: [[67], 256], + 127276: [[82], 256], + 127277: [[67, 68], 256], + 127278: [[87, 90], 256], + 127280: [[65], 256], + 127281: [[66], 256], + 127282: [[67], 256], + 127283: [[68], 256], + 127284: [[69], 256], + 127285: [[70], 256], + 127286: [[71], 256], + 127287: [[72], 256], + 127288: [[73], 256], + 127289: [[74], 256], + 127290: [[75], 256], + 127291: [[76], 256], + 127292: [[77], 256], + 127293: [[78], 256], + 127294: [[79], 256], + 127295: [[80], 256], + 127296: [[81], 256], + 127297: [[82], 256], + 127298: [[83], 256], + 127299: [[84], 256], + 127300: [[85], 256], + 127301: [[86], 256], + 127302: [[87], 256], + 127303: [[88], 256], + 127304: [[89], 256], + 127305: [[90], 256], + 127306: [[72, 86], 256], + 127307: [[77, 86], 256], + 127308: [[83, 68], 256], + 127309: [[83, 83], 256], + 127310: [[80, 80, 86], 256], + 127311: [[87, 67], 256], + 127338: [[77, 67], 256], + 127339: [[77, 68], 256], + 127376: [[68, 74], 256] + }, + 61952: { + 127488: [[12411, 12363], 256], + 127489: [[12467, 12467], 256], + 127490: [[12469], 256], + 127504: [[25163], 256], + 127505: [[23383], 256], + 127506: [[21452], 256], + 127507: [[12487], 256], + 127508: [[20108], 256], + 127509: [[22810], 256], + 127510: [[35299], 256], + 127511: [[22825], 256], + 127512: [[20132], 256], + 127513: [[26144], 256], + 127514: [[28961], 256], + 127515: [[26009], 256], + 127516: [[21069], 256], + 127517: [[24460], 256], + 127518: [[20877], 256], + 127519: [[26032], 256], + 127520: [[21021], 256], + 127521: [[32066], 256], + 127522: [[29983], 256], + 127523: [[36009], 256], + 127524: [[22768], 256], + 127525: [[21561], 256], + 127526: [[28436], 256], + 127527: [[25237], 256], + 127528: [[25429], 256], + 127529: [[19968], 256], + 127530: [[19977], 256], + 127531: [[36938], 256], + 127532: [[24038], 256], + 127533: [[20013], 256], + 127534: [[21491], 256], + 127535: [[25351], 256], + 127536: [[36208], 256], + 127537: [[25171], 256], + 127538: [[31105], 256], + 127539: [[31354], 256], + 127540: [[21512], 256], + 127541: [[28288], 256], + 127542: [[26377], 256], + 127543: [[26376], 256], + 127544: [[30003], 256], + 127545: [[21106], 256], + 127546: [[21942], 256], + 127552: [[12308, 26412, 12309], 256], + 127553: [[12308, 19977, 12309], 256], + 127554: [[12308, 20108, 12309], 256], + 127555: [[12308, 23433, 12309], 256], + 127556: [[12308, 28857, 12309], 256], + 127557: [[12308, 25171, 12309], 256], + 127558: [[12308, 30423, 12309], 256], + 127559: [[12308, 21213, 12309], 256], + 127560: [[12308, 25943, 12309], 256], + 127568: [[24471], 256], + 127569: [[21487], 256] + }, + 63488: { + 194560: [[20029]], + 194561: [[20024]], + 194562: [[20033]], + 194563: [[131362]], + 194564: [[20320]], + 194565: [[20398]], + 194566: [[20411]], + 194567: [[20482]], + 194568: [[20602]], + 194569: [[20633]], + 194570: [[20711]], + 194571: [[20687]], + 194572: [[13470]], + 194573: [[132666]], + 194574: [[20813]], + 194575: [[20820]], + 194576: [[20836]], + 194577: [[20855]], + 194578: [[132380]], + 194579: [[13497]], + 194580: [[20839]], + 194581: [[20877]], + 194582: [[132427]], + 194583: [[20887]], + 194584: [[20900]], + 194585: [[20172]], + 194586: [[20908]], + 194587: [[20917]], + 194588: [[168415]], + 194589: [[20981]], + 194590: [[20995]], + 194591: [[13535]], + 194592: [[21051]], + 194593: [[21062]], + 194594: [[21106]], + 194595: [[21111]], + 194596: [[13589]], + 194597: [[21191]], + 194598: [[21193]], + 194599: [[21220]], + 194600: [[21242]], + 194601: [[21253]], + 194602: [[21254]], + 194603: [[21271]], + 194604: [[21321]], + 194605: [[21329]], + 194606: [[21338]], + 194607: [[21363]], + 194608: [[21373]], + 194609: [[21375]], + 194610: [[21375]], + 194611: [[21375]], + 194612: [[133676]], + 194613: [[28784]], + 194614: [[21450]], + 194615: [[21471]], + 194616: [[133987]], + 194617: [[21483]], + 194618: [[21489]], + 194619: [[21510]], + 194620: [[21662]], + 194621: [[21560]], + 194622: [[21576]], + 194623: [[21608]], + 194624: [[21666]], + 194625: [[21750]], + 194626: [[21776]], + 194627: [[21843]], + 194628: [[21859]], + 194629: [[21892]], + 194630: [[21892]], + 194631: [[21913]], + 194632: [[21931]], + 194633: [[21939]], + 194634: [[21954]], + 194635: [[22294]], + 194636: [[22022]], + 194637: [[22295]], + 194638: [[22097]], + 194639: [[22132]], + 194640: [[20999]], + 194641: [[22766]], + 194642: [[22478]], + 194643: [[22516]], + 194644: [[22541]], + 194645: [[22411]], + 194646: [[22578]], + 194647: [[22577]], + 194648: [[22700]], + 194649: [[136420]], + 194650: [[22770]], + 194651: [[22775]], + 194652: [[22790]], + 194653: [[22810]], + 194654: [[22818]], + 194655: [[22882]], + 194656: [[136872]], + 194657: [[136938]], + 194658: [[23020]], + 194659: [[23067]], + 194660: [[23079]], + 194661: [[23000]], + 194662: [[23142]], + 194663: [[14062]], + 194664: [[14076]], + 194665: [[23304]], + 194666: [[23358]], + 194667: [[23358]], + 194668: [[137672]], + 194669: [[23491]], + 194670: [[23512]], + 194671: [[23527]], + 194672: [[23539]], + 194673: [[138008]], + 194674: [[23551]], + 194675: [[23558]], + 194676: [[24403]], + 194677: [[23586]], + 194678: [[14209]], + 194679: [[23648]], + 194680: [[23662]], + 194681: [[23744]], + 194682: [[23693]], + 194683: [[138724]], + 194684: [[23875]], + 194685: [[138726]], + 194686: [[23918]], + 194687: [[23915]], + 194688: [[23932]], + 194689: [[24033]], + 194690: [[24034]], + 194691: [[14383]], + 194692: [[24061]], + 194693: [[24104]], + 194694: [[24125]], + 194695: [[24169]], + 194696: [[14434]], + 194697: [[139651]], + 194698: [[14460]], + 194699: [[24240]], + 194700: [[24243]], + 194701: [[24246]], + 194702: [[24266]], + 194703: [[172946]], + 194704: [[24318]], + 194705: [[140081]], + 194706: [[140081]], + 194707: [[33281]], + 194708: [[24354]], + 194709: [[24354]], + 194710: [[14535]], + 194711: [[144056]], + 194712: [[156122]], + 194713: [[24418]], + 194714: [[24427]], + 194715: [[14563]], + 194716: [[24474]], + 194717: [[24525]], + 194718: [[24535]], + 194719: [[24569]], + 194720: [[24705]], + 194721: [[14650]], + 194722: [[14620]], + 194723: [[24724]], + 194724: [[141012]], + 194725: [[24775]], + 194726: [[24904]], + 194727: [[24908]], + 194728: [[24910]], + 194729: [[24908]], + 194730: [[24954]], + 194731: [[24974]], + 194732: [[25010]], + 194733: [[24996]], + 194734: [[25007]], + 194735: [[25054]], + 194736: [[25074]], + 194737: [[25078]], + 194738: [[25104]], + 194739: [[25115]], + 194740: [[25181]], + 194741: [[25265]], + 194742: [[25300]], + 194743: [[25424]], + 194744: [[142092]], + 194745: [[25405]], + 194746: [[25340]], + 194747: [[25448]], + 194748: [[25475]], + 194749: [[25572]], + 194750: [[142321]], + 194751: [[25634]], + 194752: [[25541]], + 194753: [[25513]], + 194754: [[14894]], + 194755: [[25705]], + 194756: [[25726]], + 194757: [[25757]], + 194758: [[25719]], + 194759: [[14956]], + 194760: [[25935]], + 194761: [[25964]], + 194762: [[143370]], + 194763: [[26083]], + 194764: [[26360]], + 194765: [[26185]], + 194766: [[15129]], + 194767: [[26257]], + 194768: [[15112]], + 194769: [[15076]], + 194770: [[20882]], + 194771: [[20885]], + 194772: [[26368]], + 194773: [[26268]], + 194774: [[32941]], + 194775: [[17369]], + 194776: [[26391]], + 194777: [[26395]], + 194778: [[26401]], + 194779: [[26462]], + 194780: [[26451]], + 194781: [[144323]], + 194782: [[15177]], + 194783: [[26618]], + 194784: [[26501]], + 194785: [[26706]], + 194786: [[26757]], + 194787: [[144493]], + 194788: [[26766]], + 194789: [[26655]], + 194790: [[26900]], + 194791: [[15261]], + 194792: [[26946]], + 194793: [[27043]], + 194794: [[27114]], + 194795: [[27304]], + 194796: [[145059]], + 194797: [[27355]], + 194798: [[15384]], + 194799: [[27425]], + 194800: [[145575]], + 194801: [[27476]], + 194802: [[15438]], + 194803: [[27506]], + 194804: [[27551]], + 194805: [[27578]], + 194806: [[27579]], + 194807: [[146061]], + 194808: [[138507]], + 194809: [[146170]], + 194810: [[27726]], + 194811: [[146620]], + 194812: [[27839]], + 194813: [[27853]], + 194814: [[27751]], + 194815: [[27926]] + }, + 63744: { + 63744: [[35912]], + 63745: [[26356]], + 63746: [[36554]], + 63747: [[36040]], + 63748: [[28369]], + 63749: [[20018]], + 63750: [[21477]], + 63751: [[40860]], + 63752: [[40860]], + 63753: [[22865]], + 63754: [[37329]], + 63755: [[21895]], + 63756: [[22856]], + 63757: [[25078]], + 63758: [[30313]], + 63759: [[32645]], + 63760: [[34367]], + 63761: [[34746]], + 63762: [[35064]], + 63763: [[37007]], + 63764: [[27138]], + 63765: [[27931]], + 63766: [[28889]], + 63767: [[29662]], + 63768: [[33853]], + 63769: [[37226]], + 63770: [[39409]], + 63771: [[20098]], + 63772: [[21365]], + 63773: [[27396]], + 63774: [[29211]], + 63775: [[34349]], + 63776: [[40478]], + 63777: [[23888]], + 63778: [[28651]], + 63779: [[34253]], + 63780: [[35172]], + 63781: [[25289]], + 63782: [[33240]], + 63783: [[34847]], + 63784: [[24266]], + 63785: [[26391]], + 63786: [[28010]], + 63787: [[29436]], + 63788: [[37070]], + 63789: [[20358]], + 63790: [[20919]], + 63791: [[21214]], + 63792: [[25796]], + 63793: [[27347]], + 63794: [[29200]], + 63795: [[30439]], + 63796: [[32769]], + 63797: [[34310]], + 63798: [[34396]], + 63799: [[36335]], + 63800: [[38706]], + 63801: [[39791]], + 63802: [[40442]], + 63803: [[30860]], + 63804: [[31103]], + 63805: [[32160]], + 63806: [[33737]], + 63807: [[37636]], + 63808: [[40575]], + 63809: [[35542]], + 63810: [[22751]], + 63811: [[24324]], + 63812: [[31840]], + 63813: [[32894]], + 63814: [[29282]], + 63815: [[30922]], + 63816: [[36034]], + 63817: [[38647]], + 63818: [[22744]], + 63819: [[23650]], + 63820: [[27155]], + 63821: [[28122]], + 63822: [[28431]], + 63823: [[32047]], + 63824: [[32311]], + 63825: [[38475]], + 63826: [[21202]], + 63827: [[32907]], + 63828: [[20956]], + 63829: [[20940]], + 63830: [[31260]], + 63831: [[32190]], + 63832: [[33777]], + 63833: [[38517]], + 63834: [[35712]], + 63835: [[25295]], + 63836: [[27138]], + 63837: [[35582]], + 63838: [[20025]], + 63839: [[23527]], + 63840: [[24594]], + 63841: [[29575]], + 63842: [[30064]], + 63843: [[21271]], + 63844: [[30971]], + 63845: [[20415]], + 63846: [[24489]], + 63847: [[19981]], + 63848: [[27852]], + 63849: [[25976]], + 63850: [[32034]], + 63851: [[21443]], + 63852: [[22622]], + 63853: [[30465]], + 63854: [[33865]], + 63855: [[35498]], + 63856: [[27578]], + 63857: [[36784]], + 63858: [[27784]], + 63859: [[25342]], + 63860: [[33509]], + 63861: [[25504]], + 63862: [[30053]], + 63863: [[20142]], + 63864: [[20841]], + 63865: [[20937]], + 63866: [[26753]], + 63867: [[31975]], + 63868: [[33391]], + 63869: [[35538]], + 63870: [[37327]], + 63871: [[21237]], + 63872: [[21570]], + 63873: [[22899]], + 63874: [[24300]], + 63875: [[26053]], + 63876: [[28670]], + 63877: [[31018]], + 63878: [[38317]], + 63879: [[39530]], + 63880: [[40599]], + 63881: [[40654]], + 63882: [[21147]], + 63883: [[26310]], + 63884: [[27511]], + 63885: [[36706]], + 63886: [[24180]], + 63887: [[24976]], + 63888: [[25088]], + 63889: [[25754]], + 63890: [[28451]], + 63891: [[29001]], + 63892: [[29833]], + 63893: [[31178]], + 63894: [[32244]], + 63895: [[32879]], + 63896: [[36646]], + 63897: [[34030]], + 63898: [[36899]], + 63899: [[37706]], + 63900: [[21015]], + 63901: [[21155]], + 63902: [[21693]], + 63903: [[28872]], + 63904: [[35010]], + 63905: [[35498]], + 63906: [[24265]], + 63907: [[24565]], + 63908: [[25467]], + 63909: [[27566]], + 63910: [[31806]], + 63911: [[29557]], + 63912: [[20196]], + 63913: [[22265]], + 63914: [[23527]], + 63915: [[23994]], + 63916: [[24604]], + 63917: [[29618]], + 63918: [[29801]], + 63919: [[32666]], + 63920: [[32838]], + 63921: [[37428]], + 63922: [[38646]], + 63923: [[38728]], + 63924: [[38936]], + 63925: [[20363]], + 63926: [[31150]], + 63927: [[37300]], + 63928: [[38584]], + 63929: [[24801]], + 63930: [[20102]], + 63931: [[20698]], + 63932: [[23534]], + 63933: [[23615]], + 63934: [[26009]], + 63935: [[27138]], + 63936: [[29134]], + 63937: [[30274]], + 63938: [[34044]], + 63939: [[36988]], + 63940: [[40845]], + 63941: [[26248]], + 63942: [[38446]], + 63943: [[21129]], + 63944: [[26491]], + 63945: [[26611]], + 63946: [[27969]], + 63947: [[28316]], + 63948: [[29705]], + 63949: [[30041]], + 63950: [[30827]], + 63951: [[32016]], + 63952: [[39006]], + 63953: [[20845]], + 63954: [[25134]], + 63955: [[38520]], + 63956: [[20523]], + 63957: [[23833]], + 63958: [[28138]], + 63959: [[36650]], + 63960: [[24459]], + 63961: [[24900]], + 63962: [[26647]], + 63963: [[29575]], + 63964: [[38534]], + 63965: [[21033]], + 63966: [[21519]], + 63967: [[23653]], + 63968: [[26131]], + 63969: [[26446]], + 63970: [[26792]], + 63971: [[27877]], + 63972: [[29702]], + 63973: [[30178]], + 63974: [[32633]], + 63975: [[35023]], + 63976: [[35041]], + 63977: [[37324]], + 63978: [[38626]], + 63979: [[21311]], + 63980: [[28346]], + 63981: [[21533]], + 63982: [[29136]], + 63983: [[29848]], + 63984: [[34298]], + 63985: [[38563]], + 63986: [[40023]], + 63987: [[40607]], + 63988: [[26519]], + 63989: [[28107]], + 63990: [[33256]], + 63991: [[31435]], + 63992: [[31520]], + 63993: [[31890]], + 63994: [[29376]], + 63995: [[28825]], + 63996: [[35672]], + 63997: [[20160]], + 63998: [[33590]], + 63999: [[21050]], + 194816: [[27966]], + 194817: [[28023]], + 194818: [[27969]], + 194819: [[28009]], + 194820: [[28024]], + 194821: [[28037]], + 194822: [[146718]], + 194823: [[27956]], + 194824: [[28207]], + 194825: [[28270]], + 194826: [[15667]], + 194827: [[28363]], + 194828: [[28359]], + 194829: [[147153]], + 194830: [[28153]], + 194831: [[28526]], + 194832: [[147294]], + 194833: [[147342]], + 194834: [[28614]], + 194835: [[28729]], + 194836: [[28702]], + 194837: [[28699]], + 194838: [[15766]], + 194839: [[28746]], + 194840: [[28797]], + 194841: [[28791]], + 194842: [[28845]], + 194843: [[132389]], + 194844: [[28997]], + 194845: [[148067]], + 194846: [[29084]], + 194847: [[148395]], + 194848: [[29224]], + 194849: [[29237]], + 194850: [[29264]], + 194851: [[149000]], + 194852: [[29312]], + 194853: [[29333]], + 194854: [[149301]], + 194855: [[149524]], + 194856: [[29562]], + 194857: [[29579]], + 194858: [[16044]], + 194859: [[29605]], + 194860: [[16056]], + 194861: [[16056]], + 194862: [[29767]], + 194863: [[29788]], + 194864: [[29809]], + 194865: [[29829]], + 194866: [[29898]], + 194867: [[16155]], + 194868: [[29988]], + 194869: [[150582]], + 194870: [[30014]], + 194871: [[150674]], + 194872: [[30064]], + 194873: [[139679]], + 194874: [[30224]], + 194875: [[151457]], + 194876: [[151480]], + 194877: [[151620]], + 194878: [[16380]], + 194879: [[16392]], + 194880: [[30452]], + 194881: [[151795]], + 194882: [[151794]], + 194883: [[151833]], + 194884: [[151859]], + 194885: [[30494]], + 194886: [[30495]], + 194887: [[30495]], + 194888: [[30538]], + 194889: [[16441]], + 194890: [[30603]], + 194891: [[16454]], + 194892: [[16534]], + 194893: [[152605]], + 194894: [[30798]], + 194895: [[30860]], + 194896: [[30924]], + 194897: [[16611]], + 194898: [[153126]], + 194899: [[31062]], + 194900: [[153242]], + 194901: [[153285]], + 194902: [[31119]], + 194903: [[31211]], + 194904: [[16687]], + 194905: [[31296]], + 194906: [[31306]], + 194907: [[31311]], + 194908: [[153980]], + 194909: [[154279]], + 194910: [[154279]], + 194911: [[31470]], + 194912: [[16898]], + 194913: [[154539]], + 194914: [[31686]], + 194915: [[31689]], + 194916: [[16935]], + 194917: [[154752]], + 194918: [[31954]], + 194919: [[17056]], + 194920: [[31976]], + 194921: [[31971]], + 194922: [[32000]], + 194923: [[155526]], + 194924: [[32099]], + 194925: [[17153]], + 194926: [[32199]], + 194927: [[32258]], + 194928: [[32325]], + 194929: [[17204]], + 194930: [[156200]], + 194931: [[156231]], + 194932: [[17241]], + 194933: [[156377]], + 194934: [[32634]], + 194935: [[156478]], + 194936: [[32661]], + 194937: [[32762]], + 194938: [[32773]], + 194939: [[156890]], + 194940: [[156963]], + 194941: [[32864]], + 194942: [[157096]], + 194943: [[32880]], + 194944: [[144223]], + 194945: [[17365]], + 194946: [[32946]], + 194947: [[33027]], + 194948: [[17419]], + 194949: [[33086]], + 194950: [[23221]], + 194951: [[157607]], + 194952: [[157621]], + 194953: [[144275]], + 194954: [[144284]], + 194955: [[33281]], + 194956: [[33284]], + 194957: [[36766]], + 194958: [[17515]], + 194959: [[33425]], + 194960: [[33419]], + 194961: [[33437]], + 194962: [[21171]], + 194963: [[33457]], + 194964: [[33459]], + 194965: [[33469]], + 194966: [[33510]], + 194967: [[158524]], + 194968: [[33509]], + 194969: [[33565]], + 194970: [[33635]], + 194971: [[33709]], + 194972: [[33571]], + 194973: [[33725]], + 194974: [[33767]], + 194975: [[33879]], + 194976: [[33619]], + 194977: [[33738]], + 194978: [[33740]], + 194979: [[33756]], + 194980: [[158774]], + 194981: [[159083]], + 194982: [[158933]], + 194983: [[17707]], + 194984: [[34033]], + 194985: [[34035]], + 194986: [[34070]], + 194987: [[160714]], + 194988: [[34148]], + 194989: [[159532]], + 194990: [[17757]], + 194991: [[17761]], + 194992: [[159665]], + 194993: [[159954]], + 194994: [[17771]], + 194995: [[34384]], + 194996: [[34396]], + 194997: [[34407]], + 194998: [[34409]], + 194999: [[34473]], + 195000: [[34440]], + 195001: [[34574]], + 195002: [[34530]], + 195003: [[34681]], + 195004: [[34600]], + 195005: [[34667]], + 195006: [[34694]], + 195007: [[17879]], + 195008: [[34785]], + 195009: [[34817]], + 195010: [[17913]], + 195011: [[34912]], + 195012: [[34915]], + 195013: [[161383]], + 195014: [[35031]], + 195015: [[35038]], + 195016: [[17973]], + 195017: [[35066]], + 195018: [[13499]], + 195019: [[161966]], + 195020: [[162150]], + 195021: [[18110]], + 195022: [[18119]], + 195023: [[35488]], + 195024: [[35565]], + 195025: [[35722]], + 195026: [[35925]], + 195027: [[162984]], + 195028: [[36011]], + 195029: [[36033]], + 195030: [[36123]], + 195031: [[36215]], + 195032: [[163631]], + 195033: [[133124]], + 195034: [[36299]], + 195035: [[36284]], + 195036: [[36336]], + 195037: [[133342]], + 195038: [[36564]], + 195039: [[36664]], + 195040: [[165330]], + 195041: [[165357]], + 195042: [[37012]], + 195043: [[37105]], + 195044: [[37137]], + 195045: [[165678]], + 195046: [[37147]], + 195047: [[37432]], + 195048: [[37591]], + 195049: [[37592]], + 195050: [[37500]], + 195051: [[37881]], + 195052: [[37909]], + 195053: [[166906]], + 195054: [[38283]], + 195055: [[18837]], + 195056: [[38327]], + 195057: [[167287]], + 195058: [[18918]], + 195059: [[38595]], + 195060: [[23986]], + 195061: [[38691]], + 195062: [[168261]], + 195063: [[168474]], + 195064: [[19054]], + 195065: [[19062]], + 195066: [[38880]], + 195067: [[168970]], + 195068: [[19122]], + 195069: [[169110]], + 195070: [[38923]], + 195071: [[38923]] + }, + 64000: { + 64000: [[20999]], + 64001: [[24230]], + 64002: [[25299]], + 64003: [[31958]], + 64004: [[23429]], + 64005: [[27934]], + 64006: [[26292]], + 64007: [[36667]], + 64008: [[34892]], + 64009: [[38477]], + 64010: [[35211]], + 64011: [[24275]], + 64012: [[20800]], + 64013: [[21952]], + 64016: [[22618]], + 64018: [[26228]], + 64021: [[20958]], + 64022: [[29482]], + 64023: [[30410]], + 64024: [[31036]], + 64025: [[31070]], + 64026: [[31077]], + 64027: [[31119]], + 64028: [[38742]], + 64029: [[31934]], + 64030: [[32701]], + 64032: [[34322]], + 64034: [[35576]], + 64037: [[36920]], + 64038: [[37117]], + 64042: [[39151]], + 64043: [[39164]], + 64044: [[39208]], + 64045: [[40372]], + 64046: [[37086]], + 64047: [[38583]], + 64048: [[20398]], + 64049: [[20711]], + 64050: [[20813]], + 64051: [[21193]], + 64052: [[21220]], + 64053: [[21329]], + 64054: [[21917]], + 64055: [[22022]], + 64056: [[22120]], + 64057: [[22592]], + 64058: [[22696]], + 64059: [[23652]], + 64060: [[23662]], + 64061: [[24724]], + 64062: [[24936]], + 64063: [[24974]], + 64064: [[25074]], + 64065: [[25935]], + 64066: [[26082]], + 64067: [[26257]], + 64068: [[26757]], + 64069: [[28023]], + 64070: [[28186]], + 64071: [[28450]], + 64072: [[29038]], + 64073: [[29227]], + 64074: [[29730]], + 64075: [[30865]], + 64076: [[31038]], + 64077: [[31049]], + 64078: [[31048]], + 64079: [[31056]], + 64080: [[31062]], + 64081: [[31069]], + 64082: [[31117]], + 64083: [[31118]], + 64084: [[31296]], + 64085: [[31361]], + 64086: [[31680]], + 64087: [[32244]], + 64088: [[32265]], + 64089: [[32321]], + 64090: [[32626]], + 64091: [[32773]], + 64092: [[33261]], + 64093: [[33401]], + 64094: [[33401]], + 64095: [[33879]], + 64096: [[35088]], + 64097: [[35222]], + 64098: [[35585]], + 64099: [[35641]], + 64100: [[36051]], + 64101: [[36104]], + 64102: [[36790]], + 64103: [[36920]], + 64104: [[38627]], + 64105: [[38911]], + 64106: [[38971]], + 64107: [[24693]], + 64108: [[148206]], + 64109: [[33304]], + 64112: [[20006]], + 64113: [[20917]], + 64114: [[20840]], + 64115: [[20352]], + 64116: [[20805]], + 64117: [[20864]], + 64118: [[21191]], + 64119: [[21242]], + 64120: [[21917]], + 64121: [[21845]], + 64122: [[21913]], + 64123: [[21986]], + 64124: [[22618]], + 64125: [[22707]], + 64126: [[22852]], + 64127: [[22868]], + 64128: [[23138]], + 64129: [[23336]], + 64130: [[24274]], + 64131: [[24281]], + 64132: [[24425]], + 64133: [[24493]], + 64134: [[24792]], + 64135: [[24910]], + 64136: [[24840]], + 64137: [[24974]], + 64138: [[24928]], + 64139: [[25074]], + 64140: [[25140]], + 64141: [[25540]], + 64142: [[25628]], + 64143: [[25682]], + 64144: [[25942]], + 64145: [[26228]], + 64146: [[26391]], + 64147: [[26395]], + 64148: [[26454]], + 64149: [[27513]], + 64150: [[27578]], + 64151: [[27969]], + 64152: [[28379]], + 64153: [[28363]], + 64154: [[28450]], + 64155: [[28702]], + 64156: [[29038]], + 64157: [[30631]], + 64158: [[29237]], + 64159: [[29359]], + 64160: [[29482]], + 64161: [[29809]], + 64162: [[29958]], + 64163: [[30011]], + 64164: [[30237]], + 64165: [[30239]], + 64166: [[30410]], + 64167: [[30427]], + 64168: [[30452]], + 64169: [[30538]], + 64170: [[30528]], + 64171: [[30924]], + 64172: [[31409]], + 64173: [[31680]], + 64174: [[31867]], + 64175: [[32091]], + 64176: [[32244]], + 64177: [[32574]], + 64178: [[32773]], + 64179: [[33618]], + 64180: [[33775]], + 64181: [[34681]], + 64182: [[35137]], + 64183: [[35206]], + 64184: [[35222]], + 64185: [[35519]], + 64186: [[35576]], + 64187: [[35531]], + 64188: [[35585]], + 64189: [[35582]], + 64190: [[35565]], + 64191: [[35641]], + 64192: [[35722]], + 64193: [[36104]], + 64194: [[36664]], + 64195: [[36978]], + 64196: [[37273]], + 64197: [[37494]], + 64198: [[38524]], + 64199: [[38627]], + 64200: [[38742]], + 64201: [[38875]], + 64202: [[38911]], + 64203: [[38923]], + 64204: [[38971]], + 64205: [[39698]], + 64206: [[40860]], + 64207: [[141386]], + 64208: [[141380]], + 64209: [[144341]], + 64210: [[15261]], + 64211: [[16408]], + 64212: [[16441]], + 64213: [[152137]], + 64214: [[154832]], + 64215: [[163539]], + 64216: [[40771]], + 64217: [[40846]], + 195072: [[38953]], + 195073: [[169398]], + 195074: [[39138]], + 195075: [[19251]], + 195076: [[39209]], + 195077: [[39335]], + 195078: [[39362]], + 195079: [[39422]], + 195080: [[19406]], + 195081: [[170800]], + 195082: [[39698]], + 195083: [[40000]], + 195084: [[40189]], + 195085: [[19662]], + 195086: [[19693]], + 195087: [[40295]], + 195088: [[172238]], + 195089: [[19704]], + 195090: [[172293]], + 195091: [[172558]], + 195092: [[172689]], + 195093: [[40635]], + 195094: [[19798]], + 195095: [[40697]], + 195096: [[40702]], + 195097: [[40709]], + 195098: [[40719]], + 195099: [[40726]], + 195100: [[40763]], + 195101: [[173568]] + }, + 64256: { + 64256: [[102, 102], 256], + 64257: [[102, 105], 256], + 64258: [[102, 108], 256], + 64259: [[102, 102, 105], 256], + 64260: [[102, 102, 108], 256], + 64261: [[383, 116], 256], + 64262: [[115, 116], 256], + 64275: [[1396, 1398], 256], + 64276: [[1396, 1381], 256], + 64277: [[1396, 1387], 256], + 64278: [[1406, 1398], 256], + 64279: [[1396, 1389], 256], + 64285: [[1497, 1460], 512], + 64286: [, 26], + 64287: [[1522, 1463], 512], + 64288: [[1506], 256], + 64289: [[1488], 256], + 64290: [[1491], 256], + 64291: [[1492], 256], + 64292: [[1499], 256], + 64293: [[1500], 256], + 64294: [[1501], 256], + 64295: [[1512], 256], + 64296: [[1514], 256], + 64297: [[43], 256], + 64298: [[1513, 1473], 512], + 64299: [[1513, 1474], 512], + 64300: [[64329, 1473], 512], + 64301: [[64329, 1474], 512], + 64302: [[1488, 1463], 512], + 64303: [[1488, 1464], 512], + 64304: [[1488, 1468], 512], + 64305: [[1489, 1468], 512], + 64306: [[1490, 1468], 512], + 64307: [[1491, 1468], 512], + 64308: [[1492, 1468], 512], + 64309: [[1493, 1468], 512], + 64310: [[1494, 1468], 512], + 64312: [[1496, 1468], 512], + 64313: [[1497, 1468], 512], + 64314: [[1498, 1468], 512], + 64315: [[1499, 1468], 512], + 64316: [[1500, 1468], 512], + 64318: [[1502, 1468], 512], + 64320: [[1504, 1468], 512], + 64321: [[1505, 1468], 512], + 64323: [[1507, 1468], 512], + 64324: [[1508, 1468], 512], + 64326: [[1510, 1468], 512], + 64327: [[1511, 1468], 512], + 64328: [[1512, 1468], 512], + 64329: [[1513, 1468], 512], + 64330: [[1514, 1468], 512], + 64331: [[1493, 1465], 512], + 64332: [[1489, 1471], 512], + 64333: [[1499, 1471], 512], + 64334: [[1508, 1471], 512], + 64335: [[1488, 1500], 256], + 64336: [[1649], 256], + 64337: [[1649], 256], + 64338: [[1659], 256], + 64339: [[1659], 256], + 64340: [[1659], 256], + 64341: [[1659], 256], + 64342: [[1662], 256], + 64343: [[1662], 256], + 64344: [[1662], 256], + 64345: [[1662], 256], + 64346: [[1664], 256], + 64347: [[1664], 256], + 64348: [[1664], 256], + 64349: [[1664], 256], + 64350: [[1658], 256], + 64351: [[1658], 256], + 64352: [[1658], 256], + 64353: [[1658], 256], + 64354: [[1663], 256], + 64355: [[1663], 256], + 64356: [[1663], 256], + 64357: [[1663], 256], + 64358: [[1657], 256], + 64359: [[1657], 256], + 64360: [[1657], 256], + 64361: [[1657], 256], + 64362: [[1700], 256], + 64363: [[1700], 256], + 64364: [[1700], 256], + 64365: [[1700], 256], + 64366: [[1702], 256], + 64367: [[1702], 256], + 64368: [[1702], 256], + 64369: [[1702], 256], + 64370: [[1668], 256], + 64371: [[1668], 256], + 64372: [[1668], 256], + 64373: [[1668], 256], + 64374: [[1667], 256], + 64375: [[1667], 256], + 64376: [[1667], 256], + 64377: [[1667], 256], + 64378: [[1670], 256], + 64379: [[1670], 256], + 64380: [[1670], 256], + 64381: [[1670], 256], + 64382: [[1671], 256], + 64383: [[1671], 256], + 64384: [[1671], 256], + 64385: [[1671], 256], + 64386: [[1677], 256], + 64387: [[1677], 256], + 64388: [[1676], 256], + 64389: [[1676], 256], + 64390: [[1678], 256], + 64391: [[1678], 256], + 64392: [[1672], 256], + 64393: [[1672], 256], + 64394: [[1688], 256], + 64395: [[1688], 256], + 64396: [[1681], 256], + 64397: [[1681], 256], + 64398: [[1705], 256], + 64399: [[1705], 256], + 64400: [[1705], 256], + 64401: [[1705], 256], + 64402: [[1711], 256], + 64403: [[1711], 256], + 64404: [[1711], 256], + 64405: [[1711], 256], + 64406: [[1715], 256], + 64407: [[1715], 256], + 64408: [[1715], 256], + 64409: [[1715], 256], + 64410: [[1713], 256], + 64411: [[1713], 256], + 64412: [[1713], 256], + 64413: [[1713], 256], + 64414: [[1722], 256], + 64415: [[1722], 256], + 64416: [[1723], 256], + 64417: [[1723], 256], + 64418: [[1723], 256], + 64419: [[1723], 256], + 64420: [[1728], 256], + 64421: [[1728], 256], + 64422: [[1729], 256], + 64423: [[1729], 256], + 64424: [[1729], 256], + 64425: [[1729], 256], + 64426: [[1726], 256], + 64427: [[1726], 256], + 64428: [[1726], 256], + 64429: [[1726], 256], + 64430: [[1746], 256], + 64431: [[1746], 256], + 64432: [[1747], 256], + 64433: [[1747], 256], + 64467: [[1709], 256], + 64468: [[1709], 256], + 64469: [[1709], 256], + 64470: [[1709], 256], + 64471: [[1735], 256], + 64472: [[1735], 256], + 64473: [[1734], 256], + 64474: [[1734], 256], + 64475: [[1736], 256], + 64476: [[1736], 256], + 64477: [[1655], 256], + 64478: [[1739], 256], + 64479: [[1739], 256], + 64480: [[1733], 256], + 64481: [[1733], 256], + 64482: [[1737], 256], + 64483: [[1737], 256], + 64484: [[1744], 256], + 64485: [[1744], 256], + 64486: [[1744], 256], + 64487: [[1744], 256], + 64488: [[1609], 256], + 64489: [[1609], 256], + 64490: [[1574, 1575], 256], + 64491: [[1574, 1575], 256], + 64492: [[1574, 1749], 256], + 64493: [[1574, 1749], 256], + 64494: [[1574, 1608], 256], + 64495: [[1574, 1608], 256], + 64496: [[1574, 1735], 256], + 64497: [[1574, 1735], 256], + 64498: [[1574, 1734], 256], + 64499: [[1574, 1734], 256], + 64500: [[1574, 1736], 256], + 64501: [[1574, 1736], 256], + 64502: [[1574, 1744], 256], + 64503: [[1574, 1744], 256], + 64504: [[1574, 1744], 256], + 64505: [[1574, 1609], 256], + 64506: [[1574, 1609], 256], + 64507: [[1574, 1609], 256], + 64508: [[1740], 256], + 64509: [[1740], 256], + 64510: [[1740], 256], + 64511: [[1740], 256] + }, + 64512: { + 64512: [[1574, 1580], 256], + 64513: [[1574, 1581], 256], + 64514: [[1574, 1605], 256], + 64515: [[1574, 1609], 256], + 64516: [[1574, 1610], 256], + 64517: [[1576, 1580], 256], + 64518: [[1576, 1581], 256], + 64519: [[1576, 1582], 256], + 64520: [[1576, 1605], 256], + 64521: [[1576, 1609], 256], + 64522: [[1576, 1610], 256], + 64523: [[1578, 1580], 256], + 64524: [[1578, 1581], 256], + 64525: [[1578, 1582], 256], + 64526: [[1578, 1605], 256], + 64527: [[1578, 1609], 256], + 64528: [[1578, 1610], 256], + 64529: [[1579, 1580], 256], + 64530: [[1579, 1605], 256], + 64531: [[1579, 1609], 256], + 64532: [[1579, 1610], 256], + 64533: [[1580, 1581], 256], + 64534: [[1580, 1605], 256], + 64535: [[1581, 1580], 256], + 64536: [[1581, 1605], 256], + 64537: [[1582, 1580], 256], + 64538: [[1582, 1581], 256], + 64539: [[1582, 1605], 256], + 64540: [[1587, 1580], 256], + 64541: [[1587, 1581], 256], + 64542: [[1587, 1582], 256], + 64543: [[1587, 1605], 256], + 64544: [[1589, 1581], 256], + 64545: [[1589, 1605], 256], + 64546: [[1590, 1580], 256], + 64547: [[1590, 1581], 256], + 64548: [[1590, 1582], 256], + 64549: [[1590, 1605], 256], + 64550: [[1591, 1581], 256], + 64551: [[1591, 1605], 256], + 64552: [[1592, 1605], 256], + 64553: [[1593, 1580], 256], + 64554: [[1593, 1605], 256], + 64555: [[1594, 1580], 256], + 64556: [[1594, 1605], 256], + 64557: [[1601, 1580], 256], + 64558: [[1601, 1581], 256], + 64559: [[1601, 1582], 256], + 64560: [[1601, 1605], 256], + 64561: [[1601, 1609], 256], + 64562: [[1601, 1610], 256], + 64563: [[1602, 1581], 256], + 64564: [[1602, 1605], 256], + 64565: [[1602, 1609], 256], + 64566: [[1602, 1610], 256], + 64567: [[1603, 1575], 256], + 64568: [[1603, 1580], 256], + 64569: [[1603, 1581], 256], + 64570: [[1603, 1582], 256], + 64571: [[1603, 1604], 256], + 64572: [[1603, 1605], 256], + 64573: [[1603, 1609], 256], + 64574: [[1603, 1610], 256], + 64575: [[1604, 1580], 256], + 64576: [[1604, 1581], 256], + 64577: [[1604, 1582], 256], + 64578: [[1604, 1605], 256], + 64579: [[1604, 1609], 256], + 64580: [[1604, 1610], 256], + 64581: [[1605, 1580], 256], + 64582: [[1605, 1581], 256], + 64583: [[1605, 1582], 256], + 64584: [[1605, 1605], 256], + 64585: [[1605, 1609], 256], + 64586: [[1605, 1610], 256], + 64587: [[1606, 1580], 256], + 64588: [[1606, 1581], 256], + 64589: [[1606, 1582], 256], + 64590: [[1606, 1605], 256], + 64591: [[1606, 1609], 256], + 64592: [[1606, 1610], 256], + 64593: [[1607, 1580], 256], + 64594: [[1607, 1605], 256], + 64595: [[1607, 1609], 256], + 64596: [[1607, 1610], 256], + 64597: [[1610, 1580], 256], + 64598: [[1610, 1581], 256], + 64599: [[1610, 1582], 256], + 64600: [[1610, 1605], 256], + 64601: [[1610, 1609], 256], + 64602: [[1610, 1610], 256], + 64603: [[1584, 1648], 256], + 64604: [[1585, 1648], 256], + 64605: [[1609, 1648], 256], + 64606: [[32, 1612, 1617], 256], + 64607: [[32, 1613, 1617], 256], + 64608: [[32, 1614, 1617], 256], + 64609: [[32, 1615, 1617], 256], + 64610: [[32, 1616, 1617], 256], + 64611: [[32, 1617, 1648], 256], + 64612: [[1574, 1585], 256], + 64613: [[1574, 1586], 256], + 64614: [[1574, 1605], 256], + 64615: [[1574, 1606], 256], + 64616: [[1574, 1609], 256], + 64617: [[1574, 1610], 256], + 64618: [[1576, 1585], 256], + 64619: [[1576, 1586], 256], + 64620: [[1576, 1605], 256], + 64621: [[1576, 1606], 256], + 64622: [[1576, 1609], 256], + 64623: [[1576, 1610], 256], + 64624: [[1578, 1585], 256], + 64625: [[1578, 1586], 256], + 64626: [[1578, 1605], 256], + 64627: [[1578, 1606], 256], + 64628: [[1578, 1609], 256], + 64629: [[1578, 1610], 256], + 64630: [[1579, 1585], 256], + 64631: [[1579, 1586], 256], + 64632: [[1579, 1605], 256], + 64633: [[1579, 1606], 256], + 64634: [[1579, 1609], 256], + 64635: [[1579, 1610], 256], + 64636: [[1601, 1609], 256], + 64637: [[1601, 1610], 256], + 64638: [[1602, 1609], 256], + 64639: [[1602, 1610], 256], + 64640: [[1603, 1575], 256], + 64641: [[1603, 1604], 256], + 64642: [[1603, 1605], 256], + 64643: [[1603, 1609], 256], + 64644: [[1603, 1610], 256], + 64645: [[1604, 1605], 256], + 64646: [[1604, 1609], 256], + 64647: [[1604, 1610], 256], + 64648: [[1605, 1575], 256], + 64649: [[1605, 1605], 256], + 64650: [[1606, 1585], 256], + 64651: [[1606, 1586], 256], + 64652: [[1606, 1605], 256], + 64653: [[1606, 1606], 256], + 64654: [[1606, 1609], 256], + 64655: [[1606, 1610], 256], + 64656: [[1609, 1648], 256], + 64657: [[1610, 1585], 256], + 64658: [[1610, 1586], 256], + 64659: [[1610, 1605], 256], + 64660: [[1610, 1606], 256], + 64661: [[1610, 1609], 256], + 64662: [[1610, 1610], 256], + 64663: [[1574, 1580], 256], + 64664: [[1574, 1581], 256], + 64665: [[1574, 1582], 256], + 64666: [[1574, 1605], 256], + 64667: [[1574, 1607], 256], + 64668: [[1576, 1580], 256], + 64669: [[1576, 1581], 256], + 64670: [[1576, 1582], 256], + 64671: [[1576, 1605], 256], + 64672: [[1576, 1607], 256], + 64673: [[1578, 1580], 256], + 64674: [[1578, 1581], 256], + 64675: [[1578, 1582], 256], + 64676: [[1578, 1605], 256], + 64677: [[1578, 1607], 256], + 64678: [[1579, 1605], 256], + 64679: [[1580, 1581], 256], + 64680: [[1580, 1605], 256], + 64681: [[1581, 1580], 256], + 64682: [[1581, 1605], 256], + 64683: [[1582, 1580], 256], + 64684: [[1582, 1605], 256], + 64685: [[1587, 1580], 256], + 64686: [[1587, 1581], 256], + 64687: [[1587, 1582], 256], + 64688: [[1587, 1605], 256], + 64689: [[1589, 1581], 256], + 64690: [[1589, 1582], 256], + 64691: [[1589, 1605], 256], + 64692: [[1590, 1580], 256], + 64693: [[1590, 1581], 256], + 64694: [[1590, 1582], 256], + 64695: [[1590, 1605], 256], + 64696: [[1591, 1581], 256], + 64697: [[1592, 1605], 256], + 64698: [[1593, 1580], 256], + 64699: [[1593, 1605], 256], + 64700: [[1594, 1580], 256], + 64701: [[1594, 1605], 256], + 64702: [[1601, 1580], 256], + 64703: [[1601, 1581], 256], + 64704: [[1601, 1582], 256], + 64705: [[1601, 1605], 256], + 64706: [[1602, 1581], 256], + 64707: [[1602, 1605], 256], + 64708: [[1603, 1580], 256], + 64709: [[1603, 1581], 256], + 64710: [[1603, 1582], 256], + 64711: [[1603, 1604], 256], + 64712: [[1603, 1605], 256], + 64713: [[1604, 1580], 256], + 64714: [[1604, 1581], 256], + 64715: [[1604, 1582], 256], + 64716: [[1604, 1605], 256], + 64717: [[1604, 1607], 256], + 64718: [[1605, 1580], 256], + 64719: [[1605, 1581], 256], + 64720: [[1605, 1582], 256], + 64721: [[1605, 1605], 256], + 64722: [[1606, 1580], 256], + 64723: [[1606, 1581], 256], + 64724: [[1606, 1582], 256], + 64725: [[1606, 1605], 256], + 64726: [[1606, 1607], 256], + 64727: [[1607, 1580], 256], + 64728: [[1607, 1605], 256], + 64729: [[1607, 1648], 256], + 64730: [[1610, 1580], 256], + 64731: [[1610, 1581], 256], + 64732: [[1610, 1582], 256], + 64733: [[1610, 1605], 256], + 64734: [[1610, 1607], 256], + 64735: [[1574, 1605], 256], + 64736: [[1574, 1607], 256], + 64737: [[1576, 1605], 256], + 64738: [[1576, 1607], 256], + 64739: [[1578, 1605], 256], + 64740: [[1578, 1607], 256], + 64741: [[1579, 1605], 256], + 64742: [[1579, 1607], 256], + 64743: [[1587, 1605], 256], + 64744: [[1587, 1607], 256], + 64745: [[1588, 1605], 256], + 64746: [[1588, 1607], 256], + 64747: [[1603, 1604], 256], + 64748: [[1603, 1605], 256], + 64749: [[1604, 1605], 256], + 64750: [[1606, 1605], 256], + 64751: [[1606, 1607], 256], + 64752: [[1610, 1605], 256], + 64753: [[1610, 1607], 256], + 64754: [[1600, 1614, 1617], 256], + 64755: [[1600, 1615, 1617], 256], + 64756: [[1600, 1616, 1617], 256], + 64757: [[1591, 1609], 256], + 64758: [[1591, 1610], 256], + 64759: [[1593, 1609], 256], + 64760: [[1593, 1610], 256], + 64761: [[1594, 1609], 256], + 64762: [[1594, 1610], 256], + 64763: [[1587, 1609], 256], + 64764: [[1587, 1610], 256], + 64765: [[1588, 1609], 256], + 64766: [[1588, 1610], 256], + 64767: [[1581, 1609], 256] + }, + 64768: { + 64768: [[1581, 1610], 256], + 64769: [[1580, 1609], 256], + 64770: [[1580, 1610], 256], + 64771: [[1582, 1609], 256], + 64772: [[1582, 1610], 256], + 64773: [[1589, 1609], 256], + 64774: [[1589, 1610], 256], + 64775: [[1590, 1609], 256], + 64776: [[1590, 1610], 256], + 64777: [[1588, 1580], 256], + 64778: [[1588, 1581], 256], + 64779: [[1588, 1582], 256], + 64780: [[1588, 1605], 256], + 64781: [[1588, 1585], 256], + 64782: [[1587, 1585], 256], + 64783: [[1589, 1585], 256], + 64784: [[1590, 1585], 256], + 64785: [[1591, 1609], 256], + 64786: [[1591, 1610], 256], + 64787: [[1593, 1609], 256], + 64788: [[1593, 1610], 256], + 64789: [[1594, 1609], 256], + 64790: [[1594, 1610], 256], + 64791: [[1587, 1609], 256], + 64792: [[1587, 1610], 256], + 64793: [[1588, 1609], 256], + 64794: [[1588, 1610], 256], + 64795: [[1581, 1609], 256], + 64796: [[1581, 1610], 256], + 64797: [[1580, 1609], 256], + 64798: [[1580, 1610], 256], + 64799: [[1582, 1609], 256], + 64800: [[1582, 1610], 256], + 64801: [[1589, 1609], 256], + 64802: [[1589, 1610], 256], + 64803: [[1590, 1609], 256], + 64804: [[1590, 1610], 256], + 64805: [[1588, 1580], 256], + 64806: [[1588, 1581], 256], + 64807: [[1588, 1582], 256], + 64808: [[1588, 1605], 256], + 64809: [[1588, 1585], 256], + 64810: [[1587, 1585], 256], + 64811: [[1589, 1585], 256], + 64812: [[1590, 1585], 256], + 64813: [[1588, 1580], 256], + 64814: [[1588, 1581], 256], + 64815: [[1588, 1582], 256], + 64816: [[1588, 1605], 256], + 64817: [[1587, 1607], 256], + 64818: [[1588, 1607], 256], + 64819: [[1591, 1605], 256], + 64820: [[1587, 1580], 256], + 64821: [[1587, 1581], 256], + 64822: [[1587, 1582], 256], + 64823: [[1588, 1580], 256], + 64824: [[1588, 1581], 256], + 64825: [[1588, 1582], 256], + 64826: [[1591, 1605], 256], + 64827: [[1592, 1605], 256], + 64828: [[1575, 1611], 256], + 64829: [[1575, 1611], 256], + 64848: [[1578, 1580, 1605], 256], + 64849: [[1578, 1581, 1580], 256], + 64850: [[1578, 1581, 1580], 256], + 64851: [[1578, 1581, 1605], 256], + 64852: [[1578, 1582, 1605], 256], + 64853: [[1578, 1605, 1580], 256], + 64854: [[1578, 1605, 1581], 256], + 64855: [[1578, 1605, 1582], 256], + 64856: [[1580, 1605, 1581], 256], + 64857: [[1580, 1605, 1581], 256], + 64858: [[1581, 1605, 1610], 256], + 64859: [[1581, 1605, 1609], 256], + 64860: [[1587, 1581, 1580], 256], + 64861: [[1587, 1580, 1581], 256], + 64862: [[1587, 1580, 1609], 256], + 64863: [[1587, 1605, 1581], 256], + 64864: [[1587, 1605, 1581], 256], + 64865: [[1587, 1605, 1580], 256], + 64866: [[1587, 1605, 1605], 256], + 64867: [[1587, 1605, 1605], 256], + 64868: [[1589, 1581, 1581], 256], + 64869: [[1589, 1581, 1581], 256], + 64870: [[1589, 1605, 1605], 256], + 64871: [[1588, 1581, 1605], 256], + 64872: [[1588, 1581, 1605], 256], + 64873: [[1588, 1580, 1610], 256], + 64874: [[1588, 1605, 1582], 256], + 64875: [[1588, 1605, 1582], 256], + 64876: [[1588, 1605, 1605], 256], + 64877: [[1588, 1605, 1605], 256], + 64878: [[1590, 1581, 1609], 256], + 64879: [[1590, 1582, 1605], 256], + 64880: [[1590, 1582, 1605], 256], + 64881: [[1591, 1605, 1581], 256], + 64882: [[1591, 1605, 1581], 256], + 64883: [[1591, 1605, 1605], 256], + 64884: [[1591, 1605, 1610], 256], + 64885: [[1593, 1580, 1605], 256], + 64886: [[1593, 1605, 1605], 256], + 64887: [[1593, 1605, 1605], 256], + 64888: [[1593, 1605, 1609], 256], + 64889: [[1594, 1605, 1605], 256], + 64890: [[1594, 1605, 1610], 256], + 64891: [[1594, 1605, 1609], 256], + 64892: [[1601, 1582, 1605], 256], + 64893: [[1601, 1582, 1605], 256], + 64894: [[1602, 1605, 1581], 256], + 64895: [[1602, 1605, 1605], 256], + 64896: [[1604, 1581, 1605], 256], + 64897: [[1604, 1581, 1610], 256], + 64898: [[1604, 1581, 1609], 256], + 64899: [[1604, 1580, 1580], 256], + 64900: [[1604, 1580, 1580], 256], + 64901: [[1604, 1582, 1605], 256], + 64902: [[1604, 1582, 1605], 256], + 64903: [[1604, 1605, 1581], 256], + 64904: [[1604, 1605, 1581], 256], + 64905: [[1605, 1581, 1580], 256], + 64906: [[1605, 1581, 1605], 256], + 64907: [[1605, 1581, 1610], 256], + 64908: [[1605, 1580, 1581], 256], + 64909: [[1605, 1580, 1605], 256], + 64910: [[1605, 1582, 1580], 256], + 64911: [[1605, 1582, 1605], 256], + 64914: [[1605, 1580, 1582], 256], + 64915: [[1607, 1605, 1580], 256], + 64916: [[1607, 1605, 1605], 256], + 64917: [[1606, 1581, 1605], 256], + 64918: [[1606, 1581, 1609], 256], + 64919: [[1606, 1580, 1605], 256], + 64920: [[1606, 1580, 1605], 256], + 64921: [[1606, 1580, 1609], 256], + 64922: [[1606, 1605, 1610], 256], + 64923: [[1606, 1605, 1609], 256], + 64924: [[1610, 1605, 1605], 256], + 64925: [[1610, 1605, 1605], 256], + 64926: [[1576, 1582, 1610], 256], + 64927: [[1578, 1580, 1610], 256], + 64928: [[1578, 1580, 1609], 256], + 64929: [[1578, 1582, 1610], 256], + 64930: [[1578, 1582, 1609], 256], + 64931: [[1578, 1605, 1610], 256], + 64932: [[1578, 1605, 1609], 256], + 64933: [[1580, 1605, 1610], 256], + 64934: [[1580, 1581, 1609], 256], + 64935: [[1580, 1605, 1609], 256], + 64936: [[1587, 1582, 1609], 256], + 64937: [[1589, 1581, 1610], 256], + 64938: [[1588, 1581, 1610], 256], + 64939: [[1590, 1581, 1610], 256], + 64940: [[1604, 1580, 1610], 256], + 64941: [[1604, 1605, 1610], 256], + 64942: [[1610, 1581, 1610], 256], + 64943: [[1610, 1580, 1610], 256], + 64944: [[1610, 1605, 1610], 256], + 64945: [[1605, 1605, 1610], 256], + 64946: [[1602, 1605, 1610], 256], + 64947: [[1606, 1581, 1610], 256], + 64948: [[1602, 1605, 1581], 256], + 64949: [[1604, 1581, 1605], 256], + 64950: [[1593, 1605, 1610], 256], + 64951: [[1603, 1605, 1610], 256], + 64952: [[1606, 1580, 1581], 256], + 64953: [[1605, 1582, 1610], 256], + 64954: [[1604, 1580, 1605], 256], + 64955: [[1603, 1605, 1605], 256], + 64956: [[1604, 1580, 1605], 256], + 64957: [[1606, 1580, 1581], 256], + 64958: [[1580, 1581, 1610], 256], + 64959: [[1581, 1580, 1610], 256], + 64960: [[1605, 1580, 1610], 256], + 64961: [[1601, 1605, 1610], 256], + 64962: [[1576, 1581, 1610], 256], + 64963: [[1603, 1605, 1605], 256], + 64964: [[1593, 1580, 1605], 256], + 64965: [[1589, 1605, 1605], 256], + 64966: [[1587, 1582, 1610], 256], + 64967: [[1606, 1580, 1610], 256], + 65008: [[1589, 1604, 1746], 256], + 65009: [[1602, 1604, 1746], 256], + 65010: [[1575, 1604, 1604, 1607], 256], + 65011: [[1575, 1603, 1576, 1585], 256], + 65012: [[1605, 1581, 1605, 1583], 256], + 65013: [[1589, 1604, 1593, 1605], 256], + 65014: [[1585, 1587, 1608, 1604], 256], + 65015: [[1593, 1604, 1610, 1607], 256], + 65016: [[1608, 1587, 1604, 1605], 256], + 65017: [[1589, 1604, 1609], 256], + 65018: [ + [ + 1589, 1604, 1609, 32, 1575, 1604, 1604, 1607, 32, 1593, 1604, 1610, 1607, 32, 1608, + 1587, 1604, 1605 + ], + 256 + ], + 65019: [[1580, 1604, 32, 1580, 1604, 1575, 1604, 1607], 256], + 65020: [[1585, 1740, 1575, 1604], 256] + }, + 65024: { + 65040: [[44], 256], + 65041: [[12289], 256], + 65042: [[12290], 256], + 65043: [[58], 256], + 65044: [[59], 256], + 65045: [[33], 256], + 65046: [[63], 256], + 65047: [[12310], 256], + 65048: [[12311], 256], + 65049: [[8230], 256], + 65056: [, 230], + 65057: [, 230], + 65058: [, 230], + 65059: [, 230], + 65060: [, 230], + 65061: [, 230], + 65062: [, 230], + 65072: [[8229], 256], + 65073: [[8212], 256], + 65074: [[8211], 256], + 65075: [[95], 256], + 65076: [[95], 256], + 65077: [[40], 256], + 65078: [[41], 256], + 65079: [[123], 256], + 65080: [[125], 256], + 65081: [[12308], 256], + 65082: [[12309], 256], + 65083: [[12304], 256], + 65084: [[12305], 256], + 65085: [[12298], 256], + 65086: [[12299], 256], + 65087: [[12296], 256], + 65088: [[12297], 256], + 65089: [[12300], 256], + 65090: [[12301], 256], + 65091: [[12302], 256], + 65092: [[12303], 256], + 65095: [[91], 256], + 65096: [[93], 256], + 65097: [[8254], 256], + 65098: [[8254], 256], + 65099: [[8254], 256], + 65100: [[8254], 256], + 65101: [[95], 256], + 65102: [[95], 256], + 65103: [[95], 256], + 65104: [[44], 256], + 65105: [[12289], 256], + 65106: [[46], 256], + 65108: [[59], 256], + 65109: [[58], 256], + 65110: [[63], 256], + 65111: [[33], 256], + 65112: [[8212], 256], + 65113: [[40], 256], + 65114: [[41], 256], + 65115: [[123], 256], + 65116: [[125], 256], + 65117: [[12308], 256], + 65118: [[12309], 256], + 65119: [[35], 256], + 65120: [[38], 256], + 65121: [[42], 256], + 65122: [[43], 256], + 65123: [[45], 256], + 65124: [[60], 256], + 65125: [[62], 256], + 65126: [[61], 256], + 65128: [[92], 256], + 65129: [[36], 256], + 65130: [[37], 256], + 65131: [[64], 256], + 65136: [[32, 1611], 256], + 65137: [[1600, 1611], 256], + 65138: [[32, 1612], 256], + 65140: [[32, 1613], 256], + 65142: [[32, 1614], 256], + 65143: [[1600, 1614], 256], + 65144: [[32, 1615], 256], + 65145: [[1600, 1615], 256], + 65146: [[32, 1616], 256], + 65147: [[1600, 1616], 256], + 65148: [[32, 1617], 256], + 65149: [[1600, 1617], 256], + 65150: [[32, 1618], 256], + 65151: [[1600, 1618], 256], + 65152: [[1569], 256], + 65153: [[1570], 256], + 65154: [[1570], 256], + 65155: [[1571], 256], + 65156: [[1571], 256], + 65157: [[1572], 256], + 65158: [[1572], 256], + 65159: [[1573], 256], + 65160: [[1573], 256], + 65161: [[1574], 256], + 65162: [[1574], 256], + 65163: [[1574], 256], + 65164: [[1574], 256], + 65165: [[1575], 256], + 65166: [[1575], 256], + 65167: [[1576], 256], + 65168: [[1576], 256], + 65169: [[1576], 256], + 65170: [[1576], 256], + 65171: [[1577], 256], + 65172: [[1577], 256], + 65173: [[1578], 256], + 65174: [[1578], 256], + 65175: [[1578], 256], + 65176: [[1578], 256], + 65177: [[1579], 256], + 65178: [[1579], 256], + 65179: [[1579], 256], + 65180: [[1579], 256], + 65181: [[1580], 256], + 65182: [[1580], 256], + 65183: [[1580], 256], + 65184: [[1580], 256], + 65185: [[1581], 256], + 65186: [[1581], 256], + 65187: [[1581], 256], + 65188: [[1581], 256], + 65189: [[1582], 256], + 65190: [[1582], 256], + 65191: [[1582], 256], + 65192: [[1582], 256], + 65193: [[1583], 256], + 65194: [[1583], 256], + 65195: [[1584], 256], + 65196: [[1584], 256], + 65197: [[1585], 256], + 65198: [[1585], 256], + 65199: [[1586], 256], + 65200: [[1586], 256], + 65201: [[1587], 256], + 65202: [[1587], 256], + 65203: [[1587], 256], + 65204: [[1587], 256], + 65205: [[1588], 256], + 65206: [[1588], 256], + 65207: [[1588], 256], + 65208: [[1588], 256], + 65209: [[1589], 256], + 65210: [[1589], 256], + 65211: [[1589], 256], + 65212: [[1589], 256], + 65213: [[1590], 256], + 65214: [[1590], 256], + 65215: [[1590], 256], + 65216: [[1590], 256], + 65217: [[1591], 256], + 65218: [[1591], 256], + 65219: [[1591], 256], + 65220: [[1591], 256], + 65221: [[1592], 256], + 65222: [[1592], 256], + 65223: [[1592], 256], + 65224: [[1592], 256], + 65225: [[1593], 256], + 65226: [[1593], 256], + 65227: [[1593], 256], + 65228: [[1593], 256], + 65229: [[1594], 256], + 65230: [[1594], 256], + 65231: [[1594], 256], + 65232: [[1594], 256], + 65233: [[1601], 256], + 65234: [[1601], 256], + 65235: [[1601], 256], + 65236: [[1601], 256], + 65237: [[1602], 256], + 65238: [[1602], 256], + 65239: [[1602], 256], + 65240: [[1602], 256], + 65241: [[1603], 256], + 65242: [[1603], 256], + 65243: [[1603], 256], + 65244: [[1603], 256], + 65245: [[1604], 256], + 65246: [[1604], 256], + 65247: [[1604], 256], + 65248: [[1604], 256], + 65249: [[1605], 256], + 65250: [[1605], 256], + 65251: [[1605], 256], + 65252: [[1605], 256], + 65253: [[1606], 256], + 65254: [[1606], 256], + 65255: [[1606], 256], + 65256: [[1606], 256], + 65257: [[1607], 256], + 65258: [[1607], 256], + 65259: [[1607], 256], + 65260: [[1607], 256], + 65261: [[1608], 256], + 65262: [[1608], 256], + 65263: [[1609], 256], + 65264: [[1609], 256], + 65265: [[1610], 256], + 65266: [[1610], 256], + 65267: [[1610], 256], + 65268: [[1610], 256], + 65269: [[1604, 1570], 256], + 65270: [[1604, 1570], 256], + 65271: [[1604, 1571], 256], + 65272: [[1604, 1571], 256], + 65273: [[1604, 1573], 256], + 65274: [[1604, 1573], 256], + 65275: [[1604, 1575], 256], + 65276: [[1604, 1575], 256] + }, + 65280: { + 65281: [[33], 256], + 65282: [[34], 256], + 65283: [[35], 256], + 65284: [[36], 256], + 65285: [[37], 256], + 65286: [[38], 256], + 65287: [[39], 256], + 65288: [[40], 256], + 65289: [[41], 256], + 65290: [[42], 256], + 65291: [[43], 256], + 65292: [[44], 256], + 65293: [[45], 256], + 65294: [[46], 256], + 65295: [[47], 256], + 65296: [[48], 256], + 65297: [[49], 256], + 65298: [[50], 256], + 65299: [[51], 256], + 65300: [[52], 256], + 65301: [[53], 256], + 65302: [[54], 256], + 65303: [[55], 256], + 65304: [[56], 256], + 65305: [[57], 256], + 65306: [[58], 256], + 65307: [[59], 256], + 65308: [[60], 256], + 65309: [[61], 256], + 65310: [[62], 256], + 65311: [[63], 256], + 65312: [[64], 256], + 65313: [[65], 256], + 65314: [[66], 256], + 65315: [[67], 256], + 65316: [[68], 256], + 65317: [[69], 256], + 65318: [[70], 256], + 65319: [[71], 256], + 65320: [[72], 256], + 65321: [[73], 256], + 65322: [[74], 256], + 65323: [[75], 256], + 65324: [[76], 256], + 65325: [[77], 256], + 65326: [[78], 256], + 65327: [[79], 256], + 65328: [[80], 256], + 65329: [[81], 256], + 65330: [[82], 256], + 65331: [[83], 256], + 65332: [[84], 256], + 65333: [[85], 256], + 65334: [[86], 256], + 65335: [[87], 256], + 65336: [[88], 256], + 65337: [[89], 256], + 65338: [[90], 256], + 65339: [[91], 256], + 65340: [[92], 256], + 65341: [[93], 256], + 65342: [[94], 256], + 65343: [[95], 256], + 65344: [[96], 256], + 65345: [[97], 256], + 65346: [[98], 256], + 65347: [[99], 256], + 65348: [[100], 256], + 65349: [[101], 256], + 65350: [[102], 256], + 65351: [[103], 256], + 65352: [[104], 256], + 65353: [[105], 256], + 65354: [[106], 256], + 65355: [[107], 256], + 65356: [[108], 256], + 65357: [[109], 256], + 65358: [[110], 256], + 65359: [[111], 256], + 65360: [[112], 256], + 65361: [[113], 256], + 65362: [[114], 256], + 65363: [[115], 256], + 65364: [[116], 256], + 65365: [[117], 256], + 65366: [[118], 256], + 65367: [[119], 256], + 65368: [[120], 256], + 65369: [[121], 256], + 65370: [[122], 256], + 65371: [[123], 256], + 65372: [[124], 256], + 65373: [[125], 256], + 65374: [[126], 256], + 65375: [[10629], 256], + 65376: [[10630], 256], + 65377: [[12290], 256], + 65378: [[12300], 256], + 65379: [[12301], 256], + 65380: [[12289], 256], + 65381: [[12539], 256], + 65382: [[12530], 256], + 65383: [[12449], 256], + 65384: [[12451], 256], + 65385: [[12453], 256], + 65386: [[12455], 256], + 65387: [[12457], 256], + 65388: [[12515], 256], + 65389: [[12517], 256], + 65390: [[12519], 256], + 65391: [[12483], 256], + 65392: [[12540], 256], + 65393: [[12450], 256], + 65394: [[12452], 256], + 65395: [[12454], 256], + 65396: [[12456], 256], + 65397: [[12458], 256], + 65398: [[12459], 256], + 65399: [[12461], 256], + 65400: [[12463], 256], + 65401: [[12465], 256], + 65402: [[12467], 256], + 65403: [[12469], 256], + 65404: [[12471], 256], + 65405: [[12473], 256], + 65406: [[12475], 256], + 65407: [[12477], 256], + 65408: [[12479], 256], + 65409: [[12481], 256], + 65410: [[12484], 256], + 65411: [[12486], 256], + 65412: [[12488], 256], + 65413: [[12490], 256], + 65414: [[12491], 256], + 65415: [[12492], 256], + 65416: [[12493], 256], + 65417: [[12494], 256], + 65418: [[12495], 256], + 65419: [[12498], 256], + 65420: [[12501], 256], + 65421: [[12504], 256], + 65422: [[12507], 256], + 65423: [[12510], 256], + 65424: [[12511], 256], + 65425: [[12512], 256], + 65426: [[12513], 256], + 65427: [[12514], 256], + 65428: [[12516], 256], + 65429: [[12518], 256], + 65430: [[12520], 256], + 65431: [[12521], 256], + 65432: [[12522], 256], + 65433: [[12523], 256], + 65434: [[12524], 256], + 65435: [[12525], 256], + 65436: [[12527], 256], + 65437: [[12531], 256], + 65438: [[12441], 256], + 65439: [[12442], 256], + 65440: [[12644], 256], + 65441: [[12593], 256], + 65442: [[12594], 256], + 65443: [[12595], 256], + 65444: [[12596], 256], + 65445: [[12597], 256], + 65446: [[12598], 256], + 65447: [[12599], 256], + 65448: [[12600], 256], + 65449: [[12601], 256], + 65450: [[12602], 256], + 65451: [[12603], 256], + 65452: [[12604], 256], + 65453: [[12605], 256], + 65454: [[12606], 256], + 65455: [[12607], 256], + 65456: [[12608], 256], + 65457: [[12609], 256], + 65458: [[12610], 256], + 65459: [[12611], 256], + 65460: [[12612], 256], + 65461: [[12613], 256], + 65462: [[12614], 256], + 65463: [[12615], 256], + 65464: [[12616], 256], + 65465: [[12617], 256], + 65466: [[12618], 256], + 65467: [[12619], 256], + 65468: [[12620], 256], + 65469: [[12621], 256], + 65470: [[12622], 256], + 65474: [[12623], 256], + 65475: [[12624], 256], + 65476: [[12625], 256], + 65477: [[12626], 256], + 65478: [[12627], 256], + 65479: [[12628], 256], + 65482: [[12629], 256], + 65483: [[12630], 256], + 65484: [[12631], 256], + 65485: [[12632], 256], + 65486: [[12633], 256], + 65487: [[12634], 256], + 65490: [[12635], 256], + 65491: [[12636], 256], + 65492: [[12637], 256], + 65493: [[12638], 256], + 65494: [[12639], 256], + 65495: [[12640], 256], + 65498: [[12641], 256], + 65499: [[12642], 256], + 65500: [[12643], 256], + 65504: [[162], 256], + 65505: [[163], 256], + 65506: [[172], 256], + 65507: [[175], 256], + 65508: [[166], 256], + 65509: [[165], 256], + 65510: [[8361], 256], + 65512: [[9474], 256], + 65513: [[8592], 256], + 65514: [[8593], 256], + 65515: [[8594], 256], + 65516: [[8595], 256], + 65517: [[9632], 256], + 65518: [[9675], 256] + } +}; diff --git a/node_modules/es5-ext/string/#/normalize/implement.js b/node_modules/es5-ext/string/#/normalize/implement.js new file mode 100644 index 0000000..deb6089 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "normalize", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/normalize/index.js b/node_modules/es5-ext/string/#/normalize/index.js new file mode 100644 index 0000000..a8c04db --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.normalize : require("./shim"); diff --git a/node_modules/es5-ext/string/#/normalize/is-implemented.js b/node_modules/es5-ext/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..01b48a9 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "æøåäüö"; + +module.exports = function () { + if (typeof str.normalize !== "function") return false; + return str.normalize("NFKD") === "æøåäüö"; +}; diff --git a/node_modules/es5-ext/string/#/normalize/shim.js b/node_modules/es5-ext/string/#/normalize/shim.js new file mode 100644 index 0000000..95bae26 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/shim.js @@ -0,0 +1,309 @@ +/* eslint no-bitwise: "off", max-statements: "off", max-lines: "off" */ + +// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and + * GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ + */ + +"use strict"; + +var primitiveSet = require("../../../object/primitive-set") + , validValue = require("../../../object/valid-value") + , data = require("./_data"); + +var floor = Math.floor + , forms = primitiveSet("NFC", "NFD", "NFKC", "NFKD") + , DEFAULT_FEATURE = [null, 0, {}] + , CACHE_THRESHOLD = 10 + , SBase = 0xac00 + , LBase = 0x1100 + , VBase = 0x1161 + , TBase = 0x11a7 + , LCount = 19 + , VCount = 21 + , TCount = 28 + , NCount = VCount * TCount + , SCount = LCount * NCount + , UChar + , cache = {} + , cacheCounter = [] + , fromCache + , fromData + , fromCpOnly + , fromRuleBasedJamo + , fromCpFilter + , strategies + , UCharIterator + , RecursDecompIterator + , DecompIterator + , CompIterator + , createIterator + , normalize; + +UChar = function (cp, feature) { + this.codepoint = cp; + this.feature = feature; +}; + +// Strategies +(function () { for (var i = 0; i <= 0xff; ++i) cacheCounter[i] = 0; })(); + +fromCache = function (nextStep, cp, needFeature) { + var ret = cache[cp]; + if (!ret) { + ret = nextStep(cp, needFeature); + if (Boolean(ret.feature) && ++cacheCounter[(cp >> 8) & 0xff] > CACHE_THRESHOLD) { + cache[cp] = ret; + } + } + return ret; +}; + +fromData = function (next, cp) { + var hash = cp & 0xff00, dunit = UChar.udata[hash] || {}, feature = dunit[cp]; + return feature ? new UChar(cp, feature) : new UChar(cp, DEFAULT_FEATURE); +}; +fromCpOnly = function (next, cp, needFeature) { + return needFeature ? next(cp, needFeature) : new UChar(cp, null); +}; + +fromRuleBasedJamo = function (next, cp, needFeature) { + var char, base, i, arr, SIndex, TIndex, feature, j; + if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || SBase + SCount < cp) { + return next(cp, needFeature); + } + if (LBase <= cp && cp < LBase + LCount) { + char = {}; + base = (cp - LBase) * VCount; + for (i = 0; i < VCount; ++i) { + char[VBase + i] = SBase + TCount * (i + base); + } + arr = new Array(3); + arr[2] = char; + return new UChar(cp, arr); + } + + SIndex = cp - SBase; + TIndex = SIndex % TCount; + feature = []; + if (TIndex === 0) { + feature[0] = [LBase + floor(SIndex / NCount), VBase + floor((SIndex % NCount) / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j) { + feature[2][TBase + j] = cp + j; + } + } else { + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } + return new UChar(cp, feature); +}; + +fromCpFilter = function (next, cp, needFeature) { + return cp < 60 || (cp > 13311 && cp < 42607) + ? new UChar(cp, DEFAULT_FEATURE) + : next(cp, needFeature); +}; + +strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + +UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { return strategy(next, cp, needFeature); }; +}, null); + +UChar.isHighSurrogate = function (cp) { return cp >= 0xd800 && cp <= 0xdbff; }; +UChar.isLowSurrogate = function (cp) { return cp >= 0xdc00 && cp <= 0xdfff; }; + +UChar.prototype.prepFeature = function () { + if (!this.feature) { + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } +}; + +UChar.prototype.toString = function () { + var num; + if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); + num = this.codepoint - 0x10000; + return String.fromCharCode(floor(num / 0x400) + 0xd800, (num % 0x400) + 0xdc00); +}; + +UChar.prototype.getDecomp = function () { + this.prepFeature(); + return this.feature[0] || null; +}; + +UChar.prototype.isCompatibility = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 8); +}; +UChar.prototype.isExclude = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 9); +}; +UChar.prototype.getCanonicalClass = function () { + this.prepFeature(); + return this.feature[1] ? this.feature[1] & 0xff : 0; +}; +UChar.prototype.getComposite = function (following) { + var cp; + this.prepFeature(); + if (!this.feature[2]) return null; + cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; +}; + +UCharIterator = function (str) { + this.str = str; + this.cursor = 0; +}; +UCharIterator.prototype.next = function () { + if (Boolean(this.str) && this.cursor < this.str.length) { + var cp = this.str.charCodeAt(this.cursor++), d; + if ( + UChar.isHighSurrogate(cp) && + this.cursor < this.str.length && + UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor))) + ) { + cp = (cp - 0xd800) * 0x400 + (d - 0xdc00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } + this.str = null; + return null; +}; + +RecursDecompIterator = function (it, cano) { + this.it = it; + this.canonical = cano; + this.resBuf = []; +}; + +RecursDecompIterator.prototype.next = function () { + var recursiveDecomp, uchar; + recursiveDecomp = function (cano, ucharLoc) { + var decomp = ucharLoc.getDecomp(), ret, i, a, j; + if (Boolean(decomp) && !(cano && ucharLoc.isCompatibility())) { + ret = []; + for (i = 0; i < decomp.length; ++i) { + a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + // Ret.concat(a); //<-why does not this work? + // following block is a workaround. + for (j = 0; j < a.length; ++j) ret.push(a[j]); + } + return ret; + } + return [ucharLoc]; + }; + if (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) return null; + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); +}; + +DecompIterator = function (it) { + this.it = it; + this.resBuf = []; +}; + +DecompIterator.prototype.next = function () { + var cc, uchar, inspt, uchar2, cc2; + if (this.resBuf.length === 0) { + do { + uchar = this.it.next(); + if (!uchar) break; + cc = uchar.getCanonicalClass(); + inspt = this.resBuf.length; + if (cc !== 0) { + for (inspt; inspt > 0; --inspt) { + uchar2 = this.resBuf[inspt - 1]; + cc2 = uchar2.getCanonicalClass(); + // eslint-disable-next-line max-depth + if (cc2 <= cc) break; + } + } + this.resBuf.splice(inspt, 0, uchar); + } while (cc !== 0); + } + return this.resBuf.shift(); +}; + +CompIterator = function (it) { + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; +}; + +CompIterator.prototype.next = function () { + var uchar, starter, composite, cc; + while (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) { + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if (this.procBuf.length === 0) { + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + starter = this.procBuf[0]; + composite = starter.getComposite(uchar); + cc = uchar.getCanonicalClass(); + if (Boolean(composite) && (this.lastClass < cc || this.lastClass === 0)) { + this.procBuf[0] = composite; + } else { + if (cc === 0) { + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); +}; + +createIterator = function (mode, str) { + switch (mode) { + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)) + ); + case "NFKC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)) + ); + default: + throw new Error(mode + " is invalid"); + } +}; +normalize = function (mode, str) { + var it = createIterator(mode, str), ret = "", uchar; + while ((uchar = it.next())) ret += uchar.toString(); + return ret; +}; + +/* Unicode data */ +UChar.udata = data; + +module.exports = function (/* Form*/) { + var str = String(validValue(this)), form = arguments[0]; + if (form === undefined) form = "NFC"; + else form = String(form); + if (!forms[form]) throw new RangeError("Invalid normalization form: " + form); + return normalize(form, str); +}; diff --git a/node_modules/es5-ext/string/#/pad.js b/node_modules/es5-ext/string/#/pad.js new file mode 100644 index 0000000..ee0339f --- /dev/null +++ b/node_modules/es5-ext/string/#/pad.js @@ -0,0 +1,16 @@ +"use strict"; + +var toInteger = require("../../number/to-integer") + , value = require("../../object/valid-value") + , repeat = require("./repeat") + , abs = Math.abs + , max = Math.max; + +module.exports = function (fill /*, length*/) { + var self = String(value(this)), sLength = self.length, length = arguments[1]; + + length = isNaN(length) ? 1 : toInteger(length); + fill = repeat.call(String(fill), abs(length)); + if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; + return self + (sLength + length >= 0 ? "" : fill.slice(length + sLength)); +}; diff --git a/node_modules/es5-ext/string/#/plain-replace-all.js b/node_modules/es5-ext/string/#/plain-replace-all.js new file mode 100644 index 0000000..9334fe0 --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace-all.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function (search, replace) { + var index, pos = 0, str = String(value(this)), sl, rl; + search = String(search); + replace = String(replace); + sl = search.length; + rl = replace.length; + while ((index = str.indexOf(search, pos)) !== -1) { + str = str.slice(0, index) + replace + str.slice(index + sl); + pos = index + rl; + } + return str; +}; diff --git a/node_modules/es5-ext/string/#/plain-replace.js b/node_modules/es5-ext/string/#/plain-replace.js new file mode 100644 index 0000000..b8bfe3d --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = String.prototype.indexOf, slice = String.prototype.slice; + +module.exports = function (search, replace) { + var index = indexOf.call(this, search); + if (index === -1) return String(this); + return slice.call(this, 0, index) + replace + slice.call(this, index + String(search).length); +}; diff --git a/node_modules/es5-ext/string/#/repeat/implement.js b/node_modules/es5-ext/string/#/repeat/implement.js new file mode 100644 index 0000000..f237dcd --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "repeat", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/repeat/index.js b/node_modules/es5-ext/string/#/repeat/index.js new file mode 100644 index 0000000..abcb601 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.repeat : require("./shim"); diff --git a/node_modules/es5-ext/string/#/repeat/is-implemented.js b/node_modules/es5-ext/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..e8e0240 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "foo"; + +module.exports = function () { + if (typeof str.repeat !== "function") return false; + return str.repeat(2) === "foofoo"; +}; diff --git a/node_modules/es5-ext/string/#/repeat/shim.js b/node_modules/es5-ext/string/#/repeat/shim.js new file mode 100644 index 0000000..ac259a8 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/shim.js @@ -0,0 +1,24 @@ +// Thanks +// @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html +// @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js + +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer"); + +module.exports = function (count) { + var str = String(value(this)), result; + count = toInteger(count); + if (count < 0) throw new RangeError("Count must be >= 0"); + if (!isFinite(count)) throw new RangeError("Count must be < ∞"); + + result = ""; + while (count) { + if (count % 2) result += str; + if (count > 1) str += str; + // eslint-disable-next-line no-bitwise + count >>= 1; + } + return result; +}; diff --git a/node_modules/es5-ext/string/#/starts-with/implement.js b/node_modules/es5-ext/string/#/starts-with/implement.js new file mode 100644 index 0000000..62abadb --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "startsWith", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/#/starts-with/index.js b/node_modules/es5-ext/string/#/starts-with/index.js new file mode 100644 index 0000000..a0a368f --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.startsWith : require("./shim"); diff --git a/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/node_modules/es5-ext/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..d1241bc --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.startsWith !== "function") return false; + return str.startsWith("trzy") === false && str.startsWith("raz") === true; +}; diff --git a/node_modules/es5-ext/string/#/starts-with/shim.js b/node_modules/es5-ext/string/#/starts-with/shim.js new file mode 100644 index 0000000..c3fa3b0 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer") + , max = Math.max + , min = Math.min; + +module.exports = function (searchString /*, position*/) { + var start, self = String(value(this)); + start = min(max(toInteger(arguments[1]), 0), self.length); + return self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/uncapitalize.js b/node_modules/es5-ext/string/#/uncapitalize.js new file mode 100644 index 0000000..202dbb7 --- /dev/null +++ b/node_modules/es5-ext/string/#/uncapitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureStringifiable = require("../../object/validate-stringifiable-value"); + +module.exports = function () { + var str = ensureStringifiable(this); + return str.charAt(0).toLowerCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/format-method.js b/node_modules/es5-ext/string/format-method.js new file mode 100644 index 0000000..91d8de9 --- /dev/null +++ b/node_modules/es5-ext/string/format-method.js @@ -0,0 +1,26 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , call = Function.prototype.call; + +module.exports = function (fmap) { + fmap = Object(value(fmap)); + return function (pattern) { + var context = this; + value(context); + pattern = String(pattern); + return pattern.replace( + /%([a-zA-Z]+)|\\([\u0000-\uffff])/g, + function (match, token, escapeChar) { + var t, result; + if (escapeChar) return escapeChar; + t = token; + while (t && !(result = fmap[t])) t = t.slice(0, -1); + if (!result) return match; + if (isCallable(result)) result = call.call(result, context); + return result + token.slice(t.length); + } + ); + }; +}; diff --git a/node_modules/es5-ext/string/from-code-point/implement.js b/node_modules/es5-ext/string/from-code-point/implement.js new file mode 100644 index 0000000..71728bf --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "fromCodePoint", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/from-code-point/index.js b/node_modules/es5-ext/string/from-code-point/index.js new file mode 100644 index 0000000..5a5fc5b --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.fromCodePoint : require("./shim"); diff --git a/node_modules/es5-ext/string/from-code-point/is-implemented.js b/node_modules/es5-ext/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..ae4b818 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fromCodePoint = String.fromCodePoint; + if (typeof fromCodePoint !== "function") return false; + return fromCodePoint(0x1d306, 0x61, 0x1d307) === "\ud834\udf06a\ud834\udf07"; +}; diff --git a/node_modules/es5-ext/string/from-code-point/shim.js b/node_modules/es5-ext/string/from-code-point/shim.js new file mode 100644 index 0000000..c8214cf --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/shim.js @@ -0,0 +1,37 @@ +// Based on: +// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ +// and: +// https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /fromcodepoint.js + +"use strict"; + +var floor = Math.floor, fromCharCode = String.fromCharCode; + +// eslint-disable-next-line no-unused-vars +module.exports = function (codePoint1 /*, …codePoints*/) { + var chars = [], length = arguments.length, i, codePoint, result = ""; + for (i = 0; i < length; ++i) { + codePoint = Number(arguments[i]); + if ( + !isFinite(codePoint) || + codePoint < 0 || + codePoint > 0x10ffff || + floor(codePoint) !== codePoint + ) { + throw new RangeError("Invalid code point " + codePoint); + } + + if (codePoint < 0x10000) { + chars.push(codePoint); + } else { + codePoint -= 0x10000; + // eslint-disable-next-line no-bitwise + chars.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00); + } + if (i + 1 !== length && chars.length <= 0x4000) continue; + result += fromCharCode.apply(null, chars); + chars.length = 0; + } + return result; +}; diff --git a/node_modules/es5-ext/string/index.js b/node_modules/es5-ext/string/index.js new file mode 100644 index 0000000..4393588 --- /dev/null +++ b/node_modules/es5-ext/string/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "formatMethod": require("./format-method"), + "fromCodePoint": require("./from-code-point"), + "isString": require("./is-string"), + "random": require("./random"), + "randomUniq": require("./random-uniq"), + "raw": require("./raw") +}; diff --git a/node_modules/es5-ext/string/is-string.js b/node_modules/es5-ext/string/is-string.js new file mode 100644 index 0000000..1b1e863 --- /dev/null +++ b/node_modules/es5-ext/string/is-string.js @@ -0,0 +1,13 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(""); + +module.exports = function (value) { + return ( + typeof value === "string" || + (value && + typeof value === "object" && + (value instanceof String || objToString.call(value) === id)) || + false + ); +}; diff --git a/node_modules/es5-ext/string/random-uniq.js b/node_modules/es5-ext/string/random-uniq.js new file mode 100644 index 0000000..ae57b29 --- /dev/null +++ b/node_modules/es5-ext/string/random-uniq.js @@ -0,0 +1,11 @@ +"use strict"; + +var generated = Object.create(null), random = Math.random; + +module.exports = function () { + var str; + do { + str = random().toString(36).slice(2); + } while (generated[str]); + return str; +}; diff --git a/node_modules/es5-ext/string/random.js b/node_modules/es5-ext/string/random.js new file mode 100644 index 0000000..8fda5de --- /dev/null +++ b/node_modules/es5-ext/string/random.js @@ -0,0 +1,38 @@ +"use strict"; + +var isValue = require("../object/is-value") + , toNaturalNumber = require("../number/to-pos-integer"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { return random().toString(36).slice(2); }; + +var getString = function (/* length */) { + var str = getChunk(), length = arguments[0]; + if (!isValue(length)) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = Object(arguments[0]), length = options.length, isUnique = options.isUnique; + + if (isValue(length)) length = toNaturalNumber(length); + + var str = getString(length); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/node_modules/es5-ext/string/raw/implement.js b/node_modules/es5-ext/string/raw/implement.js new file mode 100644 index 0000000..24f17c2 --- /dev/null +++ b/node_modules/es5-ext/string/raw/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "raw", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/string/raw/index.js b/node_modules/es5-ext/string/raw/index.js new file mode 100644 index 0000000..39889e9 --- /dev/null +++ b/node_modules/es5-ext/string/raw/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.raw : require("./shim"); diff --git a/node_modules/es5-ext/string/raw/is-implemented.js b/node_modules/es5-ext/string/raw/is-implemented.js new file mode 100644 index 0000000..8758108 --- /dev/null +++ b/node_modules/es5-ext/string/raw/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var raw = String.raw, test; + if (typeof raw !== "function") return false; + test = ["foo\nbar", "marko\n"]; + test.raw = ["foo\\nbar", "marko\\n"]; + return raw(test, "INSE\nRT") === "foo\\nbarINSE\nRTmarko\\n"; +}; diff --git a/node_modules/es5-ext/string/raw/shim.js b/node_modules/es5-ext/string/raw/shim.js new file mode 100644 index 0000000..8c52bb5 --- /dev/null +++ b/node_modules/es5-ext/string/raw/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , validValue = require("../../object/valid-value") + , reduce = Array.prototype.reduce; + +module.exports = function (callSite /*, …substitutions*/) { + var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); + if (!toPosInt(rawValue.length)) return ""; + args = arguments; + return reduce.call(rawValue, function (str1, str2, i) { + return str1 + String(args[i]) + str2; + }); +}; diff --git a/node_modules/es5-ext/to-short-string-representation.js b/node_modules/es5-ext/to-short-string-representation.js new file mode 100644 index 0000000..5aede53 --- /dev/null +++ b/node_modules/es5-ext/to-short-string-representation.js @@ -0,0 +1,16 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + return JSON.stringify(char).slice(1, -1); + }); + return string; +}; diff --git a/node_modules/es6-iterator/#/chain.js b/node_modules/es6-iterator/#/chain.js new file mode 100644 index 0000000..190a346 --- /dev/null +++ b/node_modules/es6-iterator/#/chain.js @@ -0,0 +1,40 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Iterator = require("../") + , validIterable = require("../valid-iterable") + + , push = Array.prototype.push + , defineProperties = Object.defineProperties + , IteratorChain; + +IteratorChain = function (iterators) { + defineProperties(this, { + __iterators__: d("", iterators), + __current__: d("w", iterators.shift()) + }); +}; +if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); + +IteratorChain.prototype = Object.create(Iterator.prototype, { + constructor: d(IteratorChain), + next: d(function () { + var result; + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + while (result.done) { + this.__current__ = this.__iterators__.shift(); + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + } + return result; + }) +}); + +module.exports = function () { + var iterators = [this]; + push.apply(iterators, arguments); + iterators.forEach(validIterable); + return new IteratorChain(iterators); +}; diff --git a/node_modules/es6-iterator/.editorconfig b/node_modules/es6-iterator/.editorconfig new file mode 100644 index 0000000..c24a6cd --- /dev/null +++ b/node_modules/es6-iterator/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/es6-iterator/.npmignore b/node_modules/es6-iterator/.npmignore new file mode 100644 index 0000000..a91db65 --- /dev/null +++ b/node_modules/es6-iterator/.npmignore @@ -0,0 +1,12 @@ +.DS_Store +Thumbs.db +/.idea +/.vscode +npm-debug.log +/wallaby.js +/node_modules +/.travis.yml +/.gitignore +/.circle.yml +/.circleci +/.appveyor.yml diff --git a/node_modules/es6-iterator/CHANGELOG.md b/node_modules/es6-iterator/CHANGELOG.md new file mode 100644 index 0000000..37eb16a --- /dev/null +++ b/node_modules/es6-iterator/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [2.0.3](https://github.com/medikoo/es6-iterator/compare/v2.0.2...v2.0.3) (2017-10-17) + + +### Bug Fixes + +* configurability of toStringTag ([b99f692](https://github.com/medikoo/es6-iterator/commit/b99f692)) + + + + +## [2.0.2](https://github.com/medikoo/es6-iterator/compare/v2.0.1...v2.0.2) (2017-10-17) + + +### Bug Fixes + +* constructor exposure ([dbc0c51](https://github.com/medikoo/es6-iterator/commit/dbc0c51)) +* do not allow non constructor calls ([1f2f800](https://github.com/medikoo/es6-iterator/commit/1f2f800)) +* toString and toStringTag symbol definitions. ([2d17786](https://github.com/medikoo/es6-iterator/commit/2d17786)), closes [#6](https://github.com/medikoo/es6-iterator/issues/6) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es6-iterator/CHANGES b/node_modules/es6-iterator/CHANGES new file mode 100644 index 0000000..83095f7 --- /dev/null +++ b/node_modules/es6-iterator/CHANGES @@ -0,0 +1,42 @@ +For recent changelog see CHANGELOG.md + +----- + +v2.0.1 -- 2017.03.15 +* Update dependencies + +v2.0.0 -- 2015.10.02 +* Use es6-symbol at v3 + +v1.0.0 -- 2015.06.23 +* Implement support for arguments object +* Drop support for v0.8 node ('^' in package.json dependencies) + +v0.1.3 -- 2015.02.02 +* Update dependencies +* Fix spelling of LICENSE + +v0.1.2 -- 2014.11.19 +* Optimise internal `_next` to not verify internal's list length at all times + (#2 thanks @RReverser) +* Fix documentation examples +* Configure lint scripts + +v0.1.1 -- 2014.04.29 +* Fix es6-symbol dependency version + +v0.1.0 -- 2014.04.29 +* Assure strictly npm hosted dependencies +* Remove sparse arrays dedicated handling (as per spec) +* Add: isIterable, validIterable and chain (method) +* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) +* Add break possiblity to 'forOf' via 'doBreak' function argument +* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) +* Provide @@toStringTag symbol +* When available rely on @@iterator symbol +* Remove 32bit integer maximum list length restriction +* Improve Iterator internals +* Update to use latest version of dependencies + +v0.0.0 -- 2013.10.12 +Initial (dev version) diff --git a/node_modules/es6-iterator/LICENSE b/node_modules/es6-iterator/LICENSE new file mode 100644 index 0000000..d7c36d5 --- /dev/null +++ b/node_modules/es6-iterator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/es6-iterator/README.md b/node_modules/es6-iterator/README.md new file mode 100644 index 0000000..288373d --- /dev/null +++ b/node_modules/es6-iterator/README.md @@ -0,0 +1,148 @@ +# es6-iterator +## ECMAScript 6 Iterator interface + +### Installation + + $ npm install es6-iterator + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## API + +### Constructors + +#### Iterator(list) _(es6-iterator)_ + +Abstract Iterator interface. Meant for extensions and not to be used on its own. + +Accepts any _list_ object (technically object with numeric _length_ property). + +_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ + +```javascript +var Iterator = require('es6-iterator') +var iterator = new Iterator([1, 2, 3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + + +#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ + +Dedicated for arrays and array-likes. Supports three iteration kinds: +* __value__ _(default)_ - Iterates values +* __key__ - Iterates indexes +* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. + + +```javascript +var ArrayIterator = require('es6-iterator/array') +var iterator = new ArrayIterator([1, 2, 3], 'key+value'); + +iterator.next(); // { value: [0, 1], done: false } +iterator.next(); // { value: [1, 2], done: false } +iterator.next(); // { value: [2, 3], done: false } +iterator.next(); // { value: undefined, done: true } +``` + +May also be used for _arguments_ objects: + +```javascript +(function () { + var iterator = new ArrayIterator(arguments); + + iterator.next(); // { value: 1, done: false } + iterator.next(); // { value: 2, done: false } + iterator.next(); // { value: 3, done: false } + iterator.next(); // { value: undefined, done: true } +}(1, 2, 3)); +``` + +#### StringIterator(str) _(es6-iterator/string)_ + +Assures proper iteration over unicode symbols. +See: http://mathiasbynens.be/notes/javascript-unicode + +```javascript +var StringIterator = require('es6-iterator/string'); +var iterator = new StringIterator('f🙈o🙉o🙊'); + +iterator.next(); // { value: 'f', done: false } +iterator.next(); // { value: '🙈', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙉', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙊', done: false } +iterator.next(); // { value: undefined, done: true } +``` + +### Function utilities + +#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ + +Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. + +``` +var forOf = require('es6-iterator/for-of'); +var result = []; + +forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); +console.log(result); // ['🙈', '🙉', '🙊']; +``` + +Optionally you can break iteration at any point: + +```javascript +var result = []; + +forOf([1,2,3,4]', function (val, doBreak) { + result.push(monkey); + if (val >= 3) doBreak(); +}); +console.log(result); // [1, 2, 3]; +``` + +#### get(obj) _(es6-iterator/get)_ + +Return iterator for any iterable object. + +```javascript +var getIterator = require('es6-iterator/get'); +var iterator = get([1,2,3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + +#### isIterable(obj) _(es6-iterator/is-iterable)_ + +Whether _obj_ is iterable + +```javascript +var isIterable = require('es6-iterator/is-iterable'); + +isIterable(null); // false +isIterable(true); // false +isIterable('str'); // true +isIterable(['a', 'r', 'r']); // true +isIterable(new ArrayIterator([])); // true +``` + +#### validIterable(obj) _(es6-iterator/valid-iterable)_ + +If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. + +### Method extensions + +#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ + +Chain multiple iterators into one. + +### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator) + + $ npm test diff --git a/node_modules/es6-iterator/appveyor.yml b/node_modules/es6-iterator/appveyor.yml new file mode 100644 index 0000000..942ab82 --- /dev/null +++ b/node_modules/es6-iterator/appveyor.yml @@ -0,0 +1,26 @@ +# Test against the latest version of this Node.js version +environment: + matrix: + # node.js + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "6" + - nodejs_version: "8" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/node_modules/es6-iterator/array.js b/node_modules/es6-iterator/array.js new file mode 100644 index 0000000..d7a46a4 --- /dev/null +++ b/node_modules/es6-iterator/array.js @@ -0,0 +1,32 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , contains = require("es5-ext/string/#/contains") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); + Iterator.call(this, arr); + if (!kind) kind = "value"; + else if (contains.call(kind, "key+value")) kind = "key+value"; + else if (contains.call(kind, "key")) kind = "key"; + else kind = "value"; + defineProperty(this, "__kind__", d("", kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete ArrayIterator.prototype.constructor; + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + _resolve: d(function (i) { + if (this.__kind__ === "value") return this.__list__[i]; + if (this.__kind__ === "key+value") return [i, this.__list__[i]]; + return i; + }) +}); +defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); diff --git a/node_modules/es6-iterator/for-of.js b/node_modules/es6-iterator/for-of.js new file mode 100644 index 0000000..5d15c34 --- /dev/null +++ b/node_modules/es6-iterator/for-of.js @@ -0,0 +1,47 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , callable = require("es5-ext/object/valid-callable") + , isString = require("es5-ext/string/is-string") + , get = require("./get"); + +var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; + +module.exports = function (iterable, cb /*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; + if (isArray(iterable) || isArguments(iterable)) mode = "array"; + else if (isString(iterable)) mode = "string"; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { + broken = true; + }; + if (mode === "array") { + some.call(iterable, function (value) { + call.call(cb, thisArg, value, doBreak); + return broken; + }); + return; + } + if (mode === "string") { + length = iterable.length; + for (i = 0; i < length; ++i) { + char = iterable[i]; + if (i + 1 < length) { + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; diff --git a/node_modules/es6-iterator/get.js b/node_modules/es6-iterator/get.js new file mode 100644 index 0000000..d36c9e2 --- /dev/null +++ b/node_modules/es6-iterator/get.js @@ -0,0 +1,15 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isString = require("es5-ext/string/is-string") + , ArrayIterator = require("./array") + , StringIterator = require("./string") + , iterable = require("./valid-iterable") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); + if (isArguments(obj)) return new ArrayIterator(obj); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; diff --git a/node_modules/es6-iterator/index.js b/node_modules/es6-iterator/index.js new file mode 100644 index 0000000..790475f --- /dev/null +++ b/node_modules/es6-iterator/index.js @@ -0,0 +1,106 @@ +"use strict"; + +var clear = require("es5-ext/array/#/clear") + , assign = require("es5-ext/object/assign") + , callable = require("es5-ext/object/valid-callable") + , value = require("es5-ext/object/valid-value") + , d = require("d") + , autoBind = require("d/auto-bind") + , Symbol = require("es6-symbol"); + +var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); + defineProperties(this, { + __list__: d("w", value(list)), + __context__: d("w", context), + __nextIndex__: d("w", 0) + }); + if (!context) return; + callable(context.on); + context.on("_add", this._onAdd); + context.on("_delete", this._onDelete); + context.on("_clear", this._onClear); +}; + +// Internal %IteratorPrototype% doesn't expose its constructor +delete Iterator.prototype.constructor; + +defineProperties( + Iterator.prototype, + assign( + { + _next: d(function () { + var i; + if (!this.__list__) return undefined; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + next: d(function () { + return this._createResult(this._next()); + }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { + return this.__list__[i]; + }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off("_add", this._onAdd); + this.__context__.off("_delete", this._onDelete); + this.__context__.off("_clear", this._onClear); + this.__context__ = null; + }), + toString: d(function () { + return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; + }) + }, + autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, "__redo__", d("c", [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, j) { + if (redo > index) this.__redo__[j] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) + }) + ) +); + +defineProperty( + Iterator.prototype, + Symbol.iterator, + d(function () { + return this; + }) +); diff --git a/node_modules/es6-iterator/is-iterable.js b/node_modules/es6-iterator/is-iterable.js new file mode 100644 index 0000000..cda7dfe --- /dev/null +++ b/node_modules/es6-iterator/is-iterable.js @@ -0,0 +1,16 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isValue = require("es5-ext/object/is-value") + , isString = require("es5-ext/string/is-string"); + +var iteratorSymbol = require("es6-symbol").iterator + , isArray = Array.isArray; + +module.exports = function (value) { + if (!isValue(value)) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + if (isArguments(value)) return true; + return typeof value[iteratorSymbol] === "function"; +}; diff --git a/node_modules/es6-iterator/package.json b/node_modules/es6-iterator/package.json new file mode 100644 index 0000000..bc2582a --- /dev/null +++ b/node_modules/es6-iterator/package.json @@ -0,0 +1,41 @@ +{ + "name": "es6-iterator", + "version": "2.0.3", + "description": "Iterator abstraction based on ES6 specification", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "iterator", + "array", + "list", + "set", + "map", + "generator" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-iterator.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + }, + "devDependencies": { + "eslint": "^4.9", + "eslint-config-medikoo-es5": "^1.4.4", + "event-emitter": "^0.3.5", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/es6-iterator/string.js b/node_modules/es6-iterator/string.js new file mode 100644 index 0000000..4888225 --- /dev/null +++ b/node_modules/es6-iterator/string.js @@ -0,0 +1,39 @@ +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); + str = String(str); + Iterator.call(this, str); + defineProperty(this, "__length__", d("", str.length)); +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete StringIterator.prototype.constructor; + +StringIterator.prototype = Object.create(Iterator.prototype, { + _next: d(function () { + if (!this.__list__) return undefined; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; + return char; + }) +}); +defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); diff --git a/node_modules/es6-iterator/test/#/chain.js b/node_modules/es6-iterator/test/#/chain.js new file mode 100644 index 0000000..457356f --- /dev/null +++ b/node_modules/es6-iterator/test/#/chain.js @@ -0,0 +1,23 @@ +"use strict"; + +var Iterator = require("../../"); + +module.exports = function (t, a) { + var i1 = new Iterator(["raz", "dwa", "trzy"]) + , i2 = new Iterator(["cztery", "pięć", "sześć"]) + , i3 = new Iterator(["siedem", "osiem", "dziewięć"]) + + , iterator = t.call(i1, i2, i3); + + a.deep(iterator.next(), { done: false, value: "raz" }, "#1"); + a.deep(iterator.next(), { done: false, value: "dwa" }, "#2"); + a.deep(iterator.next(), { done: false, value: "trzy" }, "#3"); + a.deep(iterator.next(), { done: false, value: "cztery" }, "#4"); + a.deep(iterator.next(), { done: false, value: "pięć" }, "#5"); + a.deep(iterator.next(), { done: false, value: "sześć" }, "#6"); + a.deep(iterator.next(), { done: false, value: "siedem" }, "#7"); + a.deep(iterator.next(), { done: false, value: "osiem" }, "#8"); + a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); +}; diff --git a/node_modules/es6-iterator/test/.eslintrc.json b/node_modules/es6-iterator/test/.eslintrc.json new file mode 100644 index 0000000..99f0b65 --- /dev/null +++ b/node_modules/es6-iterator/test/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "id-length": "off" + } +} diff --git a/node_modules/es6-iterator/test/array.js b/node_modules/es6-iterator/test/array.js new file mode 100644 index 0000000..447dfa7 --- /dev/null +++ b/node_modules/es6-iterator/test/array.js @@ -0,0 +1,67 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: "dwa" }, "Insert"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys & Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key+value"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1"); + a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert"); + a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3"); + a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 0 }, "#1"); + a.deep(it.next(), { done: false, value: 1 }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: 2 }, "Insert"); + a.deep(it.next(), { done: false, value: 3 }, "#3"); + a.deep(it.next(), { done: false, value: 4 }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 5 }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Sparse": function (a) { + var x = new Array(6), it; + + x[2] = "raz"; + x[4] = "dwa"; + it = new T(x); + a.deep(it.next(), { done: false, value: undefined }, "#1"); + a.deep(it.next(), { done: false, value: undefined }, "#2"); + a.deep(it.next(), { done: false, value: "raz" }, "#3"); + a.deep(it.next(), { done: false, value: undefined }, "#4"); + a.deep(it.next(), { done: false, value: "dwa" }, "#5"); + a.deep(it.next(), { done: false, value: undefined }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/for-of.js b/node_modules/es6-iterator/test/for-of.js new file mode 100644 index 0000000..9b47e97 --- /dev/null +++ b/node_modules/es6-iterator/test/for-of.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("../array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + + t(x = ["raz", "dwa", "trzy"], function (value, doBreak) { + ++called; + return doBreak(); + }); + a(called, 1, "Break"); +}; diff --git a/node_modules/es6-iterator/test/get.js b/node_modules/es6-iterator/test/get.js new file mode 100644 index 0000000..c5947d3 --- /dev/null +++ b/node_modules/es6-iterator/test/get.js @@ -0,0 +1,27 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a.throws(function () { + t(); +}, TypeError, "Null"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator) instanceof Iterator, true, "Iterator"); + a(String(t([])), "[object Array Iterator]", " Array"); + a(String(t(function () { + return arguments; +}())), "[object Array Iterator]", " Arguments"); + a(String(t("foo")), "[object String Iterator]", "String"); +}; diff --git a/node_modules/es6-iterator/test/index.js b/node_modules/es6-iterator/test/index.js new file mode 100644 index 0000000..4898218 --- /dev/null +++ b/node_modules/es6-iterator/test/index.js @@ -0,0 +1,99 @@ +"use strict"; + +var ee = require("event-emitter") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], it, y, z; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + y = it.next(); + a.deep(y, { done: false, value: "raz" }, "#1"); + z = it.next(); + a.not(y, z, "Recreate result"); + a.deep(z, { done: false, value: "dwa" }, "#2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(y = it.next(), { done: true, value: undefined }, "End"); + a.not(y, it.next(), "Recreate result on dead"); + }, + "Emited": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + y.emit("_add", x.push("sześć") - 1); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #1": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + x.push("foo"); + x.push("bar"); + a.deep(it.next(), { done: false, value: "foo" }, "#3"); + a.deep(it.next(), { done: false, value: "bar" }, "#4"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/is-iterable.js b/node_modules/es6-iterator/test/is-iterable.js new file mode 100644 index 0000000..5787351 --- /dev/null +++ b/node_modules/es6-iterator/test/is-iterable.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a(t(), false, "Undefined"); + a(t(123), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 0 }), false, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator), true, "Iterator"); + a(t([]), true, "Array"); + a(t("foo"), true, "String"); + a(t(""), true, "Empty string"); + a(t(function () { + return arguments; +}()), true, "Arguments"); +}; diff --git a/node_modules/es6-iterator/test/string.js b/node_modules/es6-iterator/test/string.js new file mode 100644 index 0000000..3f2a5b6 --- /dev/null +++ b/node_modules/es6-iterator/test/string.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T, a) { + var it = new T("foobar"); + + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "f" }, "#1"); + a.deep(it.next(), { done: false, value: "o" }, "#2"); + a.deep(it.next(), { done: false, value: "o" }, "#3"); + a.deep(it.next(), { done: false, value: "b" }, "#4"); + a.deep(it.next(), { done: false, value: "a" }, "#5"); + a.deep(it.next(), { done: false, value: "r" }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + + a.h1("Outside of BMP"); + it = new T("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/node_modules/es6-iterator/test/valid-iterable.js b/node_modules/es6-iterator/test/valid-iterable.js new file mode 100644 index 0000000..b8b2a8a --- /dev/null +++ b/node_modules/es6-iterator/test/valid-iterable.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var obj; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + obj = {}; + obj[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(obj), obj, "Iterator"); + obj = []; + a(t(obj), obj, "Array"); + obj = (function () { + return arguments; +}()); + a(t(obj), obj, "Arguments"); +}; diff --git a/node_modules/es6-iterator/valid-iterable.js b/node_modules/es6-iterator/valid-iterable.js new file mode 100644 index 0000000..8c6e071 --- /dev/null +++ b/node_modules/es6-iterator/valid-iterable.js @@ -0,0 +1,8 @@ +"use strict"; + +var isIterable = require("./is-iterable"); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; diff --git a/node_modules/es6-symbol/.editorconfig b/node_modules/es6-symbol/.editorconfig new file mode 100755 index 0000000..bd6d81e --- /dev/null +++ b/node_modules/es6-symbol/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[*.md] +indent_size = 2 +indent_style = space +trim_trailing_whitespace = false diff --git a/node_modules/es6-symbol/.github/FUNDING.yml b/node_modules/es6-symbol/.github/FUNDING.yml new file mode 100644 index 0000000..81c96d7 --- /dev/null +++ b/node_modules/es6-symbol/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/es6-symbol" diff --git a/node_modules/es6-symbol/.testignore b/node_modules/es6-symbol/.testignore new file mode 100644 index 0000000..b5b5cd1 --- /dev/null +++ b/node_modules/es6-symbol/.testignore @@ -0,0 +1 @@ +/lib/private diff --git a/node_modules/es6-symbol/CHANGELOG.md b/node_modules/es6-symbol/CHANGELOG.md new file mode 100644 index 0000000..60cf2b7 --- /dev/null +++ b/node_modules/es6-symbol/CHANGELOG.md @@ -0,0 +1,16 @@ +# 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. + +### [3.1.3](https://github.com/medikoo/es6-symbol/compare/v3.1.2...v3.1.3) (2019-10-29) + +### [3.1.2](https://github.com/medikoo/es6-symbol/compare/v3.1.1...v3.1.2) (2019-09-04) + +- Access `Symbol` from a global object. Makes implementation more bulletproof, as it's safe against shadowing the `Symbol` variable e.g. in script scope, or as it's practiced by some bundlers as Webpack (thanks [@cyborgx37](https://github.com/medikoo/es6-symbol/pull/30)) +- Switch license from MIT to ISC +- Switch linter to ESLint +- Configure Prettier + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es6-symbol/CHANGES b/node_modules/es6-symbol/CHANGES new file mode 100644 index 0000000..ef0cbda --- /dev/null +++ b/node_modules/es6-symbol/CHANGES @@ -0,0 +1,61 @@ +For recent changelog see CHANGELOG.md + +----- + +v3.1.1 -- 2017.03.15 +* Improve documentation +* Improve error messages +* Update dependencies + +v3.1.0 -- 2016.06.03 +* Fix internals of symbol detection +* Ensure Symbol.prototype[Symbol.toPrimitive] in all cases returns primitive value + (fixes Node v6 support) +* Create native symbols whenver possible + +v3.0.2 -- 2015.12.12 +* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of + polyfill. See #13 + +v3.0.1 -- 2015.10.22 +* Workaround for IE11 bug (reported in #12) + +v3.0.0 -- 2015.10.02 +* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available + Otherwise polyfill symbols may not be recognized by other functions +* Improve documentation + +v2.0.1 -- 2015.01.28 +* Fix Symbol.prototype[Symbol.isPrimitive] implementation +* Improve validation within Symbol.prototype.toString and + Symbol.prototype.valueOf + +v2.0.0 -- 2015.01.28 +* Update up to changes in specification: + * Implement `for` and `keyFor` + * Remove `Symbol.create` and `Symbol.isRegExp` + * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and + `Symbol.split` +* Rename `validSymbol` to `validateSymbol` +* Improve documentation +* Remove dead test modules + +v1.0.0 -- 2015.01.26 +* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) +* Introduce initialization via hidden constructor +* Fix isSymbol handling of polyfill values when native Symbol is present +* Fix spelling of LICENSE +* Configure lint scripts + +v0.1.1 -- 2014.10.07 +* Fix isImplemented, so it returns true in case of polyfill +* Improve documentations + +v0.1.0 -- 2014.04.28 +* Assure strictly npm dependencies +* Update to use latest versions of dependencies +* Fix implementation detection so it doesn't crash on `String(symbol)` +* throw on `new Symbol()` (as decided by TC39) + +v0.0.0 -- 2013.11.15 +* Initial (dev) version diff --git a/node_modules/es6-symbol/LICENSE b/node_modules/es6-symbol/LICENSE new file mode 100644 index 0000000..44745e2 --- /dev/null +++ b/node_modules/es6-symbol/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2019, 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/node_modules/es6-symbol/README.md b/node_modules/es6-symbol/README.md new file mode 100644 index 0000000..d247122 --- /dev/null +++ b/node_modules/es6-symbol/README.md @@ -0,0 +1,104 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es6-symbol + +## ECMAScript 6 Symbol polyfill + +For more information about symbols see following links + +- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) +- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) +- [Specification](https://tc39.github.io/ecma262/#sec-symbol-objects) + +### Limitations + +Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. + +### Usage + +If you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use _es6-symbol_ as following: + +```javascript +var Symbol = require("es6-symbol"); +``` + +If you want to make sure your environment implements `Symbol` globally, do: + +```javascript +require("es6-symbol/implement"); +``` + +If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: + +```javascript +var Symbol = require("es6-symbol/polyfill"); +``` + +#### API + +Best is to refer to [specification](https://tc39.github.io/ecma262/#sec-symbol-objects). Still if you want quick look, follow examples: + +```javascript +var Symbol = require("es6-symbol"); + +var symbol = Symbol("My custom symbol"); +var x = {}; + +x[symbol] = "foo"; +console.log(x[symbol]); +("foo"); + +// Detect iterable: +var iterator, result; +if (possiblyIterable[Symbol.iterator]) { + iterator = possiblyIterable[Symbol.iterator](); + result = iterator.next(); + while (!result.done) { + console.log(result.value); + result = iterator.next(); + } +} +``` + +### Installation + +#### NPM + +In your project path: + + $ npm install es6-symbol + +##### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests + + $ npm test + +## 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. + +--- + +
+ + Get professional support for d with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-symbol/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-symbol +[win-build-image]: https://ci.appveyor.com/api/projects/status/1s743lt3el278anj?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-symbol +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es6-symbol.svg +[npm-url]: https://www.npmjs.com/package/es6-symbol diff --git a/node_modules/es6-symbol/implement.js b/node_modules/es6-symbol/implement.js new file mode 100644 index 0000000..d62803b --- /dev/null +++ b/node_modules/es6-symbol/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(require("ext/global-this"), "Symbol", { + value: require("./polyfill"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es6-symbol/index.js b/node_modules/es6-symbol/index.js new file mode 100644 index 0000000..fcd8a63 --- /dev/null +++ b/node_modules/es6-symbol/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? require("ext/global-this").Symbol + : require("./polyfill"); diff --git a/node_modules/es6-symbol/is-implemented.js b/node_modules/es6-symbol/is-implemented.js new file mode 100644 index 0000000..b85ec69 --- /dev/null +++ b/node_modules/es6-symbol/is-implemented.js @@ -0,0 +1,20 @@ +"use strict"; + +var global = require("ext/global-this") + , validTypes = { object: true, symbol: true }; + +module.exports = function () { + var Symbol = global.Symbol; + var symbol; + if (typeof Symbol !== "function") return false; + symbol = Symbol("test symbol"); + try { String(symbol); } + catch (e) { return false; } + + // Return 'true' also for polyfills + if (!validTypes[typeof Symbol.iterator]) return false; + if (!validTypes[typeof Symbol.toPrimitive]) return false; + if (!validTypes[typeof Symbol.toStringTag]) return false; + + return true; +}; diff --git a/node_modules/es6-symbol/is-native-implemented.js b/node_modules/es6-symbol/is-native-implemented.js new file mode 100644 index 0000000..254774a --- /dev/null +++ b/node_modules/es6-symbol/is-native-implemented.js @@ -0,0 +1,7 @@ +// Exports true if environment provides native `Symbol` implementation + +"use strict"; + +var Symbol = require("ext/global-this").Symbol; + +module.exports = typeof Symbol === "function" && typeof Symbol() === "symbol"; diff --git a/node_modules/es6-symbol/is-symbol.js b/node_modules/es6-symbol/is-symbol.js new file mode 100644 index 0000000..66edd46 --- /dev/null +++ b/node_modules/es6-symbol/is-symbol.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (value) { + if (!value) return false; + if (typeof value === "symbol") return true; + if (!value.constructor) return false; + if (value.constructor.name !== "Symbol") return false; + return value[value.constructor.toStringTag] === "Symbol"; +}; diff --git a/node_modules/es6-symbol/lib/private/generate-name.js b/node_modules/es6-symbol/lib/private/generate-name.js new file mode 100644 index 0000000..0c16778 --- /dev/null +++ b/node_modules/es6-symbol/lib/private/generate-name.js @@ -0,0 +1,29 @@ +"use strict"; + +var d = require("d"); + +var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype; + +var created = create(null); +module.exports = function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || "")]) ++postfix; + desc += postfix || ""; + created[desc] = true; + name = "@@" + desc; + defineProperty( + objPrototype, + name, + d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + }) + ); + return name; +}; diff --git a/node_modules/es6-symbol/lib/private/setup/standard-symbols.js b/node_modules/es6-symbol/lib/private/setup/standard-symbols.js new file mode 100644 index 0000000..b25b171 --- /dev/null +++ b/node_modules/es6-symbol/lib/private/setup/standard-symbols.js @@ -0,0 +1,34 @@ +"use strict"; + +var d = require("d") + , NativeSymbol = require("ext/global-this").Symbol; + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + // To ensure proper interoperability with other native functions (e.g. Array.from) + // fallback to eventual native implementation of given symbol + hasInstance: d( + "", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill("hasInstance") + ), + isConcatSpreadable: d( + "", + (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill("isConcatSpreadable") + ), + iterator: d("", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill("iterator")), + match: d("", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill("match")), + replace: d("", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill("replace")), + search: d("", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill("search")), + species: d("", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill("species")), + split: d("", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill("split")), + toPrimitive: d( + "", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill("toPrimitive") + ), + toStringTag: d( + "", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill("toStringTag") + ), + unscopables: d( + "", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill("unscopables") + ) + }); +}; diff --git a/node_modules/es6-symbol/lib/private/setup/symbol-registry.js b/node_modules/es6-symbol/lib/private/setup/symbol-registry.js new file mode 100644 index 0000000..29d198f --- /dev/null +++ b/node_modules/es6-symbol/lib/private/setup/symbol-registry.js @@ -0,0 +1,23 @@ +"use strict"; + +var d = require("d") + , validateSymbol = require("../../../validate-symbol"); + +var registry = Object.create(null); + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (registry[key]) return registry[key]; + return (registry[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (symbol) { + var key; + validateSymbol(symbol); + for (key in registry) { + if (registry[key] === symbol) return key; + } + return undefined; + }) + }); +}; diff --git a/node_modules/es6-symbol/package.json b/node_modules/es6-symbol/package.json new file mode 100644 index 0000000..99739ca --- /dev/null +++ b/node_modules/es6-symbol/package.json @@ -0,0 +1,103 @@ +{ + "name": "es6-symbol", + "version": "3.1.3", + "description": "ECMAScript 6 Symbol polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "symbol", + "private", + "property", + "es6", + "ecmascript", + "harmony", + "ponyfill", + "polyfill" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-symbol.git" + }, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + }, + "devDependencies": { + "eslint": "^6.6.0", + "eslint-config-medikoo": "^2.6.0", + "git-list-updated": "^1.2.1", + "husky": "^3.0.9", + "lint-staged": "^9.4.2", + "prettier-elastic": "^1.18.2", + "tad": "^3.0.1" + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true, + "rules": { + "new-cap": [ + "error", + { + "capIsNewExceptions": [ + "NativeSymbol", + "SymbolPolyfill" + ] + } + ] + }, + "overrides": [ + { + "files": [ + "polyfill.js" + ], + "rules": { + "func-names": "off" + } + }, + { + "files": [ + "test/*.js" + ], + "globals": { + "Symbol": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint:updated": "pipe-git-updated --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 --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 --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", + "test": "tad" + }, + "license": "ISC" +} diff --git a/node_modules/es6-symbol/polyfill.js b/node_modules/es6-symbol/polyfill.js new file mode 100644 index 0000000..2dcc32b --- /dev/null +++ b/node_modules/es6-symbol/polyfill.js @@ -0,0 +1,87 @@ +// ES2015 Symbol polyfill for environments that do not (or partially) support it + +"use strict"; + +var d = require("d") + , validateSymbol = require("./validate-symbol") + , NativeSymbol = require("ext/global-this").Symbol + , generateName = require("./lib/private/generate-name") + , setupStandardSymbols = require("./lib/private/setup/standard-symbols") + , setupSymbolRegistry = require("./lib/private/setup/symbol-registry"); + +var create = Object.create + , defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty; + +var SymbolPolyfill, HiddenSymbol, isNativeSafe; + +if (typeof NativeSymbol === "function") { + try { + String(NativeSymbol()); + isNativeSafe = true; + } catch (ignore) {} +} else { + NativeSymbol = null; +} + +// Internal constructor (not one exposed) for creating Symbol instances. +// This one is used to ensure that `someSymbol instanceof Symbol` always return false +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor"); + return SymbolPolyfill(description); +}; + +// Exposed `Symbol` constructor +// (returns instances of HiddenSymbol) +module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError("Symbol is not a constructor"); + if (isNativeSafe) return NativeSymbol(description); + symbol = create(HiddenSymbol.prototype); + description = description === undefined ? "" : String(description); + return defineProperties(symbol, { + __description__: d("", description), + __name__: d("", generateName(description)) + }); +}; + +setupStandardSymbols(SymbolPolyfill); +setupSymbolRegistry(SymbolPolyfill); + +// Internal tweaks for real symbol producer +defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d("", function () { return this.__name__; }) +}); + +// Proper implementation of methods exposed on Symbol.prototype +// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype +defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return "Symbol (" + validateSymbol(this).__description__ + ")"; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty( + SymbolPolyfill.prototype, + SymbolPolyfill.toPrimitive, + d("", function () { + var symbol = validateSymbol(this); + if (typeof symbol === "symbol") return symbol; + return symbol.toString(); + }) +); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")); + +// Proper implementaton of toPrimitive and toStringTag for returned symbol instances +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]) +); + +// Note: It's important to define `toPrimitive` as last one, as some implementations +// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) +// And that may invoke error in definition flow: +// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]) +); diff --git a/node_modules/es6-symbol/test/implement.js b/node_modules/es6-symbol/test/implement.js new file mode 100644 index 0000000..a661192 --- /dev/null +++ b/node_modules/es6-symbol/test/implement.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(typeof Symbol, "function"); }; diff --git a/node_modules/es6-symbol/test/index.js b/node_modules/es6-symbol/test/index.js new file mode 100644 index 0000000..99b1b60 --- /dev/null +++ b/node_modules/es6-symbol/test/index.js @@ -0,0 +1,11 @@ +"use strict"; + +var d = require("d") + , defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var symbol = t("test"), obj = {}; + defineProperty(obj, symbol, d("foo")); + a(obj.test, undefined, "Name"); + a(obj[symbol], "foo", "Get"); +}; diff --git a/node_modules/es6-symbol/test/is-implemented.js b/node_modules/es6-symbol/test/is-implemented.js new file mode 100644 index 0000000..72b0682 --- /dev/null +++ b/node_modules/es6-symbol/test/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +var global = require("ext/global-this") + , polyfill = require("../polyfill"); + +module.exports = function (t, a) { + var cache; + a(typeof t(), "boolean"); + cache = global.Symbol; + global.Symbol = polyfill; + a(t(), true); + if (cache === undefined) delete global.Symbol; + else global.Symbol = cache; +}; diff --git a/node_modules/es6-symbol/test/is-native-implemented.js b/node_modules/es6-symbol/test/is-native-implemented.js new file mode 100644 index 0000000..124e59d --- /dev/null +++ b/node_modules/es6-symbol/test/is-native-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(typeof t, "boolean"); }; diff --git a/node_modules/es6-symbol/test/is-symbol.js b/node_modules/es6-symbol/test/is-symbol.js new file mode 100644 index 0000000..068e578 --- /dev/null +++ b/node_modules/es6-symbol/test/is-symbol.js @@ -0,0 +1,16 @@ +"use strict"; + +var SymbolPolyfill = require("../polyfill"); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t("raz"), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof Symbol !== "undefined") { + a(t(Symbol("foo")), true, "Native"); + } + a(t(SymbolPolyfill()), true, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/test/polyfill.js b/node_modules/es6-symbol/test/polyfill.js new file mode 100644 index 0000000..3ae523e --- /dev/null +++ b/node_modules/es6-symbol/test/polyfill.js @@ -0,0 +1,32 @@ +"use strict"; + +var d = require("d") + , isSymbol = require("../is-symbol") + , defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var symbol = t("test"), obj = {}; + defineProperty(obj, symbol, d("foo")); + a(obj.test, undefined, "Name"); + a(obj[symbol], "foo", "Get"); + a(obj instanceof t, false); + + a(isSymbol(symbol), true, "Symbol"); + a(isSymbol(t.iterator), true, "iterator"); + a(isSymbol(t.toStringTag), true, "toStringTag"); + + obj = {}; + obj[symbol] = "foo"; + if (typeof symbol !== "symbol") { + a.deep(Object.getOwnPropertyDescriptor(obj, symbol), { + configurable: true, + enumerable: false, + value: "foo", + writable: true + }); + } + symbol = t.for("marko"); + a(isSymbol(symbol), true); + a(t.for("marko"), symbol); + a(t.keyFor(symbol), "marko"); +}; diff --git a/node_modules/es6-symbol/test/validate-symbol.js b/node_modules/es6-symbol/test/validate-symbol.js new file mode 100644 index 0000000..0a2e298 --- /dev/null +++ b/node_modules/es6-symbol/test/validate-symbol.js @@ -0,0 +1,19 @@ +"use strict"; + +var SymbolPolyfill = require("../polyfill"); + +module.exports = function (t, a) { + var symbol; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t("raz"); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof Symbol !== "undefined") { + symbol = Symbol("foo"); + a(t(symbol), symbol, "Native"); + } + symbol = SymbolPolyfill(); + a(t(symbol), symbol, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/validate-symbol.js b/node_modules/es6-symbol/validate-symbol.js new file mode 100644 index 0000000..bac6f54 --- /dev/null +++ b/node_modules/es6-symbol/validate-symbol.js @@ -0,0 +1,8 @@ +"use strict"; + +var isSymbol = require("./is-symbol"); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; diff --git a/node_modules/es6-weak-map/.editorconfig b/node_modules/es6-weak-map/.editorconfig new file mode 100644 index 0000000..e1848c6 --- /dev/null +++ b/node_modules/es6-weak-map/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/node_modules/es6-weak-map/CHANGELOG.md b/node_modules/es6-weak-map/CHANGELOG.md new file mode 100644 index 0000000..1f66f2b --- /dev/null +++ b/node_modules/es6-weak-map/CHANGELOG.md @@ -0,0 +1,5 @@ +# 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.0.3](https://github.com/medikoo/es6-weak-map/compare/v2.0.2...v2.0.3) (2019-06-07) diff --git a/node_modules/es6-weak-map/CHANGES b/node_modules/es6-weak-map/CHANGES new file mode 100644 index 0000000..7772891 --- /dev/null +++ b/node_modules/es6-weak-map/CHANGES @@ -0,0 +1,45 @@ +v2.0.2 -- 2017.03.15 +* Update dependencies + +v2.0.1 -- 2015.10.02 +* Update to use es6-symbol at v3 + +v2.0.0 -- 2015.09.04 +* Relax native implementation detection, stringification of instance should returm + expected result (not necesarily prototype) + +v1.0.2 -- 2015.05.07 +* Add "ponyfill" keyword to meta description. Fixes #7 + +v1.0.1 -- 2015.04.14 +* Fix isNativeImplemented, so it's not affected by #3619 V8 bug +* Fix internal prototype resolution, in case where isNativeImplemented was true, and + native implementation was shadowed it got into stack overflow + +v1.0.0 -- 2015.04.13 +* It's v0.1.3 republished as v1.0.0 + +v0.1.4 -- 2015.04.13 +* Republish v0.1.2 as v0.1.4 due to breaking changes + (v0.1.3 should have been published as next major) + +v0.1.3 -- 2015.04.12 +* Update up to changes in specification (require new, remove clear method) +* Improve native implementation validation +* Configure lint scripts +* Rename LICENCE to LICENSE + +v0.1.2 -- 2014.09.01 +* Use internal random and unique id generator instead of external (time-uuid based). + Global uniqueness is not needed in scope of this module. Fixes #1 + +v0.1.1 -- 2014.05.15 +* Improve valid WeakMap detection + +v0.1.0 -- 2014.04.29 +* Assure to depend only npm hosted dependencies +* Update to use latest versions of dependencies +* Use ES6 symbols internally + +v0.0.0 -- 2013.10.24 +Initial (dev version) diff --git a/node_modules/es6-weak-map/LICENSE b/node_modules/es6-weak-map/LICENSE new file mode 100644 index 0000000..923b7f6 --- /dev/null +++ b/node_modules/es6-weak-map/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2018, 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/node_modules/es6-weak-map/README.md b/node_modules/es6-weak-map/README.md new file mode 100644 index 0000000..2c9c375 --- /dev/null +++ b/node_modules/es6-weak-map/README.md @@ -0,0 +1,78 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es6-weak-map + +## WeakMap collection as specified in ECMAScript6 + +_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_. + +Differences are: + +- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks) +- Well modularized CJS style +- Based on one solution. + +### Limitations + +- Will fail on non extensible objects provided as keys + +### Installation + + $ npm install es6-weak-map + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +If you want to make sure your environment implements `WeakMap`, do: + +```javascript +require("es6-weak-map/implement"); +``` + +If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do: + +```javascript +var WeakMap = require("es6-weak-map"); +``` + +If you strictly want to use polyfill even if native `WeakMap` exists, do: + +```javascript +var WeakMap = require("es6-weak-map/polyfill"); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example: + +```javascript +var WeakMap = require("es6-weak-map"); + +var map = new WeakMap(); +var obj = {}; + +map.set(obj, "foo"); // map +map.get(obj); // 'foo' +map.has(obj); // true +map.delete(obj); // true +map.get(obj); // undefined +map.has(obj); // false +map.set(obj, "bar"); // map +map.has(obj); // false +``` + +## Tests + + $ npm test + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-weak-map/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-weak-map +[win-build-image]: https://ci.appveyor.com/api/projects/status/1c73c57pg4s6lwmu?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-weak-map +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es6-weak-map.svg +[npm-url]: https://www.npmjs.com/package/es6-weak-map diff --git a/node_modules/es6-weak-map/implement.js b/node_modules/es6-weak-map/implement.js new file mode 100644 index 0000000..1bca669 --- /dev/null +++ b/node_modules/es6-weak-map/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(require("es5-ext/global"), "WeakMap", + { + value: require("./polyfill"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es6-weak-map/index.js b/node_modules/es6-weak-map/index.js new file mode 100644 index 0000000..c1a0c6b --- /dev/null +++ b/node_modules/es6-weak-map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? WeakMap : require("./polyfill"); diff --git a/node_modules/es6-weak-map/is-implemented.js b/node_modules/es6-weak-map/is-implemented.js new file mode 100644 index 0000000..cf03fd8 --- /dev/null +++ b/node_modules/es6-weak-map/is-implemented.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = function () { + var weakMap, obj; + + if (typeof WeakMap !== "function") return false; + try { + // WebKit doesn't support arguments and crashes + weakMap = new WeakMap([[obj = {}, "one"], [{}, "two"], [{}, "three"]]); + } catch (e) { + return false; + } + if (String(weakMap) !== "[object WeakMap]") return false; + if (typeof weakMap.set !== "function") return false; + if (weakMap.set({}, 1) !== weakMap) return false; + if (typeof weakMap.delete !== "function") return false; + if (typeof weakMap.has !== "function") return false; + if (weakMap.get(obj) !== "one") return false; + + return true; +}; diff --git a/node_modules/es6-weak-map/is-native-implemented.js b/node_modules/es6-weak-map/is-native-implemented.js new file mode 100644 index 0000000..372e929 --- /dev/null +++ b/node_modules/es6-weak-map/is-native-implemented.js @@ -0,0 +1,8 @@ +// Exports true if environment provides native `WeakMap` implementation, whatever that is. + +"use strict"; + +module.exports = (function () { + if (typeof WeakMap !== "function") return false; + return Object.prototype.toString.call(new WeakMap()) === "[object WeakMap]"; +}()); diff --git a/node_modules/es6-weak-map/is-weak-map.js b/node_modules/es6-weak-map/is-weak-map.js new file mode 100644 index 0000000..007408f --- /dev/null +++ b/node_modules/es6-weak-map/is-weak-map.js @@ -0,0 +1,13 @@ +"use strict"; + +var toStringTagSymbol = require("es6-symbol").toStringTag + + , objToString = Object.prototype.toString + , id = "[object WeakMap]" + , Global = typeof WeakMap === "undefined" ? null : WeakMap; + +module.exports = function (value) { + return (value && ((Global && (value instanceof Global)) || + (objToString.call(value) === id) || (value[toStringTagSymbol] === "WeakMap"))) || + false; +}; diff --git a/node_modules/es6-weak-map/package.json b/node_modules/es6-weak-map/package.json new file mode 100644 index 0000000..d88bf37 --- /dev/null +++ b/node_modules/es6-weak-map/package.json @@ -0,0 +1,44 @@ +{ + "name": "es6-weak-map", + "version": "2.0.3", + "description": "ECMAScript6 WeakMap polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "map", + "weakmap", + "collection", + "es6", + "harmony", + "list", + "hash", + "gc", + "ponyfill" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-weak-map.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + }, + "devDependencies": { + "eslint": "^5.5", + "eslint-config-medikoo-es5": "^1.7", + "tad": "^0.2.8" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "globals": { + "WeakMap": true + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/es6-weak-map/polyfill.js b/node_modules/es6-weak-map/polyfill.js new file mode 100644 index 0000000..95e7390 --- /dev/null +++ b/node_modules/es6-weak-map/polyfill.js @@ -0,0 +1,65 @@ +"use strict"; + +var isValue = require("es5-ext/object/is-value") + , setPrototypeOf = require("es5-ext/object/set-prototype-of") + , object = require("es5-ext/object/valid-object") + , ensureValue = require("es5-ext/object/valid-value") + , randomUniq = require("es5-ext/string/random-uniq") + , d = require("d") + , getIterator = require("es6-iterator/get") + , forOf = require("es6-iterator/for-of") + , toStringTagSymbol = require("es6-symbol").toStringTag + , isNative = require("./is-native-implemented") + + , isArray = Array.isArray, defineProperty = Object.defineProperty + , objHasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf + , WeakMapPoly; + +module.exports = WeakMapPoly = function (/* Iterable*/) { + var iterable = arguments[0], self; + + if (!(this instanceof WeakMapPoly)) throw new TypeError("Constructor requires 'new'"); + self = isNative && setPrototypeOf && (WeakMap !== WeakMapPoly) + ? setPrototypeOf(new WeakMap(), getPrototypeOf(this)) : this; + + if (isValue(iterable)) { + if (!isArray(iterable)) iterable = getIterator(iterable); + } + defineProperty(self, "__weakMapData__", d("c", "$weakMap$" + randomUniq())); + if (!iterable) return self; + forOf(iterable, function (val) { + ensureValue(val); + self.set(val[0], val[1]); + }); + return self; +}; + +if (isNative) { + if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap); + WeakMapPoly.prototype = Object.create(WeakMap.prototype, { constructor: d(WeakMapPoly) }); +} + +Object.defineProperties(WeakMapPoly.prototype, { + delete: d(function (key) { + if (objHasOwnProperty.call(object(key), this.__weakMapData__)) { + delete key[this.__weakMapData__]; + return true; + } + return false; + }), + get: d(function (key) { + if (!objHasOwnProperty.call(object(key), this.__weakMapData__)) return undefined; + return key[this.__weakMapData__]; + }), + has: d(function (key) { + return objHasOwnProperty.call(object(key), this.__weakMapData__); + }), + set: d(function (key, value) { + defineProperty(object(key), this.__weakMapData__, d("c", value)); + return this; + }), + toString: d(function () { + return "[object WeakMap]"; + }) +}); +defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d("c", "WeakMap")); diff --git a/node_modules/es6-weak-map/test/implement.js b/node_modules/es6-weak-map/test/implement.js new file mode 100644 index 0000000..e64af3e --- /dev/null +++ b/node_modules/es6-weak-map/test/implement.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof WeakMap, "function"); +}; diff --git a/node_modules/es6-weak-map/test/index.js b/node_modules/es6-weak-map/test/index.js new file mode 100644 index 0000000..418b514 --- /dev/null +++ b/node_modules/es6-weak-map/test/index.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (T, a) { + var obj = {}; + + a((new T([[obj, "foo"]])).get(obj), "foo"); +}; diff --git a/node_modules/es6-weak-map/test/is-implemented.js b/node_modules/es6-weak-map/test/is-implemented.js new file mode 100644 index 0000000..fa7f7b9 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +var globalObj = require("es5-ext/global") + , polyfill = require("../polyfill"); + +module.exports = function (t, a) { + var cache; + + a(typeof t(), "boolean"); + cache = globalObj.WeakMap; + globalObj.WeakMap = polyfill; + a(t(), true); + if (cache === undefined) delete globalObj.WeakMap; + else globalObj.WeakMap = cache; +}; diff --git a/node_modules/es6-weak-map/test/is-native-implemented.js b/node_modules/es6-weak-map/test/is-native-implemented.js new file mode 100644 index 0000000..8788186 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-native-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "boolean"); +}; diff --git a/node_modules/es6-weak-map/test/is-weak-map.js b/node_modules/es6-weak-map/test/is-weak-map.js new file mode 100644 index 0000000..e73c839 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-weak-map.js @@ -0,0 +1,16 @@ +"use strict"; + +var WeakMapPoly = require("../polyfill"); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t("raz"), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof WeakMap !== "undefined") { + a(t(new WeakMap()), true, "Native"); + } + a(t(new WeakMapPoly()), true, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/test/polyfill.js b/node_modules/es6-weak-map/test/polyfill.js new file mode 100644 index 0000000..9275b46 --- /dev/null +++ b/node_modules/es6-weak-map/test/polyfill.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = function (T, a) { + var obj1 = {}, obj2 = {}, obj3 = {}, arr = [[obj1, "raz"], [obj2, "dwa"]], map = new T(arr); + + a(map instanceof T, true, "WeakMap"); + a(map.has(obj1), true, "Has: true"); + a(map.get(obj1), "raz", "Get: contains"); + a(map.has(obj3), false, "Has: false"); + a(map.get(obj3), undefined, "Get: doesn't contain"); + a(map.set(obj3, "trzy"), map, "Set: return"); + a(map.has(obj3), true, "Add"); + a(map.delete({}), false, "Delete: false"); + + a(map.delete(obj1), true, "Delete: true"); + a(map.get(obj1), undefined, "Get: after delete"); + a(map.has(obj1), false, "Has: after delete"); + + a.h1("Empty initialization"); + map = new T(); + map.set(obj1, "bar"); + a(map.get(obj1), "bar"); +}; diff --git a/node_modules/es6-weak-map/test/valid-weak-map.js b/node_modules/es6-weak-map/test/valid-weak-map.js new file mode 100644 index 0000000..6e5da2c --- /dev/null +++ b/node_modules/es6-weak-map/test/valid-weak-map.js @@ -0,0 +1,32 @@ +"use strict"; + +var WeakMapPoly = require("../polyfill"); + +module.exports = function (t, a) { + var map; + + a.throws(function () { + t(undefined); + }, TypeError, "Undefined"); + a.throws(function () { + t(null); + }, TypeError, "Null"); + a.throws(function () { + t(true); + }, TypeError, "Primitive"); + a.throws(function () { + t("raz"); + }, TypeError, "String"); + a.throws(function () { + t({}); + }, TypeError, "Object"); + a.throws(function () { + t([]); + }, TypeError, "Array"); + if (typeof WeakMap !== "undefined") { + map = new WeakMap(); + a(t(map), map, "Native"); + } + map = new WeakMapPoly(); + a(t(map), map, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/valid-weak-map.js b/node_modules/es6-weak-map/valid-weak-map.js new file mode 100644 index 0000000..ad2f9f3 --- /dev/null +++ b/node_modules/es6-weak-map/valid-weak-map.js @@ -0,0 +1,8 @@ +"use strict"; + +var isWeakMap = require("./is-weak-map"); + +module.exports = function (value) { + if (!isWeakMap(value)) throw new TypeError(value + " is not a WeakMap"); + return value; +}; diff --git a/node_modules/expand-brackets/LICENSE b/node_modules/expand-brackets/LICENSE new file mode 100644 index 0000000..6525171 --- /dev/null +++ b/node_modules/expand-brackets/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/expand-brackets/README.md b/node_modules/expand-brackets/README.md new file mode 100644 index 0000000..c0e33d0 --- /dev/null +++ b/node_modules/expand-brackets/README.md @@ -0,0 +1,302 @@ +# expand-brackets [![NPM version](https://img.shields.io/npm/v/expand-brackets.svg?style=flat)](https://www.npmjs.com/package/expand-brackets) [![NPM monthly downloads](https://img.shields.io/npm/dm/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![NPM total downloads](https://img.shields.io/npm/dt/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-brackets.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-brackets) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/expand-brackets.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/expand-brackets) + +> Expand POSIX bracket expressions (character classes) in glob patterns. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save expand-brackets +``` + +## Usage + +```js +var brackets = require('expand-brackets'); +brackets(string[, options]); +``` + +**Params** + +The main export is a function that takes the following parameters: + +* `pattern` **{String}**: the pattern to convert +* `options` **{Object}**: optionally supply an options object +* `returns` **{String}**: returns a string that can be used to create a regex + +**Example** + +```js +console.log(brackets('[![:lower:]]')); +//=> '[^a-z]' +``` + +## API + +### [brackets](index.js#L29) + +Parses the given POSIX character class `pattern` and returns a +string that can be used for creating regular expressions for matching. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}** + +### [.match](index.js#L54) + +Takes an array of strings and a POSIX character class pattern, and returns a new array with only the strings that matched the pattern. + +**Example** + +```js +var brackets = require('expand-brackets'); +console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]')); +//=> ['a'] + +console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+')); +//=> ['a', 'ab'] +``` + +**Params** + +* `arr` **{Array}**: Array of strings to match +* `pattern` **{String}**: POSIX character class pattern(s) +* `options` **{Object}** +* `returns` **{Array}** + +### [.isMatch](index.js#L100) + +Returns true if the specified `string` matches the given brackets `pattern`. + +**Example** + +```js +var brackets = require('expand-brackets'); + +console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]')); +//=> true +console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]')); +//=> false +``` + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Poxis pattern +* `options` **{String}** +* `returns` **{Boolean}** + +### [.matcher](index.js#L123) + +Takes a POSIX character class pattern and returns a matcher function. The returned function takes the string to match as its only argument. + +**Example** + +```js +var brackets = require('expand-brackets'); +var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]'); + +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.A')); +//=> true +``` + +**Params** + +* `pattern` **{String}**: Poxis pattern +* `options` **{String}** +* `returns` **{Boolean}** + +### [.makeRe](index.js#L145) + +Create a regular expression from the given `pattern`. + +**Example** + +```js +var brackets = require('expand-brackets'); +var re = brackets.makeRe('[[:alpha:]]'); +console.log(re); +//=> /^(?:[a-zA-Z])$/ +``` + +**Params** + +* `pattern` **{String}**: The pattern to convert to regex. +* `options` **{Object}** +* `returns` **{RegExp}** + +### [.create](index.js#L187) + +Parses the given POSIX character class `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Example** + +```js +var brackets = require('expand-brackets'); +console.log(brackets('[[:alpha:]]')); +// { options: { source: 'string' }, +// input: '[[:alpha:]]', +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// not: [Function], +// escape: [Function], +// text: [Function], +// posix: [Function], +// bracket: [Function], +// 'bracket.open': [Function], +// 'bracket.inner': [Function], +// 'bracket.literal': [Function], +// 'bracket.close': [Function] }, +// output: '[a-zA-Z]', +// ast: +// { type: 'root', +// errors: [], +// nodes: [ [Object], [Object], [Object] ] }, +// parsingErrors: [] } +``` + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}** + +## Options + +### options.sourcemap + +Generate a source map for the given pattern. + +**Example** + +```js +var res = brackets('[:alpha:]', {sourcemap: true}); + +console.log(res.map); +// { version: 3, +// sources: [ 'brackets' ], +// names: [], +// mappings: 'AAAA,MAAS', +// sourcesContent: [ '[:alpha:]' ] } +``` + +### POSIX Character classes + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]`: Alphanumeric characters (`a-zA-Z0-9]`) +* `[:alpha:]`: Alphabetic characters (`a-zA-Z]`) +* `[:blank:]`: Space and tab (`[ t]`) +* `[:digit:]`: Digits (`[0-9]`) +* `[:lower:]`: Lowercase letters (`[a-z]`) +* `[:punct:]`: Punctuation and symbols. (`[!"#$%&'()*+, -./:;<=>?@ [\]^_``{|}~]`) +* `[:upper:]`: Uppercase letters (`[A-Z]`) +* `[:word:]`: Word characters (letters, numbers and underscores) (`[A-Za-z0-9_]`) +* `[:xdigit:]`: Hexadecimal digits (`[A-Fa-f0-9]`) + +See [posix-character-classes](https://github.com/jonschlinkert/posix-character-classes) for more details. + +**Not supported** + +* [equivalence classes](https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html) are not supported +* [POSIX.2 collating symbols](https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html) are not supported + +## Changelog + +### v2.0.0 + +**Breaking changes** + +* The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +* Adds a `.create` method to do what the main function did before v2.0.0 + +### v0.2.0 + +In addition to performance and matching improvements, the v0.2.0 refactor adds complete POSIX character class support, with the exception of equivalence classes and POSIX.2 collating symbols which are not relevant to node.js usage. + +**Added features** + +* parser is exposed, so that expand-brackets parsers can be used by upstream parsers (like [micromatch](https://github.com/jonschlinkert/micromatch)) +* compiler is exposed, so that expand-brackets compilers can be used by upstream compilers +* source maps + +**source map example** + +```js +var brackets = require('expand-brackets'); +var res = brackets('[:alpha:]'); +console.log(res.map); + +{ version: 3, + sources: [ 'brackets' ], + names: [], + mappings: 'AAAA,MAAS', + sourcesContent: [ '[:alpha:]' ] } +``` + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/jonschlinkert/nanomatch) | [homepage](https://github.com/jonschlinkert/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 66 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/expand-brackets/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 12, 2016._ \ No newline at end of file diff --git a/node_modules/expand-brackets/changelog.md b/node_modules/expand-brackets/changelog.md new file mode 100644 index 0000000..0c0723a --- /dev/null +++ b/node_modules/expand-brackets/changelog.md @@ -0,0 +1,35 @@ +## Changelog + +### v2.0.0 + +**Breaking changes** + +- The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +- Adds a `.create` method to do what the main function did before v2.0.0 + +### v0.2.0 + +In addition to performance and matching improvements, the v0.2.0 refactor adds complete POSIX character class support, with the exception of equivalence classes and POSIX.2 collating symbols which are not relevant to node.js usage. + +**Added features** + +- parser is exposed, so that expand-brackets parsers can be used by upstream parsers (like [micromatch][]) +- compiler is exposed, so that expand-brackets compilers can be used by upstream compilers +- source maps + +**source map example** + +```js +var brackets = require('expand-brackets'); +var res = brackets('[:alpha:]'); +console.log(res.map); + +{ version: 3, + sources: [ 'brackets' ], + names: [], + mappings: 'AAAA,MAAS', + sourcesContent: [ '[:alpha:]' ] } +``` diff --git a/node_modules/expand-brackets/index.js b/node_modules/expand-brackets/index.js new file mode 100644 index 0000000..74b8b15 --- /dev/null +++ b/node_modules/expand-brackets/index.js @@ -0,0 +1,211 @@ +'use strict'; + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); + +/** + * Module dependencies + */ + +var debug = require('debug')('expand-brackets'); +var extend = require('extend-shallow'); +var Snapdragon = require('snapdragon'); +var toRegex = require('to-regex'); + +/** + * Parses the given POSIX character class `pattern` and returns a + * string that can be used for creating regular expressions for matching. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +function brackets(pattern, options) { + debug('initializing from <%s>', __filename); + var res = brackets.create(pattern, options); + return res.output; +} + +/** + * Takes an array of strings and a POSIX character class pattern, and returns a new + * array with only the strings that matched the pattern. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]')); + * //=> ['a'] + * + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+')); + * //=> ['a', 'ab'] + * ``` + * @param {Array} `arr` Array of strings to match + * @param {String} `pattern` POSIX character class pattern(s) + * @param {Object} `options` + * @return {Array} + * @api public + */ + +brackets.match = function(arr, pattern, options) { + arr = [].concat(arr); + var opts = extend({}, options); + var isMatch = brackets.matcher(pattern, opts); + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (isMatch(ele)) { + res.push(ele); + } + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + + if (opts.nonull === true || opts.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + return res; +}; + +/** + * Returns true if the specified `string` matches the given + * brackets `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * + * console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]')); + * //=> true + * console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.isMatch = function(str, pattern, options) { + return brackets.matcher(pattern, options)(str); +}; + +/** + * Takes a POSIX character class pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var brackets = require('expand-brackets'); + * var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.A')); + * //=> true + * ``` + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.matcher = function(pattern, options) { + var re = brackets.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; +}; + +/** + * Create a regular expression from the given `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * var re = brackets.makeRe('[[:alpha:]]'); + * console.log(re); + * //=> /^(?:[a-zA-Z])$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +brackets.makeRe = function(pattern, options) { + var res = brackets.create(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(res.output, opts); +}; + +/** + * Parses the given POSIX character class `pattern` and returns an object + * with the compiled `output` and optional source `map`. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets('[[:alpha:]]')); + * // { options: { source: 'string' }, + * // input: '[[:alpha:]]', + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // not: [Function], + * // escape: [Function], + * // text: [Function], + * // posix: [Function], + * // bracket: [Function], + * // 'bracket.open': [Function], + * // 'bracket.inner': [Function], + * // 'bracket.literal': [Function], + * // 'bracket.close': [Function] }, + * // output: '[a-zA-Z]', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: [ [Object], [Object], [Object] ] }, + * // parsingErrors: [] } + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +brackets.create = function(pattern, options) { + var snapdragon = (options && options.snapdragon) || new Snapdragon(options); + compilers(snapdragon); + parsers(snapdragon); + + var ast = snapdragon.parse(pattern, options); + ast.input = pattern; + var res = snapdragon.compile(ast, options); + res.input = pattern; + return res; +}; + +/** + * Expose `brackets` constructor, parsers and compilers + */ + +brackets.compilers = compilers; +brackets.parsers = parsers; + +/** + * Expose `brackets` + * @type {Function} + */ + +module.exports = brackets; diff --git a/node_modules/expand-brackets/lib/compilers.js b/node_modules/expand-brackets/lib/compilers.js new file mode 100644 index 0000000..fbf7fe8 --- /dev/null +++ b/node_modules/expand-brackets/lib/compilers.js @@ -0,0 +1,87 @@ +'use strict'; + +var posix = require('posix-character-classes'); + +module.exports = function(brackets) { + brackets.compiler + + /** + * Escaped characters + */ + + .set('escape', function(node) { + return this.emit('\\' + node.val.replace(/^\\/, ''), node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val.replace(/([{}])/g, '\\$1'), node); + }) + + /** + * POSIX character classes + */ + + .set('posix', function(node) { + if (node.val === '[::]') { + return this.emit('\\[::\\]', node); + } + + var val = posix[node.inner]; + if (typeof val === 'undefined') { + val = '[' + node.inner + ']'; + } + return this.emit(val, node); + }) + + /** + * Non-posix brackets + */ + + .set('bracket', function(node) { + return this.mapVisit(node.nodes); + }) + .set('bracket.open', function(node) { + return this.emit(node.val, node); + }) + .set('bracket.inner', function(node) { + var inner = node.val; + + if (inner === '[' || inner === ']') { + return this.emit('\\' + node.val, node); + } + if (inner === '^]') { + return this.emit('^\\]', node); + } + if (inner === '^') { + return this.emit('^', node); + } + + if (/-/.test(inner) && !/(\d-\d|\w-\w)/.test(inner)) { + inner = inner.split('-').join('\\-'); + } + + var isNegated = inner.charAt(0) === '^'; + // add slashes to negated brackets, per spec + if (isNegated && inner.indexOf('/') === -1) { + inner += '/'; + } + if (isNegated && inner.indexOf('.') === -1) { + inner += '.'; + } + + // don't unescape `0` (octal literal) + inner = inner.replace(/\\([1-9])/g, '$1'); + return this.emit(inner, node); + }) + .set('bracket.close', function(node) { + var val = node.val.replace(/^\\/, ''); + if (node.parent.escaped === true) { + return this.emit('\\' + val, node); + } + return this.emit(val, node); + }); +}; diff --git a/node_modules/expand-brackets/lib/parsers.js b/node_modules/expand-brackets/lib/parsers.js new file mode 100644 index 0000000..450a512 --- /dev/null +++ b/node_modules/expand-brackets/lib/parsers.js @@ -0,0 +1,219 @@ +'use strict'; + +var utils = require('./utils'); +var define = require('define-property'); + +/** + * Text regex + */ + +var TEXT_REGEX = '(\\[(?=.*\\])|\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Brackets parsers + */ + +function parsers(brackets) { + brackets.state = brackets.state || {}; + brackets.parser.sets.bracket = brackets.parser.sets.bracket || []; + brackets.parser + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0] + }); + }) + + /** + * Text parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }) + + /** + * POSIX character classes: "[[:alpha:][:digits:]]" + */ + + .capture('posix', function() { + var pos = this.position(); + var m = this.match(/^\[:(.*?):\](?=.*\])/); + if (!m) return; + + var inside = this.isInside('bracket'); + if (inside) { + brackets.posix++; + } + + return pos({ + type: 'posix', + insideBracket: inside, + inner: m[1], + val: m[0] + }); + }) + + /** + * Bracket (noop) + */ + + .capture('bracket', function() {}) + + /** + * Open: '[' + */ + + .capture('bracket.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\[(?=.*\])/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + return pos({ + type: 'escape', + val: m[0] + }); + } + + var open = pos({ + type: 'bracket.open', + val: m[0] + }); + + if (last.type === 'bracket.open' || this.isInside('bracket')) { + open.val = '\\' + open.val; + open.type = 'bracket.inner'; + open.escaped = true; + return open; + } + + var node = pos({ + type: 'bracket', + nodes: [open] + }); + + define(node, 'parent', prev); + define(open, 'parent', node); + this.push('bracket', node); + prev.nodes.push(node); + }) + + /** + * Bracket text + */ + + .capture('bracket.inner', function() { + if (!this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + var next = this.input.charAt(0); + var val = m[0]; + + var node = pos({ + type: 'bracket.inner', + val: val + }); + + if (val === '\\\\') { + return node; + } + + var first = val.charAt(0); + var last = val.slice(-1); + + if (first === '!') { + val = '^' + val.slice(1); + } + + if (last === '\\' || (val === '^' && next === ']')) { + val += this.input[0]; + this.consume(1); + } + + node.val = val; + return node; + }) + + /** + * Close: ']' + */ + + .capture('bracket.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\]/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + + return pos({ + type: 'escape', + val: m[0] + }); + } + + var node = pos({ + type: 'bracket.close', + rest: this.input, + val: m[0] + }); + + if (last.type === 'bracket.open') { + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + var bracket = this.pop('bracket'); + if (!this.isType(bracket, 'bracket')) { + if (this.options.strict) { + throw new Error('missing opening "["'); + } + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + bracket.nodes.push(node); + define(node, 'parent', bracket); + }); +} + +/** + * Brackets parsers + */ + +module.exports = parsers; + +/** + * Expose text regex + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; diff --git a/node_modules/expand-brackets/lib/utils.js b/node_modules/expand-brackets/lib/utils.js new file mode 100644 index 0000000..599ff51 --- /dev/null +++ b/node_modules/expand-brackets/lib/utils.js @@ -0,0 +1,34 @@ +'use strict'; + +var toRegex = require('to-regex'); +var regexNot = require('regex-not'); +var cached; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr) { + return arr[arr.length - 1]; +}; + +/** + * Create and cache regex to use for text nodes + */ + +exports.createRegex = function(pattern, include) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re; + + if (typeof include === 'string') { + re = toRegex('^(?:' + include + '|' + not + ')', opts); + } else { + re = toRegex(not, opts); + } + + return (cached = re); +}; diff --git a/node_modules/expand-brackets/node_modules/define-property/LICENSE b/node_modules/expand-brackets/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/expand-brackets/node_modules/define-property/README.md b/node_modules/expand-brackets/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/expand-brackets/node_modules/define-property/index.js b/node_modules/expand-brackets/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/expand-brackets/node_modules/define-property/package.json b/node_modules/expand-brackets/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..3743fe6 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,123 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg)](https://www.npmjs.com/package/is-accessor-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [API](#api) +- [Related projects](#related-projects) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-accessor-descriptor --save +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-accessor-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..2ca4af8 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..5de879e --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..0f39c64 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,61 @@ +{ + "name": "is-accessor-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "version": "0.1.6", + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-accessor-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "layout": "default" + } +} diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..41e1643 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md @@ -0,0 +1,128 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg)](https://www.npmjs.com/package/is-data-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-data-descriptor --save +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-data-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..d4d09c9 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js @@ -0,0 +1,55 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// data descriptor properties +var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' +}; + +function isDataDescriptor(obj, prop) { + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +/** + * Expose `isDataDescriptor` + */ + +module.exports = isDataDescriptor; diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..5de879e --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..5fb294b --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json @@ -0,0 +1,60 @@ +{ + "name": "is-data-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "version": "0.1.4", + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-data-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..a561bfe --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/package.json @@ -0,0 +1,75 @@ +{ + "name": "is-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "version": "0.1.6", + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/expand-brackets/package.json b/node_modules/expand-brackets/package.json new file mode 100644 index 0000000..1c5233c --- /dev/null +++ b/node_modules/expand-brackets/package.json @@ -0,0 +1,85 @@ +{ + "name": "expand-brackets", + "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", + "version": "2.1.4", + "homepage": "https://github.com/jonschlinkert/expand-brackets", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (http://kolarik.sk)" + ], + "repository": "jonschlinkert/expand-brackets", + "bugs": { + "url": "https://github.com/jonschlinkert/expand-brackets/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "devDependencies": { + "bash-match": "^0.1.1", + "gulp-format-md": "^0.1.10", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.3", + "mocha": "^3.0.2", + "multimatch": "^2.1.0", + "yargs-parser": "^4.0.0" + }, + "keywords": [ + "bracket", + "brackets", + "character class", + "expand", + "expression", + "posix" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "helper-changelog" + ], + "related": { + "list": [ + "braces", + "extglob", + "micromatch", + "nanomatch" + ] + }, + "reflinks": [ + "micromatch", + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/expand-tilde/LICENSE b/node_modules/expand-tilde/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/expand-tilde/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/expand-tilde/README.md b/node_modules/expand-tilde/README.md new file mode 100644 index 0000000..d1892b7 --- /dev/null +++ b/node_modules/expand-tilde/README.md @@ -0,0 +1,80 @@ +# expand-tilde [![NPM version](https://img.shields.io/npm/v/expand-tilde.svg?style=flat)](https://www.npmjs.com/package/expand-tilde) [![NPM downloads](https://img.shields.io/npm/dm/expand-tilde.svg?style=flat)](https://npmjs.org/package/expand-tilde) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-tilde.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-tilde) + +> Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save expand-tilde +``` + +## Usage + +See the [Bash documentation for Tilde Expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html). + +```js +var expandTilde = require('expand-tilde'); + +expandTilde('~') +//=> '/Users/jonschlinkert' + +expandTilde('~+') +//=> process.cwd() +``` + +## Run tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 08, 2016._ \ No newline at end of file diff --git a/node_modules/expand-tilde/index.js b/node_modules/expand-tilde/index.js new file mode 100644 index 0000000..d4e4706 --- /dev/null +++ b/node_modules/expand-tilde/index.js @@ -0,0 +1,22 @@ +/*! + * expand-tilde + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +var homedir = require('homedir-polyfill'); +var path = require('path'); + +module.exports = function expandTilde(filepath) { + var home = homedir(); + + if (filepath.charCodeAt(0) === 126 /* ~ */) { + if (filepath.charCodeAt(1) === 43 /* + */) { + return path.join(process.cwd(), filepath.slice(2)); + } + return home ? path.join(home, filepath.slice(1)) : filepath; + } + + return filepath; +}; diff --git a/node_modules/expand-tilde/package.json b/node_modules/expand-tilde/package.json new file mode 100644 index 0000000..9b37b1b --- /dev/null +++ b/node_modules/expand-tilde/package.json @@ -0,0 +1,67 @@ +{ + "name": "expand-tilde", + "description": "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.", + "version": "2.0.2", + "homepage": "https://github.com/jonschlinkert/expand-tilde", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/expand-tilde", + "bugs": { + "url": "https://github.com/jonschlinkert/expand-tilde/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "is-windows": "^0.2.0", + "mocha": "^2.5.3" + }, + "keywords": [ + "cwd", + "expand", + "expansion", + "filepath", + "home", + "path", + "pwd", + "tilde", + "user", + "userhome" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "dependencies": { + "homedir-polyfill": "^1.0.1" + } +} diff --git a/node_modules/ext/CHANGELOG.md b/node_modules/ext/CHANGELOG.md new file mode 100644 index 0000000..48bffa3 --- /dev/null +++ b/node_modules/ext/CHANGELOG.md @@ -0,0 +1,89 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.7.0](https://github.com/medikoo/es5-ext/compare/v1.6.0...v1.7.0) (2022-08-31) + +### Features + +- `string.camelToHyphen` method ([b8ea4ab](https://github.com/medikoo/es5-ext/commit/b8ea4ab6c8b920ecdff224f9c92092e1c7f8cdfc)) +- `string.capitalize` method ([32e7360](https://github.com/medikoo/es5-ext/commit/32e736034bd27ed25d4566b22aa93aa66c7901cf)) + +## [1.6.0](https://github.com/medikoo/es5-ext/compare/v1.5.0...v1.6.0) (2021-09-24) + +### Features + +- `Object.clear` util ([a955da4](https://github.com/medikoo/es5-ext/commit/a955da41e65a25ad87a46234bae065f096abd1d2)) + +### Bug Fixes + +- Fix `Object.entries` to not return non enumerable properties ([44fb872](https://github.com/medikoo/es5-ext/commit/44fb87266617378d2f47a1a5baad6280bf6298a8)) + +## [1.5.0](https://github.com/medikoo/es5-ext/compare/v1.3.0...v1.5.0) (2021-08-23) + +### Features + +- `Promise.limit` ([060a05d](https://github.com/medikoo/es5-ext/commit/060a05d4751cd291c6dd7641f5a73ba9338ea7ab)) +- `String.prototype.includes` ([ceebe8d](https://github.com/medikoo/es5-ext/commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) +- `charset` option for `String.random` ([2a20eeb](https://github.com/medikoo/es5-ext/commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) + +## [1.4.0](https://github.com///compare/v1.3.0...v1.4.0) (2019-11-29) + +### Features + +- `charset` option for `String.random` ([2a20eeb](https://github.com///commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) +- `String.prototype.includes` implementation ([ceebe8d](https://github.com///commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) + +## [1.3.0](https://github.com///compare/v1.2.1...v1.3.0) (2019-11-28) + +### Features + +- `String.random` util ([5b5860a](https://github.com///commit/5b5860ac545b05f00527e00295fdb4f97e4a4e5b)) + +### [1.2.1](https://github.com///compare/v1.2.0...v1.2.1) (2019-11-26) + +## [1.2.0](https://github.com/medikoo/ext/compare/v1.1.2...v1.2.0) (2019-11-07) + +### Features + +- ceil10, floor10 and round10 for Math ([6a2bc4b](https://github.com/medikoo/ext/commit/6a2bc4b)) + +### [1.1.2](https://github.com/medikoo/ext/compare/v1.1.1...v1.1.2) (2019-10-29) + +### Bug Fixes + +- Improve globalThis detection ([470862d](https://github.com/medikoo/ext/commit/470862d)) + +### [1.1.1](https://github.com/medikoo/ext/compare/v1.1.0...v1.1.1) (2019-10-29) + +### Bug Fixes + +- Provide naive fallback for sealed Object.prototype case ([a8d528b](https://github.com/medikoo/ext/commit/a8d528b)) +- Workaournd Safari incompatibility case ([0b051e6](https://github.com/medikoo/ext/commit/0b051e6)) + +## [1.1.0](https://github.com/medikoo/ext/compare/v1.0.3...v1.1.0) (2019-10-21) + +### Features + +- Object.entries implementation ([cf51e45](https://github.com/medikoo/ext/commit/cf51e45)) + +### [1.0.3](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.3) (2019-07-03) + +Remove obsolete files from publication + +### [1.0.2](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.2) (2019-07-03) + +(no changes) + +### [1.0.1](https://github.com/medikoo/ext/compare/v1.0.0...v1.0.1) (2019-07-03) + +Prettify + +## 1.0.0 (2019-07-03) + +### Features + +- `function/identity` (adapted from `es5-ext`) ([f0102af](https://github.com/medikoo/ext/commit/f0102af)) +- `thenable/finally` (adapted from `es5-ext`) ([a8494ac](https://github.com/medikoo/ext/commit/a8494ac)) +- `global-this/is-implemented` ([3a80904](https://github.com/medikoo/ext/commit/3a80904)) +- `globalThis` (mostly adapted from `es5-ext`) ([6559bd3](https://github.com/medikoo/ext/commit/6559bd3)) diff --git a/node_modules/ext/LICENSE b/node_modules/ext/LICENSE new file mode 100644 index 0000000..7df6b3d --- /dev/null +++ b/node_modules/ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2011-2022, 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/node_modules/ext/README.md b/node_modules/ext/README.md new file mode 100644 index 0000000..29491e2 --- /dev/null +++ b/node_modules/ext/README.md @@ -0,0 +1,46 @@ +[![Build status][build-image]][build-url] +[![npm version][npm-image]][npm-url] + +# ext + +_(Previously known as `es5-ext`)_ + +## JavaScript language extensions (with respect to evolving standard) + +Non-standard or soon to be standard language utilities in a future proof, non-invasive form. + +Doesn't enforce transpilation step. Where it's applicable utilities/extensions are safe to use in all ES3+ implementations. + +### Installation + +```bash +npm install ext +``` + +### Utilities + +- [`globalThis`](docs/global-this.md) +- `Function` + - [`identity`](docs/function/identity.md) +- `Math` + - [`ceil10`](docs/math/ceil-10.md) + - [`floor10`](docs/math/floor-10.md) + - [`round10`](docs/math/round-10.md) +- `Object` + - [`clear`](docs/object/clear.md) + - [`entries`](docs/object/entries.md) +- `Promise` + - [`limit`](docs/promise/limit.md) +- `String` + - [`random`](docs/string/random.md) +- `String.prototype` + - [`campelToHyphen`](docs/string_/camel-to-hyphen.md) + - [`capitalize`](docs/string_/capitalize.md) + - [`includes`](docs/string_/includes.md) +- `Thenable.prototype` + - [`finally`](docs/thenable_/finally.md) + +[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate%20[ext]/badge.svg +[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate%20[ext] +[npm-image]: https://img.shields.io/npm/v/ext.svg +[npm-url]: https://www.npmjs.com/package/ext diff --git a/node_modules/ext/docs/function/identity.md b/node_modules/ext/docs/function/identity.md new file mode 100644 index 0000000..b6a5c1d --- /dev/null +++ b/node_modules/ext/docs/function/identity.md @@ -0,0 +1,9 @@ +# `Function.identity` _(ext/function/identity)_ + +Returns input argument. + +```javascript +const identity = require("ext/function/identity"); + +identity("foo"); // "foo" +``` diff --git a/node_modules/ext/docs/global-this.md b/node_modules/ext/docs/global-this.md new file mode 100644 index 0000000..fafd422 --- /dev/null +++ b/node_modules/ext/docs/global-this.md @@ -0,0 +1,9 @@ +# `globalThis` _(ext/global-this)_ + +Returns global object. Resolve native [globalThis](https://github.com/tc39/proposal-global) if implemented, otherwise fallback to internal resolution of a global object. + +```javascript +const globalThis = require("ext/global-this"); + +globalThis.Array === Array; // true +``` diff --git a/node_modules/ext/docs/math/ceil-10.md b/node_modules/ext/docs/math/ceil-10.md new file mode 100644 index 0000000..1d53122 --- /dev/null +++ b/node_modules/ext/docs/math/ceil-10.md @@ -0,0 +1,10 @@ +# `Math.ceil10` _(ext/math/ceil-10)_ + +Decimal ceil + +```javascript +const ceil10 = require("ext/math/ceil-10"); + +ceil10(55.51, -1); // 55.6 +ceil10(-59, 1); // -50; +``` diff --git a/node_modules/ext/docs/math/floor-10.md b/node_modules/ext/docs/math/floor-10.md new file mode 100644 index 0000000..099c1b6 --- /dev/null +++ b/node_modules/ext/docs/math/floor-10.md @@ -0,0 +1,10 @@ +# `Math.floor10` _(ext/math/floor-10)_ + +Decimal floor + +```javascript +const floor10 = require("ext/math/floor-10"); + +floor10(55.59, -1); // 55.5 +floor10(59, 1); // 50 +``` diff --git a/node_modules/ext/docs/math/round-10.md b/node_modules/ext/docs/math/round-10.md new file mode 100644 index 0000000..727acb1 --- /dev/null +++ b/node_modules/ext/docs/math/round-10.md @@ -0,0 +1,10 @@ +# `Math.round10` _(ext/math/round-10)_ + +Decimal round + +```javascript +const round10 = require("ext/math/round-10"); + +round10(55.549, -1); // 55.5 +round10(1.005, -2); // 1.01 +``` diff --git a/node_modules/ext/docs/object/clear.md b/node_modules/ext/docs/object/clear.md new file mode 100644 index 0000000..468be1b --- /dev/null +++ b/node_modules/ext/docs/object/clear.md @@ -0,0 +1,12 @@ +# `Object.clear` _(ext/object/clear)_ + +Deletes all own, enumerable, non-symbol properties in the object + +```javascript +const clear = require("ext/object/clear"); + +const obj = { foo: "bar" }; + +clear(obj); +Object.keys(obj); // [] +``` diff --git a/node_modules/ext/docs/object/entries.md b/node_modules/ext/docs/object/entries.md new file mode 100644 index 0000000..2d05f4c --- /dev/null +++ b/node_modules/ext/docs/object/entries.md @@ -0,0 +1,11 @@ +# `Object.entries` _(ext/object/entries)_ + +[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) implementation. + +Returns native `Object.entries` if it's implemented, otherwise library implementation is returned + +```javascript +const entries = require("ext/object/entries"); + +entries({ foo: "bar" }); // [["foo", "bar"]] +``` diff --git a/node_modules/ext/docs/promise/limit.md b/node_modules/ext/docs/promise/limit.md new file mode 100644 index 0000000..8b0ea38 --- /dev/null +++ b/node_modules/ext/docs/promise/limit.md @@ -0,0 +1,13 @@ +# `Promise.limit` _(ext/promise/limit)_ + +Helps to limit concurrency of asynchronous operations. + +```javascript +const limit = require("ext/promise/limit").bind(Promise); + +const limittedAsyncFunction = limit(2, asyncFunction); + +imittedAsyncFunction(); // Async operation started +imittedAsyncFunction(); // Async operation started +imittedAsyncFunction(); // On hold until one of previously started finalizes +``` diff --git a/node_modules/ext/docs/string/random.md b/node_modules/ext/docs/string/random.md new file mode 100644 index 0000000..c3099e9 --- /dev/null +++ b/node_modules/ext/docs/string/random.md @@ -0,0 +1,31 @@ +# `String.random(options = { ... })` _(ext/string/random)_ + +Returns generated random string, contained only of ascii cars `a-z` and `0-1`. +By default returns string of length `10`. + +```javascript +const random = require("ext/string/random"); + +random(); // "upcfns0i4t" +random({ length: 3 }); // "5tw" +``` + +## Supported options: + +### `isUnique: false` + +Ensures generated string is unique among ones already returned. + +_Note: When not applying this setting, accidental generation of same string is still highly unlikely. Provided option is just to provide a mean to eliminate possibility of an edge case of duplicate string being returned_ + +### `length: 10` + +Desired length of result string + +### `charset: null` + +Fixed list of possible characters + +```javascript +random({ charset: "abc" }); // "bacbccbbac" +``` diff --git a/node_modules/ext/docs/string_/camel-to-hyphen.md b/node_modules/ext/docs/string_/camel-to-hyphen.md new file mode 100644 index 0000000..e3e4c03 --- /dev/null +++ b/node_modules/ext/docs/string_/camel-to-hyphen.md @@ -0,0 +1,9 @@ +# `string.camelToHyphen()` _(ext/string\_/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. `oneTwoThree` into `one-to-three`. Useful when converting names from js property convention into filename convention. + +```javascript +const camelToHyphen = require("ext/string_/camelToHyphen"); + +camelToHyphen.call("razDwaTrzy"); // raz-dwa-trzy +``` diff --git a/node_modules/ext/docs/string_/capitalize.md b/node_modules/ext/docs/string_/capitalize.md new file mode 100644 index 0000000..319e194 --- /dev/null +++ b/node_modules/ext/docs/string_/capitalize.md @@ -0,0 +1,9 @@ +# `string.capitalize()` _(ext/string\_/capitalize)_ + +Capitalize input string, e.g. convert `this is a test` into `This is a test`. + +```javascript +const capitalize = require("ext/string_/capitalize"); + +capitalize.call("this is a test"); // This is a test +``` diff --git a/node_modules/ext/docs/string_/includes.md b/node_modules/ext/docs/string_/includes.md new file mode 100644 index 0000000..4fe1b58 --- /dev/null +++ b/node_modules/ext/docs/string_/includes.md @@ -0,0 +1,10 @@ +# `string.includes(position = 0)` _(ext/string\_/includes)_ + +`includes` method for strings. Resolve native [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) if implemented, otherwise fallback to shim implementation. + +```javascript +const includes = require("ext/string_/includes"); + +includes.call("razdwa", "raz"); // true +includes.call("razdwa", "trzy"); // false +``` diff --git a/node_modules/ext/docs/thenable_/finally.md b/node_modules/ext/docs/thenable_/finally.md new file mode 100644 index 0000000..978ce0c --- /dev/null +++ b/node_modules/ext/docs/thenable_/finally.md @@ -0,0 +1,9 @@ +# `thenable.finally` _(ext/thenable\_/finally)_ + +`finally` method for any _thenable_ input + +```javascript +const finally = require("ext/thenable_/finally"); + +finally.call(thenable, () => console.log("Thenable resolved")); +``` diff --git a/node_modules/ext/function/identity.js b/node_modules/ext/function/identity.js new file mode 100644 index 0000000..cde213f --- /dev/null +++ b/node_modules/ext/function/identity.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return value; }; diff --git a/node_modules/ext/global-this/implementation.js b/node_modules/ext/global-this/implementation.js new file mode 100644 index 0000000..6a06d52 --- /dev/null +++ b/node_modules/ext/global-this/implementation.js @@ -0,0 +1,31 @@ +var naiveFallback = function () { + if (typeof self === "object" && self) return self; + if (typeof window === "object" && window) return window; + throw new Error("Unable to resolve global `this`"); +}; + +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5+ engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + try { + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + } catch (error) { + // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze) + return naiveFallback(); + } + try { + // Safari case (window.__global__ is resolved with global context, but __global__ does not) + if (!__global__) return naiveFallback(); + return __global__; + } finally { + delete Object.prototype.__global__; + } +})(); diff --git a/node_modules/ext/global-this/index.js b/node_modules/ext/global-this/index.js new file mode 100644 index 0000000..8a99c25 --- /dev/null +++ b/node_modules/ext/global-this/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? globalThis : require("./implementation"); diff --git a/node_modules/ext/global-this/is-implemented.js b/node_modules/ext/global-this/is-implemented.js new file mode 100644 index 0000000..3eae23e --- /dev/null +++ b/node_modules/ext/global-this/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + if (typeof globalThis !== "object") return false; + if (!globalThis) return false; + return globalThis.Array === Array; +}; diff --git a/node_modules/ext/lib/private/decimal-adjust.js b/node_modules/ext/lib/private/decimal-adjust.js new file mode 100644 index 0000000..e04cde9 --- /dev/null +++ b/node_modules/ext/lib/private/decimal-adjust.js @@ -0,0 +1,29 @@ +// Credit: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +// #Decimal_rounding + +"use strict"; + +var isValue = require("type/object/is") + , ensureInteger = require("type/integer/ensure"); + +var split = String.prototype.split; + +module.exports = function (type) { + return function (value/*, exp*/) { + value = Number(value); + var exp = arguments[1]; + if (isValue(exp)) exp = ensureInteger(exp); + if (!value) return value; + if (!exp) return Math[type](value); + if (!isFinite(value)) return value; + + // Shift + var tokens = split.call(value, "e"); + value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); + + // Shift back + tokens = value.toString().split("e"); + return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); + }; +}; diff --git a/node_modules/ext/lib/private/define-function-length.js b/node_modules/ext/lib/private/define-function-length.js new file mode 100644 index 0000000..4db3228 --- /dev/null +++ b/node_modules/ext/lib/private/define-function-length.js @@ -0,0 +1,56 @@ +"use strict"; + +var test = function (arg1, arg2) { return arg2; }; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} +catch (ignore) {} + +if (test.length === 1) { + // ES2015+ + var desc = { configurable: true, writable: false, enumerable: false }; + module.exports = function (length, fn) { + if (fn.length === length) return fn; + desc.value = length; + return Object.defineProperty(fn, "length", desc); + }; + return; +} + +module.exports = function (length, fn) { + if (fn.length === length) return fn; + switch (length) { + case 0: + return function () { return fn.apply(this, arguments); }; + case 1: + return function (ignored1) { return fn.apply(this, arguments); }; + case 2: + return function (ignored1, ignored2) { return fn.apply(this, arguments); }; + case 3: + return function (ignored1, ignored2, ignored3) { return fn.apply(this, arguments); }; + case 4: + return function (ignored1, ignored2, ignored3, ignored4) { + return fn.apply(this, arguments); + }; + case 5: + return function (ignored1, ignored2, ignored3, ignored4, ignored5) { + return fn.apply(this, arguments); + }; + case 6: + return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6) { + return fn.apply(this, arguments); + }; + case 7: + return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6, ignored7) { + return fn.apply(this, arguments); + }; + default: + throw new Error("Usupported function length"); + } +}; diff --git a/node_modules/ext/math/ceil-10.js b/node_modules/ext/math/ceil-10.js new file mode 100644 index 0000000..c57a730 --- /dev/null +++ b/node_modules/ext/math/ceil-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("ceil"); diff --git a/node_modules/ext/math/floor-10.js b/node_modules/ext/math/floor-10.js new file mode 100644 index 0000000..27dd1aa --- /dev/null +++ b/node_modules/ext/math/floor-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("floor"); diff --git a/node_modules/ext/math/round-10.js b/node_modules/ext/math/round-10.js new file mode 100644 index 0000000..643d676 --- /dev/null +++ b/node_modules/ext/math/round-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("round"); diff --git a/node_modules/ext/node_modules/type/CHANGELOG.md b/node_modules/ext/node_modules/type/CHANGELOG.md new file mode 100644 index 0000000..001636b --- /dev/null +++ b/node_modules/ext/node_modules/type/CHANGELOG.md @@ -0,0 +1,172 @@ +# 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.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/node_modules/ext/node_modules/type/LICENSE b/node_modules/ext/node_modules/type/LICENSE new file mode 100644 index 0000000..ce541c9 --- /dev/null +++ b/node_modules/ext/node_modules/type/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2019-2022, 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/node_modules/ext/node_modules/type/README.md b/node_modules/ext/node_modules/type/README.md new file mode 100644 index 0000000..6b20794 --- /dev/null +++ b/node_modules/ext/node_modules/type/README.md @@ -0,0 +1,168 @@ +[![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 diff --git a/node_modules/ext/node_modules/type/array-length/coerce.js b/node_modules/ext/node_modules/type/array-length/coerce.js new file mode 100644 index 0000000..3dbbf97 --- /dev/null +++ b/node_modules/ext/node_modules/type/array-length/coerce.js @@ -0,0 +1,10 @@ +"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/node_modules/ext/node_modules/type/array-length/ensure.js b/node_modules/ext/node_modules/type/array-length/ensure.js new file mode 100644 index 0000000..2b48ddc --- /dev/null +++ b/node_modules/ext/node_modules/type/array-length/ensure.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/array-like/ensure.js b/node_modules/ext/node_modules/type/array-like/ensure.js new file mode 100644 index 0000000..0d1a9f7 --- /dev/null +++ b/node_modules/ext/node_modules/type/array-like/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/array-like/is.js b/node_modules/ext/node_modules/type/array-like/is.js new file mode 100644 index 0000000..7778fed --- /dev/null +++ b/node_modules/ext/node_modules/type/array-like/is.js @@ -0,0 +1,21 @@ +"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/node_modules/ext/node_modules/type/array/ensure.js b/node_modules/ext/node_modules/type/array/ensure.js new file mode 100644 index 0000000..19e4599 --- /dev/null +++ b/node_modules/ext/node_modules/type/array/ensure.js @@ -0,0 +1,43 @@ +"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/node_modules/ext/node_modules/type/array/is.js b/node_modules/ext/node_modules/type/array/is.js new file mode 100644 index 0000000..13fd8d3 --- /dev/null +++ b/node_modules/ext/node_modules/type/array/is.js @@ -0,0 +1,27 @@ +"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/node_modules/ext/node_modules/type/big-int/coerce.js b/node_modules/ext/node_modules/type/big-int/coerce.js new file mode 100644 index 0000000..a600a20 --- /dev/null +++ b/node_modules/ext/node_modules/type/big-int/coerce.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/big-int/ensure.js b/node_modules/ext/node_modules/type/big-int/ensure.js new file mode 100644 index 0000000..319b1b7 --- /dev/null +++ b/node_modules/ext/node_modules/type/big-int/ensure.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/constructor/ensure.js b/node_modules/ext/node_modules/type/constructor/ensure.js new file mode 100644 index 0000000..4f3e846 --- /dev/null +++ b/node_modules/ext/node_modules/type/constructor/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/constructor/is.js b/node_modules/ext/node_modules/type/constructor/is.js new file mode 100644 index 0000000..058a156 --- /dev/null +++ b/node_modules/ext/node_modules/type/constructor/is.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/date/ensure.js b/node_modules/ext/node_modules/type/date/ensure.js new file mode 100644 index 0000000..0fae4d3 --- /dev/null +++ b/node_modules/ext/node_modules/type/date/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/date/is.js b/node_modules/ext/node_modules/type/date/is.js new file mode 100644 index 0000000..0754085 --- /dev/null +++ b/node_modules/ext/node_modules/type/date/is.js @@ -0,0 +1,26 @@ +"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/node_modules/ext/node_modules/type/docs/array-length.md b/node_modules/ext/node_modules/type/docs/array-length.md new file mode 100644 index 0000000..cca7d8a --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/array-length.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/array-like.md b/node_modules/ext/node_modules/type/docs/array-like.md new file mode 100644 index 0000000..2a48df8 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/array-like.md @@ -0,0 +1,33 @@ +# 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/node_modules/ext/node_modules/type/docs/array.md b/node_modules/ext/node_modules/type/docs/array.md new file mode 100644 index 0000000..0c6ac4e --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/array.md @@ -0,0 +1,46 @@ +# 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/node_modules/ext/node_modules/type/docs/big-int.md b/node_modules/ext/node_modules/type/docs/big-int.md new file mode 100644 index 0000000..78626fd --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/big-int.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/constructor.md b/node_modules/ext/node_modules/type/docs/constructor.md new file mode 100644 index 0000000..172462a --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/constructor.md @@ -0,0 +1,28 @@ +# 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/node_modules/ext/node_modules/type/docs/date.md b/node_modules/ext/node_modules/type/docs/date.md new file mode 100644 index 0000000..98d3654 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/date.md @@ -0,0 +1,28 @@ +# 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/node_modules/ext/node_modules/type/docs/ensure.md b/node_modules/ext/node_modules/type/docs/ensure.md new file mode 100644 index 0000000..c3a9527 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/ensure.md @@ -0,0 +1,40 @@ +# `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/node_modules/ext/node_modules/type/docs/error.md b/node_modules/ext/node_modules/type/docs/error.md new file mode 100644 index 0000000..c779333 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/error.md @@ -0,0 +1,26 @@ +# 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/node_modules/ext/node_modules/type/docs/finite.md b/node_modules/ext/node_modules/type/docs/finite.md new file mode 100644 index 0000000..68786ca --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/finite.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/function.md b/node_modules/ext/node_modules/type/docs/function.md new file mode 100644 index 0000000..23f3827 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/function.md @@ -0,0 +1,28 @@ +# 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/node_modules/ext/node_modules/type/docs/integer.md b/node_modules/ext/node_modules/type/docs/integer.md new file mode 100644 index 0000000..9260a46 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/integer.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/iterable.md b/node_modules/ext/node_modules/type/docs/iterable.md new file mode 100644 index 0000000..862e6c8 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/iterable.md @@ -0,0 +1,65 @@ +# 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/node_modules/ext/node_modules/type/docs/map.md b/node_modules/ext/node_modules/type/docs/map.md new file mode 100644 index 0000000..c128022 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/map.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/natural-number.md b/node_modules/ext/node_modules/type/docs/natural-number.md new file mode 100644 index 0000000..c91ee16 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/natural-number.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/number.md b/node_modules/ext/node_modules/type/docs/number.md new file mode 100644 index 0000000..5f4dfa9 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/number.md @@ -0,0 +1,33 @@ +# 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/node_modules/ext/node_modules/type/docs/object.md b/node_modules/ext/node_modules/type/docs/object.md new file mode 100644 index 0000000..ed43b1f --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/object.md @@ -0,0 +1,28 @@ +# 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/node_modules/ext/node_modules/type/docs/plain-function.md b/node_modules/ext/node_modules/type/docs/plain-function.md new file mode 100644 index 0000000..e3a8895 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/plain-function.md @@ -0,0 +1,28 @@ +# 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/node_modules/ext/node_modules/type/docs/plain-object.md b/node_modules/ext/node_modules/type/docs/plain-object.md new file mode 100644 index 0000000..ce3f522 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/plain-object.md @@ -0,0 +1,69 @@ +# 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/node_modules/ext/node_modules/type/docs/promise.md b/node_modules/ext/node_modules/type/docs/promise.md new file mode 100644 index 0000000..ce38794 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/promise.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/prototype.md b/node_modules/ext/node_modules/type/docs/prototype.md new file mode 100644 index 0000000..926c256 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/prototype.md @@ -0,0 +1,15 @@ +# 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/node_modules/ext/node_modules/type/docs/reg-exp.md b/node_modules/ext/node_modules/type/docs/reg-exp.md new file mode 100644 index 0000000..00d081c --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/reg-exp.md @@ -0,0 +1,26 @@ +# 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/node_modules/ext/node_modules/type/docs/safe-integer.md b/node_modules/ext/node_modules/type/docs/safe-integer.md new file mode 100644 index 0000000..cf4bb1c --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/safe-integer.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/set.md b/node_modules/ext/node_modules/type/docs/set.md new file mode 100644 index 0000000..33f8876 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/set.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/string.md b/node_modules/ext/node_modules/type/docs/string.md new file mode 100644 index 0000000..051b4a3 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/string.md @@ -0,0 +1,32 @@ +# 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/node_modules/ext/node_modules/type/docs/thenable.md b/node_modules/ext/node_modules/type/docs/thenable.md new file mode 100644 index 0000000..1bdf92d --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/thenable.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/time-value.md b/node_modules/ext/node_modules/type/docs/time-value.md new file mode 100644 index 0000000..98e9e8e --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/time-value.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/docs/value.md b/node_modules/ext/node_modules/type/docs/value.md new file mode 100644 index 0000000..1310609 --- /dev/null +++ b/node_modules/ext/node_modules/type/docs/value.md @@ -0,0 +1,27 @@ +# 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/node_modules/ext/node_modules/type/ensure.js b/node_modules/ext/node_modules/type/ensure.js new file mode 100644 index 0000000..7fe8220 --- /dev/null +++ b/node_modules/ext/node_modules/type/ensure.js @@ -0,0 +1,51 @@ +"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/node_modules/ext/node_modules/type/error/ensure.js b/node_modules/ext/node_modules/type/error/ensure.js new file mode 100644 index 0000000..8b28d85 --- /dev/null +++ b/node_modules/ext/node_modules/type/error/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/error/is.js b/node_modules/ext/node_modules/type/error/is.js new file mode 100644 index 0000000..bf04c80 --- /dev/null +++ b/node_modules/ext/node_modules/type/error/is.js @@ -0,0 +1,45 @@ +"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/node_modules/ext/node_modules/type/finite/coerce.js b/node_modules/ext/node_modules/type/finite/coerce.js new file mode 100644 index 0000000..a3783be --- /dev/null +++ b/node_modules/ext/node_modules/type/finite/coerce.js @@ -0,0 +1,8 @@ +"use strict"; + +var coerceToNumber = require("../number/coerce"); + +module.exports = function (value) { + value = coerceToNumber(value); + return isFinite(value) ? value : null; +}; diff --git a/node_modules/ext/node_modules/type/finite/ensure.js b/node_modules/ext/node_modules/type/finite/ensure.js new file mode 100644 index 0000000..aac96be --- /dev/null +++ b/node_modules/ext/node_modules/type/finite/ensure.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/function/ensure.js b/node_modules/ext/node_modules/type/function/ensure.js new file mode 100644 index 0000000..d133701 --- /dev/null +++ b/node_modules/ext/node_modules/type/function/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/function/is.js b/node_modules/ext/node_modules/type/function/is.js new file mode 100644 index 0000000..981990a --- /dev/null +++ b/node_modules/ext/node_modules/type/function/is.js @@ -0,0 +1,19 @@ +"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/node_modules/ext/node_modules/type/integer/coerce.js b/node_modules/ext/node_modules/type/integer/coerce.js new file mode 100644 index 0000000..cba5e17 --- /dev/null +++ b/node_modules/ext/node_modules/type/integer/coerce.js @@ -0,0 +1,11 @@ +"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/node_modules/ext/node_modules/type/integer/ensure.js b/node_modules/ext/node_modules/type/integer/ensure.js new file mode 100644 index 0000000..df1a975 --- /dev/null +++ b/node_modules/ext/node_modules/type/integer/ensure.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/iterable/ensure.js b/node_modules/ext/node_modules/type/iterable/ensure.js new file mode 100644 index 0000000..b1a2489 --- /dev/null +++ b/node_modules/ext/node_modules/type/iterable/ensure.js @@ -0,0 +1,49 @@ +"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/node_modules/ext/node_modules/type/iterable/is.js b/node_modules/ext/node_modules/type/iterable/is.js new file mode 100644 index 0000000..d35408c --- /dev/null +++ b/node_modules/ext/node_modules/type/iterable/is.js @@ -0,0 +1,32 @@ +// 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/node_modules/ext/node_modules/type/lib/ensure/min.js b/node_modules/ext/node_modules/type/lib/ensure/min.js new file mode 100644 index 0000000..df878bd --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/ensure/min.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js b/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js new file mode 100644 index 0000000..254d8b3 --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; diff --git a/node_modules/ext/node_modules/type/lib/resolve-error-message.js b/node_modules/ext/node_modules/type/lib/resolve-error-message.js new file mode 100644 index 0000000..3cb000b --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/resolve-error-message.js @@ -0,0 +1,52 @@ +"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/node_modules/ext/node_modules/type/lib/resolve-exception.js b/node_modules/ext/node_modules/type/lib/resolve-exception.js new file mode 100644 index 0000000..6c99286 --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/resolve-exception.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/lib/safe-to-string.js b/node_modules/ext/node_modules/type/lib/safe-to-string.js new file mode 100644 index 0000000..a756dd3 --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/safe-to-string.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (value) { + try { + return value.toString(); + } catch (error) { + try { return String(value); } + catch (error2) { return null; } + } +}; diff --git a/node_modules/ext/node_modules/type/lib/to-short-string.js b/node_modules/ext/node_modules/type/lib/to-short-string.js new file mode 100644 index 0000000..c8d7ed8 --- /dev/null +++ b/node_modules/ext/node_modules/type/lib/to-short-string.js @@ -0,0 +1,29 @@ +"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/node_modules/ext/node_modules/type/map/ensure.js b/node_modules/ext/node_modules/type/map/ensure.js new file mode 100644 index 0000000..3e3325a --- /dev/null +++ b/node_modules/ext/node_modules/type/map/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/map/is.js b/node_modules/ext/node_modules/type/map/is.js new file mode 100644 index 0000000..4ed7bae --- /dev/null +++ b/node_modules/ext/node_modules/type/map/is.js @@ -0,0 +1,28 @@ +"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/node_modules/ext/node_modules/type/natural-number/coerce.js b/node_modules/ext/node_modules/type/natural-number/coerce.js new file mode 100644 index 0000000..4b7931c --- /dev/null +++ b/node_modules/ext/node_modules/type/natural-number/coerce.js @@ -0,0 +1,10 @@ +"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/node_modules/ext/node_modules/type/natural-number/ensure.js b/node_modules/ext/node_modules/type/natural-number/ensure.js new file mode 100644 index 0000000..1f09174 --- /dev/null +++ b/node_modules/ext/node_modules/type/natural-number/ensure.js @@ -0,0 +1,21 @@ +"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/node_modules/ext/node_modules/type/number/coerce.js b/node_modules/ext/node_modules/type/number/coerce.js new file mode 100644 index 0000000..1bb1512 --- /dev/null +++ b/node_modules/ext/node_modules/type/number/coerce.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/number/ensure.js b/node_modules/ext/node_modules/type/number/ensure.js new file mode 100644 index 0000000..9ae705d --- /dev/null +++ b/node_modules/ext/node_modules/type/number/ensure.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/object/ensure.js b/node_modules/ext/node_modules/type/object/ensure.js new file mode 100644 index 0000000..341f55c --- /dev/null +++ b/node_modules/ext/node_modules/type/object/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/object/is.js b/node_modules/ext/node_modules/type/object/is.js new file mode 100644 index 0000000..a254dcb --- /dev/null +++ b/node_modules/ext/node_modules/type/object/is.js @@ -0,0 +1,11 @@ +"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/node_modules/ext/node_modules/type/package.json b/node_modules/ext/node_modules/type/package.json new file mode 100644 index 0000000..a863fbf --- /dev/null +++ b/node_modules/ext/node_modules/type/package.json @@ -0,0 +1,120 @@ +{ + "name": "type", + "version": "2.7.2", + "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": "^13.0.3", + "mocha": "^6.2.3", + "nyc": "^15.1.0", + "prettier-elastic": "^2.2.1" + }, + "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, + "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/node_modules/ext/node_modules/type/plain-function/ensure.js b/node_modules/ext/node_modules/type/plain-function/ensure.js new file mode 100644 index 0000000..d3a20e6 --- /dev/null +++ b/node_modules/ext/node_modules/type/plain-function/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/plain-function/is.js b/node_modules/ext/node_modules/type/plain-function/is.js new file mode 100644 index 0000000..b55d4ff --- /dev/null +++ b/node_modules/ext/node_modules/type/plain-function/is.js @@ -0,0 +1,11 @@ +"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/node_modules/ext/node_modules/type/plain-object/ensure.js b/node_modules/ext/node_modules/type/plain-object/ensure.js new file mode 100644 index 0000000..519261e --- /dev/null +++ b/node_modules/ext/node_modules/type/plain-object/ensure.js @@ -0,0 +1,67 @@ +"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/node_modules/ext/node_modules/type/plain-object/is.js b/node_modules/ext/node_modules/type/plain-object/is.js new file mode 100644 index 0000000..50d6713 --- /dev/null +++ b/node_modules/ext/node_modules/type/plain-object/is.js @@ -0,0 +1,28 @@ +"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/node_modules/ext/node_modules/type/promise/ensure.js b/node_modules/ext/node_modules/type/promise/ensure.js new file mode 100644 index 0000000..7fbebb3 --- /dev/null +++ b/node_modules/ext/node_modules/type/promise/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/promise/is.js b/node_modules/ext/node_modules/type/promise/is.js new file mode 100644 index 0000000..5353362 --- /dev/null +++ b/node_modules/ext/node_modules/type/promise/is.js @@ -0,0 +1,27 @@ +"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/node_modules/ext/node_modules/type/prototype/is.js b/node_modules/ext/node_modules/type/prototype/is.js new file mode 100644 index 0000000..aaddb2a --- /dev/null +++ b/node_modules/ext/node_modules/type/prototype/is.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/reg-exp/ensure.js b/node_modules/ext/node_modules/type/reg-exp/ensure.js new file mode 100644 index 0000000..50669f3 --- /dev/null +++ b/node_modules/ext/node_modules/type/reg-exp/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/reg-exp/is.js b/node_modules/ext/node_modules/type/reg-exp/is.js new file mode 100644 index 0000000..f0c69d5 --- /dev/null +++ b/node_modules/ext/node_modules/type/reg-exp/is.js @@ -0,0 +1,37 @@ +"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/node_modules/ext/node_modules/type/safe-integer/coerce.js b/node_modules/ext/node_modules/type/safe-integer/coerce.js new file mode 100644 index 0000000..b97e4aa --- /dev/null +++ b/node_modules/ext/node_modules/type/safe-integer/coerce.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/safe-integer/ensure.js b/node_modules/ext/node_modules/type/safe-integer/ensure.js new file mode 100644 index 0000000..dbdc46d --- /dev/null +++ b/node_modules/ext/node_modules/type/safe-integer/ensure.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/set/ensure.js b/node_modules/ext/node_modules/type/set/ensure.js new file mode 100644 index 0000000..c5b6a41 --- /dev/null +++ b/node_modules/ext/node_modules/type/set/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/set/is.js b/node_modules/ext/node_modules/type/set/is.js new file mode 100644 index 0000000..d0b137b --- /dev/null +++ b/node_modules/ext/node_modules/type/set/is.js @@ -0,0 +1,27 @@ +"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/node_modules/ext/node_modules/type/string/coerce.js b/node_modules/ext/node_modules/type/string/coerce.js new file mode 100644 index 0000000..43cd931 --- /dev/null +++ b/node_modules/ext/node_modules/type/string/coerce.js @@ -0,0 +1,23 @@ +"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/node_modules/ext/node_modules/type/string/ensure.js b/node_modules/ext/node_modules/type/string/ensure.js new file mode 100644 index 0000000..e26b5f0 --- /dev/null +++ b/node_modules/ext/node_modules/type/string/ensure.js @@ -0,0 +1,13 @@ +"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/node_modules/ext/node_modules/type/thenable/ensure.js b/node_modules/ext/node_modules/type/thenable/ensure.js new file mode 100644 index 0000000..8397c7c --- /dev/null +++ b/node_modules/ext/node_modules/type/thenable/ensure.js @@ -0,0 +1,14 @@ +"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/node_modules/ext/node_modules/type/thenable/is.js b/node_modules/ext/node_modules/type/thenable/is.js new file mode 100644 index 0000000..1f3d399 --- /dev/null +++ b/node_modules/ext/node_modules/type/thenable/is.js @@ -0,0 +1,9 @@ +"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/node_modules/ext/node_modules/type/time-value/coerce.js b/node_modules/ext/node_modules/type/time-value/coerce.js new file mode 100644 index 0000000..7124864 --- /dev/null +++ b/node_modules/ext/node_modules/type/time-value/coerce.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/time-value/ensure.js b/node_modules/ext/node_modules/type/time-value/ensure.js new file mode 100644 index 0000000..ddf4f61 --- /dev/null +++ b/node_modules/ext/node_modules/type/time-value/ensure.js @@ -0,0 +1,15 @@ +"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/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts new file mode 100644 index 0000000..e949e11 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToArrayLength(value: any): number | null; +export default coerceToArrayLength; diff --git a/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts new file mode 100644 index 0000000..25c9370 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts new file mode 100644 index 0000000..549febe --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts @@ -0,0 +1,11 @@ +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/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts b/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts new file mode 100644 index 0000000..acdd657 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts @@ -0,0 +1,2 @@ +declare function isArrayLike(value: any, options?: {allowString?: boolean}): boolean; +export default isArrayLike; diff --git a/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts new file mode 100644 index 0000000..6c249b7 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts @@ -0,0 +1,10 @@ +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/node_modules/ext/node_modules/type/ts-types/array/is.d.ts b/node_modules/ext/node_modules/type/ts-types/array/is.d.ts new file mode 100644 index 0000000..71af03e --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/array/is.d.ts @@ -0,0 +1,2 @@ +declare function isArray(value: any): boolean; +export default isArray; diff --git a/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts new file mode 100644 index 0000000..8c73fc6 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToBigInt(value: any): bigint | null; +export default coerceToBigInt; diff --git a/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts new file mode 100644 index 0000000..93073cb --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts new file mode 100644 index 0000000..79dd28c --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts b/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts new file mode 100644 index 0000000..768a635 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts @@ -0,0 +1,2 @@ +declare function isConstructor(value: any): boolean; +export default isConstructor; diff --git a/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts new file mode 100644 index 0000000..d96ad31 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/date/is.d.ts b/node_modules/ext/node_modules/type/ts-types/date/is.d.ts new file mode 100644 index 0000000..7907a8f --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/date/is.d.ts @@ -0,0 +1,2 @@ +declare function isDate(value: any): boolean; +export default isDate; diff --git a/node_modules/ext/node_modules/type/ts-types/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/ensure.d.ts new file mode 100644 index 0000000..62ba597 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/ensure.d.ts @@ -0,0 +1,24 @@ +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/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts new file mode 100644 index 0000000..b42f446 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/error/is.d.ts b/node_modules/ext/node_modules/type/ts-types/error/is.d.ts new file mode 100644 index 0000000..db64ea3 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/error/is.d.ts @@ -0,0 +1,2 @@ +declare function isError(value: any): boolean; +export default isError; diff --git a/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts new file mode 100644 index 0000000..f1edc2d --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToFinite(value: any): number | null; +export default coerceToFinite; diff --git a/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts new file mode 100644 index 0000000..988c511 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts new file mode 100644 index 0000000..30839e5 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/function/is.d.ts b/node_modules/ext/node_modules/type/ts-types/function/is.d.ts new file mode 100644 index 0000000..9d94f95 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/function/is.d.ts @@ -0,0 +1,2 @@ +declare function isFunction(value: any): boolean; +export default isFunction; diff --git a/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts new file mode 100644 index 0000000..3bbb00f --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToInteger(value: any): number | null; +export default coerceToInteger; diff --git a/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts new file mode 100644 index 0000000..06f1c8a --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts new file mode 100644 index 0000000..973d3ea --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts @@ -0,0 +1,10 @@ +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/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts b/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts new file mode 100644 index 0000000..93686d2 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts @@ -0,0 +1,2 @@ +declare function isIterable(value: any, options?: { allowString?: boolean, denyEmpty?: boolean }): boolean; +export default isIterable; diff --git a/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts new file mode 100644 index 0000000..6a23851 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/map/is.d.ts b/node_modules/ext/node_modules/type/ts-types/map/is.d.ts new file mode 100644 index 0000000..340ed1b --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/map/is.d.ts @@ -0,0 +1,2 @@ +declare function isMap(value: any): boolean; +export default isMap; diff --git a/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts new file mode 100644 index 0000000..633317c --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToNaturalNumber(value: any): number | null; +export default coerceToNaturalNumber; diff --git a/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts new file mode 100644 index 0000000..2f6d6b5 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts new file mode 100644 index 0000000..cc9f355 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToNumber(value: any): number | null; +export default coerceToNumber; diff --git a/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts new file mode 100644 index 0000000..326b222 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts new file mode 100644 index 0000000..f5ccce1 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/object/is.d.ts b/node_modules/ext/node_modules/type/ts-types/object/is.d.ts new file mode 100644 index 0000000..47fdd9c --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/object/is.d.ts @@ -0,0 +1,2 @@ +declare function isObject(value: any): boolean; +export default isObject; diff --git a/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts new file mode 100644 index 0000000..8681e77 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts b/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts new file mode 100644 index 0000000..de32a5e --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts @@ -0,0 +1,2 @@ +declare function isPlainFunction(value: any): boolean; +export default isPlainFunction; diff --git a/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts new file mode 100644 index 0000000..063d709 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts @@ -0,0 +1,10 @@ +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/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts b/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts new file mode 100644 index 0000000..8626085 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts @@ -0,0 +1,2 @@ +declare function isPlainObject(value: any): boolean; +export default isPlainObject; diff --git a/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts new file mode 100644 index 0000000..3ddf4ea --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts b/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts new file mode 100644 index 0000000..9306fe5 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts @@ -0,0 +1,2 @@ +declare function isPromise(value: any): boolean; +export default isPromise; diff --git a/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts b/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts new file mode 100644 index 0000000..7f2eb12 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts @@ -0,0 +1,2 @@ +declare function isPrototype(value: any): boolean; +export default isPrototype; diff --git a/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts new file mode 100644 index 0000000..95a2c9b --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts b/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts new file mode 100644 index 0000000..a325e34 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts @@ -0,0 +1,2 @@ +declare function isRegExp(value: any): boolean; +export default isRegExp; diff --git a/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts new file mode 100644 index 0000000..5e6539c --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToSafeInteger(value: any): number | null; +export default coerceToSafeInteger; diff --git a/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts new file mode 100644 index 0000000..5d4b953 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts new file mode 100644 index 0000000..2b14259 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/set/is.d.ts b/node_modules/ext/node_modules/type/ts-types/set/is.d.ts new file mode 100644 index 0000000..530aed3 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/set/is.d.ts @@ -0,0 +1,2 @@ +declare function isSet(value: any): boolean; +export default isSet; diff --git a/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts new file mode 100644 index 0000000..603519d --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToString(value: any): string | null; +export default coerceToString; diff --git a/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts new file mode 100644 index 0000000..d31965a --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts @@ -0,0 +1,7 @@ +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/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts new file mode 100644 index 0000000..741faad --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts @@ -0,0 +1,10 @@ +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/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts b/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts new file mode 100644 index 0000000..c8f207f --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts @@ -0,0 +1,2 @@ +declare function isThenable(value: any): boolean; +export default isThenable; diff --git a/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts b/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts new file mode 100644 index 0000000..44849ba --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToTimeValue(value: any): number | null; +export default coerceToTimeValue; diff --git a/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts new file mode 100644 index 0000000..f8084b8 --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts @@ -0,0 +1,5 @@ +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/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts b/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts new file mode 100644 index 0000000..928b29e --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts @@ -0,0 +1,4 @@ +import { EnsureOptions } from '../ensure'; + +declare function ensureValue(value: any, options?: EnsureOptions): T; +export default ensureValue; diff --git a/node_modules/ext/node_modules/type/ts-types/value/is.d.ts b/node_modules/ext/node_modules/type/ts-types/value/is.d.ts new file mode 100644 index 0000000..31f306d --- /dev/null +++ b/node_modules/ext/node_modules/type/ts-types/value/is.d.ts @@ -0,0 +1,2 @@ +declare function isValue(value: any): boolean; +export default isValue; diff --git a/node_modules/ext/node_modules/type/value/ensure.js b/node_modules/ext/node_modules/type/value/ensure.js new file mode 100644 index 0000000..3067a3e --- /dev/null +++ b/node_modules/ext/node_modules/type/value/ensure.js @@ -0,0 +1,12 @@ +"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/node_modules/ext/node_modules/type/value/is.js b/node_modules/ext/node_modules/type/value/is.js new file mode 100644 index 0000000..648aa9c --- /dev/null +++ b/node_modules/ext/node_modules/type/value/is.js @@ -0,0 +1,6 @@ +"use strict"; + +// ES3 safe +var _undefined = void 0; + +module.exports = function (value) { return value !== _undefined && value !== null; }; diff --git a/node_modules/ext/object/clear.js b/node_modules/ext/object/clear.js new file mode 100644 index 0000000..be3be2b --- /dev/null +++ b/node_modules/ext/object/clear.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureObject = require("type/object/ensure") + , ensure = require("type/ensure"); + +var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (object) { + ensure(["object", object, ensureObject]); + for (var key in object) { + if (!objPropertyIsEnumerable.call(object, key)) continue; + delete object[key]; + } + return object; +}; diff --git a/node_modules/ext/object/entries/implement.js b/node_modules/ext/object/entries/implement.js new file mode 100644 index 0000000..383ceee --- /dev/null +++ b/node_modules/ext/object/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "entries", { + value: require("./implementation"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/ext/object/entries/implementation.js b/node_modules/ext/object/entries/implementation.js new file mode 100644 index 0000000..d6f121c --- /dev/null +++ b/node_modules/ext/object/entries/implementation.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureValue = require("type/value/ensure"); + +var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (object) { + object = Object(ensureValue(object)); + var result = []; + for (var key in object) { + if (!objPropertyIsEnumerable.call(object, key)) continue; + result.push([key, object[key]]); + } + return result; +}; diff --git a/node_modules/ext/object/entries/index.js b/node_modules/ext/object/entries/index.js new file mode 100644 index 0000000..0a784d6 --- /dev/null +++ b/node_modules/ext/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.entries : require("./implementation"); diff --git a/node_modules/ext/object/entries/is-implemented.js b/node_modules/ext/object/entries/is-implemented.js new file mode 100644 index 0000000..aad52b2 --- /dev/null +++ b/node_modules/ext/object/entries/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + try { return Object.entries({ foo: 12 })[0][0] === "foo"; } + catch (e) { return false; } +}; diff --git a/node_modules/ext/package.json b/node_modules/ext/package.json new file mode 100644 index 0000000..4bf9e12 --- /dev/null +++ b/node_modules/ext/package.json @@ -0,0 +1,152 @@ +{ + "name": "ext", + "version": "1.7.0", + "description": "JavaScript utilities with respect to emerging standard", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ecmascript", + "es", + "es6", + "extensions", + "ext", + "addons", + "lodash", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": { + "type": "git", + "url": "https://github.com/medikoo/es5-ext#ext" + }, + "dependencies": { + "type": "^2.7.2" + }, + "devDependencies": { + "chai": "^4.3.6", + "eslint": "^8.23.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": "^13.0.3", + "mocha": "^6.2.3", + "nyc": "^15.1.0", + "prettier-elastic": "^2.2.1", + "sinon": "^8.1.1", + "timers-ext": "^0.1.7" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintIgnore": [ + "_es5-ext" + ], + "eslintConfig": { + "extends": "medikoo/es3", + "root": true, + "overrides": [ + { + "files": "global-this/implementation.js", + "globals": { + "__global__": true, + "self": true, + "window": true + }, + "rules": { + "no-extend-native": "off", + "strict": "off" + } + }, + { + "files": [ + "global-this/is-implemented.js", + "global-this/index.js" + ], + "globals": { + "globalThis": true + } + }, + { + "files": "string_/camel-to-hyphen.js", + "rules": { + "id-length": "off" + } + }, + { + "files": "test/**/*.js", + "env": { + "mocha": true + } + }, + { + "files": [ + "test/promise/limit.js", + "test/thenable_/finally.js" + ], + "globals": { + "Promise": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md", + "*.yml" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "mocha": { + "recursive": true + }, + "nyc": { + "all": true, + "exclude": [ + ".github", + "_es5-ext", + "coverage/**", + "test/**", + "*.config.js" + ], + "reporter": [ + "lcov", + "html", + "text-summary" + ] + }, + "scripts": { + "coverage": "nyc npm test", + "lint": "eslint .", + "lint:updated": "pipe-git-updated --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 --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" + }, + "license": "ISC" +} diff --git a/node_modules/ext/promise/limit.js b/node_modules/ext/promise/limit.js new file mode 100644 index 0000000..841afad --- /dev/null +++ b/node_modules/ext/promise/limit.js @@ -0,0 +1,62 @@ +"use strict"; + +var ensureNaturalNumber = require("type/natural-number/ensure") + , ensurePlainFunction = require("type/plain-function/ensure") + , ensure = require("type/ensure") + , defineFunctionLength = require("../lib/private/define-function-length"); + +module.exports = function (limit, callback) { + limit = ensure( + ["limit", limit, ensureNaturalNumber, { min: 1 }], + ["callback", callback, ensurePlainFunction] + )[0]; + + var Promise = this, ongoingCount = 0, pending = []; + var onSuccess, onFailure; + + var release = function () { + --ongoingCount; + if (ongoingCount >= limit) return; + var next = pending.shift(); + if (!next) return; + ++ongoingCount; + try { + next.resolve( + Promise.resolve(callback.apply(next.context, next.arguments)).then( + onSuccess, onFailure + ) + ); + } catch (exception) { + release(); + next.reject(exception); + } + }; + + onSuccess = function (value) { + release(); + return value; + }; + + onFailure = function (exception) { + release(); + throw exception; + }; + + return defineFunctionLength(callback.length, function () { + if (ongoingCount >= limit) { + var context = this, args = arguments; + return new Promise(function (resolve, reject) { + pending.push({ + context: context, + arguments: args, + resolve: resolve, + reject: reject + }); + }); + } + ++ongoingCount; + try { + return Promise.resolve(callback.apply(this, arguments)).then(onSuccess, onFailure); + } catch (exception) { return onFailure(exception); } + }); +}; diff --git a/node_modules/ext/string/random.js b/node_modules/ext/string/random.js new file mode 100644 index 0000000..c96ef92 --- /dev/null +++ b/node_modules/ext/string/random.js @@ -0,0 +1,50 @@ +"use strict"; + +var isObject = require("type/object/is") + , ensureNaturalNumber = require("type/natural-number/ensure") + , ensureString = require("type/string/ensure"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { return random().toString(36).slice(2); }; + +var getString = function (length, charset) { + var str; + if (charset) { + var charsetLength = charset.length; + str = ""; + for (var i = 0; i < length; ++i) { + str += charset.charAt(Math.floor(Math.random() * charsetLength)); + } + return str; + } + str = getChunk(); + if (length === null) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = arguments[0]; + if (!isObject(options)) options = {}; + var length = ensureNaturalNumber(options.length, { "default": 10 }) + , isUnique = options.isUnique + , charset = ensureString(options.charset, { isOptional: true }); + + var str = getString(length, charset); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/node_modules/ext/string_/camel-to-hyphen.js b/node_modules/ext/string_/camel-to-hyphen.js new file mode 100644 index 0000000..feffae6 --- /dev/null +++ b/node_modules/ext/string_/camel-to-hyphen.js @@ -0,0 +1,49 @@ +"use strict"; + +var ensureString = require("type/string/ensure") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +var capitalLetters = { + A: true, + B: true, + C: true, + D: true, + E: true, + F: true, + G: true, + H: true, + I: true, + J: true, + K: true, + L: true, + M: true, + N: true, + O: true, + P: true, + Q: true, + R: true, + S: true, + T: true, + U: true, + V: true, + W: true, + X: true, + Y: true, + Z: true +}; + +module.exports = function () { + var input = ensureString(this); + if (!input) return input; + var outputLetters = []; + for (var index = 0, letter; (letter = input[index]); ++index) { + if (objHasOwnProperty.call(capitalLetters, letter)) { + if (index) outputLetters.push("-"); + outputLetters.push(letter.toLowerCase()); + } else { + outputLetters.push(letter); + } + } + + return outputLetters.join(""); +}; diff --git a/node_modules/ext/string_/capitalize.js b/node_modules/ext/string_/capitalize.js new file mode 100644 index 0000000..bc76311 --- /dev/null +++ b/node_modules/ext/string_/capitalize.js @@ -0,0 +1,9 @@ +"use strict"; + +var ensureString = require("type/string/ensure"); + +module.exports = function () { + var input = ensureString(this); + if (!input) return input; + return input.charAt(0).toUpperCase() + input.slice(1); +}; diff --git a/node_modules/ext/string_/includes/implementation.js b/node_modules/ext/string_/includes/implementation.js new file mode 100644 index 0000000..a7219f2 --- /dev/null +++ b/node_modules/ext/string_/includes/implementation.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/node_modules/ext/string_/includes/index.js b/node_modules/ext/string_/includes/index.js new file mode 100644 index 0000000..ee4e284 --- /dev/null +++ b/node_modules/ext/string_/includes/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.includes + : require("./implementation"); diff --git a/node_modules/ext/string_/includes/is-implemented.js b/node_modules/ext/string_/includes/is-implemented.js new file mode 100644 index 0000000..edc4515 --- /dev/null +++ b/node_modules/ext/string_/includes/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.includes !== "function") return false; + return str.includes("dwa") === true && str.includes("foo") === false; +}; diff --git a/node_modules/ext/thenable_/finally.js b/node_modules/ext/thenable_/finally.js new file mode 100644 index 0000000..42274bf --- /dev/null +++ b/node_modules/ext/thenable_/finally.js @@ -0,0 +1,24 @@ +"use strict"; + +var ensurePlainFunction = require("type/plain-function/ensure") + , isThenable = require("type/thenable/is") + , ensureThenable = require("type/thenable/ensure"); + +var resolveCallback = function (callback, next) { + var callbackResult = callback(); + if (!isThenable(callbackResult)) return next(); + return callbackResult.then(next); +}; + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + return this.then( + function (result) { + return resolveCallback(callback, function () { return result; }); + }, + function (error) { + return resolveCallback(callback, function () { throw error; }); + } + ); +}; diff --git a/node_modules/extend-shallow/LICENSE b/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/extend-shallow/README.md b/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..cdc45d4 --- /dev/null +++ b/node_modules/extend-shallow/README.md @@ -0,0 +1,61 @@ +# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extend-shallow --save +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## Related + +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/node_modules/extend-shallow/index.js b/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..92a067f --- /dev/null +++ b/node_modules/extend-shallow/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var isObject = require('is-extendable'); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/node_modules/extend-shallow/package.json b/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..b42e01c --- /dev/null +++ b/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "devDependencies": { + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "for-own": "^0.1.3", + "glob": "^5.0.12", + "is-plain-object": "^2.0.1", + "kind-of": "^2.0.0", + "minimist": "^1.1.1", + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/extend/.editorconfig b/node_modules/extend/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/extend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/extend/.eslintrc b/node_modules/extend/.eslintrc new file mode 100644 index 0000000..a34cf28 --- /dev/null +++ b/node_modules/extend/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 20], + "eqeqeq": [2, "allow-null"], + "func-name-matching": [1], + "max-depth": [1, 4], + "max-statements": [2, 26], + "no-extra-parens": [1], + "no-magic-numbers": [0], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + "sort-keys": [0], + } +} diff --git a/node_modules/extend/.jscs.json b/node_modules/extend/.jscs.json new file mode 100644 index 0000000..3cce01d --- /dev/null +++ b/node_modules/extend/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 6 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": false, + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} + diff --git a/node_modules/extend/.travis.yml b/node_modules/extend/.travis.yml new file mode 100644 index 0000000..5ccdfc4 --- /dev/null +++ b/node_modules/extend/.travis.yml @@ -0,0 +1,230 @@ +language: node_js +os: + - linux +node_js: + - "10.7" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/extend/CHANGELOG.md b/node_modules/extend/CHANGELOG.md new file mode 100644 index 0000000..2cf7de6 --- /dev/null +++ b/node_modules/extend/CHANGELOG.md @@ -0,0 +1,83 @@ +3.0.2 / 2018-07-19 +================== + * [Fix] Prevent merging `__proto__` property (#48) + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` + * [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm` + +3.0.1 / 2017-04-27 +================== + * [Fix] deep extending should work with a non-object (#46) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` + * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. + * [Docs] Add example to readme (#34) + +3.0.0 / 2015-07-01 +================== + * [Possible breaking change] Use global "strict" directive (#32) + * [Tests] `int` is an ES3 reserved word + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Add `npm run eslint` + * [Dev Deps] Update `covert`, `jscs` + +2.0.1 / 2015-04-25 +================== + * Use an inline `isArray` check, for ES3 browsers. (#27) + * Some old browsers fail when an identifier is `toString` + * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds + * Add license info to package.json (#25) + * Update `tape`, `jscs` + * Adding a CHANGELOG + +2.0.0 / 2014-10-01 +================== + * Increase code coverage to 100%; run code coverage as part of tests + * Add `npm run lint`; Run linter as part of tests + * Remove nodeType and setInterval checks in isPlainObject + * Updating `tape`, `jscs`, `covert` + * General style and README cleanup + +1.3.0 / 2014-06-20 +================== + * Add component.json for browser support (#18) + * Use SVG for badges in README (#16) + * Updating `tape`, `covert` + * Updating travis-ci to work with multiple node versions + * Fix `deep === false` bug (returning target as {}) (#14) + * Fixing constructor checks in isPlainObject + * Adding additional test coverage + * Adding `npm run coverage` + * Add LICENSE (#13) + * Adding a warning about `false`, per #11 + * General style and whitespace cleanup + +1.2.1 / 2013-09-14 +================== + * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8 + * Updating `tape` + +1.2.0 / 2013-09-02 +================== + * Updating the README: add badges + * Adding a missing variable reference. + * Using `tape` instead of `buster` for tests; add more tests (#7) + * Adding node 0.10 to Travis CI (#6) + * Enabling "npm test" and cleaning up package.json (#5) + * Add Travis CI. + +1.1.3 / 2012-12-06 +================== + * Added unit tests. + * Ensure extend function is named. (Looks nicer in a stack trace.) + * README cleanup. + +1.1.1 / 2012-11-07 +================== + * README cleanup. + * Added installation instructions. + * Added a missing semicolon + +1.0.0 / 2012-04-08 +================== + * Initial commit + diff --git a/node_modules/extend/LICENSE b/node_modules/extend/LICENSE new file mode 100644 index 0000000..e16d6a5 --- /dev/null +++ b/node_modules/extend/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/extend/README.md b/node_modules/extend/README.md new file mode 100644 index 0000000..5b8249a --- /dev/null +++ b/node_modules/extend/README.md @@ -0,0 +1,81 @@ +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] + +# extend() for Node.js [![Version Badge][npm-version-png]][npm-url] + +`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true. + +Notes: + +* Since Node.js >= 4, + [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + now offers the same functionality natively (but without the "deep copy" option). + See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6). +* Some native implementations of `Object.assign` in both Node.js and many + browsers (since NPM modules are for the browser too) may not be fully + spec-compliant. + Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for + a compliant candidate. + +## Installation + +This package is available on [npm][npm-url] as: `extend` + +``` sh +npm install extend +``` + +## Usage + +**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** + +*Extend one object with one or more others, returning the modified object.* + +**Example:** + +``` js +var extend = require('extend'); +extend(targetObject, object1, object2); +``` + +Keep in mind that the target object will be modified, and will be returned from extend(). + +If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). +Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. +Warning: passing `false` as the first argument is not supported. + +### Arguments + +* `deep` *Boolean* (optional) +If set, the merge becomes recursive (i.e. deep copy). +* `target` *Object* +The object to extend. +* `object1` *Object* +The object that will be merged into the first. +* `objectN` *Object* (Optional) +More objects to merge into the first. + +## License + +`node-extend` is licensed under the [MIT License][mit-license-url]. + +## Acknowledgements + +All credit to the jQuery authors for perfecting this amazing utility. + +Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb]. + +[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg +[travis-url]: https://travis-ci.org/justmoon/node-extend +[npm-url]: https://npmjs.org/package/extend +[mit-license-url]: http://opensource.org/licenses/MIT +[github-justmoon]: https://github.com/justmoon +[github-insin]: https://github.com/insin +[github-ljharb]: https://github.com/ljharb +[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg +[deps-svg]: https://david-dm.org/justmoon/node-extend.svg +[deps-url]: https://david-dm.org/justmoon/node-extend +[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg +[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies + diff --git a/node_modules/extend/component.json b/node_modules/extend/component.json new file mode 100644 index 0000000..1500a2f --- /dev/null +++ b/node_modules/extend/component.json @@ -0,0 +1,32 @@ +{ + "name": "extend", + "author": "Stefan Thomas (http://www.justmoon.net)", + "version": "3.0.0", + "description": "Port of jQuery.extend for node.js and the browser.", + "scripts": [ + "index.js" + ], + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "keywords": [ + "extend", + "clone", + "merge" + ], + "repository" : { + "type": "git", + "url": "https://github.com/justmoon/node-extend.git" + }, + "dependencies": { + }, + "devDependencies": { + "tape" : "~3.0.0", + "covert": "~0.4.0", + "jscs": "~1.6.2" + } +} + diff --git a/node_modules/extend/index.js b/node_modules/extend/index.js new file mode 100644 index 0000000..2aa3faa --- /dev/null +++ b/node_modules/extend/index.js @@ -0,0 +1,117 @@ +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; + +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } + + // Return the modified object + return target; +}; diff --git a/node_modules/extend/package.json b/node_modules/extend/package.json new file mode 100644 index 0000000..85279f7 --- /dev/null +++ b/node_modules/extend/package.json @@ -0,0 +1,42 @@ +{ + "name": "extend", + "author": "Stefan Thomas (http://www.justmoon.net)", + "version": "3.0.2", + "description": "Port of jQuery.extend for node.js and the browser", + "main": "index", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage-quiet", + "tests-only": "node test", + "coverage": "covert test/index.js", + "coverage-quiet": "covert test/index.js --quiet", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "keywords": [ + "extend", + "clone", + "merge" + ], + "repository": { + "type": "git", + "url": "https://github.com/justmoon/node-extend.git" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.19.1", + "jscs": "^3.0.7", + "tape": "^4.9.1" + }, + "license": "MIT" +} diff --git a/node_modules/extglob/LICENSE b/node_modules/extglob/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/extglob/README.md b/node_modules/extglob/README.md new file mode 100644 index 0000000..3255ea2 --- /dev/null +++ b/node_modules/extglob/README.md @@ -0,0 +1,362 @@ +# extglob [![NPM version](https://img.shields.io/npm/v/extglob.svg?style=flat)](https://www.npmjs.com/package/extglob) [![NPM monthly downloads](https://img.shields.io/npm/dm/extglob.svg?style=flat)](https://npmjs.org/package/extglob) [![NPM total downloads](https://img.shields.io/npm/dt/extglob.svg?style=flat)](https://npmjs.org/package/extglob) [![Linux Build Status](https://img.shields.io/travis/micromatch/extglob.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/extglob) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/extglob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/extglob) + +> Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extglob +``` + +* Convert an extglob string to a regex-compatible string. +* More complete (and correct) support than [minimatch](https://github.com/isaacs/minimatch) (minimatch fails a large percentage of the extglob tests) +* Handles [negation patterns](#extglob-patterns) +* Handles [nested patterns](#extglob-patterns) +* Organized code base, easy to maintain and make changes when edge cases arise +* As you can see by the [benchmarks](#benchmarks), extglob doesn't pay with speed for it's completeness, accuracy and quality. + +**Heads up!**: This library only supports extglobs, to handle full glob patterns and other extended globbing features use [micromatch](https://github.com/jonschlinkert/micromatch) instead. + +## Usage + +The main export is a function that takes a string and options, and returns an object with the parsed AST and the compiled `.output`, which is a regex-compatible string that can be used for matching. + +```js +var extglob = require('extglob'); +console.log(extglob('!(xyz)*.js')); +``` + +## Extglob cheatsheet + +Extended globbing patterns can be defined as follows (as described by the [bash man page](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)): + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern-list)` | `(...|...)?` | Matches zero or one occurrence of the given pattern(s) | +| `*(pattern-list)` | `(...|...)*` | Matches zero or more occurrences of the given pattern(s) | +| `+(pattern-list)` | `(...|...)+` | Matches one or more occurrences of the given pattern(s) | +| `@(pattern-list)` | `(...|...)` [1] | Matches one of the given pattern(s) | +| `!(pattern-list)` | N/A | Matches anything except one of the given pattern(s) | + +## API + +### [extglob](index.js#L36) + +Convert the given `extglob` pattern into a regex-compatible string. Returns an object with the compiled result and the parsed AST. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{String}** + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob('*.!(*a)')); +//=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' +``` + +### [.match](index.js#L56) + +Takes an array of strings and an extglob pattern and returns a new array that contains only the strings that match the pattern. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Extglob pattern +* `options` **{Object}** +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)')); +//=> ['a.b', 'a.c'] +``` + +### [.isMatch](index.js#L111) + +Returns true if the specified `string` matches the given extglob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Extglob pattern +* `options` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var extglob = require('extglob'); + +console.log(extglob.isMatch('a.a', '*.!(*a)')); +//=> false +console.log(extglob.isMatch('a.b', '*.!(*a)')); +//=> true +``` + +### [.contains](index.js#L150) + +Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}** +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.contains('aa/bb/cc', '*b')); +//=> true +console.log(extglob.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matcher](index.js#L184) + +Takes an extglob pattern and returns a matcher function. The returned function takes the string to match as its only argument. + +**Params** + +* `pattern` **{String}**: Extglob pattern +* `options` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var extglob = require('extglob'); +var isMatch = extglob.matcher('*.!(*a)'); + +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.create](index.js#L214) + +Convert the given `extglob` pattern into a regex-compatible string. Returns an object with the compiled result and the parsed AST. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{String}** + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.create('*.!(*a)').output); +//=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' +``` + +### [.capture](index.js#L248) + +Returns an array of matches captured by `pattern` in `string`, or `null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var extglob = require('extglob'); +extglob.capture(pattern, string[, options]); + +console.log(extglob.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(extglob.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L281) + +Create a regular expression from the given `pattern` and `options`. + +**Params** + +* `pattern` **{String}**: The pattern to convert to regex. +* `options` **{Object}** +* `returns` **{RegExp}** + +**Example** + +```js +var extglob = require('extglob'); +var re = extglob.makeRe('*.!(*a)'); +console.log(re); +//=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/ +``` + +## Options + +Available options are based on the options from Bash (and the option names used in bash). + +### options.nullglob + +**Type**: `boolean` + +**Default**: `undefined` + +When enabled, the pattern itself will be returned when no matches are found. + +### options.nonull + +Alias for [options.nullglob](#optionsnullglob), included for parity with minimatch. + +### options.cache + +**Type**: `boolean` + +**Default**: `undefined` + +Functions are memoized based on the given glob patterns and options. Disable memoization by setting `options.cache` to false. + +### options.failglob + +**Type**: `boolean` + +**Default**: `undefined` + +Throw an error is no matches are found. + +## Benchmarks + +Last run on December 21, 2017 + +```sh +# negation-nested (49 bytes) + extglob x 2,228,255 ops/sec ±0.98% (89 runs sampled) + minimatch x 207,875 ops/sec ±0.61% (91 runs sampled) + + fastest is extglob (by 1072% avg) + +# negation-simple (43 bytes) + extglob x 2,205,668 ops/sec ±1.00% (91 runs sampled) + minimatch x 311,923 ops/sec ±1.25% (91 runs sampled) + + fastest is extglob (by 707% avg) + +# range-false (57 bytes) + extglob x 2,263,877 ops/sec ±0.40% (94 runs sampled) + minimatch x 271,372 ops/sec ±1.02% (91 runs sampled) + + fastest is extglob (by 834% avg) + +# range-true (56 bytes) + extglob x 2,161,891 ops/sec ±0.41% (92 runs sampled) + minimatch x 268,265 ops/sec ±1.17% (91 runs sampled) + + fastest is extglob (by 806% avg) + +# star-simple (46 bytes) + extglob x 2,211,081 ops/sec ±0.49% (92 runs sampled) + minimatch x 343,319 ops/sec ±0.59% (91 runs sampled) + + fastest is extglob (by 644% avg) + +``` + +## Differences from Bash + +This library has complete parity with Bash 4.3 with only a couple of minor differences. + +* In some cases Bash returns true if the given string "contains" the pattern, whereas this library returns true if the string is an exact match for the pattern. You can relax this by setting `options.contains` to true. +* This library is more accurate than Bash and thus does not fail some of the tests that Bash 4.3 still lists as failing in their unit tests + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by [micromatch].") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [isiahmeadows](https://github.com/isiahmeadows) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [mjbvz](https://github.com/mjbvz) | +| 1 | [shinnn](https://github.com/shinnn) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 21, 2017._ + +
+
+
    +
  1. `@` isn "'t a RegEx character." + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/extglob/changelog.md b/node_modules/extglob/changelog.md new file mode 100644 index 0000000..c9fc4fc --- /dev/null +++ b/node_modules/extglob/changelog.md @@ -0,0 +1,25 @@ +## Changelog + +### v2.0.0 + +**Added features** + +- Adds [.capture](readme.md#capture) method for capturing matches, thanks to [devongovett](https://github.com/devongovett) + + +### v1.0.0 + +**Breaking changes** + +- The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +- Adds a `.create` method to do what the main function did before v1.0.0 + +**Other changes** + +- adds `expand-brackets` parsers/compilers to handle nested brackets and extglobs +- uses `to-regex` to build regex for `makeRe` method +- improves coverage +- optimizations \ No newline at end of file diff --git a/node_modules/extglob/index.js b/node_modules/extglob/index.js new file mode 100644 index 0000000..116e6d5 --- /dev/null +++ b/node_modules/extglob/index.js @@ -0,0 +1,331 @@ +'use strict'; + +/** + * Module dependencies + */ + +var extend = require('extend-shallow'); +var unique = require('array-unique'); +var toRegex = require('to-regex'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var Extglob = require('./lib/extglob'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob('*.!(*a)')); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function extglob(pattern, options) { + return extglob.create(pattern, options).output; +} + +/** + * Takes an array of strings and an extglob pattern and returns a new + * array that contains only the strings that match the pattern. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)')); + * //=> ['a.b', 'a.c'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Extglob pattern + * @param {Object} `options` + * @return {Array} Returns an array of matches + * @api public + */ + +extglob.match = function(list, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + list = utils.arrayify(list); + var isMatch = extglob.matcher(pattern, options); + var len = list.length; + var idx = -1; + var matches = []; + + while (++idx < len) { + var ele = list[idx]; + + if (isMatch(ele)) { + matches.push(ele); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + + return options.nodupes !== false ? unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given + * extglob `pattern`. + * + * ```js + * var extglob = require('extglob'); + * + * console.log(extglob.isMatch('a.a', '*.!(*a)')); + * //=> false + * console.log(extglob.isMatch('a.b', '*.!(*a)')); + * //=> true + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.isMatch = function(str, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === str) { + return true; + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher); + return isMatch(str); +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but + * the pattern can match any part of the string. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(extglob.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +extglob.contains = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var opts = extend({}, options, {contains: true}); + opts.strictClose = false; + opts.strictOpen = false; + return extglob.isMatch(str, pattern, opts); +}; + +/** + * Takes an extglob pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var extglob = require('extglob'); + * var isMatch = extglob.matcher('*.!(*a)'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.matcher = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function matcher() { + var re = extglob.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; + } + + return utils.memoize('matcher', pattern, options, matcher); +}; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.create('*.!(*a)').output); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +extglob.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function create() { + var ext = new Extglob(options); + var ast = ext.parse(pattern, options); + return ext.compile(ast, options); + } + + return utils.memoize('create', pattern, options, create); +}; + +/** + * Returns an array of matches captured by `pattern` in `string`, or `null` + * if the pattern did not match. + * + * ```js + * var extglob = require('extglob'); + * extglob.capture(pattern, string[, options]); + * + * console.log(extglob.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(extglob.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +extglob.capture = function(pattern, str, options) { + var re = extglob.makeRe(pattern, extend({capture: true}, options)); + + function match() { + return function(string) { + var match = re.exec(string); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = utils.memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given `pattern` and `options`. + * + * ```js + * var extglob = require('extglob'); + * var re = extglob.makeRe('*.!(*a)'); + * console.log(re); + * //=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +extglob.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = extend({strictErrors: false}, options); + if (opts.strictErrors === true) opts.strict = true; + var res = extglob.create(pattern, opts); + return toRegex(res.output, opts); + } + + var regex = utils.memoize('makeRe', pattern, options, makeRe); + if (regex.source.length > MAX_LENGTH) { + throw new SyntaxError('potentially malicious regex detected'); + } + + return regex; +}; + +/** + * Cache + */ + +extglob.cache = utils.cache; +extglob.clearCache = function() { + extglob.cache.__data__ = {}; +}; + +/** + * Expose `Extglob` constructor, parsers and compilers + */ + +extglob.Extglob = Extglob; +extglob.compilers = compilers; +extglob.parsers = parsers; + +/** + * Expose `extglob` + * @type {Function} + */ + +module.exports = extglob; diff --git a/node_modules/extglob/lib/.DS_Store b/node_modules/extglob/lib/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/node_modules/extglob/lib/.DS_Store differ diff --git a/node_modules/extglob/lib/compilers.js b/node_modules/extglob/lib/compilers.js new file mode 100644 index 0000000..d7bed25 --- /dev/null +++ b/node_modules/extglob/lib/compilers.js @@ -0,0 +1,169 @@ +'use strict'; + +var brackets = require('expand-brackets'); + +/** + * Extglob compilers + */ + +module.exports = function(extglob) { + function star() { + if (typeof extglob.options.star === 'function') { + return extglob.options.star.apply(this, arguments); + } + if (typeof extglob.options.star === 'string') { + return extglob.options.star; + } + return '.*?'; + } + + /** + * Use `expand-brackets` compilers + */ + + extglob.use(brackets.compilers); + extglob.compiler + + /** + * Escaped: "\\*" + */ + + .set('escape', function(node) { + return this.emit(node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + return this.emit('\\' + node.val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var val = '[^\\\\/.]'; + var prev = this.prev(); + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch !== '!' && ch !== '=' && ch !== ':') { + return this.emit(val, node); + } + return this.emit(node.val, node); + } + + if (prev.type === 'text' && prev.val) { + return this.emit(val, node); + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus: "+" + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + var ch = this.output.slice(-1); + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node) { + var prev = this.prev(); + var prefix = prev.type !== 'text' && prev.type !== 'escape' + ? '(?!\\.)' + : ''; + + return this.emit(prefix + star.call(this, node), node); + }) + + /** + * Parens + */ + + .set('paren', function(node) { + return this.mapVisit(node.nodes); + }) + .set('paren.open', function(node) { + var capture = this.options.capture ? '(' : ''; + + switch (node.parent.prefix) { + case '!': + case '^': + return this.emit(capture + '(?:(?!(?:', node); + case '*': + case '+': + case '?': + case '@': + return this.emit(capture + '(?:', node); + default: { + var val = node.val; + if (this.options.bash === true) { + val = '\\' + val; + } else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') { + val += '?:'; + } + + return this.emit(val, node); + } + } + }) + .set('paren.close', function(node) { + var capture = this.options.capture ? ')' : ''; + + switch (node.prefix) { + case '!': + case '^': + var prefix = /^(\)|$)/.test(node.rest) ? '$' : ''; + var str = star.call(this, node); + + // if the extglob has a slash explicitly defined, we know the user wants + // to match slashes, so we need to ensure the "star" regex allows for it + if (node.parent.hasSlash && !this.options.star && this.options.slash !== false) { + str = '.*?'; + } + + return this.emit(prefix + ('))' + str + ')') + capture, node); + case '*': + case '+': + case '?': + return this.emit(')' + node.prefix + capture, node); + case '@': + return this.emit(')' + capture, node); + default: { + var val = (this.options.bash === true ? '\\' : '') + ')'; + return this.emit(val, node); + } + } + }) + + /** + * Text + */ + + .set('text', function(node) { + var val = node.val.replace(/[\[\]]/g, '\\$&'); + return this.emit(val, node); + }); +}; diff --git a/node_modules/extglob/lib/extglob.js b/node_modules/extglob/lib/extglob.js new file mode 100644 index 0000000..015f928 --- /dev/null +++ b/node_modules/extglob/lib/extglob.js @@ -0,0 +1,78 @@ +'use strict'; + +/** + * Module dependencies + */ + +var Snapdragon = require('snapdragon'); +var define = require('define-property'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./compilers'); +var parsers = require('./parsers'); + +/** + * Customize Snapdragon parser and renderer + */ + +function Extglob(options) { + this.options = extend({source: 'extglob'}, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(this.options); + this.snapdragon.patterns = this.snapdragon.patterns || {}; + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon); + parsers(this.snapdragon); + + /** + * Override Snapdragon `.parse` method + */ + + define(this.snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strict !== true) { + var node = last.nodes[0]; + node.val = '\\' + node.val; + var sibling = node.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; + }); + + /** + * Decorate `.parse` method + */ + + define(this, 'parse', function(ast, options) { + return this.snapdragon.parse.apply(this.snapdragon, arguments); + }); + + /** + * Decorate `.compile` method + */ + + define(this, 'compile', function(ast, options) { + return this.snapdragon.compile.apply(this.snapdragon, arguments); + }); + +} + +/** + * Expose `Extglob` + */ + +module.exports = Extglob; diff --git a/node_modules/extglob/lib/parsers.js b/node_modules/extglob/lib/parsers.js new file mode 100644 index 0000000..2ba7352 --- /dev/null +++ b/node_modules/extglob/lib/parsers.js @@ -0,0 +1,156 @@ +'use strict'; + +var brackets = require('expand-brackets'); +var define = require('define-property'); +var utils = require('./utils'); + +/** + * Characters to use in text regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Extglob parsers + */ + +function parsers(extglob) { + extglob.state = extglob.state || {}; + + /** + * Use `expand-brackets` parsers + */ + + extglob.use(brackets.parsers); + extglob.parser.sets.paren = extglob.parser.sets.paren || []; + extglob.parser + + /** + * Extglob open: "*(" + */ + + .capture('paren.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^([!@*?+])?\(/); + if (!m) return; + + var prev = this.prev(); + var prefix = m[1]; + var val = m[0]; + + var open = pos({ + type: 'paren.open', + parsed: parsed, + val: val + }); + + var node = pos({ + type: 'paren', + prefix: prefix, + nodes: [open] + }); + + // if nested negation extglobs, just cancel them out to simplify + if (prefix === '!' && prev.type === 'paren' && prev.prefix === '!') { + prev.prefix = '@'; + node.prefix = '@'; + } + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'parent', prev); + define(open, 'parent', node); + + this.push('paren', node); + prev.nodes.push(node); + }) + + /** + * Extglob close: ")" + */ + + .capture('paren.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\)/); + if (!m) return; + + var parent = this.pop('paren'); + var node = pos({ + type: 'paren.close', + rest: this.input, + parsed: parsed, + val: m[0] + }); + + if (!this.isType(parent, 'paren')) { + if (this.options.strict) { + throw new Error('missing opening paren: "("'); + } + node.escaped = true; + return node; + } + + node.prefix = parent.prefix; + parent.nodes.push(node); + define(node, 'parent', parent); + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0], + ch: m[1] + }); + }) + + /** + * Question marks: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + extglob.state.metachar = true; + return pos({ + type: 'qmark', + rest: this.input, + parsed: parsed, + val: m[0] + }); + }) + + /** + * Character parsers + */ + + .capture('star', /^\*(?!\()/) + .capture('plus', /^\+(?!\()/) + .capture('dot', /^\./) + .capture('text', not); +}; + +/** + * Expose text regex string + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; + +/** + * Extglob parsers + */ + +module.exports = parsers; diff --git a/node_modules/extglob/lib/utils.js b/node_modules/extglob/lib/utils.js new file mode 100644 index 0000000..37a59fb --- /dev/null +++ b/node_modules/extglob/lib/utils.js @@ -0,0 +1,69 @@ +'use strict'; + +var regex = require('regex-not'); +var Cache = require('fragment-cache'); + +/** + * Utils + */ + +var utils = module.exports; +var cache = utils.cache = new Cache(); + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (!Array.isArray(val)) { + return [val]; + } + return val; +}; + +/** + * Memoize a generated regex or function + */ + +utils.memoize = function(type, pattern, options, fn) { + var key = utils.createKey(type + pattern, options); + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + if (options && options.cache === false) { + return val; + } + + cache.set(type, key, val); + return val; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var key = pattern; + if (typeof options === 'undefined') { + return key; + } + for (var prop in options) { + key += ';' + prop + '=' + String(options[prop]); + } + return key; +}; + +/** + * Create the regex to use for matching text + */ + +utils.createRegex = function(str) { + var opts = {contains: true, strictClose: false}; + return regex(str, opts); +}; diff --git a/node_modules/extglob/node_modules/define-property/LICENSE b/node_modules/extglob/node_modules/define-property/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/extglob/node_modules/define-property/README.md b/node_modules/extglob/node_modules/define-property/README.md new file mode 100644 index 0000000..2f1af05 --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/README.md @@ -0,0 +1,95 @@ +# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save define-property +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add define-property +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ \ No newline at end of file diff --git a/node_modules/extglob/node_modules/define-property/index.js b/node_modules/extglob/node_modules/define-property/index.js new file mode 100644 index 0000000..27c19eb --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/extglob/node_modules/define-property/package.json b/node_modules/extglob/node_modules/define-property/package.json new file mode 100644 index 0000000..e0ab1ca --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/package.json @@ -0,0 +1,62 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/extglob/package.json b/node_modules/extglob/package.json new file mode 100644 index 0000000..afe5157 --- /dev/null +++ b/node_modules/extglob/package.json @@ -0,0 +1,108 @@ +{ + "name": "extglob", + "description": "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.", + "version": "2.0.4", + "homepage": "https://github.com/micromatch/extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Isiah Meadows (https://www.isiahmeadows.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Matt Bierner (http://mattbierner.com)", + "Shinnosuke Watanabe (https://shinnn.github.io)" + ], + "repository": "micromatch/extglob", + "bugs": { + "url": "https://github.com/micromatch/extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.1", + "helper-changelog": "^0.3.0", + "is-windows": "^1.0.1", + "micromatch": "^3.0.4", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.0", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "extended", + "extglob", + "glob", + "globbing", + "ksh", + "match", + "pattern", + "patterns", + "regex", + "test", + "wildcard" + ], + "lintDeps": { + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**/*.js" + ] + } + } + } + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "fill-range", + "micromatch" + ] + }, + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fancy-log/LICENSE b/node_modules/fancy-log/LICENSE new file mode 100644 index 0000000..3a58630 --- /dev/null +++ b/node_modules/fancy-log/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2018 Blaine Bublitz and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/fancy-log/README.md b/node_modules/fancy-log/README.md new file mode 100644 index 0000000..33ef5c1 --- /dev/null +++ b/node_modules/fancy-log/README.md @@ -0,0 +1,71 @@ +

+ + + +

+ +# fancy-log + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Log things, prefixed with a timestamp. + +## Usage + +```js +var log = require('fancy-log'); + +log('a message'); +// [16:27:02] a message + +log.error('oh no!'); +// [16:27:02] oh no! +``` + +## API + +### `log(msg...)` + +Logs the message as if you called `console.log` but prefixes the output with the +current time in HH:MM:ss format. + +### `log.error(msg...)` + +Logs the message as if you called `console.error` but prefixes the output with the +current time in HH:MM:ss format. + +### `log.warn(msg...)` + +Logs the message as if you called `console.warn` but prefixes the output with the +current time in HH:MM:ss format. + + +### `log.info(msg...)` + +Logs the message as if you called `console.info` but prefixes the output with the +current time in HH:MM:ss format. + +### `log.dir(msg...)` + +Logs the message as if you called `console.dir` but prefixes the output with the +current time in HH:MM:ss format. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/fancy-log.svg +[npm-url]: https://www.npmjs.com/package/fancy-log +[npm-image]: http://img.shields.io/npm/v/fancy-log.svg + +[travis-url]: https://travis-ci.org/gulpjs/fancy-log +[travis-image]: http://img.shields.io/travis/gulpjs/fancy-log.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fancy-log +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fancy-log.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/fancy-log +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fancy-log/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/fancy-log/index.js b/node_modules/fancy-log/index.js new file mode 100644 index 0000000..9dc9888 --- /dev/null +++ b/node_modules/fancy-log/index.js @@ -0,0 +1,92 @@ +'use strict'; + +var Console = require('console').Console; +var gray = require('ansi-gray'); +var timestamp = require('time-stamp'); +var supportsColor = require('color-support'); +var nodeVersion = require('parse-node-version')(process.version); + +var colorDetectionOptions = { + // If on Windows, ignore the isTTY check + // This is due to AppVeyor (and thus probably common Windows platforms?) failing the check + // TODO: If this is too broad, we can reduce it to an APPVEYOR env check + ignoreTTY: (process.platform === 'win32'), +}; + +// Needed to add this because node 10 decided to start coloring log output randomly +var console; +if (nodeVersion.major >= 10) { + // Node 10 also changed the way this is constructed + console = new Console({ + stdout: process.stdout, + stderr: process.stderr, + colorMode: false, + }); +} else { + console = new Console(process.stdout, process.stderr); +} + +function hasFlag(flag) { + return (process.argv.indexOf('--' + flag) !== -1); +} + +function addColor(str) { + if (hasFlag('no-color')) { + return str; + } + + if (hasFlag('color')) { + return gray(str); + } + + if (supportsColor(colorDetectionOptions)) { + return gray(str); + } + + return str; +} + +function getTimestamp() { + return '[' + addColor(timestamp('HH:mm:ss')) + ']'; +} + +function log() { + var time = getTimestamp(); + process.stdout.write(time + ' '); + console.log.apply(console, arguments); + return this; +} + +function info() { + var time = getTimestamp(); + process.stdout.write(time + ' '); + console.info.apply(console, arguments); + return this; +} + +function dir() { + var time = getTimestamp(); + process.stdout.write(time + ' '); + console.dir.apply(console, arguments); + return this; +} + +function warn() { + var time = getTimestamp(); + process.stderr.write(time + ' '); + console.warn.apply(console, arguments); + return this; +} + +function error() { + var time = getTimestamp(); + process.stderr.write(time + ' '); + console.error.apply(console, arguments); + return this; +} + +module.exports = log; +module.exports.info = info; +module.exports.dir = dir; +module.exports.warn = warn; +module.exports.error = error; diff --git a/node_modules/fancy-log/package.json b/node_modules/fancy-log/package.json new file mode 100644 index 0000000..e9a70bb --- /dev/null +++ b/node_modules/fancy-log/package.json @@ -0,0 +1,49 @@ +{ + "name": "fancy-log", + "version": "1.3.3", + "description": "Log things, prefixed with a timestamp.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz ", + "Aman Mittal (http://amandeepmittal.github.io/)" + ], + "repository": "gulpjs/fancy-log", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + }, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3" + }, + "keywords": [ + "console.log", + "log", + "logger", + "logging", + "pretty", + "timestamp" + ] +} diff --git a/node_modules/fast-levenshtein/LICENSE.md b/node_modules/fast-levenshtein/LICENSE.md new file mode 100644 index 0000000..6212406 --- /dev/null +++ b/node_modules/fast-levenshtein/LICENSE.md @@ -0,0 +1,25 @@ +(MIT License) + +Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.com/) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/fast-levenshtein/README.md b/node_modules/fast-levenshtein/README.md new file mode 100644 index 0000000..2a917a7 --- /dev/null +++ b/node_modules/fast-levenshtein/README.md @@ -0,0 +1,120 @@ +# fast-levenshtein - Levenshtein algorithm in Javascript + +[![Build Status](https://secure.travis-ci.org/hiddentao/fast-levenshtein.png)](http://travis-ci.org/hiddentao/fast-levenshtein) + +An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with asynchronous callback support. + +## Features + +* Works in node.js and in the browser. +* Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)). +* Provides synchronous and asynchronous versions of the algorithm. +* Asynchronous version is almost as fast as the synchronous version for small strings and can also provide progress updates. +* Comprehensive test suite and performance benchmark. +* Small: <1 KB minified and gzipped + +## Installation + +### node.js + +Install using [npm](http://npmjs.org/): + +```bash +$ npm install fast-levenshtein +``` + +### Browser + +Using bower: + +```bash +$ bower install fast-levenshtein +``` + +If you are not using any module loader system then the API will then be accessible via the `window.Levenshtein` object. + +## Examples + +**Synchronous** + +```javascript +var levenshtein = require('fast-levenshtein'); + +var distance = levenshtein.get('back', 'book'); // 2 +var distance = levenshtein.get('我愛你', '我叫你'); // 1 +``` + +**Asynchronous** + +```javascript +var levenshtein = require('fast-levenshtein'); + +levenshtein.getAsync('back', 'book', function (err, distance) { + // err is null unless an error was thrown + // distance equals 2 +}); +``` + +**Asynchronous with progress updates** + +```javascript +var levenshtein = require('fast-levenshtein'); + +var hugeText1 = fs.readFileSync(...); +var hugeText2 = fs.readFileSync(...); + +levenshtein.getAsync(hugeText1, hugeText2, function (err, distance) { + // process the results as normal +}, { + progress: function(percentComplete) { + console.log(percentComplete + ' % completed so far...'); + } +); +``` + +## Building and Testing + +To build the code and run the tests: + +```bash +$ npm install -g grunt-cli +$ npm install +$ npm run build +``` + +## Performance + +_Thanks to [Titus Wormer](https://github.com/wooorm) for [encouraging me](https://github.com/hiddentao/fast-levenshtein/issues/1) to do this._ + +Benchmarked against other node.js levenshtein distance modules (on Macbook Air 2012, Core i7, 8GB RAM): + +```bash +Running suite Implementation comparison [benchmark/speed.js]... +>> levenshtein-edit-distance x 234 ops/sec ±3.02% (73 runs sampled) +>> levenshtein-component x 422 ops/sec ±4.38% (83 runs sampled) +>> levenshtein-deltas x 283 ops/sec ±3.83% (78 runs sampled) +>> natural x 255 ops/sec ±0.76% (88 runs sampled) +>> levenshtein x 180 ops/sec ±3.55% (86 runs sampled) +>> fast-levenshtein x 1,792 ops/sec ±2.72% (95 runs sampled) +Benchmark done. +Fastest test is fast-levenshtein at 4.2x faster than levenshtein-component +``` + +You can run this benchmark yourself by doing: + +```bash +$ npm install -g grunt-cli +$ npm install +$ npm run build +$ npm run benchmark +``` + +## Contributing + +If you wish to submit a pull request please update and/or create new tests for any changes you make and ensure the grunt build passes. + +See [CONTRIBUTING.md](https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md) for details. + +## License + +MIT - see [LICENSE.md](https://github.com/hiddentao/fast-levenshtein/blob/master/LICENSE.md) diff --git a/node_modules/fast-levenshtein/levenshtein.js b/node_modules/fast-levenshtein/levenshtein.js new file mode 100644 index 0000000..3051ec5 --- /dev/null +++ b/node_modules/fast-levenshtein/levenshtein.js @@ -0,0 +1,211 @@ +(function() { + 'use strict'; + + /** + * Extend an Object with another Object's properties. + * + * The source objects are specified as additional arguments. + * + * @param dst Object the object to extend. + * + * @return Object the final object. + */ + var _extend = function(dst) { + var sources = Array.prototype.slice.call(arguments, 1); + for (var i=0; i tmp) { + nextCol = tmp; + } + // deletion + tmp = prevRow[j + 1] + 1; + if (nextCol > tmp) { + nextCol = tmp; + } + + // copy current col value into previous (in preparation for next iteration) + prevRow[j] = curCol; + } + + // copy last col value into previous (in preparation for next iteration) + prevRow[j] = nextCol; + } + + return nextCol; + }, + + /** + * Asynchronously calculate levenshtein distance of the two strings. + * + * @param str1 String the first string. + * @param str2 String the second string. + * @param cb Function callback function with signature: function(Error err, int distance) + * @param [options] Object additional options. + * @param [options.progress] Function progress callback with signature: function(percentComplete) + */ + getAsync: function(str1, str2, cb, options) { + options = _extend({}, { + progress: null + }, options); + + // base cases + if (str1 === str2) return cb(null, 0); + if (str1.length === 0) return cb(null, str2.length); + if (str2.length === 0) return cb(null, str1.length); + + // two rows + var prevRow = new Array(str2.length + 1), + curCol, nextCol, + i, j, tmp, + startTime, currentTime; + + // initialise previous row + for (i=0; i tmp) { + nextCol = tmp; + } + // deletion + tmp = prevRow[j + 1] + 1; + if (nextCol > tmp) { + nextCol = tmp; + } + + // copy current into previous (in preparation for next iteration) + prevRow[j] = curCol; + + // get current time + currentTime = new Date().valueOf(); + } + + // send a progress update? + if (null !== options.progress) { + try { + options.progress.call(null, (i * 100.0/ str1.length)); + } catch (err) { + return cb('Progress callback: ' + err.toString()); + } + } + + // next iteration + _defer(__calculate); + }; + + __calculate(); + } + + }; + + // amd + if (typeof define !== "undefined" && define !== null && define.amd) { + define(function() { + return Levenshtein; + }); + } + // commonjs + else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) { + module.exports = Levenshtein; + } + // web worker + else if (typeof self !== "undefined" && typeof self.postMessage === 'function' && typeof self.importScripts === 'function') { + self.Levenshtein = Levenshtein; + } + // browser main thread + else if (typeof window !== "undefined" && window !== null) { + window.Levenshtein = Levenshtein; + } +}()); + diff --git a/node_modules/fast-levenshtein/package.json b/node_modules/fast-levenshtein/package.json new file mode 100644 index 0000000..20fef7b --- /dev/null +++ b/node_modules/fast-levenshtein/package.json @@ -0,0 +1,37 @@ +{ + "name": "fast-levenshtein", + "version": "1.1.4", + "description": "Efficient implementation of Levenshtein algorithm with asynchronous callback support", + "main": "levenshtein.js", + "files": [ + "levenshtein.js" + ], + "scripts": { + "build": "grunt build", + "benchmark": "grunt benchmark", + "test": "mocha" + }, + "devDependencies": { + "chai": "~1.5.0", + "grunt": "~0.4.1", + "grunt-benchmark": "~0.2.0", + "grunt-contrib-jshint": "~0.4.3", + "grunt-contrib-uglify": "~0.2.0", + "grunt-mocha-test": "~0.2.2", + "grunt-npm-install": "~0.1.0", + "load-grunt-tasks": "~0.6.0", + "lodash": "^4.0.1", + "mocha": "~1.9.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/hiddentao/fast-levenshtein.git" + }, + "keywords": [ + "levenshtein", + "distance", + "string" + ], + "author": "Ramesh Nair (http://www.hiddentao.com/)", + "license": "MIT" +} diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100644 index 0000000..bc1f8a0 --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,250 @@ +# fill-range [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [Options](#options) + * [options.step](#optionsstep) + * [options.strictRanges](#optionsstrictranges) + * [options.stringify](#optionsstringify) + * [options.toRegex](#optionstoregex) + * [options.transform](#optionstransform) +- [About](#about) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fill-range +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add fill-range +``` + +## Usage + +Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. + +```js +var fill = require('fill-range'); +fill(from, to[, step, options]); + +// examples +console.log(fill('1', '10')); //=> '[ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ]' +console.log(fill('1', '10', {toRegex: true})); //=> [1-9]|10 +``` + +**Params** + +* `from`: **{String|Number}** the number or letter to start with +* `to`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. +* `options`: **{Object|Function}**: See all available [options](#options) + +## Examples + +By default, an array of values is returned. + +**Alphabetical ranges** + +```js +console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] +console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] +``` + +**Numerical ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] +``` + +**Negative ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] +console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] +``` + +**Steps (increments)** + +```js +// numerical ranges with increments +console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] +console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] +console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] + +// alphabetical ranges with increments +console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] +``` + +## Options + +### options.step + +**Type**: `number` (formatted as a string or number) + +**Default**: `undefined` + +**Description**: The increment to use for the range. Can be used with letters or numbers. + +**Example(s)** + +```js +// numbers +console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] +console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] +console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] + +// letters +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] +console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] +``` + +### options.strictRanges + +**Type**: `boolean` + +**Default**: `false` + +**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. + +**Example(s)** + +The following are all invalid: + +```js +fill('1.1', '2'); // decimals not supported in ranges +fill('a', '2'); // incompatible range values +fill(1, 10, 'foo'); // invalid "step" argument +``` + +### options.stringify + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Cast all returned values to strings. By default, integers are returned as numbers. + +**Example(s)** + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill(1, 5, {stringify: true})); //=> [ '1', '2', '3', '4', '5' ] +``` + +### options.toRegex + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Create a regex-compatible source string, instead of expanding values to an array. + +**Example(s)** + +```js +// alphabetical range +console.log(fill('a', 'e', {toRegex: true})); //=> '[a-e]' +// alphabetical with step +console.log(fill('a', 'z', 3, {toRegex: true})); //=> 'a|d|g|j|m|p|s|v|y' +// numerical range +console.log(fill('1', '100', {toRegex: true})); //=> '[1-9]|[1-9][0-9]|100' +// numerical range with zero padding +console.log(fill('000001', '100000', {toRegex: true})); +//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' +``` + +### options.transform + +**Type**: `function` + +**Default**: `undefined` + +**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. + +**Example(s)** + +```js +// increase padding by two +var arr = fill('01', '05', function(val, a, b, step, idx, arr, options) { + return repeat('0', (options.maxLength + 2) - val.length) + val; +}); + +console.log(arr); +//=> ['0001', '0002', '0003', '0004', '0005'] +``` + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/jonschlinkert/to-regex-range) | [homepage](https://github.com/jonschlinkert/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.87 million test assertions.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 103 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 23, 2017._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js new file mode 100644 index 0000000..294a2ed --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,208 @@ +/*! + * fill-range + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var util = require('util'); +var isNumber = require('is-number'); +var extend = require('extend-shallow'); +var repeat = require('repeat-string'); +var toRegex = require('to-regex-range'); + +/** + * Return a range of numbers or letters. + * + * @param {String} `start` Start of the range + * @param {String} `stop` End of the range + * @param {String} `step` Increment or decrement to use. + * @param {Function} `fn` Custom function to modify each element in the range. + * @return {Array} + */ + +function fillRange(start, stop, step, options) { + if (typeof start === 'undefined') { + return []; + } + + if (typeof stop === 'undefined' || start === stop) { + // special case, for handling negative zero + var isString = typeof start === 'string'; + if (isNumber(start) && !toNumber(start)) { + return [isString ? '0' : 0]; + } + return [start]; + } + + if (typeof step !== 'number' && typeof step !== 'string') { + options = step; + step = undefined; + } + + if (typeof options === 'function') { + options = { transform: options }; + } + + var opts = extend({step: step}, options); + if (opts.step && !isValidNumber(opts.step)) { + if (opts.strictRanges === true) { + throw new TypeError('expected options.step to be a number'); + } + return []; + } + + opts.isNumber = isValidNumber(start) && isValidNumber(stop); + if (!opts.isNumber && !isValid(start, stop)) { + if (opts.strictRanges === true) { + throw new RangeError('invalid range arguments: ' + util.inspect([start, stop])); + } + return []; + } + + opts.isPadded = isPadded(start) || isPadded(stop); + opts.toString = opts.stringify + || typeof opts.step === 'string' + || typeof start === 'string' + || typeof stop === 'string' + || !opts.isNumber; + + if (opts.isPadded) { + opts.maxLength = Math.max(String(start).length, String(stop).length); + } + + // support legacy minimatch/fill-range options + if (typeof opts.optimize === 'boolean') opts.toRegex = opts.optimize; + if (typeof opts.makeRe === 'boolean') opts.toRegex = opts.makeRe; + return expand(start, stop, opts); +} + +function expand(start, stop, options) { + var a = options.isNumber ? toNumber(start) : start.charCodeAt(0); + var b = options.isNumber ? toNumber(stop) : stop.charCodeAt(0); + + var step = Math.abs(toNumber(options.step)) || 1; + if (options.toRegex && step === 1) { + return toRange(a, b, start, stop, options); + } + + var zero = {greater: [], lesser: []}; + var asc = a < b; + var arr = new Array(Math.round((asc ? b - a : a - b) / step)); + var idx = 0; + + while (asc ? a <= b : a >= b) { + var val = options.isNumber ? a : String.fromCharCode(a); + if (options.toRegex && (val >= 0 || !options.isNumber)) { + zero.greater.push(val); + } else { + zero.lesser.push(Math.abs(val)); + } + + if (options.isPadded) { + val = zeros(val, options); + } + + if (options.toString) { + val = String(val); + } + + if (typeof options.transform === 'function') { + arr[idx++] = options.transform(val, a, b, step, idx, arr, options); + } else { + arr[idx++] = val; + } + + if (asc) { + a += step; + } else { + a -= step; + } + } + + if (options.toRegex === true) { + return toSequence(arr, zero, options); + } + return arr; +} + +function toRange(a, b, start, stop, options) { + if (options.isPadded) { + return toRegex(start, stop, options); + } + + if (options.isNumber) { + return toRegex(Math.min(a, b), Math.max(a, b), options); + } + + var start = String.fromCharCode(Math.min(a, b)); + var stop = String.fromCharCode(Math.max(a, b)); + return '[' + start + '-' + stop + ']'; +} + +function toSequence(arr, zeros, options) { + var greater = '', lesser = ''; + if (zeros.greater.length) { + greater = zeros.greater.join('|'); + } + if (zeros.lesser.length) { + lesser = '-(' + zeros.lesser.join('|') + ')'; + } + var res = greater && lesser + ? greater + '|' + lesser + : greater || lesser; + + if (options.capture) { + return '(' + res + ')'; + } + return res; +} + +function zeros(val, options) { + if (options.isPadded) { + var str = String(val); + var len = str.length; + var dash = ''; + if (str.charAt(0) === '-') { + dash = '-'; + str = str.slice(1); + } + var diff = options.maxLength - len; + var pad = repeat('0', diff); + val = (dash + pad + str); + } + if (options.stringify) { + return String(val); + } + return val; +} + +function toNumber(val) { + return Number(val) || 0; +} + +function isPadded(str) { + return /^-?0\d/.test(str); +} + +function isValid(min, max) { + return (isValidNumber(min) || isValidLetter(min)) + && (isValidNumber(max) || isValidLetter(max)); +} + +function isValidLetter(ch) { + return typeof ch === 'string' && ch.length === 1 && /^\w+$/.test(ch); +} + +function isValidNumber(n) { + return isNumber(n) && !/\./.test(n); +} + +/** + * Expose `fillRange` + * @type {Function} + */ + +module.exports = fillRange; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000..fa17dd2 --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,82 @@ +{ + "name": "fill-range", + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + " (https://github.com/wtgtybhertgeghgtwtg)", + "Edo Rivai (edo.rivai.nl)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^1.0.0", + "gulp-format-md": "^0.1.12", + "minimist": "^1.2.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "verb": { + "related": { + "list": [ + "braces", + "expand-range", + "micromatch", + "to-regex-range" + ] + }, + "toc": true, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/find-up/index.js b/node_modules/find-up/index.js new file mode 100644 index 0000000..7ff0e2b --- /dev/null +++ b/node_modules/find-up/index.js @@ -0,0 +1,53 @@ +'use strict'; +var path = require('path'); +var pathExists = require('path-exists'); +var Promise = require('pinkie-promise'); + +function splitPath(x) { + return path.resolve(x || '').split(path.sep); +} + +function join(parts, filename) { + return path.resolve(parts.join(path.sep) + path.sep, filename); +} + +module.exports = function (filename, opts) { + opts = opts || {}; + + var parts = splitPath(opts.cwd); + + return new Promise(function (resolve) { + (function find() { + var fp = join(parts, filename); + + pathExists(fp).then(function (exists) { + if (exists) { + resolve(fp); + } else if (parts.pop()) { + find(); + } else { + resolve(null); + } + }); + })(); + }); +}; + +module.exports.sync = function (filename, opts) { + opts = opts || {}; + + var parts = splitPath(opts.cwd); + var len = parts.length; + + while (len--) { + var fp = join(parts, filename); + + if (pathExists.sync(fp)) { + return fp; + } + + parts.pop(); + } + + return null; +}; diff --git a/node_modules/find-up/license b/node_modules/find-up/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/find-up/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/find-up/package.json b/node_modules/find-up/package.json new file mode 100644 index 0000000..478866c --- /dev/null +++ b/node_modules/find-up/package.json @@ -0,0 +1,51 @@ +{ + "name": "find-up", + "version": "1.1.2", + "description": "Find a file by walking up parent directories", + "license": "MIT", + "repository": "sindresorhus/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + } +} diff --git a/node_modules/find-up/readme.md b/node_modules/find-up/readme.md new file mode 100644 index 0000000..9ea0611 --- /dev/null +++ b/node_modules/find-up/readme.md @@ -0,0 +1,72 @@ +# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) + +> Find a file by walking up parent directories + + +## Install + +``` +$ npm install --save find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +```js +// example.js +const findUp = require('find-up'); + +findUp('unicorn.png').then(filepath => { + console.log(filepath); + //=> '/Users/sindresorhus/unicorn.png' +}); +``` + + +## API + +### findUp(filename, [options]) + +Returns a promise for the filepath or `null`. + +### findUp.sync(filename, [options]) + +Returns a filepath or `null`. + +#### filename + +Type: `string` + +Filename of the file to find. + +#### options + +##### cwd + +Type: `string` +Default: `process.cwd()` + +Directory to start from. + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/findup-sync/LICENSE b/node_modules/findup-sync/LICENSE new file mode 100644 index 0000000..6e210d0 --- /dev/null +++ b/node_modules/findup-sync/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2018 Ben Alman , Blaine Bublitz , and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/findup-sync/README.md b/node_modules/findup-sync/README.md new file mode 100644 index 0000000..3d1b17b --- /dev/null +++ b/node_modules/findup-sync/README.md @@ -0,0 +1,57 @@ +

+ + + +

+ + +# findup-sync + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Find the first file matching a given pattern in the current directory or the nearest ancestor directory. + +Matching is done with [micromatch][micromatch], please report any matching related issues on that repository. + +## Usage + +```js +var findup = require('findup-sync'); +findup(patternOrPatterns [, micromatchOptions]); + +// Start looking in the CWD. +var filepath1 = findup('{a,b}*.txt'); + +// Start looking somewhere else, and ignore case (probably a good idea). +var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true}); +``` + +## API + +### `findup(patterns, [options])` + +* `patterns` **{String|Array}**: Glob pattern(s) or file path(s) to match against. +* `options` **{Object}**: Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here. +* `returns` **{String}**: Returns the first matching file. + +## License + +MIT + +[micromatch]: http://github.com/jonschlinkert/micromatch + +[downloads-image]: http://img.shields.io/npm/dm/findup-sync.svg +[npm-url]: https://www.npmjs.com/package/findup-sync +[npm-image]: http://img.shields.io/npm/v/findup-sync.svg + +[travis-url]: https://travis-ci.org/gulpjs/findup-sync +[travis-image]: http://img.shields.io/travis/gulpjs/findup-sync.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/findup-sync +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/findup-sync.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/findup-sync +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/findup-sync/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/findup-sync/index.js b/node_modules/findup-sync/index.js new file mode 100644 index 0000000..2a9e117 --- /dev/null +++ b/node_modules/findup-sync/index.js @@ -0,0 +1,87 @@ +'use strict'; + +/** + * Module dependencies + */ + +var fs = require('fs'); +var path = require('path'); +var isGlob = require('is-glob'); +var resolveDir = require('resolve-dir'); +var detect = require('detect-file'); +var mm = require('micromatch'); + +/** + * @param {String|Array} `pattern` Glob pattern or file path(s) to match against. + * @param {Object} `options` Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify the `options.cwd` property here. + * @return {String} Returns the first matching file. + * @api public + */ + +module.exports = function(patterns, options) { + options = options || {}; + var cwd = path.resolve(resolveDir(options.cwd || '')); + + if (typeof patterns === 'string') { + return lookup(cwd, [patterns], options); + } + + if (!Array.isArray(patterns)) { + throw new TypeError('findup-sync expects a string or array as the first argument.'); + } + + return lookup(cwd, patterns, options); +}; + +function lookup(cwd, patterns, options) { + var len = patterns.length; + var idx = -1; + var res; + + while (++idx < len) { + if (isGlob(patterns[idx])) { + res = matchFile(cwd, patterns[idx], options); + } else { + res = findFile(cwd, patterns[idx], options); + } + if (res) { + return res; + } + } + + var dir = path.dirname(cwd); + if (dir === cwd) { + return null; + } + return lookup(dir, patterns, options); +} + +function matchFile(cwd, pattern, opts) { + var isMatch = mm.matcher(pattern, opts); + var files = tryReaddirSync(cwd); + var len = files.length; + var idx = -1; + + while (++idx < len) { + var name = files[idx]; + var fp = path.join(cwd, name); + if (isMatch(name) || isMatch(fp)) { + return fp; + } + } + return null; +} + +function findFile(cwd, filename, options) { + var fp = cwd ? path.resolve(cwd, filename) : filename; + return detect(fp, options); +} + +function tryReaddirSync(fp) { + try { + return fs.readdirSync(fp); + } catch (err) { + // Ignore error + } + return []; +} diff --git a/node_modules/findup-sync/package.json b/node_modules/findup-sync/package.json new file mode 100644 index 0000000..357f57a --- /dev/null +++ b/node_modules/findup-sync/package.json @@ -0,0 +1,57 @@ +{ + "name": "findup-sync", + "version": "3.0.0", + "description": "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Ben Alman ", + "Tyler Kellen ", + "Jon Schlinkert ", + "Blaine Bublitz " + ], + "repository": "gulpjs/findup-sync", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js", + "LICENSE" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "homedir-polyfill": "^1.0.1", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3", + "normalize-path": "^3.0.0", + "resolve": "^1.4.0" + }, + "keywords": [ + "file", + "find", + "find-up", + "findup", + "glob", + "match", + "pattern", + "resolve", + "search" + ] +} diff --git a/node_modules/fined/LICENSE b/node_modules/fined/LICENSE new file mode 100644 index 0000000..538c116 --- /dev/null +++ b/node_modules/fined/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, 2017, 2018 Blaine Bublitz and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/fined/README.md b/node_modules/fined/README.md new file mode 100644 index 0000000..d0ec267 --- /dev/null +++ b/node_modules/fined/README.md @@ -0,0 +1,81 @@ +

+ + + +

+ +# fined + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Find a file given a declaration of locations. + +## Usage + +```js +var fined = require('fined'); + +fined({ path: 'path/to/file', extensions: ['.js', '.json'] }); +// => { path: '/absolute/path/to/file.js', extension: '.js' } (if file exists) +// => null (if file does not exist) + +var opts = { + name: '.app', + cwd: '.', + extensions: { + 'rc': 'default-rc-loader', + '.yml': 'default-yml-loader', + }, +}; + +fined({ path: '.' }, opts); +// => { path: '/absolute/of/cwd/.app.yml', extension: { '.yml': 'default-yml-loader' } } + +fined({ path: '~', extensions: { 'rc': 'some-special-rc-loader' } }, opts); +// => { path: '/User/home/.apprc', extension: { 'rc': 'some-special-rc-loader' } } +``` + +## API + +### fined(pathObj, opts) => object | null + +#### Arguments: + +* **pathObj** [string | object] : a path setting for finding a file. +* **opts** [object] : a plain object supplements `pathObj`. + + `pathObj` and `opts` can have same properties: + + * **path** [string] : a path string. + * **name** [string] : a basename. + * **extensions**: [string | array | object] : extensions. + * **cwd**: a base directory of `path` and for finding up. + * **findUp**: [boolean] : a flag to find up. + +#### Return: + +This function returns a plain object which consists of following properties if a file exists otherwise null. + + * **path** : an absolute path + * **extension** : a string or a plain object of extension. + + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/fined.svg +[npm-url]: https://www.npmjs.com/package/fined +[npm-image]: http://img.shields.io/npm/v/fined.svg + +[travis-url]: https://travis-ci.org/gulpjs/fined +[travis-image]: http://img.shields.io/travis/gulpjs/fined.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fined +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fined.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/fined +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fined/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/fined/index.js b/node_modules/fined/index.js new file mode 100644 index 0000000..1a66ab2 --- /dev/null +++ b/node_modules/fined/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); + +var isPlainObject = require('is-plain-object'); +var pick = require('object.pick'); +var defaults = require('object.defaults/immutable'); +var expandTilde = require('expand-tilde'); +var parsePath = require('parse-filepath'); + + +function fined(pathObj, defaultObj) { + var expandedPath = expandPath(pathObj, defaultObj); + return expandedPath ? findWithExpandedPath(expandedPath) : null; +} + +function expandPath(pathObj, defaultObj) { + if (!isPlainObject(defaultObj)) { + defaultObj = {}; + } + + if (isString(pathObj)) { + pathObj = { path: pathObj }; + } + + if (!isPlainObject(pathObj)) { + pathObj = {}; + } + + pathObj = defaults(pathObj, defaultObj); + + var filePath; + if (!isString(pathObj.path)) { + return null; + } + // Execution of toString is for a String object. + if (isString(pathObj.name) && pathObj.name) { + if (pathObj.path) { + filePath = expandTilde(pathObj.path.toString()); + filePath = path.join(filePath, pathObj.name.toString()); + } else { + filePath = pathObj.name.toString(); + } + } else { + filePath = expandTilde(pathObj.path.toString()); + } + + var extArr = createExtensionArray(pathObj.extensions); + var extMap = createExtensionMap(pathObj.extensions); + + var basedir = isString(pathObj.cwd) ? pathObj.cwd.toString() : '.'; + basedir = path.resolve(expandTilde(basedir)); + + var findUp = !!pathObj.findUp; + + var parsed = parsePath(filePath); + if (parsed.isAbsolute) { + filePath = filePath.slice(parsed.root.length); + findUp = false; + basedir = parsed.root; + /* istanbul ignore if */ + } else if (parsed.root) { // Expanded path has a drive letter on Windows. + filePath = filePath.slice(parsed.root.length); + basedir = path.resolve(parsed.root); + } + + if (parsed.ext) { + filePath = filePath.slice(0, -parsed.ext.length); + // This ensures that only the original extension is matched. + extArr = [parsed.ext]; + } + + return { + path: filePath, + basedir: basedir, + findUp: findUp, + extArr: extArr, + extMap: extMap, + }; +} + +function findWithExpandedPath(expanded) { + var found = expanded.findUp ? + findUpFile(expanded.basedir, expanded.path, expanded.extArr) : + findFile(expanded.basedir, expanded.path, expanded.extArr); + + if (!found) { + return null; + } + + if (expanded.extMap) { + found.extension = pick(expanded.extMap, found.extension); + } + return found; +} + +function findFile(basedir, relpath, extArr) { + var noExtPath = path.resolve(basedir, relpath); + for (var i = 0, n = extArr.length; i < n; i++) { + var filepath = noExtPath + extArr[i]; + try { + fs.statSync(filepath); + return { path: filepath, extension: extArr[i] }; + } catch (e) { + // Ignore error + } + } + + return null; +} + +function findUpFile(basedir, filepath, extArr) { + var lastdir; + do { + var found = findFile(basedir, filepath, extArr); + if (found) { + return found; + } + + lastdir = basedir; + basedir = path.dirname(basedir); + } while (lastdir !== basedir); + + return null; +} + +function createExtensionArray(exts) { + if (isString(exts)) { + return [exts]; + } + + if (Array.isArray(exts)) { + exts = exts.filter(isString); + return (exts.length > 0) ? exts : ['']; + } + + if (isPlainObject(exts)) { + exts = Object.keys(exts); + return (exts.length > 0) ? exts : ['']; + } + + return ['']; +} + +function createExtensionMap(exts) { + if (!isPlainObject(exts)) { + return null; + } + + if (isEmpty(exts)) { + return { '': null }; + } + + return exts; +} + +function isEmpty(object) { + return !Object.keys(object).length; +} + +function isString(value) { + if (typeof value === 'string') { + return true; + } + + if (Object.prototype.toString.call(value) === '[object String]') { + return true; + } + + return false; +} + +module.exports = fined; diff --git a/node_modules/fined/node_modules/is-plain-object/LICENSE b/node_modules/fined/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/fined/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/fined/node_modules/is-plain-object/README.md b/node_modules/fined/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/fined/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/fined/node_modules/is-plain-object/index.d.ts b/node_modules/fined/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/fined/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/fined/node_modules/is-plain-object/index.js b/node_modules/fined/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/fined/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/fined/node_modules/is-plain-object/package.json b/node_modules/fined/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/fined/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fined/package.json b/node_modules/fined/package.json new file mode 100644 index 0000000..e64ed64 --- /dev/null +++ b/node_modules/fined/package.json @@ -0,0 +1,47 @@ +{ + "name": "fined", + "version": "1.2.0", + "description": "Find a file given a declaration of locations.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Takayuki Sato ", + "Blaine Bublitz " + ], + "repository": "gulpjs/fined", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js", + "LICENSE" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3" + }, + "keywords": [ + "find", + "lookup", + "config" + ] +} diff --git a/node_modules/flagged-respawn/LICENSE b/node_modules/flagged-respawn/LICENSE new file mode 100644 index 0000000..ca63f90 --- /dev/null +++ b/node_modules/flagged-respawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018 Tyler Kellen , Blaine Bublitz , and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/flagged-respawn/README.md b/node_modules/flagged-respawn/README.md new file mode 100644 index 0000000..44899fc --- /dev/null +++ b/node_modules/flagged-respawn/README.md @@ -0,0 +1,111 @@ +

+ + + +

+ +# flagged-respawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +A tool for respawning node binaries when special flags are present. + +## What is it? + +Say you wrote a command line tool that runs arbitrary javascript (e.g. task runner, test framework, etc). For the sake of discussion, let's pretend it's a testing harness you've named `testify`. + +Everything is going splendidly until one day you decide to test some code that relies on a feature behind a v8 flag in node (`--harmony`, for example). Without much thought, you run `testify --harmony spec tests.js`. + +It doesn't work. After digging around for a bit, you realize this produces a [`process.argv`](http://nodejs.org/docs/latest/api/process.html#process_process_argv) of: + +`['node', '/usr/local/bin/test', '--harmony', 'spec', 'tests.js']` + +Crap. The `--harmony` flag is in the wrong place! It should be applied to the **node** command, not our binary. What we actually wanted was this: + +`['node', '--harmony', '/usr/local/bin/test', 'spec', 'tests.js']` + +Flagged-respawn fixes this problem and handles all the edge cases respawning creates, such as: +- Providing a method to determine if a respawn is needed. +- Piping stderr/stdout from the child into the parent. +- Making the parent process exit with the same code as the child. +- If the child is killed, making the parent exit with the same signal. + +To see it in action, clone this repository and run `npm install` / `npm run respawn` / `npm run nospawn`. + +## Sample Usage + +```js +#!/usr/bin/env node + +const flaggedRespawn = require('flagged-respawn'); + +// get a list of all possible v8 flags for the running version of node +const v8flags = require('v8flags').fetch(); + +flaggedRespawn(v8flags, process.argv, function (ready, child) { + if (ready) { + console.log('Running!'); + // your cli code here + } else { + console.log('Special flags found, respawning.'); + } + if (process.pid !== child.pid) { + console.log('Respawned to PID:', child.pid); + } +}); + +``` + + +## API + +### flaggedRespawn(flags, argv, [ forcedFlags, ] callback) : Void + +Respawns the script itself when *argv* has special flag contained in *flags* and/or *forcedFlags* is not empty. Because members of *flags* and *forcedFlags* are passed to `node` command, each of them needs to be a node flag or a V8 flag. + +#### Forbid respawning + +If `--no-respawning` flag is given in *argv*, this function does not respawned even if *argv* contains members of flags or *forcedFlags* is not empty. (This flag is also used internally to prevent from respawning more than once). + +#### Parameter: + +| Parameter | Type | Description | +|:--------------|:------:|:----------------------------------------------------| +| *flags* | Array | An array of node flags and V8 flags which are available when present in *argv*. | +| *argv* | Array | Command line arguments to respawn. | +| *forcedFlags* | Array or String | An array of node flags or a string of a single flag and V8 flags for respawning forcely. | +| *callback* | function | A called function when not respawning or after respawned. | + +* **callback(ready, proc, argv) : Void** + + *callback* function is called both when respawned or not, and it can be distinguished by callback's argument: *ready*. (*ready* indicates whether a process spawned its child process (false) or not (true), but it does not indicate whether a process is a spawned child process or not. *ready* for a spawned child process is true.) + + *argv* is an array of command line arguments which is respawned (when *ready* is false) or is passed current process except flags within *flags* and `--no-respawning` (when *ready* is true). + + **Parameter:** + + | Parameter | Type | Description | + |:----------|:-------:|:--------------------------| + | *ready* | boolean | True, if not respawning and is ready to execute main function. | + | *proc* | object | Child process object if respawned, otherwise current process object. | + | *argv* | Array | An array of command line arguments. | + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/flagged-respawn.svg +[npm-url]: https://www.npmjs.com/package/flagged-respawn +[npm-image]: http://img.shields.io/npm/v/flagged-respawn.svg + +[travis-url]: https://travis-ci.org/gulpjs/flagged-respawn +[travis-image]: http://img.shields.io/travis/gulpjs/flagged-respawn.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/flagged-respawn +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/flagged-respawn.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/flagged-respawn +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/flagged-respawn/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/flagged-respawn/index.js b/node_modules/flagged-respawn/index.js new file mode 100644 index 0000000..15c1c1f --- /dev/null +++ b/node_modules/flagged-respawn/index.js @@ -0,0 +1,52 @@ +var reorder = require('./lib/reorder'); +var respawn = require('./lib/respawn'); +var remover = require('./lib/remover'); + +var FORBID_RESPAWNING_FLAG = '--no-respawning'; + +module.exports = function(flags, argv, forcedFlags, execute) { + if (!flags) { + throw new Error('You must specify flags to respawn with.'); + } + if (!argv) { + throw new Error('You must specify an argv array.'); + } + + if (typeof forcedFlags === 'function') { + execute = forcedFlags; + forcedFlags = []; + } + + if (typeof forcedFlags === 'string') { + forcedFlags = [forcedFlags]; + } + + if (!Array.isArray(forcedFlags)) { + forcedFlags = []; + } + + var index = argv.indexOf(FORBID_RESPAWNING_FLAG); + if (index >= 0) { + argv = argv.slice(0, index).concat(argv.slice(index + 1)); + argv = remover(flags, argv); + execute(true, process, argv); + return; + } + + var proc = process; + var reordered = reorder(flags, argv); + var ready = JSON.stringify(argv) === JSON.stringify(reordered); + + if (forcedFlags.length) { + reordered = reordered.slice(0, 1) + .concat(forcedFlags) + .concat(reordered.slice(1)); + ready = false; + } + + if (!ready) { + reordered.push(FORBID_RESPAWNING_FLAG); + proc = respawn(reordered); + } + execute(ready, proc, reordered); +}; diff --git a/node_modules/flagged-respawn/lib/is-v8flags.js b/node_modules/flagged-respawn/lib/is-v8flags.js new file mode 100644 index 0000000..34df9d2 --- /dev/null +++ b/node_modules/flagged-respawn/lib/is-v8flags.js @@ -0,0 +1,13 @@ +function isV8flags(flag, v8flags) { + return v8flags.indexOf(replaceSeparatorsFromDashesToUnderscores(flag)) >= 0; +} + +function replaceSeparatorsFromDashesToUnderscores(flag) { + var arr = /^(-+)(.*)$/.exec(flag); + if (!arr) { + return flag; + } + return arr[1] + arr[2].replace(/\-/g, '_'); +} + +module.exports = isV8flags; diff --git a/node_modules/flagged-respawn/lib/remover.js b/node_modules/flagged-respawn/lib/remover.js new file mode 100644 index 0000000..3d194fa --- /dev/null +++ b/node_modules/flagged-respawn/lib/remover.js @@ -0,0 +1,13 @@ +var isV8flags = require('./is-v8flags'); + +module.exports = function(flags, argv) { + var args = argv.slice(0, 1); + for (var i = 1, n = argv.length; i < n; i++) { + var arg = argv[i]; + var flag = arg.split('=')[0]; + if (!isV8flags(flag, flags)) { + args.push(arg); + } + } + return args; +}; diff --git a/node_modules/flagged-respawn/lib/reorder.js b/node_modules/flagged-respawn/lib/reorder.js new file mode 100644 index 0000000..125fc6c --- /dev/null +++ b/node_modules/flagged-respawn/lib/reorder.js @@ -0,0 +1,18 @@ +var isV8flags = require('./is-v8flags'); + +module.exports = function(flags, argv) { + if (!argv) { + argv = process.argv; + } + var args = [argv[1]]; + argv.slice(2).forEach(function(arg) { + var flag = arg.split('=')[0]; + if (isV8flags(flag, flags)) { + args.unshift(arg); + } else { + args.push(arg); + } + }); + args.unshift(argv[0]); + return args; +}; diff --git a/node_modules/flagged-respawn/lib/respawn.js b/node_modules/flagged-respawn/lib/respawn.js new file mode 100644 index 0000000..c7e40fe --- /dev/null +++ b/node_modules/flagged-respawn/lib/respawn.js @@ -0,0 +1,16 @@ +var spawn = require('child_process').spawn; + +module.exports = function(argv) { + var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' }); + child.on('exit', function(code, signal) { + process.on('exit', function() { + /* istanbul ignore if */ + if (signal) { + process.kill(process.pid, signal); + } else { + process.exit(code); + } + }); + }); + return child; +}; diff --git a/node_modules/flagged-respawn/package.json b/node_modules/flagged-respawn/package.json new file mode 100644 index 0000000..1d38d81 --- /dev/null +++ b/node_modules/flagged-respawn/package.json @@ -0,0 +1,47 @@ +{ + "name": "flagged-respawn", + "version": "1.0.1", + "description": "A tool for respawning node binaries when special flags are present.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Takayuki Sato ", + "Bertrand Marron ", + "Tyler Kellen ", + "Blaine Bublitz " + ], + "repository": "gulpjs/flagged-respawn", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js", + "lib/", + "LICENSE" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "nyc --reporter=lcov --reporter=text-summary npm test", + "coveralls": "npm run cover && istanbul-coveralls", + "respawn": "node test/bin/respawner --harmony test", + "nospawn": "node test/bin/respawner test" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3", + "nyc": "^11.3.0", + "v8flags": "^3.0.1" + }, + "keywords": [ + "respawn", + "flags" + ] +} diff --git a/node_modules/flush-write-stream/.travis.yml b/node_modules/flush-write-stream/.travis.yml new file mode 100644 index 0000000..4689cb7 --- /dev/null +++ b/node_modules/flush-write-stream/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - '4' + - '6' + - '8' + - '10' diff --git a/node_modules/flush-write-stream/LICENSE b/node_modules/flush-write-stream/LICENSE new file mode 100644 index 0000000..66a4d2a --- /dev/null +++ b/node_modules/flush-write-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 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/node_modules/flush-write-stream/README.md b/node_modules/flush-write-stream/README.md new file mode 100644 index 0000000..7ea7b69 --- /dev/null +++ b/node_modules/flush-write-stream/README.md @@ -0,0 +1,59 @@ +# flush-write-stream + +A write stream constructor that supports a flush function that is called before `finish` is emitted + +``` +npm install flush-write-stream +``` + +[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream) + +## Usage + +``` js +var writer = require('flush-write-stream') + +var ws = writer(write, flush) + +ws.on('finish', function () { + console.log('finished') +}) + +ws.write('hello') +ws.write('world') +ws.end() + +function write (data, enc, cb) { + // i am your normal ._write method + console.log('writing', data.toString()) + cb() +} + +function flush (cb) { + // i am called before finish is emitted + setTimeout(cb, 1000) // wait 1 sec +} +``` + +If you run the above it will produce the following output + +``` +writing hello +writing world +(nothing happens for 1 sec) +finished +``` + +## API + +#### `var ws = writer([options], write, [flush])` + +Create a new writable stream. Options are forwarded to the stream constructor. + +#### `var ws = writer.obj([options], write, [flush])` + +Same as the above except `objectMode` is set to `true` per default. + +## License + +MIT diff --git a/node_modules/flush-write-stream/example.js b/node_modules/flush-write-stream/example.js new file mode 100644 index 0000000..fa6b5da --- /dev/null +++ b/node_modules/flush-write-stream/example.js @@ -0,0 +1,22 @@ +var writer = require('./') + +var ws = writer(write, flush) + +ws.on('finish', function () { + console.log('finished') +}) + +ws.write('hello') +ws.write('world') +ws.end() + +function write (data, enc, cb) { + // i am your normal ._write method + console.log('writing', data.toString()) + cb() +} + +function flush (cb) { + // i am called before finish is emitted + setTimeout(cb, 1000) // wait 1 sec +} diff --git a/node_modules/flush-write-stream/index.js b/node_modules/flush-write-stream/index.js new file mode 100644 index 0000000..d7c6209 --- /dev/null +++ b/node_modules/flush-write-stream/index.js @@ -0,0 +1,54 @@ +var stream = require('readable-stream') +var inherits = require('inherits') + +var SIGNAL_FLUSH =(Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) + +module.exports = WriteStream + +function WriteStream (opts, write, flush) { + if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush) + + if (typeof opts === 'function') { + flush = write + write = opts + opts = {} + } + + stream.Writable.call(this, opts) + + this.destroyed = false + this._worker = write || null + this._flush = flush || null +} + +inherits(WriteStream, stream.Writable) + +WriteStream.obj = function (opts, worker, flush) { + if (typeof opts === 'function') return WriteStream.obj(null, opts, worker) + if (!opts) opts = {} + opts.objectMode = true + return new WriteStream(opts, worker, flush) +} + +WriteStream.prototype._write = function (data, enc, cb) { + if (SIGNAL_FLUSH === data) this._flush(cb) + else this._worker(data, enc, cb) +} + +WriteStream.prototype.end = function (data, enc, cb) { + if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments) + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + if (data) this.write(data) + if (!this._writableState.ending) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} + +WriteStream.prototype.destroy = function (err) { + if (this.destroyed) return + this.destroyed = true + if (err) this.emit('error', err) + this.emit('close') +} diff --git a/node_modules/flush-write-stream/package.json b/node_modules/flush-write-stream/package.json new file mode 100644 index 0000000..9d6326c --- /dev/null +++ b/node_modules/flush-write-stream/package.json @@ -0,0 +1,26 @@ +{ + "name": "flush-write-stream", + "version": "1.1.1", + "description": "A write stream constructor that supports a flush function that is called before finish is emitted", + "main": "index.js", + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + }, + "devDependencies": { + "tape": "^4.2.2" + }, + "scripts": { + "test": "tape test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/mafintosh/flush-write-stream.git" + }, + "author": "Mathias Buus (@mafintosh)", + "license": "MIT", + "bugs": { + "url": "https://github.com/mafintosh/flush-write-stream/issues" + }, + "homepage": "https://github.com/mafintosh/flush-write-stream" +} diff --git a/node_modules/flush-write-stream/test.js b/node_modules/flush-write-stream/test.js new file mode 100644 index 0000000..6cd0c20 --- /dev/null +++ b/node_modules/flush-write-stream/test.js @@ -0,0 +1,85 @@ +var tape = require('tape') +var writer = require('./') + +tape('is a write stream', function (t) { + var expected = ['hello', 'world', 'verden'] + var ws = writer.obj(write) + + ws.write('hello') + ws.write('world') + ws.write('verden') + ws.end(function () { + t.same(expected.length, 0) + t.end() + }) + + function write (data, enc, cb) { + t.same(data, expected.shift()) + cb() + } +}) + +tape('is flushable', function (t) { + var expected = ['hello', 'world', 'verden'] + var flushed = false + + var ws = writer.obj(write, flush) + + ws.write('hello') + ws.write('world') + ws.write('verden') + ws.end(function () { + t.same(expected.length, 0) + t.ok(flushed, 'was flushed') + t.end() + }) + + function write (data, enc, cb) { + t.same(data, expected.shift()) + cb() + } + + function flush (cb) { + flushed = true + process.nextTick(cb) + } +}) + +tape('can pass options', function (t) { + var expected = ['hello', 'world', 'verden'] + var flushed = false + + var ws = writer({objectMode: true}, write, flush) + + ws.write('hello') + ws.write('world') + ws.write('verden') + ws.end(function () { + t.same(expected.length, 0) + t.ok(flushed, 'was flushed') + t.end() + }) + + function write (data, enc, cb) { + t.same(data, expected.shift()) + cb() + } + + function flush (cb) { + flushed = true + process.nextTick(cb) + } +}) + +tape('emits error on destroy', function (t) { + var expected = new Error() + + var ws = writer({objectMode: true}, function () {}) + + ws.on('error', function (err) { + t.equal(err, expected) + }) + ws.on('close', t.end) + + ws.destroy(expected) +}) diff --git a/node_modules/for-in/LICENSE b/node_modules/for-in/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/for-in/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/for-in/README.md b/node_modules/for-in/README.md new file mode 100644 index 0000000..874e189 --- /dev/null +++ b/node_modules/for-in/README.md @@ -0,0 +1,85 @@ +# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![NPM total downloads](https://img.shields.io/npm/dt/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-in) + +> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save for-in +``` + +## Usage + +```js +var forIn = require('for-in'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forIn(obj, function (value, key, o) { + keys.push(key); + values.push(value); +}); + +console.log(keys); +//=> ['a', 'b', 'c']; + +console.log(values); +//=> ['foo', 'bar', 'baz']; +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 16 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulirish](https://github.com/paulirish) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/node_modules/for-in/index.js b/node_modules/for-in/index.js new file mode 100644 index 0000000..0b5f95f --- /dev/null +++ b/node_modules/for-in/index.js @@ -0,0 +1,16 @@ +/*! + * for-in + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function forIn(obj, fn, thisArg) { + for (var key in obj) { + if (fn.call(thisArg, obj[key], key, obj) === false) { + break; + } + } +}; diff --git a/node_modules/for-in/package.json b/node_modules/for-in/package.json new file mode 100644 index 0000000..48810a1 --- /dev/null +++ b/node_modules/for-in/package.json @@ -0,0 +1,68 @@ +{ + "name": "for-in", + "description": "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/for-in", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Irish (http://paulirish.com)" + ], + "repository": "jonschlinkert/for-in", + "bugs": { + "url": "https://github.com/jonschlinkert/for-in/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "for", + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "in", + "key", + "keys", + "object", + "own", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "collection-map", + "for-own" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE new file mode 100644 index 0000000..d290fe0 --- /dev/null +++ b/node_modules/for-own/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/for-own/README.md b/node_modules/for-own/README.md new file mode 100644 index 0000000..fd56877 --- /dev/null +++ b/node_modules/for-own/README.md @@ -0,0 +1,85 @@ +# for-own [![NPM version](https://img.shields.io/npm/v/for-own.svg?style=flat)](https://www.npmjs.com/package/for-own) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![NPM total downloads](https://img.shields.io/npm/dt/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-own.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-own) + +> Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save for-own +``` + +## Usage + +```js +var forOwn = require('for-own'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forOwn(obj, function (value, key, o) { + keys.push(key); + values.push(value); +}); + +console.log(keys); +//=> ['a', 'b', 'c']; + +console.log(values); +//=> ['foo', 'bar', 'baz']; +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [javiercejudo](https://github.com/javiercejudo) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js new file mode 100644 index 0000000..74e2d75 --- /dev/null +++ b/node_modules/for-own/index.js @@ -0,0 +1,19 @@ +/*! + * for-own + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var forIn = require('for-in'); +var hasOwn = Object.prototype.hasOwnProperty; + +module.exports = function forOwn(obj, fn, thisArg) { + forIn(obj, function(val, key) { + if (hasOwn.call(obj, key)) { + return fn.call(thisArg, obj[key], key, obj); + } + }); +}; diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json new file mode 100644 index 0000000..5eb73af --- /dev/null +++ b/node_modules/for-own/package.json @@ -0,0 +1,70 @@ +{ + "name": "for-own", + "description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/for-own", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Javier Cejudo (https://www.javiercejudo.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/for-own", + "bugs": { + "url": "https://github.com/jonschlinkert/for-own/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "for", + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "key", + "keys", + "object", + "own", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "collection-map", + "for-in" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fragment-cache/LICENSE b/node_modules/fragment-cache/LICENSE new file mode 100644 index 0000000..b11cb79 --- /dev/null +++ b/node_modules/fragment-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-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. diff --git a/node_modules/fragment-cache/README.md b/node_modules/fragment-cache/README.md new file mode 100644 index 0000000..541ef0f --- /dev/null +++ b/node_modules/fragment-cache/README.md @@ -0,0 +1,156 @@ +# fragment-cache [![NPM version](https://img.shields.io/npm/v/fragment-cache.svg?style=flat)](https://www.npmjs.com/package/fragment-cache) [![NPM downloads](https://img.shields.io/npm/dm/fragment-cache.svg?style=flat)](https://npmjs.org/package/fragment-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fragment-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fragment-cache) + +> A cache for managing namespaced sub-caches + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fragment-cache +``` + +## Usage + +```js +var Fragment = require('fragment-cache'); +var fragment = new Fragment(); +``` + +## API + +### [FragmentCache](index.js#L24) + +Create a new `FragmentCache` with an optional object to use for `caches`. + +**Example** + +```js +var fragment = new FragmentCache(); +``` + +**Params** + +* `cacheName` **{String}** +* `returns` **{Object}**: Returns the [map-cache](https://github.com/jonschlinkert/map-cache) instance. + +### [.cache](index.js#L49) + +Get cache `name` from the `fragment.caches` object. Creates a new `MapCache` if it doesn't already exist. + +**Example** + +```js +var cache = fragment.cache('files'); +console.log(fragment.caches.hasOwnProperty('files')); +//=> true +``` + +**Params** + +* `cacheName` **{String}** +* `returns` **{Object}**: Returns the [map-cache](https://github.com/jonschlinkert/map-cache) instance. + +### [.set](index.js#L67) + +Set a value for property `key` on cache `name` + +**Example** + +```js +fragment.set('files', 'somefile.js', new File({path: 'somefile.js'})); +``` + +**Params** + +* `name` **{String}** +* `key` **{String}**: Property name to set +* `val` **{any}**: The value of `key` +* `returns` **{Object}**: The cache instance for chaining + +### [.has](index.js#L93) + +Returns true if a non-undefined value is set for `key` on fragment cache `name`. + +**Example** + +```js +var cache = fragment.cache('files'); +cache.set('somefile.js'); + +console.log(cache.has('somefile.js')); +//=> true + +console.log(cache.has('some-other-file.js')); +//=> false +``` + +**Params** + +* `name` **{String}**: Cache name +* `key` **{String}**: Optionally specify a property to check for on cache `name` +* `returns` **{Boolean}** + +### [.get](index.js#L115) + +Get `name`, or if specified, the value of `key`. Invokes the [cache](#cache) method, so that cache `name` will be created it doesn't already exist. If `key` is not passed, the entire cache (`name`) is returned. + +**Example** + +```js +var Vinyl = require('vinyl'); +var cache = fragment.cache('files'); +cache.set('somefile.js', new Vinyl({path: 'somefile.js'})); +console.log(cache.get('somefile.js')); +//=> +``` + +**Params** + +* `name` **{String}** +* `returns` **{Object}**: Returns cache `name`, or the value of `key` if specified + +## About + +### Related projects + +* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [map-cache](https://www.npmjs.com/package/map-cache): Basic cache object for storing key-value pairs. | [homepage](https://github.com/jonschlinkert/map-cache "Basic cache object for storing key-value pairs.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/fragment-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 17, 2016._ \ No newline at end of file diff --git a/node_modules/fragment-cache/index.js b/node_modules/fragment-cache/index.js new file mode 100644 index 0000000..8ce6216 --- /dev/null +++ b/node_modules/fragment-cache/index.js @@ -0,0 +1,128 @@ +/*! + * fragment-cache + * + * Copyright (c) 2016-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var MapCache = require('map-cache'); + +/** + * Create a new `FragmentCache` with an optional object to use for `caches`. + * + * ```js + * var fragment = new FragmentCache(); + * ``` + * @name FragmentCache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + +function FragmentCache(caches) { + this.caches = caches || {}; +} + +/** + * Prototype + */ + +FragmentCache.prototype = { + + /** + * Get cache `name` from the `fragment.caches` object. Creates a new + * `MapCache` if it doesn't already exist. + * + * ```js + * var cache = fragment.cache('files'); + * console.log(fragment.caches.hasOwnProperty('files')); + * //=> true + * ``` + * @name .cache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + + cache: function(cacheName) { + return this.caches[cacheName] || (this.caches[cacheName] = new MapCache()); + }, + + /** + * Set a value for property `key` on cache `name` + * + * ```js + * fragment.set('files', 'somefile.js', new File({path: 'somefile.js'})); + * ``` + * @name .set + * @param {String} `name` + * @param {String} `key` Property name to set + * @param {any} `val` The value of `key` + * @return {Object} The cache instance for chaining + * @api public + */ + + set: function(cacheName, key, val) { + var cache = this.cache(cacheName); + cache.set(key, val); + return cache; + }, + + /** + * Returns true if a non-undefined value is set for `key` on fragment cache `name`. + * + * ```js + * var cache = fragment.cache('files'); + * cache.set('somefile.js'); + * + * console.log(cache.has('somefile.js')); + * //=> true + * + * console.log(cache.has('some-other-file.js')); + * //=> false + * ``` + * @name .has + * @param {String} `name` Cache name + * @param {String} `key` Optionally specify a property to check for on cache `name` + * @return {Boolean} + * @api public + */ + + has: function(cacheName, key) { + return typeof this.get(cacheName, key) !== 'undefined'; + }, + + /** + * Get `name`, or if specified, the value of `key`. Invokes the [cache]() method, + * so that cache `name` will be created it doesn't already exist. If `key` is not passed, + * the entire cache (`name`) is returned. + * + * ```js + * var Vinyl = require('vinyl'); + * var cache = fragment.cache('files'); + * cache.set('somefile.js', new Vinyl({path: 'somefile.js'})); + * console.log(cache.get('somefile.js')); + * //=> + * ``` + * @name .get + * @param {String} `name` + * @return {Object} Returns cache `name`, or the value of `key` if specified + * @api public + */ + + get: function(name, key) { + var cache = this.cache(name); + if (typeof key === 'string') { + return cache.get(key); + } + return cache; + } +}; + +/** + * Expose `FragmentCache` + */ + +exports = module.exports = FragmentCache; diff --git a/node_modules/fragment-cache/package.json b/node_modules/fragment-cache/package.json new file mode 100644 index 0000000..f87c5da --- /dev/null +++ b/node_modules/fragment-cache/package.json @@ -0,0 +1,60 @@ +{ + "name": "fragment-cache", + "description": "A cache for managing namespaced sub-caches", + "version": "0.2.1", + "homepage": "https://github.com/jonschlinkert/fragment-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/fragment-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/fragment-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "map-cache": "^0.2.2" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.11", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.1", + "mocha": "^3.2.0" + }, + "keywords": [ + "cache", + "fragment" + ], + "verb": { + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "map-cache", + "verb" + ], + "related": { + "list": [ + "base", + "map-cache" + ] + }, + "layout": "default", + "toc": false, + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fs-mkdirp-stream/LICENSE b/node_modules/fs-mkdirp-stream/LICENSE new file mode 100644 index 0000000..73593ac --- /dev/null +++ b/node_modules/fs-mkdirp-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors (Originally based on code from node-mkdirp - MIT/X11 license - Copyright 2010 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/node_modules/fs-mkdirp-stream/README.md b/node_modules/fs-mkdirp-stream/README.md new file mode 100644 index 0000000..819f8a3 --- /dev/null +++ b/node_modules/fs-mkdirp-stream/README.md @@ -0,0 +1,65 @@ +

+ + + +

+ +# fs-mkdirp-stream + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Ensure directories exist before writing to them. + +## Usage + +```js +var to = require('to2'); +var from = require('from2'); +var mkdirpStream = require('fs-mkdirp-stream'); + +from.obj([{ dirname: '/path/to/my/', path: '/path/to/my/file.js' }]) + .pipe(mkdirpStream.obj(function(obj, callback) { + // callback can take 3 arguments (err, dirname, mode) + callback(null, obj.dirname); + })) + .pipe(to.obj(function(obj) { + // This will be called once the directory exists + // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' } + })); +``` + +## API + +### `mkdirpStream(resolver)` + +Takes a `resolver` function or string and returns a `through2` stream. + +If the `resolver` is a function, it will be called once per chunk with the signature `(chunk, callback)`. The `callback(error, dirpath, mode)` must be called with the `dirpath` to be created as the 2nd parameter or an `error` as the 1st parameter; optionally with a `mode` as the 3rd parameter. + +If the `resolver` is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom `mode` can't be used. + +### `mkdirpStream.obj(resolver)` + +The same as the top-level API but for object streams. See the example to see the benefit of object streams with this module. + +## License + +MIT + +Contains a custom implementation of `mkdirp` originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes. + +[downloads-image]: http://img.shields.io/npm/dm/fs-mkdirp-stream.svg +[npm-url]: https://npmjs.com/package/fs-mkdirp-stream +[npm-image]: http://img.shields.io/npm/v/fs-mkdirp-stream.svg + +[travis-url]: https://travis-ci.org/gulpjs/fs-mkdirp-stream +[travis-image]: http://img.shields.io/travis/gulpjs/fs-mkdirp-stream.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fs-mkdirp-stream +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fs-mkdirp-stream.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/fs-mkdirp-stream +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fs-mkdirp-stream/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/fs-mkdirp-stream/index.js b/node_modules/fs-mkdirp-stream/index.js new file mode 100644 index 0000000..cde5e19 --- /dev/null +++ b/node_modules/fs-mkdirp-stream/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var through = require('through2'); + +var mkdirp = require('./mkdirp'); + +function toFunction(dirpath) { + function stringResolver(chunk, callback) { + callback(null, dirpath); + } + + return stringResolver; +} + +function define(options) { + + function mkdirpStream(resolver) { + // Handle resolver that's just a dirpath + if (typeof resolver === 'string') { + resolver = toFunction(resolver); + } + + function makeFileDirs(chunk, enc, callback) { + resolver(chunk, onDirpath); + + function onDirpath(dirpathErr, dirpath, mode) { + if (dirpathErr) { + return callback(dirpathErr); + } + + mkdirp(dirpath, mode, onMkdirp); + } + + function onMkdirp(mkdirpErr) { + if (mkdirpErr) { + return callback(mkdirpErr); + } + + callback(null, chunk); + } + } + + return through(options, makeFileDirs); + } + + return mkdirpStream; +} + +module.exports = define(); +module.exports.obj = define({ objectMode: true, highWaterMark: 16 }); diff --git a/node_modules/fs-mkdirp-stream/mkdirp.js b/node_modules/fs-mkdirp-stream/mkdirp.js new file mode 100644 index 0000000..e70031b --- /dev/null +++ b/node_modules/fs-mkdirp-stream/mkdirp.js @@ -0,0 +1,71 @@ +'use strict'; + +var path = require('path'); + +var fs = require('graceful-fs'); + +var MASK_MODE = parseInt('7777', 8); +var DEFAULT_DIR_MODE = parseInt('0777', 8); + +function mkdirp(dirpath, customMode, callback) { + if (typeof customMode === 'function') { + callback = customMode; + customMode = undefined; + } + + var mode = customMode || (DEFAULT_DIR_MODE & ~process.umask()); + dirpath = path.resolve(dirpath); + + fs.mkdir(dirpath, mode, onMkdir); + + function onMkdir(mkdirErr) { + if (!mkdirErr) { + return fs.stat(dirpath, onStat); + } + + switch (mkdirErr.code) { + case 'ENOENT': { + return mkdirp(path.dirname(dirpath), onRecurse); + } + + case 'EEXIST': { + return fs.stat(dirpath, onStat); + } + + default: { + return callback(mkdirErr); + } + } + + function onStat(statErr, stats) { + if (statErr) { + return callback(statErr); + } + + if (!stats.isDirectory()) { + return callback(mkdirErr); + } + + // TODO: Is it proper to mask like this? + if ((stats.mode & MASK_MODE) === mode) { + return callback(); + } + + if (!customMode) { + return callback(); + } + + fs.chmod(dirpath, mode, callback); + } + } + + function onRecurse(recurseErr) { + if (recurseErr) { + return callback(recurseErr); + } + + mkdirp(dirpath, mode, callback); + } +} + +module.exports = mkdirp; diff --git a/node_modules/fs-mkdirp-stream/package.json b/node_modules/fs-mkdirp-stream/package.json new file mode 100644 index 0000000..8bfaacd --- /dev/null +++ b/node_modules/fs-mkdirp-stream/package.json @@ -0,0 +1,52 @@ +{ + "name": "fs-mkdirp-stream", + "version": "1.0.0", + "description": "Ensure directories exist before writing to them.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/fs-mkdirp-stream", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js", + "mkdirp.js" + ], + "scripts": { + "lint": "eslint index.js mkdirp.js test/ && jscs index.js mkdirp.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "devDependencies": { + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mississippi": "^1.3.0", + "mocha": "^3.2.0", + "rimraf": "^2.6.1" + }, + "keywords": [ + "fs", + "mkdirp", + "stream", + "mkdir", + "directory", + "directories", + "ensure" + ] +} diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE new file mode 100644 index 0000000..5bd884c --- /dev/null +++ b/node_modules/fs.realpath/LICENSE @@ -0,0 +1,43 @@ +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. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + 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. diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md new file mode 100644 index 0000000..a42ceac --- /dev/null +++ b/node_modules/fs.realpath/README.md @@ -0,0 +1,33 @@ +# fs.realpath + +A backwards-compatible fs.realpath for Node v6 and above + +In Node v6, the JavaScript implementation of fs.realpath was replaced +with a faster (but less resilient) native implementation. That raises +new and platform-specific errors and cannot handle long or excessively +symlink-looping paths. + +This module handles those cases by detecting the new errors and +falling back to the JavaScript implementation. On versions of Node +prior to v6, it has no effect. + +## USAGE + +```js +var rp = require('fs.realpath') + +// async version +rp.realpath(someLongAndLoopingPath, function (er, real) { + // the ELOOP was handled, but it was a bit slower +}) + +// sync version +var real = rp.realpathSync(someLongAndLoopingPath) + +// monkeypatch at your own risk! +// This replaces the fs.realpath/fs.realpathSync builtins +rp.monkeypatch() + +// un-do the monkeypatching +rp.unmonkeypatch() +``` diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js new file mode 100644 index 0000000..b09c7c7 --- /dev/null +++ b/node_modules/fs.realpath/index.js @@ -0,0 +1,66 @@ +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = require('fs') +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = require('./old.js') + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js new file mode 100644 index 0000000..b40305e --- /dev/null +++ b/node_modules/fs.realpath/old.js @@ -0,0 +1,303 @@ +// 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. + +var pathModule = require('path'); +var isWindows = process.platform === 'win32'; +var fs = require('fs'); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json new file mode 100644 index 0000000..3edc57d --- /dev/null +++ b/node_modules/fs.realpath/package.json @@ -0,0 +1,26 @@ +{ + "name": "fs.realpath", + "version": "1.0.0", + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "scripts": { + "test": "tap test/*.js --cov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "files": [ + "old.js", + "index.js" + ] +} diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig new file mode 100644 index 0000000..ac29ade --- /dev/null +++ b/node_modules/function-bind/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..9b33d8e --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json new file mode 100644 index 0000000..8c44794 --- /dev/null +++ b/node_modules/function-bind/.jscs.json @@ -0,0 +1,176 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} + diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore new file mode 100644 index 0000000..dbb555f --- /dev/null +++ b/node_modules/function-bind/.npmignore @@ -0,0 +1,22 @@ +# gitignore +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml new file mode 100644 index 0000000..85f70d2 --- /dev/null +++ b/node_modules/function-bind/.travis.yml @@ -0,0 +1,168 @@ +language: node_js +os: + - linux +node_js: + - "8.4" + - "7.10" + - "6.11" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..81862a0 --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..cc4daec --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..20a1727 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,63 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..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/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md new file mode 100644 index 0000000..bf3e1c0 --- /dev/null +++ b/node_modules/get-caller-file/LICENSE.md @@ -0,0 +1,6 @@ +ISC License (ISC) +Copyright 2018 Stefan Penner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md new file mode 100644 index 0000000..1944927 --- /dev/null +++ b/node_modules/get-caller-file/README.md @@ -0,0 +1,4 @@ +# get-caller-file + +[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) +[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js new file mode 100644 index 0000000..03e7dfc --- /dev/null +++ b/node_modules/get-caller-file/index.js @@ -0,0 +1,20 @@ +'use strict'; + +// Call this function in a another function to find out the file from +// which that function was called from. (Inspects the v8 stack trace) +// +// Inspired by http://stackoverflow.com/questions/13227489 + +module.exports = function getCallerFile(_position) { + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(err, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + + var position = _position ? _position : 2; + + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; +}; diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json new file mode 100644 index 0000000..eb121a6 --- /dev/null +++ b/node_modules/get-caller-file/package.json @@ -0,0 +1,31 @@ +{ + "name": "get-caller-file", + "version": "1.0.3", + "description": "", + "main": "index.js", + "directories": { + "test": "tests" + }, + "files": [ + "index.js" + ], + "scripts": { + "test": "mocha test", + "test:debug": "mocha test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "author": "Stefan Penner", + "license": "ISC", + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "devDependencies": { + "chai": "^4.1.2", + "ensure-posix-path": "^1.0.1", + "mocha": "^5.2.0" + } +} diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc new file mode 100644 index 0000000..0ab0876 --- /dev/null +++ b/node_modules/get-intrinsic/.eslintrc @@ -0,0 +1,37 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines-per-function": [2, 90], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000..8e8da0d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/get-intrinsic +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/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000..1bb52d3 --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,98 @@ +# 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.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000..3aa0bba --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![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] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000..3c3d93e --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,334 @@ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('has'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000..dfde032 --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,91 @@ +{ + "name": "get-intrinsic", + "version": "1.1.3", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "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/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.2", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000..7e0ea30 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bind/callBound'); +var v = require('es-value-fixtures'); +var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor'); +var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/get-value/LICENSE b/node_modules/get-value/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/get-value/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/get-value/index.js b/node_modules/get-value/index.js new file mode 100644 index 0000000..5879a88 --- /dev/null +++ b/node_modules/get-value/index.js @@ -0,0 +1,50 @@ +/*! + * get-value + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function(obj, prop, a, b, c) { + if (!isObject(obj) || !prop) { + return obj; + } + + prop = toString(prop); + + // allowing for multiple properties to be passed as + // a string or array, but much faster (3-4x) than doing + // `[].slice.call(arguments)` + if (a) prop += '.' + toString(a); + if (b) prop += '.' + toString(b); + if (c) prop += '.' + toString(c); + + if (prop in obj) { + return obj[prop]; + } + + var segs = prop.split('.'); + var len = segs.length; + var i = -1; + + while (obj && (++i < len)) { + var key = segs[i]; + while (key[key.length - 1] === '\\') { + key = key.slice(0, -1) + '.' + segs[++i]; + } + obj = obj[key]; + } + return obj; +}; + +function isObject(val) { + return val !== null && (typeof val === 'object' || typeof val === 'function'); +} + +function toString(val) { + if (!val) return ''; + if (Array.isArray(val)) { + return val.join('.'); + } + return val; +} diff --git a/node_modules/get-value/package.json b/node_modules/get-value/package.json new file mode 100644 index 0000000..df168cd --- /dev/null +++ b/node_modules/get-value/package.json @@ -0,0 +1,79 @@ +{ + "name": "get-value", + "description": "Use property paths (`a.b.c`) to get a nested value from an object.", + "version": "2.0.6", + "homepage": "https://github.com/jonschlinkert/get-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/get-value", + "bugs": { + "url": "https://github.com/jonschlinkert/get-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-reduce": "^1.0.1", + "benchmarked": "^0.1.4", + "dot-prop": "^2.2.0", + "getobject": "^0.1.0", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-format-md": "^0.1.5", + "gulp-istanbul": "^0.10.2", + "gulp-mocha": "^2.1.3", + "isobject": "^2.0.0", + "matched": "^0.3.2", + "minimist": "^1.2.0" + }, + "keywords": [ + "get", + "key", + "nested", + "object", + "path", + "paths", + "prop", + "properties", + "property", + "props", + "segment", + "value", + "values" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-any", + "has-any-deep", + "has-value", + "set-value", + "unset-value" + ] + }, + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..734076d --- /dev/null +++ b/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015 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. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md new file mode 100644 index 0000000..3bec5c7 --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,109 @@ +glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) +====== +Javascript module to extract the non-magic parent path from a glob string. + +[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) +[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) + +Usage +----- +```sh +npm install glob-parent --save +``` + +**Examples** + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) +- `*` (star) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' +``` + +## Limitations + +#### Braces & Brackets +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +#### Windows +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]') // 'foo ' +globParent('foo \\[bar]*') // 'foo ' + +// GOOD +globParent('./foo \\[bar]') // 'foo [bar]' +globParent('./foo \\[bar]*') // '.' +``` + + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) + +License +------- +[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000..3a14a53 --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var path = require('path'); +var isglob = require('is-glob'); +var pathDirname = require('path-dirname'); +var isWin32 = require('os').platform() === 'win32'; + +module.exports = function globParent(str) { + // flip windows path separators + if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); + + // special case for strings ending in enclosure containing path separator + if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do {str = pathDirname.posix(str)} + while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); + + // remove escape chars and return result + return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); +}; diff --git a/node_modules/glob-parent/node_modules/is-glob/LICENSE b/node_modules/glob-parent/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/glob-parent/node_modules/is-glob/README.md b/node_modules/glob-parent/node_modules/is-glob/README.md new file mode 100644 index 0000000..6f4404f --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/README.md @@ -0,0 +1,142 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +isGlob('abc/?.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +isGlob('abc/\\?.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +## About + +### Related projects + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 40 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [tuvistavie](https://github.com/tuvistavie) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/glob-parent/node_modules/is-glob/index.js b/node_modules/glob-parent/node_modules/is-glob/index.js new file mode 100644 index 0000000..2ecbe2a --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/index.js @@ -0,0 +1,25 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = require('is-extglob'); + +module.exports = function isGlob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) return true; + + var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; + var match; + + while ((match = regex.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; +}; diff --git a/node_modules/glob-parent/node_modules/is-glob/package.json b/node_modules/glob-parent/node_modules/is-glob/package.json new file mode 100644 index 0000000..53a137d --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/package.json @@ -0,0 +1,80 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Daniel Perez (http://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000..e002385 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,42 @@ +{ + "name": "glob-parent", + "version": "3.1.0", + "description": "Strips glob magic from a string to provide the parent directory path", + "main": "index.js", + "scripts": { + "test": "istanbul test node_modules/mocha/bin/_mocha", + "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "repository": { + "type": "git", + "url": "https://github.com/es128/glob-parent" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ], + "files": [ + "index.js" + ], + "author": "Elan Shanker (https://github.com/es128)", + "license": "ISC", + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "homepage": "https://github.com/es128/glob-parent", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + } +} diff --git a/node_modules/glob-stream/LICENSE b/node_modules/glob-stream/LICENSE new file mode 100755 index 0000000..67fa13b --- /dev/null +++ b/node_modules/glob-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/glob-stream/README.md b/node_modules/glob-stream/README.md new file mode 100644 index 0000000..12c103e --- /dev/null +++ b/node_modules/glob-stream/README.md @@ -0,0 +1,146 @@ +

+ + + +

+ +# glob-stream + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +A [Readable Stream][readable-stream-url] interface over [node-glob][node-glob-url]. + +## Usage + +```javascript +var gs = require('glob-stream'); + +var readable = gs('./files/**/*.coffee', { /* options */ }); + +var writable = /* your WriteableStream */ + +readable.pipe(writable); +``` + +You can pass any combination of glob strings. One caveat is that you cannot __only__ pass a negative glob, you must give it at least one positive glob so it knows where to start. If given a non-glob path (also referred to as a singular glob), only one file will be emitted. If given a singular glob and no files match, an error is emitted (see also [`options.allowEmpty`][allow-empty-url]). + +## API + +### `globStream(globs, options)` + +Takes a glob string or an array of glob strings as the first argument and an options object as the second. Returns a stream of objects that contain `cwd`, `base` and `path` properties. + +#### Options + +##### `options.allowEmpty` + +Whether or not to error upon an empty singular glob. + +Type: `Boolean` + +Default: `false` (error upon no match) + +##### `options.dot` + +Whether or not to treat dotfiles as regular files. This is passed through to [node-glob][node-glob-url]. + +Type: `Boolean` + +Default: `false` + +##### `options.silent` + +Whether or not to suppress warnings on stderr from [node-glob][node-glob-url]. This is passed through to [node-glob][node-glob-url]. + +Type: `Boolean` + +Default: `true` + +##### `options.cwd` + +The current working directory that the glob is resolved against. + +Type: `String` + +Default: `process.cwd()` + +##### `options.root` + +The root path that the glob is resolved against. + +__Note: This is never passed to [node-glob][node-glob-url] because it is pre-resolved against your paths.__ + +Type: `String` + +Default: `undefined` (use the filesystem root) + +##### `options.base` + +The absolute segment of the glob path that isn't a glob. This value is attached to each glob object and is useful for relative pathing. + +Type: `String` + +Default: The absolute path segement before a glob starts (see [glob-parent][glob-parent-url]) + +##### `options.cwdbase` + +Whether or not the `cwd` and `base` should be the same. + +Type: `Boolean` + +Default: `false` + +##### `options.uniqueBy` + +Filters stream to remove duplicates based on the string property name or the result of function. When using a function, the function receives the streamed data (objects containing `cwd`, `base`, `path` properties) to compare against. + +Type: `String` or `Function` + +Default: `'path'` + +##### other + +Any glob-related options are documented in [node-glob][node-glob-url]. Those options are forwarded verbatim, with the exception of `root` and `ignore`. `root` is pre-resolved and `ignore` is joined with all negative globs. + +#### Globbing & Negation + +```js +var stream = gs(['./**/*.js', '!./node_modules/**/*']); +``` + +Globs are executed in order, so negations should follow positive globs. For example: + +The following would __not__ exclude any files: +```js +gs(['!b*.js', '*.js']) +``` + +However, this would exclude all files that started with `b`: +```js +gs(['*.js', '!b*.js']) +``` + +## License + +MIT + +[node-glob-url]: https://github.com/isaacs/node-glob +[glob-parent-url]: https://github.com/es128/glob-parent +[allow-empty-url]: #optionsallowempty +[readable-stream-url]: https://nodejs.org/api/stream.html#stream_readable_streams + +[downloads-image]: http://img.shields.io/npm/dm/glob-stream.svg +[npm-url]: https://www.npmjs.com/package/glob-stream +[npm-image]: http://img.shields.io/npm/v/glob-stream.svg + +[travis-url]: https://travis-ci.org/gulpjs/glob-stream +[travis-image]: http://img.shields.io/travis/gulpjs/glob-stream.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-stream +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-stream.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-stream +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glob-stream.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/glob-stream/index.js b/node_modules/glob-stream/index.js new file mode 100644 index 0000000..dd012f6 --- /dev/null +++ b/node_modules/glob-stream/index.js @@ -0,0 +1,94 @@ +'use strict'; + +var Combine = require('ordered-read-streams'); +var unique = require('unique-stream'); +var pumpify = require('pumpify'); +var isNegatedGlob = require('is-negated-glob'); +var extend = require('extend'); + +var GlobStream = require('./readable'); + +function globStream(globs, opt) { + if (!opt) { + opt = {}; + } + + var ourOpt = extend({}, opt); + var ignore = ourOpt.ignore; + + ourOpt.cwd = typeof ourOpt.cwd === 'string' ? ourOpt.cwd : process.cwd(); + ourOpt.dot = typeof ourOpt.dot === 'boolean' ? ourOpt.dot : false; + ourOpt.silent = typeof ourOpt.silent === 'boolean' ? ourOpt.silent : true; + ourOpt.cwdbase = typeof ourOpt.cwdbase === 'boolean' ? ourOpt.cwdbase : false; + ourOpt.uniqueBy = typeof ourOpt.uniqueBy === 'string' || + typeof ourOpt.uniqueBy === 'function' ? ourOpt.uniqueBy : 'path'; + + if (ourOpt.cwdbase) { + ourOpt.base = ourOpt.cwd; + } + // Normalize string `ignore` to array + if (typeof ignore === 'string') { + ignore = [ignore]; + } + // Ensure `ignore` is an array + if (!Array.isArray(ignore)) { + ignore = []; + } + + // Only one glob no need to aggregate + if (!Array.isArray(globs)) { + globs = [globs]; + } + + var positives = []; + var negatives = []; + + globs.forEach(sortGlobs); + + function sortGlobs(globString, index) { + if (typeof globString !== 'string') { + throw new Error('Invalid glob at index ' + index); + } + + var glob = isNegatedGlob(globString); + var globArray = glob.negated ? negatives : positives; + + globArray.push({ + index: index, + glob: glob.pattern, + }); + } + + if (positives.length === 0) { + throw new Error('Missing positive glob'); + } + + // Create all individual streams + var streams = positives.map(streamFromPositive); + + // Then just pipe them to a single unique stream and return it + var aggregate = new Combine(streams); + var uniqueStream = unique(ourOpt.uniqueBy); + + return pumpify.obj(aggregate, uniqueStream); + + function streamFromPositive(positive) { + var negativeGlobs = negatives + .filter(indexGreaterThan(positive.index)) + .map(toGlob) + .concat(ignore); + return new GlobStream(positive.glob, negativeGlobs, ourOpt); + } +} + +function indexGreaterThan(index) { + return function(obj) { + return obj.index > index; + }; +} + +function toGlob(obj) { + return obj.glob; +} + +module.exports = globStream; diff --git a/node_modules/glob-stream/package.json b/node_modules/glob-stream/package.json new file mode 100644 index 0000000..7cd919a --- /dev/null +++ b/node_modules/glob-stream/package.json @@ -0,0 +1,59 @@ +{ + "name": "glob-stream", + "version": "6.1.0", + "description": "A Readable Stream interface over node-glob.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Eric Schoffstall ", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-stream", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js", + "readable.js", + "LICENSE" + ], + "scripts": { + "lint": "eslint . && jscs index.js readable.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "devDependencies": { + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mississippi": "^1.2.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "glob", + "stream", + "gulp", + "readable", + "fs", + "files" + ] +} diff --git a/node_modules/glob-stream/readable.js b/node_modules/glob-stream/readable.js new file mode 100644 index 0000000..36cf7b6 --- /dev/null +++ b/node_modules/glob-stream/readable.js @@ -0,0 +1,117 @@ +'use strict'; + +var inherits = require('util').inherits; + +var glob = require('glob'); +var extend = require('extend'); +var Readable = require('readable-stream').Readable; +var globParent = require('glob-parent'); +var toAbsoluteGlob = require('to-absolute-glob'); +var removeTrailingSeparator = require('remove-trailing-separator'); + +var globErrMessage1 = 'File not found with singular glob: '; +var globErrMessage2 = ' (if this was purposeful, use `allowEmpty` option)'; + +function getBasePath(ourGlob, opt) { + return globParent(toAbsoluteGlob(ourGlob, opt)); +} + +function globIsSingular(glob) { + var globSet = glob.minimatch.set; + if (globSet.length !== 1) { + return false; + } + + return globSet[0].every(function isString(value) { + return typeof value === 'string'; + }); +} + +function GlobStream(ourGlob, negatives, opt) { + if (!(this instanceof GlobStream)) { + return new GlobStream(ourGlob, negatives, opt); + } + + var ourOpt = extend({}, opt); + + Readable.call(this, { + objectMode: true, + highWaterMark: ourOpt.highWaterMark || 16, + }); + + // Delete `highWaterMark` after inheriting from Readable + delete ourOpt.highWaterMark; + + var self = this; + + function resolveNegatives(negative) { + return toAbsoluteGlob(negative, ourOpt); + } + + var ourNegatives = negatives.map(resolveNegatives); + ourOpt.ignore = ourNegatives; + + var cwd = ourOpt.cwd; + var allowEmpty = ourOpt.allowEmpty || false; + + // Extract base path from glob + var basePath = ourOpt.base || getBasePath(ourGlob, ourOpt); + + // Remove path relativity to make globs make sense + ourGlob = toAbsoluteGlob(ourGlob, ourOpt); + // Delete `root` after all resolving done + delete ourOpt.root; + + var globber = new glob.Glob(ourGlob, ourOpt); + this._globber = globber; + + var found = false; + + globber.on('match', function(filepath) { + found = true; + var obj = { + cwd: cwd, + base: basePath, + path: removeTrailingSeparator(filepath), + }; + if (!self.push(obj)) { + globber.pause(); + } + }); + + globber.once('end', function() { + if (allowEmpty !== true && !found && globIsSingular(globber)) { + var err = new Error(globErrMessage1 + ourGlob + globErrMessage2); + + return self.destroy(err); + } + + self.push(null); + }); + + function onError(err) { + self.destroy(err); + } + + globber.once('error', onError); +} +inherits(GlobStream, Readable); + +GlobStream.prototype._read = function() { + this._globber.resume(); +}; + +GlobStream.prototype.destroy = function(err) { + var self = this; + + this._globber.abort(); + + process.nextTick(function() { + if (err) { + self.emit('error', err); + } + self.emit('close'); + }); +}; + +module.exports = GlobStream; diff --git a/node_modules/glob-watcher/LICENSE b/node_modules/glob-watcher/LICENSE new file mode 100755 index 0000000..b8fc743 --- /dev/null +++ b/node_modules/glob-watcher/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/glob-watcher/README.md b/node_modules/glob-watcher/README.md new file mode 100644 index 0000000..dba40cf --- /dev/null +++ b/node_modules/glob-watcher/README.md @@ -0,0 +1,137 @@ +

+ + + +

+ +# glob-watcher + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Watch globs and execute a function upon change, with intelligent defaults for debouncing and queueing. + +## Usage + +```js +var watch = require('glob-watcher'); + +watch(['./*.js', '!./something.js'], function(done){ + // This function will be called each time a globbed file is changed + // but is debounced with a 200ms delay (default) and queues subsequent calls + + // Make sure to signal async completion with the callback + // or by returning a stream, promise, observable or child process + done(); + + // if you need access to the `path` or `stat` object, listen + // for the `change` event (see below) + + // if you need to listen to specific events, use the returned + // watcher instance (see below) +}); + +// Raw chokidar instance +var watcher = watch(['./*.js', '!./something.js']); + +// Listen for the 'change' event to get `path`/`stat` +// No async completion available because this is the raw chokidar instance +watcher.on('change', function(path, stat) { + // `path` is the path of the changed file + // `stat` is an `fs.Stat` object (not always available) +}); + +// Listen for other events +// No async completion available because this is the raw chokidar instance +watcher.on('add', function(path, stat) { + // `path` is the path of the changed file + // `stat` is an `fs.Stat` object (not always available) +}); +``` + +## API + +### `watch(globs[, options][, fn])` + +Takes a path string, an array of path strings, a [glob][micromatch] string or an array of [glob][micromatch] strings as `globs` to watch on the filesystem. Also optionally takes `options` to configure the watcher and a `fn` to execute when a file changes. + +__Note: As of 5.0.0, globs must use `/` as the separator character because `\\` is reserved for escape sequences (as per the Bash 4.3 & Micromatch specs). This means you can't use `path.join()` or `__dirname` in Windows environments. If you need to use `path.join()`, you can use [normalize-path][normalize-path] against your paths afterwards. If you need to use `__dirname`, you can set it as the `cwd` option that gets passed directly to [chokidar][chokidar]. The [micromatch docs][micromatch-backslashes] contain more information about backslashes.__ + +Returns an instance of [chokidar][chokidar]. + +#### `fn([callback])` + +If the `fn` is passed, it will be called when the watcher emits a `change`, `add` or `unlink` event. It is automatically debounced with a default delay of 200 milliseconds and subsequent calls will be queued and called upon completion. These defaults can be changed using the `options`. + +The `fn` is passed a single argument, `callback`, which is a function that must be called when work in the `fn` is complete. Instead of calling the `callback` function, [async completion][async-completion] can be signalled by: + * Returning a `Stream` or `EventEmitter` + * Returning a `Child Process` + * Returning a `Promise` + * Returning an `Observable` + +Once async completion is signalled, if another run is queued, it will be executed. + +#### `options` + +##### `options.ignoreInitial` + +If set to `false` the `fn` is called during [chokidar][chokidar] instantiation as it discovers the file paths. Useful if it is desirable to trigger the `fn` during startup. + +__Passed through to [chokidar][chokidar], but defaulted to `true` instead of `false`.__ + +Type: `Boolean` + +Default: `true` + +##### `options.delay` + +The delay to wait before triggering the `fn`. Useful for waiting on many changes before doing the work on changed files, e.g. find-and-replace on many files. + +Type: `Number` + +Default: `200` (milliseconds) + +##### `options.queue` + +Whether or not a file change should queue the `fn` execution if the `fn` is already running. Useful for a long running `fn`. + +Type: `Boolean` + +Default: `true` + +##### `options.events` + +An event name or array of event names to listen for. Useful if you only need to watch specific events. + +Type: `String | Array` + +Default: `[ 'add', 'change', 'unlink' ]` + +##### other + +Options are passed directly to [chokidar][chokidar]. + +## License + +MIT + +[micromatch]: https://github.com/micromatch/micromatch +[normalize-path]: https://www.npmjs.com/package/normalize-path +[micromatch-backslashes]: https://github.com/micromatch/micromatch#backslashes +[async-completion]: https://github.com/gulpjs/async-done#completion-and-error-resolution +[chokidar]: https://github.com/paulmillr/chokidar + +[downloads-image]: http://img.shields.io/npm/dm/glob-watcher.svg +[npm-url]: https://npmjs.com/package/glob-watcher +[npm-image]: http://img.shields.io/npm/v/glob-watcher.svg + +[travis-url]: https://travis-ci.org/gulpjs/glob-watcher +[travis-image]: http://img.shields.io/travis/gulpjs/glob-watcher.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-watcher +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-watcher.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-watcher +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glob-watcher/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/glob-watcher/index.js b/node_modules/glob-watcher/index.js new file mode 100644 index 0000000..2c51da6 --- /dev/null +++ b/node_modules/glob-watcher/index.js @@ -0,0 +1,149 @@ +'use strict'; + +var chokidar = require('chokidar'); +var debounce = require('just-debounce'); +var asyncDone = require('async-done'); +var defaults = require('object.defaults/immutable'); +var isNegatedGlob = require('is-negated-glob'); +var anymatch = require('anymatch'); +var normalize = require('normalize-path'); + +var defaultOpts = { + delay: 200, + events: ['add', 'change', 'unlink'], + ignored: [], + ignoreInitial: true, + queue: true, +}; + +function listenerCount(ee, evtName) { + if (typeof ee.listenerCount === 'function') { + return ee.listenerCount(evtName); + } + + return ee.listeners(evtName).length; +} + +function hasErrorListener(ee) { + return listenerCount(ee, 'error') !== 0; +} + +function exists(val) { + return val != null; +} + +function watch(glob, options, cb) { + if (typeof options === 'function') { + cb = options; + options = {}; + } + + var opt = defaults(options, defaultOpts); + + if (!Array.isArray(opt.events)) { + opt.events = [opt.events]; + } + + if (Array.isArray(glob)) { + // We slice so we don't mutate the passed globs array + glob = glob.slice(); + } else { + glob = [glob]; + } + + var queued = false; + var running = false; + + // These use sparse arrays to keep track of the index in the + // original globs array + var positives = new Array(glob.length); + var negatives = new Array(glob.length); + + // Reverse the glob here so we don't end up with a positive + // and negative glob in position 0 after a reverse + glob.reverse().forEach(sortGlobs); + + function sortGlobs(globString, index) { + var result = isNegatedGlob(globString); + if (result.negated) { + negatives[index] = result.pattern; + } else { + positives[index] = result.pattern; + } + } + + var toWatch = positives.filter(exists); + + function joinCwd(glob) { + if (glob && opt.cwd) { + return normalize(opt.cwd + '/' + glob); + } + + return glob; + } + + // We only do add our custom `ignored` if there are some negative globs + // TODO: I'm not sure how to test this + if (negatives.some(exists)) { + var normalizedPositives = positives.map(joinCwd); + var normalizedNegatives = negatives.map(joinCwd); + var shouldBeIgnored = function(path) { + var positiveMatch = anymatch(normalizedPositives, path, true); + var negativeMatch = anymatch(normalizedNegatives, path, true); + // If negativeMatch is -1, that means it was never negated + if (negativeMatch === -1) { + return false; + } + + // If the negative is "less than" the positive, that means + // it came later in the glob array before we reversed them + return negativeMatch < positiveMatch; + }; + + opt.ignored = [].concat(opt.ignored, shouldBeIgnored); + } + var watcher = chokidar.watch(toWatch, opt); + + function runComplete(err) { + running = false; + + if (err && hasErrorListener(watcher)) { + watcher.emit('error', err); + } + + // If we have a run queued, start onChange again + if (queued) { + queued = false; + onChange(); + } + } + + function onChange() { + if (running) { + if (opt.queue) { + queued = true; + } + return; + } + + running = true; + asyncDone(cb, runComplete); + } + + var fn; + if (typeof cb === 'function') { + fn = debounce(onChange, opt.delay); + } + + function watchEvent(eventName) { + watcher.on(eventName, fn); + } + + if (fn) { + opt.events.forEach(watchEvent); + } + + return watcher; +} + +module.exports = watch; diff --git a/node_modules/glob-watcher/package.json b/node_modules/glob-watcher/package.json new file mode 100644 index 0000000..d934112 --- /dev/null +++ b/node_modules/glob-watcher/package.json @@ -0,0 +1,52 @@ +{ + "name": "glob-watcher", + "version": "5.0.5", + "description": "Watch globs and execute a function upon change, with intelligent defaults for debouncing and queueing.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [], + "repository": "gulpjs/glob-watcher", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.16.0", + "istanbul": "^0.4.0", + "istanbul-coveralls": "^1.0.1", + "mocha": "^2.0.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.6.1", + "through2": "^2.0.1" + }, + "keywords": [ + "watch", + "glob", + "async", + "queue", + "debounce", + "callback" + ] +} diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE new file mode 100644 index 0000000..42ca266 --- /dev/null +++ b/node_modules/glob/LICENSE @@ -0,0 +1,21 @@ +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. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md new file mode 100644 index 0000000..83f0c83 --- /dev/null +++ b/node_modules/glob/README.md @@ -0,0 +1,378 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![a fun cartoon logo made of glob characters](logo/glob.png) + +## Usage + +Install with npm + +``` +npm i glob +``` + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `absolute` Set to true to always receive absolute paths for matched + files. Unlike `realpath`, this also affects the values returned in + the `match` event. +* `fs` File-system object with Node's `fs` API. By default, the built-in + `fs` module will be used. Set to a volume provided by a library like + `memfs` to avoid using the "real" file-system. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` + +![](oh-my-glob.gif) diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js new file mode 100644 index 0000000..424c46e --- /dev/null +++ b/node_modules/glob/common.js @@ -0,0 +1,238 @@ +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var fs = require("fs") +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasort (a, b) { + return a.localeCompare(b, 'en') +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + self.fs = options.fs || fs + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + // always treat \ in patterns as escapes, not path separators + options.allowWindowsEscape = false + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js new file mode 100644 index 0000000..37a4d7e --- /dev/null +++ b/node_modules/glob/glob.js @@ -0,0 +1,790 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + self.fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + self.fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + self.fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return self.fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json new file mode 100644 index 0000000..5940b64 --- /dev/null +++ b/node_modules/glob/package.json @@ -0,0 +1,55 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "glob", + "description": "a little globber", + "version": "7.2.3", + "publishConfig": { + "tag": "v7-legacy" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "memfs": "^3.2.0", + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^15.0.6", + "tick": "0.0.6" + }, + "tap": { + "before": "test/00-setup.js", + "after": "test/zz-cleanup.js", + "jobs": 1 + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } +} diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js new file mode 100644 index 0000000..2c4f480 --- /dev/null +++ b/node_modules/glob/sync.js @@ -0,0 +1,486 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert.ok(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert.ok(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/node_modules/global-modules/LICENSE b/node_modules/global-modules/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/global-modules/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/global-modules/README.md b/node_modules/global-modules/README.md new file mode 100644 index 0000000..a076f65 --- /dev/null +++ b/node_modules/global-modules/README.md @@ -0,0 +1,75 @@ +# global-modules [![NPM version](https://img.shields.io/npm/v/global-modules.svg?style=flat)](https://www.npmjs.com/package/global-modules) [![NPM monthly downloads](https://img.shields.io/npm/dm/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![NPM total downloads](https://img.shields.io/npm/dt/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/global-modules.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/global-modules) + +> The directory used by npm for globally installed npm modules. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save global-modules +``` + +## Usage + +```js +var globalModules = require('global-modules'); +console.log(globalModules); +//=> '/usr/local/lib/node_modules' +``` +_(Note that this path might be different based on OS or user defined configuration settings)_ + +## About + +### Related projects + +* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's local or global .gitconfig.") +* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.") +* [homedir-polyfill](https://www.npmjs.com/package/homedir-polyfill): Node.js os.homedir polyfill for older versions of node.js. | [homepage](https://github.com/doowb/homedir-polyfill "Node.js os.homedir polyfill for older versions of node.js.") +* [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique "npm" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths "Returns an array of unique "npm" directories based on the user's platform and environment.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 14 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [jason-chang](https://github.com/jason-chang) | +| 1 | [Kikobeats](https://github.com/Kikobeats) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 28, 2017._ \ No newline at end of file diff --git a/node_modules/global-modules/index.js b/node_modules/global-modules/index.js new file mode 100644 index 0000000..e4c2b8b --- /dev/null +++ b/node_modules/global-modules/index.js @@ -0,0 +1,31 @@ +/*! + * global-modules + * + * Copyright (c) 2015-2017 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var path = require('path'); +var prefix = require('global-prefix'); +var isWindows = require('is-windows'); +var gm; + +function getPath() { + if (isWindows()) { + return path.resolve(prefix, 'node_modules'); + } + return path.resolve(prefix, 'lib/node_modules'); +} + +/** + * Expose `global-modules` path + */ + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: function() { + return gm || (gm = getPath()); + } +}); diff --git a/node_modules/global-modules/package.json b/node_modules/global-modules/package.json new file mode 100644 index 0000000..35430bb --- /dev/null +++ b/node_modules/global-modules/package.json @@ -0,0 +1,72 @@ +{ + "name": "global-modules", + "description": "The directory used by npm for globally installed npm modules.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/global-modules", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "JasonChang (https://packagist.org/packages/jason-chang)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Kiko Beats (https://kikobeats.com)" + ], + "repository": "jonschlinkert/global-modules", + "bugs": { + "url": "https://github.com/jonschlinkert/global-modules/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "directory", + "dirname", + "global", + "module", + "modules", + "package", + "path", + "prefix", + "resolve" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "homedir-polyfill", + "git-config-path", + "global-prefix", + "npm-paths" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/global-prefix/LICENSE b/node_modules/global-prefix/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/global-prefix/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/global-prefix/README.md b/node_modules/global-prefix/README.md new file mode 100644 index 0000000..31d78ff --- /dev/null +++ b/node_modules/global-prefix/README.md @@ -0,0 +1,78 @@ +# global-prefix [![NPM version](https://img.shields.io/npm/v/global-prefix.svg?style=flat)](https://www.npmjs.com/package/global-prefix) [![NPM monthly downloads](https://img.shields.io/npm/dm/global-prefix.svg?style=flat)](https://npmjs.org/package/global-prefix) [![NPM total downloads](https://img.shields.io/npm/dt/global-prefix.svg?style=flat)](https://npmjs.org/package/global-prefix) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/global-prefix.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/global-prefix) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/global-prefix.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/global-prefix) + +> Get the npm global path prefix. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save global-prefix +``` + +This is partially based on the code used by npm internally to resolve the global prefix. + +## Usage + +```js +var prefix = require('global-prefix'); +//=> '/usr/local' (this path will differ by system and user-defined config) +``` + +## About + +### Related projects + +* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.") +* [global-paths](https://www.npmjs.com/package/global-paths): Returns an array of unique "global" directories based on the user's platform and environment. The… [more](https://github.com/jonschlinkert/global-paths) | [homepage](https://github.com/jonschlinkert/global-paths "Returns an array of unique "global" directories based on the user's platform and environment. The resulting paths can be used for doing lookups for generators or other globally installed npm packages. Node.js / JavaScript.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 16 | [jonschlinkert](https://github.com/jonschlinkert) | +| 15 | [doowb](https://github.com/doowb) | +| 1 | [rmbaad](https://github.com/rmbaad) | +| 1 | [avengerpenguin](https://github.com/avengerpenguin) | +| 1 | [jason-chang](https://github.com/jason-chang) | +| 1 | [jorrit](https://github.com/jorrit) | +| 1 | [mathiasvr](https://github.com/mathiasvr) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 28, 2017._ \ No newline at end of file diff --git a/node_modules/global-prefix/index.js b/node_modules/global-prefix/index.js new file mode 100644 index 0000000..cc66d95 --- /dev/null +++ b/node_modules/global-prefix/index.js @@ -0,0 +1,96 @@ +/*! + * global-prefix + * + * Copyright (c) 2015-2017 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var expand = require('expand-tilde'); +var homedir = require('homedir-polyfill'); +var ini = require('ini'); +var prefix; + +function getPrefix() { + if (process.env.PREFIX) { + prefix = process.env.PREFIX; + } else { + // Start by checking if the global prefix is set by the user + var home = homedir(); + if (home) { + // homedir() returns undefined if $HOME not set; path.resolve requires strings + var userConfig = path.resolve(home, '.npmrc'); + prefix = tryConfigPath(userConfig); + } + + if (!prefix) { + // Otherwise find the path of npm + var npm = tryNpmPath(); + if (npm) { + // Check the built-in npm config file + var builtinConfig = path.resolve(npm, '..', '..', 'npmrc'); + prefix = tryConfigPath(builtinConfig); + + if (prefix) { + // Now the global npm config can also be checked. + var globalConfig = path.resolve(prefix, 'etc', 'npmrc'); + prefix = tryConfigPath(globalConfig) || prefix; + } + } + + if (!prefix) fallback(); + } + } + + if (prefix) { + return expand(prefix); + } +} + +function fallback() { + var isWindows = require('is-windows'); + if (isWindows()) { + // c:\node\node.exe --> prefix=c:\node\ + prefix = process.env.APPDATA + ? path.join(process.env.APPDATA, 'npm') + : path.dirname(process.execPath); + } else { + // /usr/local/bin/node --> prefix=/usr/local + prefix = path.dirname(path.dirname(process.execPath)); + + // destdir only is respected on Unix + if (process.env.DESTDIR) { + prefix = path.join(process.env.DESTDIR, prefix); + } + } +} + +function tryNpmPath() { + try { + return fs.realpathSync(require('which').sync('npm')); + } catch (err) {} + return null; +} + +function tryConfigPath(configPath) { + try { + var data = fs.readFileSync(configPath, 'utf-8'); + var config = ini.parse(data); + if (config.prefix) return config.prefix; + } catch (err) {} + return null; +} + +/** + * Expose `prefix` + */ + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: function() { + return prefix || (prefix = getPrefix()); + } +}); diff --git a/node_modules/global-prefix/package.json b/node_modules/global-prefix/package.json new file mode 100644 index 0000000..7d366a6 --- /dev/null +++ b/node_modules/global-prefix/package.json @@ -0,0 +1,75 @@ +{ + "name": "global-prefix", + "description": "Get the npm global path prefix.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/global-prefix", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Alexandr Bogachev (https://github.com/rmbaad)", + "Brian Woodward (https://twitter.com/doowb)", + "Charlike Mike Reagent (https://i.am.charlike.online)", + "JasonChang (https://packagist.org/packages/jason-chang)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Jorrit Schippers (https://www.ncode.nl)", + "Mathias Rasmussen (chrome://dino)", + "Ross Fenning (http://rossfenning.co.uk)" + ], + "repository": "jonschlinkert/global-prefix", + "bugs": { + "url": "https://github.com/jonschlinkert/global-prefix/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "global", + "module", + "modules", + "npm", + "path", + "prefix", + "resolve" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "global-modules", + "global-paths" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/glogg/LICENSE b/node_modules/glogg/LICENSE new file mode 100644 index 0000000..3a58630 --- /dev/null +++ b/node_modules/glogg/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2018 Blaine Bublitz and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/glogg/README.md b/node_modules/glogg/README.md new file mode 100644 index 0000000..897e105 --- /dev/null +++ b/node_modules/glogg/README.md @@ -0,0 +1,114 @@ +

+ + + +

+ +# glogg + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Global logging utility. + +## Usage + +```js +var getLogger = require('glogg'); + +var logger = getLogger('my-namespace'); + +// logs strings +logger.debug('The MOST verbose!'); +logger.info('Some important info'); +logger.warn('All the warnings to you'); +logger.error('OH NO! SOMETHING HAPPENED!'); + +// supports util.format! +logger.info('%s style!', 'printf'); + +// log anything +logger.debug({ my: 'obj' }); +logger.info([1, 2, 3]); + +// somewhere else +logger.on('info', function(msg){ + // do something with msg +}); + +// must be handled to avoid crashing process +logger.on('error', function(msg){ + // now it won't crash +}); +``` + +## API + +__Note: This module makes no assumptions about the log levels and they will always +be emitted. If you are looking to filter some out, your listeners will need to have +extra logic.__ + +### getLogger([namespace]) + +Create a new logger at the given namespace (or the default if no namespace is provided). +Returns an augmented [`sparkles`](https://github.com/phated/sparkles) EventEmitter object +with 4 methods: `debug()`, `info()`, `warn()` and `error()`. When called, these methods emit +an event with the same name. If the first argument is a string, the arguments +are passed through node's `util.format()` before being emitted. Other parts +of a node program can get the logger by namespace and listen for the events to +be emitted. + +#### logger.debug(msg) + +Emits a `debug` event with the given `msg`. + +If the first argument is a string, all arguments are passed to node's +`util.format()` before being emitted. + +#### logger.info(msg) + +Emits a `info` event with the given `msg`. + +If the first argument is a string, all arguments are passed to node's +`util.format()` before being emitted. + +#### logger.warn(msg) + +Emits a `warn` event with the given `msg`. + +If the first argument is a string, all arguments are passed to node's +`util.format()` before being emitted. + +#### logger.error(msg) + +Emits a `error` event with the given `msg`. + +If the first argument is a string, all arguments are passed to node's +`util.format()` before being emitted. + +__Note: You must handle this event in some way or the node process will crash +when an `error` event is emitted.__ + +#### logger.on(event, fn) + +Standard API from node's `EventEmitter`. Use this to listen for events from +the logger methods. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/glogg.svg +[npm-url]: https://www.npmjs.com/package/glogg +[npm-image]: http://img.shields.io/npm/v/glogg.svg + +[travis-url]: https://travis-ci.org/gulpjs/glogg +[travis-image]: http://img.shields.io/travis/gulpjs/glogg.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glogg +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glogg.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glogg +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glogg/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/glogg/index.js b/node_modules/glogg/index.js new file mode 100644 index 0000000..6e34bcf --- /dev/null +++ b/node_modules/glogg/index.js @@ -0,0 +1,34 @@ +'use strict'; + +var format = require('util').format; + +var sparkles = require('sparkles'); + +var levels = [ + 'debug', + 'info', + 'warn', + 'error', +]; + +function getLogger(namespace) { + var logger = sparkles(namespace); + + levels.forEach(function(level) { + logger[level] = makeLogLevel(logger, level); + }); + + return logger; +} + +function makeLogLevel(self, level) { + return function(msg) { + if (typeof msg === 'string') { + msg = format.apply(null, arguments); + } + + self.emit(level, msg); + }; +} + +module.exports = getLogger; diff --git a/node_modules/glogg/package.json b/node_modules/glogg/package.json new file mode 100644 index 0000000..e848906 --- /dev/null +++ b/node_modules/glogg/package.json @@ -0,0 +1,44 @@ +{ + "name": "glogg", + "version": "1.0.2", + "description": "Global logging utility", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/glogg", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "sparkles": "^1.0.0" + }, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3" + }, + "keywords": [ + "global", + "log", + "logger", + "logging", + "shared" + ] +} diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000..e906a25 --- /dev/null +++ b/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, 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. diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md new file mode 100644 index 0000000..82d6e4d --- /dev/null +++ b/node_modules/graceful-fs/README.md @@ -0,0 +1,143 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](https://nodejs.org/api/fs.html) + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFile('some-file-or-whatever', (err, data) => { + // Do stuff here. +}) +``` + +## Sync methods + +This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync +methods. If you use sync methods which open file descriptors then you are +responsible for dealing with any errors. + +This is a known limitation, not a bug. + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. + +## Changes + +This module is fairly stable at this point, and used by a lot of +things. That being said, because it implements a subtle behavior +change in a core part of the node API, even modest changes can be +extremely breaking, and the versioning is thus biased towards +bumping the major when in doubt. + +The main change between major versions has been switching between +providing a fully-patched `fs` module vs monkey-patching the node core +builtin, and the approach by which a non-monkey-patched `fs` was +created. + +The goal is to trade `EMFILE` errors for slower fs operations. So, if +you try to open a zillion files, rather than crashing, `open` +operations will be queued up and wait for something else to `close`. + +There are advantages to each approach. Monkey-patching the fs means +that no `EMFILE` errors can possibly occur anywhere in your +application, because everything is using the same core `fs` module, +which is patched. However, it can also obviously cause undesirable +side-effects, especially if the module is loaded multiple times. + +Implementing a separate-but-identical patched `fs` module is more +surgical (and doesn't run the risk of patching multiple times), but +also imposes the challenge of keeping in sync with the core module. + +The current approach loads the `fs` module, and then creates a +lookalike object that has all the same methods, except a few that are +patched. It is safe to use in all versions of Node from 0.8 through +7.0. + +### v4 + +* Do not monkey-patch the fs module. This module may now be used as a + drop-in dep, and users can opt into monkey-patching the fs builtin + if their app requires it. + +### v3 + +* Monkey-patch fs, because the eval approach no longer works on recent + node. +* fixed possible type-error throw if rename fails on windows +* verify that we *never* get EMFILE errors +* Ignore ENOSYS from chmod/chown +* clarify that graceful-fs must be used as a drop-in + +### v2.1.0 + +* Use eval rather than monkey-patching fs. +* readdir: Always sort the results +* win32: requeue a file if error has an OK status + +### v2.0 + +* A return to monkey patching +* wrap process.cwd + +### v1.1 + +* wrap readFile +* Wrap fs.writeFile. +* readdir protection +* Don't clobber the fs builtin +* Handle fs.read EAGAIN errors by trying again +* Expose the curOpen counter +* No-op lchown/lchmod if not implemented +* fs.rename patch only for win32 +* Patch fs.rename to handle AV software on Windows +* Close #4 Chown should not fail on einval or eperm if non-root +* Fix isaacs/fstream#1 Only wrap fs one time +* Fix #3 Start at 1024 max files, then back off on EMFILE +* lutimes that doens't blow up on Linux +* A full on-rewrite using a queue instead of just swallowing the EMFILE error +* Wrap Read/Write streams as well + +### 1.0 + +* Update engines for node 0.6 +* Be lstat-graceful on Windows +* first diff --git a/node_modules/graceful-fs/clone.js b/node_modules/graceful-fs/clone.js new file mode 100644 index 0000000..dff3cc8 --- /dev/null +++ b/node_modules/graceful-fs/clone.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ +} + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 0000000..8d5b89e --- /dev/null +++ b/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,448 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var clone = require('./clone.js') + +var util = require('util') + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + resetQueue() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + resetQueue() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + require('assert').equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb, startTime) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb, startTime) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb, startTime) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + var noReaddirOptionVersions = /^v[0-5]\./ + function readdir (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + var go$readdir = noReaddirOptionVersions.test(process.version) + ? function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, fs$readdirCallback( + path, options, cb, startTime + )) + } + : function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, fs$readdirCallback( + path, options, cb, startTime + )) + } + + return go$readdir(path, options, cb) + + function fs$readdirCallback (path, options, cb, startTime) { + return function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([ + go$readdir, + [path, options, cb], + err, + startTime || Date.now(), + Date.now() + ]) + else { + if (files && files.sort) + files.sort() + + if (typeof cb === 'function') + cb.call(this, err, files) + } + } + } + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() +} + +function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + + var elem = fs[gracefulQueue].shift() + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) + } +} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 0000000..d617b50 --- /dev/null +++ b/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json new file mode 100644 index 0000000..3057856 --- /dev/null +++ b/node_modules/graceful-fs/package.json @@ -0,0 +1,50 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.2.10", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-graceful-fs" + }, + "main": "graceful-fs.js", + "directories": { + "test": "test" + }, + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags", + "test": "nyc --silent node test.js | tap -c -", + "posttest": "nyc report" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "import-fresh": "^2.0.0", + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^12.7.0" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js", + "clone.js" + ] +} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000..46dea36 --- /dev/null +++ b/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,355 @@ +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (fs.chown && !fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = typeof fs.rename !== 'function' ? fs.rename + : (function (fs$rename) { + function rename (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) + return rename + })(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = typeof fs.read !== 'function' ? fs.read + : (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) + + fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync + : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else if (fs.futimes) { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} diff --git a/node_modules/gulp-cli/LICENSE b/node_modules/gulp-cli/LICENSE new file mode 100644 index 0000000..9aedc0d --- /dev/null +++ b/node_modules/gulp-cli/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall 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/node_modules/gulp-cli/README.md b/node_modules/gulp-cli/README.md new file mode 100644 index 0000000..a998637 --- /dev/null +++ b/node_modules/gulp-cli/README.md @@ -0,0 +1,240 @@ +

+ + + +

+ +# gulp-cli + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Command Line Utility for Gulp + +## Usage + +```bash +> gulp [flags] ... +``` + +## Custom Metadata + +When listing tasks with the `gulp -T` command, gulp-cli displays some custom metadata as defined upon task functions. Currently supported properties: + +* `task.description` - String of the description to display. + +```js +function clean() { ... } +clean.description = 'Cleans up generated files.'; +``` + +* `task.flags` - Object with key/value pairs being flag/description to display. + +```js +function build() { ... } +build.flags = { + '--prod': 'Builds in production mode.' +}; +``` + +Example Usage: + +```js +function build() { ... } +build.description = 'Build entire project.'; +build.flags = { + '--prod': 'Builds in production mode (minification, etc).' +}; +// gulp 3.x +gulp.task('build', build); +// gulp 4.x +gulp.task(build); +``` + +## Tasks + +The task(s) listed on the command line will be executed. +If more than one task is listed, Gulp will execute all of them +concurrently, that is, as if they had all been listed as dependencies of +a single task. + +By default, Gulp does not serialize tasks listed on the command line. If you would like to execute tasks serially, you must specify the `--series` flag. e.g. `gulp clean build --series` + +Just running `gulp` will execute the task `default`. If there is no +`default` task, gulp will error. + +## Completion +> Thanks to the grunt team, specifically Tyler Kellen + +To enable tasks auto-completion in shell you should add `eval "$(gulp --completion=shell)"` in your `.shellrc` file. + +###### Bash: + +Add `eval "$(gulp --completion=bash)"` to `~/.bashrc`. + +###### Zsh: + +Add `eval "$(gulp --completion=zsh)"` to `~/.zshrc`. + +###### Powershell: + +Add `Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)` to `$PROFILE`. + +###### Fish: + +Add `gulp --completion=fish | source` to `~/.config/fish/config.fish`. + +## Compilers + +You can find a list of supported languages at https://github.com/js-cli/js-interpret. If you would like to add support for a new language, send pull requests/open issues on that project. + +## Environment + +The CLI adds process.env.INIT_CWD which is the original cwd it was launched from. + +## Configuration + +Configuration is supported through the use of a `.gulp.*` file (e.g. `.gulp.json`, `.gulp.yml`). You can find a list of supported languages at https://github.com/js-cli/js-interpret. + +Configuration from the home directory (`~`) and current working directory (`cwd`) are merged with `cwd` taking precedence. + +Supported configurations properties: + +| Property | Description | +|--------------------|-------------| +| description | Top-level description of the project/gulpfile (Replaces "Tasks for ~/path/of/gulpfile.js") | +| flags.continue | Continue execution of tasks upon failure by default. | +| flags.compactTasks | Reduce the output of task dependency tree by default. | +| flags.tasksDepth | Set default depth of task dependency tree. | +| flags.gulpfile | Set a default gulpfile | +| flags.silent | Silence logging by default | +| flags.series | Run tasks given on the CLI in series (the default is parallel) | +| flags.require | An array of modules to require before running the gulpfile. Any relative paths will be resolved against the `--cwd` directory (if you don't want that behavior, use absolute paths) | +| flags.nodeFlags | An array of flags used to forcibly respawn the process upon startup. For example, if you always want your gulpfiles to run in node's harmony mode, you can set `--harmony` here | + +## Flags + +gulp has very few flags to know about. All other flags are for tasks to use if needed. + +__Some flags only work with gulp 4 and will be ignored when invoked against gulp 3.__ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagShort FlagDescription
--help-hShow this help.
--version-vPrint the global and local gulp versions.
--require [path]Will require a module before running the gulpfile. This is useful for transpilers but also has other applications.
--gulpfile [path]-fManually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well.
--cwd [path]Manually set the CWD. The search for the gulpfile, as well as the relativity of all requires (including the `--require` flag) will be from here.
--verify [path (optional)]Will verify plugins referenced in project's package.json against the plugins blacklist.
--tasks-TPrint the task dependency tree for the loaded gulpfile.
--tasks-simplePrint a plaintext list of tasks for the loaded gulpfile.
--tasks-json [path]Print the task dependency tree, in JSON format, for the loaded gulpfile. The [path] argument is optional, and if given writes the JSON to the path.
--tasks-depth [number]Specify the depth of the task dependency tree to print. This flag can be used with --tasks or --tasks-json. (This flag was named --depth before but is deprecated.)
--compact-tasksReduce the output of task dependency tree by printing only top tasks and their child tasks. This flag can be used with --tasks or --tasks-json.
--sort-tasksWill sort top tasks of task dependency tree. This flag can be used with --tasks.
--colorWill force gulp and gulp plugins to display colors, even when no color support is detected.
--no-colorWill force gulp and gulp plugins to not display colors, even when color support is detected.
--silent-SSuppress all gulp logging.
--continueContinue execution of tasks upon failure.
--seriesRun tasks given on the CLI in series (the default is parallel).
--log-level-LSet the loglevel. -L for least verbose and -LLLL for most verbose. -LLL is default.
+ +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/gulp-cli.svg +[npm-url]: https://www.npmjs.com/package/gulp-cli +[npm-image]: http://img.shields.io/npm/v/gulp-cli.svg + +[travis-url]: https://travis-ci.org/gulpjs/gulp-cli +[travis-image]: http://img.shields.io/travis/gulpjs/gulp-cli.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/gulp-cli +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/gulp-cli.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-cli +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/gulp-cli/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/gulp-cli/bin/gulp.js b/node_modules/gulp-cli/bin/gulp.js new file mode 100755 index 0000000..b6423d1 --- /dev/null +++ b/node_modules/gulp-cli/bin/gulp.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +'use strict'; + +require('../')(); diff --git a/node_modules/gulp-cli/completion/README.md b/node_modules/gulp-cli/completion/README.md new file mode 100644 index 0000000..3fa466f --- /dev/null +++ b/node_modules/gulp-cli/completion/README.md @@ -0,0 +1,20 @@ +# Completion for gulp +> Thanks to the grunt team, specifically Tyler Kellen + +To enable tasks auto-completion in shell you should add `eval "$(gulp --completion=shell)"` in your `.shellrc` file. + +## Bash + +Add `eval "$(gulp --completion=bash)"` to `~/.bashrc`. + +## Zsh + +Add `eval "$(gulp --completion=zsh)"` to `~/.zshrc`. + +## Powershell + +Add `Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)` to `$PROFILE`. + +## Fish + +Add `gulp --completion=fish | source` to `~/.config/fish/config.fish`. diff --git a/node_modules/gulp-cli/completion/bash b/node_modules/gulp-cli/completion/bash new file mode 100644 index 0000000..704c27c --- /dev/null +++ b/node_modules/gulp-cli/completion/bash @@ -0,0 +1,27 @@ +#!/bin/bash + +# Borrowed from grunt-cli +# http://gruntjs.com/ +# +# Copyright (c) 2012 Tyler Kellen, contributors +# Licensed under the MIT license. +# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT + +# Usage: +# +# To enable bash completion for gulp, add the following line (minus the +# leading #, which is the bash comment character) to your ~/.bashrc file: +# +# eval "$(gulp --completion=bash)" + +# Enable bash autocompletion. +function _gulp_completions() { + # The currently-being-completed word. + local cur="${COMP_WORDS[COMP_CWORD]}" + #Grab tasks + local compls=$(gulp --tasks-simple) + # Tell complete what stuff to show. + COMPREPLY=($(compgen -W "$compls" -- "$cur")) +} + +complete -o default -F _gulp_completions gulp diff --git a/node_modules/gulp-cli/completion/fish b/node_modules/gulp-cli/completion/fish new file mode 100644 index 0000000..f27f224 --- /dev/null +++ b/node_modules/gulp-cli/completion/fish @@ -0,0 +1,10 @@ +#!/usr/bin/env fish + +# Usage: +# +# To enable fish completion for gulp, add the following line to +# your ~/.config/fish/config.fish file: +# +# gulp --completion=fish | source + +complete -c gulp -a "(gulp --tasks-simple)" -f diff --git a/node_modules/gulp-cli/completion/powershell b/node_modules/gulp-cli/completion/powershell new file mode 100644 index 0000000..08ec438 --- /dev/null +++ b/node_modules/gulp-cli/completion/powershell @@ -0,0 +1,61 @@ +# Copyright (c) 2014 Jason Jarrett +# +# Tab completion for the `gulp` +# +# Usage: +# +# To enable powershell completion for gulp you need to be running +# at least PowerShell v3 or greater and add the below to your $PROFILE +# +# Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine) +# +# + +$gulp_completion_Process = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) + + + # Load up an assembly to read the gulpfile's sha1 + if(-not $global:GulpSHA1Managed) { + [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null + $global:GulpSHA1Managed = new-Object System.Security.Cryptography.SHA1Managed + } + + # setup a global (in-memory) cache + if(-not $global:GulpfileShaCache) { + $global:GulpfileShaCache = @{}; + } + + $cache = $global:GulpfileShaCache; + + # Get the gulpfile's sha1 + $sha1gulpFile = (resolve-path gulpfile.js -ErrorAction Ignore | %{ + $file = [System.IO.File]::Open($_.Path, "open", "read") + [string]::join('', ($global:GulpSHA1Managed.ComputeHash($file) | %{ $_.ToString("x2") })) + $file.Dispose() + }) + + # lookup the sha1 for previously cached task lists. + if($cache.ContainsKey($sha1gulpFile)){ + $tasks = $cache[$sha1gulpFile]; + } else { + $tasks = (gulp --tasks-simple).split("`n"); + $cache[$sha1gulpFile] = $tasks; + } + + + $tasks | + where { $_.startswith($commandName) } + Sort-Object | + foreach { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', ('{0}' -f $_) } +} + +if (-not $global:options) { + $global:options = @{ + CustomArgumentCompleters = @{}; + NativeArgumentCompleters = @{} + } +} + +$global:options['NativeArgumentCompleters']['gulp'] = $gulp_completion_Process +$function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{','End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}' diff --git a/node_modules/gulp-cli/completion/zsh b/node_modules/gulp-cli/completion/zsh new file mode 100644 index 0000000..8169b22 --- /dev/null +++ b/node_modules/gulp-cli/completion/zsh @@ -0,0 +1,25 @@ +#!/bin/zsh + +# Borrowed from grunt-cli +# http://gruntjs.com/ +# +# Copyright (c) 2012 Tyler Kellen, contributors +# Licensed under the MIT license. +# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT + +# Usage: +# +# To enable zsh completion for gulp, add the following line (minus the +# leading #, which is the zsh comment character) to your ~/.zshrc file: +# +# eval "$(gulp --completion=zsh)" + +# Enable zsh autocompletion. +function _gulp_completion() { + # Grab tasks + compls=$(gulp --tasks-simple) + completions=(${=compls}) + compadd -- $completions +} + +compdef _gulp_completion gulp diff --git a/node_modules/gulp-cli/gulp.1 b/node_modules/gulp-cli/gulp.1 new file mode 100644 index 0000000..a9342d8 --- /dev/null +++ b/node_modules/gulp-cli/gulp.1 @@ -0,0 +1,83 @@ +.TH "GULP" "" "June 2020" "" "" +.SH "NAME" +\fBgulp\fR +.SS Usage +.P +\fBgulp [flags] \.\.\.\fP +.SS Tasks +.P +The task(s) listed will be executed\. +If more than one task is listed, Gulp will execute all of them +concurrently, that is, as if they had all been listed as dependencies of +a single task\. +.P +By default, Gulp does not serialize tasks listed on the command line\. If you would like to execute tasks serially, you must specify the \fB\-\-series\fP flag\. e\.g\. \fBgulp clean build \-\-series\fP +.P +Just running \fBgulp\fP will execute the task \fBdefault\fP\|\. If there is no +\fBdefault\fP task, gulp will error\. +.SS Compilers +.P +You can find a list of supported languages at https:// If you would like to add support for a new language, send pull requests/open issues on that project\. +.SS Environment +.P +The CLI adds process\.env\.INIT_CWD which is the original cwd it was launched from\. +.SS Flags +.P +gulp has very few flags to know about\. All other flags are for tasks to use if needed\. +.P +\fBSome flags only work with gulp 4 and will be ignored when invoked against gulp 3\.\fR +.P +\fB\-\-help\fR, \fB\-h\fR + Show the help\. +.P +\fB\-\-version\fR, \fB\-v\fR + Print the global and local gulp versions\. +.P +\fB\-\-require\fR [path] + Will require a module before running the gulpfile\. This is useful for transpilers but also has other applications\. +.P +\fB\-\-gulpfile\fR [path], \fB\-f\fR [path] + Manually set path of gulpfile\. Useful if you have multiple gulpfiles\. This will set the CWD to the gulpfile directory as well\. +.P +\fB\-\-cwd\fR [path] + Manually set the CWD\. The search for the gulpfile, as well as the relativity of all requires will be from here\. +.P +\fB\-\-verify\fR [path (optional)] + Will verify plugins referenced in project's package\.json against the plugins blacklist\. +.P +\fB\-\-tasks\fR, \fB\-T\fR + Print the task dependency tree for the loaded gulpfile\. +.P +\fB\-\-tasks\-simple\fR + Print a plaintext list of tasks for the loaded gulpfile\. +.P +\fB\-\-tasks\-json\fR [path] + Print the task dependency tree, in JSON format, for the loaded gulpfile\. The [path] argument is optional, and if given writes the JSON to the path\. +.P +\fB\-\-tasks\-depth\fR [number] + Specify the depth of the task dependency tree to print\. This flag can be used with \-\-tasks or \-\-tasks\-json\. (This flag was named \-\-depth before but is deprecated\.) +.P +\fB\-\-compact\-tasks\fR + Reduce the output of task dependency tree by printing only top tasks and their child tasks\. This flag can be used with \-\-tasks or \-\-tasks\-json\. +.P +\fB\-\-sort\-tasks\fR + Will sort top tasks of task dependency tree\. This flag can be used with \-\-tasks\. +.P +\fB\-\-color\fR + Will force gulp and gulp plugins to display colors, even when no color support is detected\. +.P +\fB\-\-no\-color\fR + Will force gulp and gulp plugins to not display colors, even when color support is detected\. +.P +\fB\-\-silent\fR, \fB\-S\fR + Suppress all gulp logging\. +.P +\fB\-\-continue\fR + Continue execution of tasks upon failure\. +.P +\fB\-\-series\fR + Run tasks given on the CLI in series (the default is parallel)\. +.P +\fB\-\-log\-level\fR, \fB\-L\fR + Set the loglevel\. \-L for least verbose and \-LLLL for most verbose\. \-LLL is default\. + diff --git a/node_modules/gulp-cli/index.js b/node_modules/gulp-cli/index.js new file mode 100644 index 0000000..258c86a --- /dev/null +++ b/node_modules/gulp-cli/index.js @@ -0,0 +1,212 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var log = require('gulplog'); +var yargs = require('yargs'); +var Liftoff = require('liftoff'); +var interpret = require('interpret'); +var v8flags = require('v8flags'); +var findRange = require('semver-greatest-satisfied-range'); +var ansi = require('./lib/shared/ansi'); +var exit = require('./lib/shared/exit'); +var tildify = require('./lib/shared/tildify'); +var makeTitle = require('./lib/shared/make-title'); +var cliOptions = require('./lib/shared/cli-options'); +var completion = require('./lib/shared/completion'); +var verifyDeps = require('./lib/shared/verify-dependencies'); +var cliVersion = require('./package.json').version; +var getBlacklist = require('./lib/shared/get-blacklist'); +var toConsole = require('./lib/shared/log/to-console'); + +var loadConfigFiles = require('./lib/shared/config/load-files'); +var mergeConfigToCliFlags = require('./lib/shared/config/cli-flags'); +var mergeConfigToEnvFlags = require('./lib/shared/config/env-flags'); + +// Logging functions +var logVerify = require('./lib/shared/log/verify'); +var logBlacklistError = require('./lib/shared/log/blacklist-error'); + +// Get supported ranges +var ranges = fs.readdirSync(path.join(__dirname, '/lib/versioned/')); + +// Set env var for ORIGINAL cwd +// before anything touches it +process.env.INIT_CWD = process.cwd(); + +var cli = new Liftoff({ + name: 'gulp', + processTitle: makeTitle('gulp', process.argv.slice(2)), + completions: completion, + extensions: interpret.jsVariants, + v8flags: v8flags, + configFiles: { + '.gulp': { + home: { + path: '~', + extensions: interpret.extensions, + }, + cwd: { + path: '.', + extensions: interpret.extensions, + }, + }, + }, +}); + +var usage = + '\n' + ansi.bold('Usage:') + + ' gulp ' + ansi.blue('[options]') + ' tasks'; + +var parser = yargs.usage(usage, cliOptions); +var opts = parser.argv; + +cli.on('require', function(name) { + // This is needed because interpret needs to stub the .mjs extension + // Without the .mjs require hook, rechoir blows up + // However, we don't want to show the mjs-stub loader in the logs + if (path.basename(name, '.js') !== 'mjs-stub') { + log.info('Requiring external module', ansi.magenta(name)); + } +}); + +cli.on('requireFail', function(name, error) { + log.warn( + ansi.yellow('Failed to load external module'), + ansi.magenta(name) + ); + /* istanbul ignore else */ + if (error) { + log.warn(ansi.yellow(error.toString())); + } +}); + +cli.on('respawn', function(flags, child) { + var nodeFlags = ansi.magenta(flags.join(', ')); + var pid = ansi.magenta(child.pid); + log.info('Node flags detected:', nodeFlags); + log.info('Respawned to PID:', pid); +}); + +function run() { + cli.prepare({ + cwd: opts.cwd, + configPath: opts.gulpfile, + require: opts.require, + completion: opts.completion, + }, function(env) { + var cfgLoadOrder = ['home', 'cwd']; + var cfg = loadConfigFiles(env.configFiles['.gulp'], cfgLoadOrder); + opts = mergeConfigToCliFlags(opts, cfg); + env = mergeConfigToEnvFlags(env, cfg, opts); + env.configProps = cfg; + + // Set up event listeners for logging again after configuring. + toConsole(log, opts); + + cli.execute(env, env.nodeFlags, handleArguments); + }); +} + +module.exports = run; + +// The actual logic +function handleArguments(env) { + + // This translates the --continue flag in gulp + // To the settle env variable for undertaker + // We use the process.env so the user's gulpfile + // Can know about the flag + if (opts.continue) { + process.env.UNDERTAKER_SETTLE = 'true'; + } + + if (opts.help) { + parser.showHelp(console.log); + exit(0); + } + + // Anything that needs to print outside of the logging mechanism should use console.log + if (opts.version) { + console.log('CLI version:', cliVersion); + console.log('Local version:', env.modulePackage.version || 'Unknown'); + exit(0); + } + + if (opts.verify) { + var pkgPath = opts.verify !== true ? opts.verify : 'package.json'; + /* istanbul ignore else */ + if (path.resolve(pkgPath) !== path.normalize(pkgPath)) { + pkgPath = path.join(env.cwd, pkgPath); + } + log.info('Verifying plugins in ' + pkgPath); + return getBlacklist(function(err, blacklist) { + /* istanbul ignore if */ + if (err) { + return logBlacklistError(err); + } + + var blacklisted = verifyDeps(require(pkgPath), blacklist); + + logVerify(blacklisted); + }); + } + + if (!env.modulePath) { + /* istanbul ignore next */ + var missingNodeModules = + fs.existsSync(path.join(env.cwd, 'package.json')) + && !fs.existsSync(path.join(env.cwd, 'node_modules')); + + /* istanbul ignore next */ + var missingGulpMessage = + missingNodeModules + ? 'Local modules not found in' + : 'Local gulp not found in'; + log.error( + ansi.red(missingGulpMessage), + ansi.magenta(tildify(env.cwd)) + ); + var hasYarn = fs.existsSync(path.join(env.cwd, 'yarn.lock')); + /* istanbul ignore next */ + var installCommand = + missingNodeModules + ? hasYarn + ? 'yarn install' + : 'npm install' + : hasYarn + ? 'yarn add gulp' + : 'npm install gulp'; + log.error(ansi.red('Try running: ' + installCommand)); + exit(1); + } + + if (!env.configPath) { + log.error(ansi.red('No gulpfile found')); + exit(1); + } + + // Chdir before requiring gulpfile to make sure + // we let them chdir as needed + if (process.cwd() !== env.cwd) { + process.chdir(env.cwd); + log.info( + 'Working directory changed to', + ansi.magenta(tildify(env.cwd)) + ); + } + + // Find the correct CLI version to run + var range = findRange(env.modulePackage.version, ranges); + + if (!range) { + log.error( + ansi.red('Unsupported gulp version', env.modulePackage.version) + ); + exit(1); + } + + // Load and execute the CLI version + var versionedDir = path.join(__dirname, '/lib/versioned/', range, '/'); + require(versionedDir)(opts, env, env.configProps); +} diff --git a/node_modules/gulp-cli/lib/shared/ansi.js b/node_modules/gulp-cli/lib/shared/ansi.js new file mode 100644 index 0000000..d5030fa --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/ansi.js @@ -0,0 +1,41 @@ +'use strict'; + +var colors = require('ansi-colors'); +var supportsColor = require('color-support'); + +var hasColors = colorize(); + +/* istanbul ignore next */ +module.exports = { + red: hasColors ? colors.red : noColor, + green: hasColors ? colors.green : noColor, + blue: hasColors ? colors.blue : noColor, + magenta: hasColors ? colors.magenta : noColor, + cyan: hasColors ? colors.cyan : noColor, + white: hasColors ? colors.white : noColor, + gray: hasColors ? colors.gray : noColor, + bgred: hasColors ? colors.bgred : noColor, + bold: hasColors ? colors.bold : noColor, + yellow: hasColors ? colors.yellow : noColor, +}; + +function noColor(message) { + return message; +} + +function hasFlag(flag) { + return (process.argv.indexOf('--' + flag) !== -1); +} + +function colorize() { + if (hasFlag('no-color')) { + return false; + } + + /* istanbul ignore if */ + if (hasFlag('color')) { + return true; + } + + return supportsColor(); +} diff --git a/node_modules/gulp-cli/lib/shared/cli-options.js b/node_modules/gulp-cli/lib/shared/cli-options.js new file mode 100644 index 0000000..09d98e3 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/cli-options.js @@ -0,0 +1,122 @@ +'use strict'; + +var ansi = require('./ansi'); + +module.exports = { + help: { + alias: 'h', + type: 'boolean', + desc: ansi.gray( + 'Show this help.'), + }, + version: { + alias: 'v', + type: 'boolean', + desc: ansi.gray( + 'Print the global and local gulp versions.'), + }, + require: { + type: 'string', + requiresArg: true, + desc: ansi.gray( + 'Will require a module before running the gulpfile. ' + + 'This is useful for transpilers but also has other applications.'), + }, + gulpfile: { + alias: 'f', + type: 'string', + requiresArg: true, + desc: ansi.gray( + 'Manually set path of gulpfile. Useful if you have multiple gulpfiles. ' + + 'This will set the CWD to the gulpfile directory as well.'), + }, + cwd: { + type: 'string', + requiresArg: true, + desc: ansi.gray( + 'Manually set the CWD. The search for the gulpfile, ' + + 'as well as the relativity of all requires will be from here.'), + }, + verify: { + desc: ansi.gray( + 'Will verify plugins referenced in project\'s package.json against ' + + 'the plugins blacklist.'), + }, + tasks: { + alias: 'T', + type: 'boolean', + desc: ansi.gray( + 'Print the task dependency tree for the loaded gulpfile.'), + }, + 'tasks-simple': { + type: 'boolean', + desc: ansi.gray( + 'Print a plaintext list of tasks for the loaded gulpfile.'), + }, + 'tasks-json': { + desc: ansi.gray( + 'Print the task dependency tree, ' + + 'in JSON format, for the loaded gulpfile.'), + }, + 'tasks-depth': { + alias: 'depth', + type: 'number', + requiresArg: true, + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Specify the depth of the task dependency tree.'), + }, + 'compact-tasks': { + type: 'boolean', + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Reduce the output of task dependency tree by printing ' + + 'only top tasks and their child tasks.'), + }, + 'sort-tasks': { + type: 'boolean', + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Will sort top tasks of task dependency tree.'), + }, + color: { + type: 'boolean', + desc: ansi.gray( + 'Will force gulp and gulp plugins to display colors, ' + + 'even when no color support is detected.'), + }, + 'no-color': { + type: 'boolean', + desc: ansi.gray( + 'Will force gulp and gulp plugins to not display colors, ' + + 'even when color support is detected.'), + }, + silent: { + alias: 'S', + type: 'boolean', + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Suppress all gulp logging.'), + }, + continue: { + type: 'boolean', + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Continue execution of tasks upon failure.'), + }, + series: { + type: 'boolean', + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Run tasks given on the CLI in series (the default is parallel).'), + }, + 'log-level': { + alias: 'L', + // Type isn't needed because count acts as a boolean + count: true, + default: undefined, // To detect if this cli option is specified. + desc: ansi.gray( + 'Set the loglevel. -L for least verbose and -LLLL for most verbose. ' + + '-LLL is default.'), + }, +}; diff --git a/node_modules/gulp-cli/lib/shared/completion.js b/node_modules/gulp-cli/lib/shared/completion.js new file mode 100644 index 0000000..3a47023 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/completion.js @@ -0,0 +1,22 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); + +module.exports = function(name) { + if (typeof name !== 'string') { + throw new Error('Missing completion type'); + } + var file = path.join(__dirname, '../../completion', name); + try { + console.log(fs.readFileSync(file, 'utf8')); + process.exit(0); + } catch (err) { + console.log( + 'echo "gulp autocompletion rules for', + '\'' + name + '\'', + 'not found"' + ); + process.exit(5); + } +}; diff --git a/node_modules/gulp-cli/lib/shared/config/cli-flags.js b/node_modules/gulp-cli/lib/shared/config/cli-flags.js new file mode 100644 index 0000000..1baf38d --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/config/cli-flags.js @@ -0,0 +1,25 @@ +'use strict'; + +var copyProps = require('copy-props'); + +var fromTo = { + 'flags.silent': 'silent', + 'flags.continue': 'continue', + 'flags.series': 'series', + 'flags.logLevel': 'logLevel', + 'flags.compactTasks': 'compactTasks', + 'flags.tasksDepth': 'tasksDepth', + 'flags.sortTasks': 'sortTasks', +}; + +function mergeConfigToCliFlags(opt, config) { + return copyProps(config, opt, fromTo, defaults); +} + +function defaults(cfgInfo, optInfo) { + if (optInfo.value === undefined) { + return cfgInfo.value; + } +} + +module.exports = mergeConfigToCliFlags; diff --git a/node_modules/gulp-cli/lib/shared/config/env-flags.js b/node_modules/gulp-cli/lib/shared/config/env-flags.js new file mode 100644 index 0000000..a5a4abd --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/config/env-flags.js @@ -0,0 +1,44 @@ +'use strict'; + +var path = require('path'); +var copyProps = require('copy-props'); + +var toFrom = { + configPath: 'flags.gulpfile', + configBase: 'flags.gulpfile', + require: 'flags.require', + nodeFlags: 'flags.nodeFlags', +}; + +function mergeConfigToEnvFlags(env, config, cliOpts) { + // This must reverse because `flags.gulpfile` determines 2 different properties + var reverse = true; + return copyProps(env, config, toFrom, convert, reverse); + + function convert(configInfo, envInfo) { + if (envInfo.keyChain === 'configBase') { + if (cliOpts.gulpfile === undefined) { + return path.dirname(configInfo.value); + } + return; + } + + if (envInfo.keyChain === 'configPath') { + if (cliOpts.gulpfile === undefined) { + return configInfo.value; + } + return; + } + + if (envInfo.keyChain === 'require') { + return [].concat(envInfo.value, configInfo.value); + } + + /* istanbul ignore else */ + if (envInfo.keyChain === 'nodeFlags') { + return [].concat(configInfo.value || []); + } + } +} + +module.exports = mergeConfigToEnvFlags; diff --git a/node_modules/gulp-cli/lib/shared/config/load-files.js b/node_modules/gulp-cli/lib/shared/config/load-files.js new file mode 100644 index 0000000..4ebb29c --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/config/load-files.js @@ -0,0 +1,30 @@ +'use strict'; + +var copyProps = require('copy-props'); +var path = require('path'); + +function loadConfigFiles(configFiles, configFileOrder) { + var config = {}; + + configFileOrder.forEach(loadFile); + + function loadFile(key) { + var filePath = configFiles[key]; + if (!filePath) { + return; + } + + copyProps(require(filePath), config, convert); + + function convert(loadedInfo) { + if (loadedInfo.keyChain === 'flags.gulpfile') { + return path.resolve(path.dirname(filePath), loadedInfo.value); + } + return loadedInfo.value; + } + } + + return config; +} + +module.exports = loadConfigFiles; diff --git a/node_modules/gulp-cli/lib/shared/exit.js b/node_modules/gulp-cli/lib/shared/exit.js new file mode 100644 index 0000000..9d619c3 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/exit.js @@ -0,0 +1,15 @@ +'use strict'; + +// Fix stdout truncation on windows +function exit(code) { + /* istanbul ignore next */ + if (process.platform === 'win32' && process.stdout.bufferSize) { + process.stdout.once('drain', function() { + process.exit(code); + }); + return; + } + process.exit(code); +} + +module.exports = exit; diff --git a/node_modules/gulp-cli/lib/shared/get-blacklist.js b/node_modules/gulp-cli/lib/shared/get-blacklist.js new file mode 100644 index 0000000..4cc16d4 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/get-blacklist.js @@ -0,0 +1,62 @@ +'use strict'; + +var https = require('https'); + +var concat = require('concat-stream'); + +var url = 'https://raw.githubusercontent.com/gulpjs/plugins/master/src/blackList.json'; + +function collect(stream, cb) { + stream.on('error', cb); + stream.pipe(concat(onSuccess)); + + function onSuccess(result) { + cb(null, result); + } +} + +function parse(str, cb) { + try { + cb(null, JSON.parse(str)); + } catch (err) { + /* istanbul ignore next */ + cb(new Error('Invalid Blacklist JSON.')); + } +} + +// TODO: Test this impl +function getBlacklist(cb) { + https.get(url, onRequest); + + function onRequest(res) { + /* istanbul ignore if */ + if (res.statusCode !== 200) { + // TODO: Test different status codes + return cb(new Error('Request failed. Status Code: ' + res.statusCode)); + } + + res.setEncoding('utf8'); + + collect(res, onCollect); + } + + function onCollect(err, result) { + /* istanbul ignore if */ + if (err) { + return cb(err); + } + + parse(result, onParse); + } + + function onParse(err, blacklist) { + /* istanbul ignore if */ + if (err) { + return cb(err); + } + + cb(null, blacklist); + } +} + +module.exports = getBlacklist; diff --git a/node_modules/gulp-cli/lib/shared/log/blacklist-error.js b/node_modules/gulp-cli/lib/shared/log/blacklist-error.js new file mode 100644 index 0000000..b0355b2 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/log/blacklist-error.js @@ -0,0 +1,15 @@ +'use strict'; + +var log = require('gulplog'); + +var ansi = require('../ansi'); +var exit = require('../exit'); + +/* istanbul ignore next */ +function logBlacklistError(err) { + log.error(ansi.red('Error: failed to retrieve plugins black-list')); + log.error(err.message); // Avoid duplicating for each version + exit(1); +} + +module.exports = logBlacklistError; diff --git a/node_modules/gulp-cli/lib/shared/log/copy-tree.js b/node_modules/gulp-cli/lib/shared/log/copy-tree.js new file mode 100644 index 0000000..99d7b5f --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/log/copy-tree.js @@ -0,0 +1,81 @@ +'use strict'; + +function copyNode(node) { + var newNode = {}; + Object.keys(node).forEach(function(key) { + newNode[key] = node[key]; + }); + return newNode; +} + +var defaultNodeFactory = { + topNode: copyNode, + taskNode: copyNode, + childNode: copyNode, +}; + +function copyTree(tree, opts, nodeFactory) { + opts = opts || {}; + + var depth = opts.tasksDepth; + depth = typeof depth === 'number' ? ((depth < 1) ? 1 : depth) : null; + + nodeFactory = nodeFactory || defaultNodeFactory; + + var newTree = nodeFactory.topNode(tree); + newTree.nodes = []; + + if (Array.isArray(tree.nodes)) { + tree.nodes.forEach(visit); + } + + function visit(node) { + var newNode = nodeFactory.taskNode(node); + newNode.nodes = []; + newTree.nodes.push(newNode); + + if (opts.compactTasks) { + forEach(node.nodes, copyNotRecursively, newNode); + + } else if (!depth || depth > 1) { + forEach(node.nodes, copyRecursively, depth, 2, newNode); + } + } + + function copyNotRecursively(child, newParent) { + var newChild = nodeFactory.childNode(child); + newChild.nodes = []; + newParent.nodes.push(newChild); + + if (child.branch) { + forEach(child.nodes, copyNotRecursively, newChild); + } + } + + function copyRecursively(child, maxDepth, nowDepth, newParent) { + var newChild = nodeFactory.childNode(child); + newChild.nodes = []; + newParent.nodes.push(newChild); + + if (!maxDepth || maxDepth > nowDepth) { + forEach(child.nodes, copyRecursively, maxDepth, nowDepth + 1, newChild); + } + } + + return newTree; +} + +function forEach(nodes, fn) { + if (!Array.isArray(nodes)) { + return; + } + + var args = Array.prototype.slice.call(arguments, 2); + + for (var i = 0, n = nodes.length; i < n; i++) { + fn.apply(nodes[i], [nodes[i]].concat(args)); + } +} + +module.exports = copyTree; + diff --git a/node_modules/gulp-cli/lib/shared/log/tasks.js b/node_modules/gulp-cli/lib/shared/log/tasks.js new file mode 100644 index 0000000..0b76b08 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/log/tasks.js @@ -0,0 +1,166 @@ +'use strict'; + +var archy = require('archy'); +var log = require('gulplog'); + +var sortBy = require('array-sort'); +var isObject = require('isobject'); + +var ansi = require('../ansi'); +var copyTree = require('./copy-tree'); + +function logTasks(tree, opts, getTask) { + if (opts.sortTasks) { + tree.nodes = sortBy(tree.nodes, 'label'); + } + + var lineInfos = []; + var entryObserver = getLineInfoCollector(lineInfos); + var nodeFactory = getNodeFactory(getTask, entryObserver); + + tree = copyTree(tree, opts, nodeFactory); + var spacer = getSpacerForLineIndents(tree, lineInfos); + var lines = getLinesContainingOnlyBranches(tree); + + log.info(tree.label); + printTreeList(lines, spacer, lineInfos); +} + +function getLineInfoCollector(lineInfos) { + return { + topTask: function(node) { + lineInfos.push({ + name: node.label, + desc: node.desc, + type: 'top', + }); + }, + option: function(opt) { + lineInfos.push({ + name: opt.label, + desc: opt.desc, + type: 'option', + }); + }, + childTask: function(node) { + lineInfos.push({ + name: node.label, + type: 'child', + }); + }, + }; +} + +function getNodeFactory(getTask, entryObserver) { + return { + topNode: function(node) { + return { + label: node.label, + }; + }, + + taskNode: function(node) { + /* istanbul ignore next */ + var task = getTask(node.label) || {}; + + var newNode = { + label: node.label, + desc: typeof task.description === 'string' ? task.description : '', + opts: [], + }; + entryObserver.topTask(newNode); + + if (isObject(task.flags)) { + Object.keys(task.flags).sort().forEach(function(flag) { + if (flag.length === 0) { + return; + } + /* istanbul ignore next */ + var opt = { + label: flag, + desc: typeof task.flags[flag] === 'string' ? task.flags[flag] : '', + }; + entryObserver.option(opt); + newNode.opts.push(opt); + newNode.label += '\n' + opt.label; // The way of archy for options. + }); + } + + return newNode; + }, + + childNode: function(node) { + var newChild = { + label: node.label, + }; + entryObserver.childTask(newChild); + newChild.label = ''; // Because don't use child tasks to calc indents. + + return newChild; + }, + }; +} + +function getSpacerForLineIndents(tree, lineInfos) { + var maxSize = 0; + var sizes = []; + + archy(tree) + .split('\n') + .slice(1, -1) + .forEach(function(line, index) { + var info = lineInfos[index]; + if (info.type === 'top' || info.type === 'option') { + maxSize = Math.max(maxSize, line.length); + sizes.push(line.length); + } else { + sizes.push(0); + } + }); + + maxSize += 3; + + return function(index) { + return Array(maxSize - sizes[index]).join(' '); + }; +} + +function getLinesContainingOnlyBranches(tree) { + tree.nodes.forEach(function(node) { + node.label = ''; + node.opts.forEach(function() { + node.label += '\n'; + }); + }); + + return archy(tree) + .split('\n') + .slice(1, -1); +} + +function printTreeList(lines, spacer, lineInfos) { + lines.forEach(function(branch, index) { + var info = lineInfos[index]; + + var line = ansi.white(branch); + + if (info.type === 'top') { + line += ansi.cyan(info.name); + if (info.desc.length > 0) { + line += spacer(index) + ansi.white(info.desc); + } + } else if (info.type === 'option') { + line += ansi.magenta(info.name); + if (info.desc.length > 0) { + line += spacer(index) + ansi.white('…' + info.desc); + } + } else { // If (info.type === 'child') { + line += ansi.white(info.name); + } + + log.info(line); + }); +} + +module.exports = logTasks; + diff --git a/node_modules/gulp-cli/lib/shared/log/to-console.js b/node_modules/gulp-cli/lib/shared/log/to-console.js new file mode 100644 index 0000000..43650af --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/log/to-console.js @@ -0,0 +1,58 @@ +'use strict'; + +var fancyLog = require('fancy-log'); + +/* istanbul ignore next */ +function noop() {} + +// The sorting of the levels is +// significant. +var levels = [ + 'error', // -L: Logs error events. + 'warn', // -LL: Logs warn and error events. + 'info', // -LLL: Logs info, warn and error events. + 'debug', // -LLLL: Logs all log levels. +]; + +function cleanup(log) { + levels.forEach(removeListeners); + + function removeListeners(level) { + if (level === 'error') { + log.removeListener(level, noop); + log.removeListener(level, fancyLog.error); + } else { + log.removeListener(level, fancyLog); + } + } +} + +function toConsole(log, opts) { + // Remove previous listeners to enable to call this twice. + cleanup(log); + + // Return immediately if logging is + // not desired. + if (opts.tasksSimple || opts.tasksJson || opts.help || opts.version || opts.silent) { + // Keep from crashing process when silent. + log.on('error', noop); + return; + } + + // Default loglevel to info level (3). + var loglevel = opts.logLevel || 3; + + levels + .filter(function(item, i) { + return i < loglevel; + }) + .forEach(function(level) { + if (level === 'error') { + log.on(level, fancyLog.error); + } else { + log.on(level, fancyLog); + } + }); +} + +module.exports = toConsole; diff --git a/node_modules/gulp-cli/lib/shared/log/verify.js b/node_modules/gulp-cli/lib/shared/log/verify.js new file mode 100644 index 0000000..7104623 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/log/verify.js @@ -0,0 +1,28 @@ +'use strict'; + +var log = require('gulplog'); + +var ansi = require('../ansi'); +var exit = require('../exit'); + +function logVerify(blacklisted) { + var pluginNames = Object.keys(blacklisted); + + if (!pluginNames.length) { + log.info( + ansi.green('There are no blacklisted plugins in this project') + ); + exit(0); + } + + log.warn(ansi.red('Blacklisted plugins found in this project:')); + + pluginNames.map(function(pluginName) { + var reason = blacklisted[pluginName]; + log.warn(ansi.bgred(pluginName) + ': ' + reason); + }); + + exit(1); +} + +module.exports = logVerify; diff --git a/node_modules/gulp-cli/lib/shared/make-title.js b/node_modules/gulp-cli/lib/shared/make-title.js new file mode 100644 index 0000000..aa6d2ee --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/make-title.js @@ -0,0 +1,11 @@ +'use strict'; + +function makeTitle(cmd, argv) { + if (!argv || argv.length === 0) { + return cmd; + } + + return [cmd].concat(argv).join(' '); +} + +module.exports = makeTitle; diff --git a/node_modules/gulp-cli/lib/shared/register-exports.js b/node_modules/gulp-cli/lib/shared/register-exports.js new file mode 100644 index 0000000..572e9ed --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/register-exports.js @@ -0,0 +1,21 @@ +'use strict'; + +function registerExports(gulpInst, tasks) { + var taskNames = Object.keys(tasks); + + if (taskNames.length) { + taskNames.forEach(register); + } + + function register(taskName) { + var task = tasks[taskName]; + + if (typeof task !== 'function') { + return; + } + + gulpInst.task(task.displayName || taskName, task); + } +} + +module.exports = registerExports; diff --git a/node_modules/gulp-cli/lib/shared/require-or-import.js b/node_modules/gulp-cli/lib/shared/require-or-import.js new file mode 100644 index 0000000..6970ae4 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/require-or-import.js @@ -0,0 +1,32 @@ +'use strict'; + +var pathToFileURL = require('url').pathToFileURL; + +var importESM; +try { + // Node.js <10 errors out with a SyntaxError when loading a script that uses import(). + // So a function is dynamically created to catch the SyntaxError at runtime instead of parsetime. + // That way we can keep supporting all Node.js versions all the way back to 0.10. + importESM = new Function('id', 'return import(id);'); +} catch (e) { + importESM = null; +} + +function requireOrImport(path, callback) { + var err = null; + var cjs; + try { + cjs = require(path); + } catch (e) { + if (pathToFileURL && importESM && e.code === 'ERR_REQUIRE_ESM') { + // This is needed on Windows, because import() fails if providing a Windows file path. + var url = pathToFileURL(path); + importESM(url).then(function(esm) { callback(null, esm); }, callback); + return; + } + err = e; + } + process.nextTick(function() { callback(err, cjs); }); +} + +module.exports = requireOrImport; diff --git a/node_modules/gulp-cli/lib/shared/tildify.js b/node_modules/gulp-cli/lib/shared/tildify.js new file mode 100644 index 0000000..a9c61fc --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/tildify.js @@ -0,0 +1,9 @@ +'use strict'; + +var replaceHomedir = require('replace-homedir'); + +function tildify(filepath) { + return replaceHomedir(filepath, '~'); +} + +module.exports = tildify; diff --git a/node_modules/gulp-cli/lib/shared/verify-dependencies.js b/node_modules/gulp-cli/lib/shared/verify-dependencies.js new file mode 100644 index 0000000..a0d4812 --- /dev/null +++ b/node_modules/gulp-cli/lib/shared/verify-dependencies.js @@ -0,0 +1,25 @@ +'use strict'; + +var matchdep = require('matchdep'); + +/** + * Given a collection of plugin names verifies this collection against + * the blacklist. Returns an object with: + * [plugin name]=>[blacklisting reason] + * or an empty object if none of the dependencies to check are blacklisted. + * + * @param pkg - package.json contents + * @param blacklist - contents of the blacklist in JSON format + */ +function verifyDependencies(pkg, blacklist) { + var blacklisted = matchdep + .filterAll(Object.keys(blacklist), pkg) + .reduce(function(blacklisted, pluginName) { + blacklisted[pluginName] = blacklist[pluginName]; + return blacklisted; + }, {}); + + return blacklisted; +} + +module.exports = verifyDependencies; diff --git a/node_modules/gulp-cli/lib/versioned/^3.7.0/format-error.js b/node_modules/gulp-cli/lib/versioned/^3.7.0/format-error.js new file mode 100644 index 0000000..705e0bf --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^3.7.0/format-error.js @@ -0,0 +1,23 @@ +'use strict'; + +// Format orchestrator errors +function formatError(e) { + if (!e.err) { + return e.message; + } + + // PluginError + if (typeof e.err.showStack === 'boolean') { + return e.err.toString(); + } + + // Normal error + if (e.err.stack) { + return e.err.stack; + } + + // Unknown (string, number, etc.) + return new Error(String(e.err)).stack; +} + +module.exports = formatError; diff --git a/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js b/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js new file mode 100644 index 0000000..b3a0da5 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js @@ -0,0 +1,83 @@ +'use strict'; + +var fs = require('fs'); + +var log = require('gulplog'); +var stdout = require('mute-stdout'); + +var taskTree = require('./task-tree'); +var copyTree = require('../../shared/log/copy-tree'); + +var tildify = require('../../shared/tildify'); +var logTasks = require('../../shared/log/tasks'); +var ansi = require('../../shared/ansi'); +var exit = require('../../shared/exit'); +var logEvents = require('./log/events'); +var logTasksSimple = require('./log/tasks-simple'); +var registerExports = require('../../shared/register-exports'); +var requireOrImport = require('../../shared/require-or-import'); + +function execute(opts, env, config) { + var tasks = opts._; + var toRun = tasks.length ? tasks : ['default']; + + if (opts.tasksSimple || opts.tasks || opts.tasksJson) { + // Mute stdout if we are listing tasks + stdout.mute(); + } + + // This is what actually loads up the gulpfile + requireOrImport(env.configPath, function(err, exported) { + // Before import(), if require() failed we got an unhandled exception on the module level. + // So console.error() & exit() were added here to mimic the old behavior as close as possible. + if (err) { + console.error(err); + exit(1); + } + + log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); + + var gulpInst = require(env.modulePath); + logEvents(gulpInst); + + registerExports(gulpInst, exported); + + // Always unmute stdout after gulpfile is required + stdout.unmute(); + + var tree; + if (opts.tasksSimple) { + return logTasksSimple(env, gulpInst); + } + if (opts.tasks) { + tree = taskTree(gulpInst.tasks); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + ansi.magenta(tildify(env.configPath)); + } + return logTasks(tree, opts, function(task) { + return gulpInst.tasks[task].fn; + }); + } + if (opts.tasksJson) { + tree = taskTree(gulpInst.tasks); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + tildify(env.configPath); + } + + var output = JSON.stringify(copyTree(tree, opts)); + + if (typeof opts.tasksJson === 'boolean') { + return console.log(output); + } + + return fs.writeFileSync(opts.tasksJson, output, 'utf-8'); + } + gulpInst.start.apply(gulpInst, toRun); + }); +} + +module.exports = execute; diff --git a/node_modules/gulp-cli/lib/versioned/^3.7.0/log/events.js b/node_modules/gulp-cli/lib/versioned/^3.7.0/log/events.js new file mode 100644 index 0000000..b7bd00a --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^3.7.0/log/events.js @@ -0,0 +1,60 @@ +'use strict'; + +var log = require('gulplog'); +var prettyTime = require('pretty-hrtime'); + +var ansi = require('../../../shared/ansi'); +var exit = require('../../../shared/exit'); +var formatError = require('../format-error'); + +// Wire up logging events +function logEvents(gulpInst) { + + // Exit with 0 or 1 + var failed = false; + process.once('exit', function(code) { + if (code === 0 && failed) { + exit(1); + } + }); + + // Total hack due to poor error management in orchestrator + gulpInst.on('err', function() { + failed = true; + }); + + gulpInst.on('task_start', function(e) { + // TODO: batch these + // so when 5 tasks start at once it only logs one time with all 5 + log.info('Starting', '\'' + ansi.cyan(e.task) + '\'...'); + }); + + gulpInst.on('task_stop', function(e) { + var time = prettyTime(e.hrDuration); + log.info( + 'Finished', '\'' + ansi.cyan(e.task) + '\'', + 'after', ansi.magenta(time) + ); + }); + + gulpInst.on('task_err', function(e) { + var msg = formatError(e); + var time = prettyTime(e.hrDuration); + log.error( + '\'' + ansi.cyan(e.task) + '\'', + ansi.red('errored after'), + ansi.magenta(time) + ); + log.error(msg); + }); + + gulpInst.on('task_not_found', function(err) { + log.error( + ansi.red('Task \'' + err.task + '\' is not in your gulpfile') + ); + log.error('Please check the documentation for proper gulpfile formatting'); + exit(1); + }); +} + +module.exports = logEvents; diff --git a/node_modules/gulp-cli/lib/versioned/^3.7.0/log/tasks-simple.js b/node_modules/gulp-cli/lib/versioned/^3.7.0/log/tasks-simple.js new file mode 100644 index 0000000..dca2fdf --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^3.7.0/log/tasks-simple.js @@ -0,0 +1,9 @@ +'use strict'; + +function logTasksSimple(env, localGulp) { + console.log(Object.keys(localGulp.tasks) + .join('\n') + .trim()); +} + +module.exports = logTasksSimple; diff --git a/node_modules/gulp-cli/lib/versioned/^3.7.0/task-tree.js b/node_modules/gulp-cli/lib/versioned/^3.7.0/task-tree.js new file mode 100644 index 0000000..8d68980 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^3.7.0/task-tree.js @@ -0,0 +1,27 @@ +'use strict'; + +module.exports = function(tasks) { + var map = {}; + var arr = []; + Object.keys(tasks).forEach(function(taskname) { + var task = { + label: taskname, + type: 'task', + nodes: [], + }; + map[taskname] = task; + arr.push(task); + }); + Object.keys(tasks).forEach(function(taskname) { + var task = map[taskname]; + tasks[taskname].dep.forEach(function(childname) { + var child = map[childname] || { + label: childname, + type: 'task', + nodes: [], + }; + task.nodes.push(child); + }); + }); + return { label: 'Tasks', nodes: arr }; +}; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.1/index.js b/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.1/index.js new file mode 100644 index 0000000..116956a --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.1/index.js @@ -0,0 +1,96 @@ +'use strict'; + +var fs = require('fs'); + +var log = require('gulplog'); +var stdout = require('mute-stdout'); + +var ansi = require('../../shared/ansi'); +var exit = require('../../shared/exit'); +var tildify = require('../../shared/tildify'); + +var logTasks = require('../../shared/log/tasks'); +var logEvents = require('../^4.0.0/log/events'); +var logSyncTask = require('../^4.0.0/log/sync-task'); +var logTasksSimple = require('../^4.0.0/log/tasks-simple'); +var registerExports = require('../../shared/register-exports'); + +var copyTree = require('../../shared/log/copy-tree'); +var requireOrImport = require('../../shared/require-or-import'); + +function execute(opts, env, config) { + + var tasks = opts._; + var toRun = tasks.length ? tasks : ['default']; + + if (opts.tasksSimple || opts.tasks || opts.tasksJson) { + // Mute stdout if we are listing tasks + stdout.mute(); + } + + var gulpInst = require(env.modulePath); + logEvents(gulpInst); + logSyncTask(gulpInst, opts); + + // This is what actually loads up the gulpfile + requireOrImport(env.configPath, function(err, exported) { + // Before import(), if require() failed we got an unhandled exception on the module level. + // So console.error() & exit() were added here to mimic the old behavior as close as possible. + if (err) { + console.error(err); + exit(1); + } + + registerExports(gulpInst, exported); + + // Always unmute stdout after gulpfile is required + stdout.unmute(); + + var tree; + if (opts.tasksSimple) { + return logTasksSimple(gulpInst.tree()); + } + if (opts.tasks) { + tree = {}; + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + ansi.magenta(tildify(env.configPath)); + } + tree.nodes = gulpInst.tree({ deep: true }); + return logTasks(tree, opts, function(taskname) { + return gulpInst.task(taskname); + }); + } + if (opts.tasksJson) { + tree = {}; + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + tildify(env.configPath); + } + tree.nodes = gulpInst.tree({ deep: true }); + + var output = JSON.stringify(copyTree(tree, opts)); + if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) { + return console.log(output); + } + return fs.writeFileSync(opts.tasksJson, output, 'utf-8'); + } + try { + log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); + var runMethod = opts.series ? 'series' : 'parallel'; + gulpInst[runMethod](toRun)(function(err) { + if (err) { + exit(1); + } + }); + } catch (err) { + log.error(ansi.red(err.message)); + log.error('To list available tasks, try running: gulp --tasks'); + exit(1); + } + }); +} + +module.exports = execute; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.2/index.js b/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.2/index.js new file mode 100644 index 0000000..1fca06f --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.2/index.js @@ -0,0 +1,96 @@ +'use strict'; + +var fs = require('fs'); + +var log = require('gulplog'); +var stdout = require('mute-stdout'); + +var ansi = require('../../shared/ansi'); +var exit = require('../../shared/exit'); +var tildify = require('../../shared/tildify'); + +var logTasks = require('../../shared/log/tasks'); +var logEvents = require('../^4.0.0/log/events'); +var logSyncTask = require('../^4.0.0/log/sync-task'); +var logTasksSimple = require('../^4.0.0/log/tasks-simple'); +var registerExports = require('../../shared/register-exports'); + +var copyTree = require('../../shared/log/copy-tree'); +var getTask = require('../^4.0.0/log/get-task'); +var requireOrImport = require('../../shared/require-or-import'); + +function execute(opts, env, config) { + + var tasks = opts._; + var toRun = tasks.length ? tasks : ['default']; + + if (opts.tasksSimple || opts.tasks || opts.tasksJson) { + // Mute stdout if we are listing tasks + stdout.mute(); + } + + var gulpInst = require(env.modulePath); + logEvents(gulpInst); + logSyncTask(gulpInst, opts); + + // This is what actually loads up the gulpfile + requireOrImport(env.configPath, function(err, exported) { + // Before import(), if require() failed we got an unhandled exception on the module level. + // So console.error() & exit() were added here to mimic the old behavior as close as possible. + if (err) { + console.error(err); + exit(1); + } + + registerExports(gulpInst, exported); + + // Always unmute stdout after gulpfile is required + stdout.unmute(); + + var tree; + if (opts.tasksSimple) { + tree = gulpInst.tree(); + return logTasksSimple(tree.nodes); + } + if (opts.tasks) { + tree = gulpInst.tree({ deep: true }); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + ansi.magenta(tildify(env.configPath)); + } + + return logTasks(tree, opts, getTask(gulpInst)); + } + if (opts.tasksJson) { + tree = gulpInst.tree({ deep: true }); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + tildify(env.configPath); + } + + var output = JSON.stringify(copyTree(tree, opts)); + + if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) { + return console.log(output); + } + return fs.writeFileSync(opts.tasksJson, output, 'utf-8'); + } + try { + log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); + var runMethod = opts.series ? 'series' : 'parallel'; + gulpInst[runMethod](toRun)(function(err) { + if (err) { + exit(1); + } + }); + } catch (err) { + log.error(ansi.red(err.message)); + log.error('To list available tasks, try running: gulp --tasks'); + exit(1); + } + }); +} + +module.exports = execute; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js new file mode 100644 index 0000000..3d8a771 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js @@ -0,0 +1,24 @@ +'use strict'; + +// Format orchestrator errors +/* istanbul ignore next */ +function formatError(e) { + if (!e.error) { + return e.message; + } + + // PluginError + if (typeof e.error.showStack === 'boolean') { + return e.error.toString(); + } + + // Normal error + if (e.error.stack) { + return e.error.stack; + } + + // Unknown (string, number, etc.) + return new Error(String(e.error)).stack; +} + +module.exports = formatError; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js new file mode 100644 index 0000000..f0f0f45 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js @@ -0,0 +1,96 @@ +'use strict'; + +var fs = require('fs'); + +var log = require('gulplog'); +var stdout = require('mute-stdout'); + +var ansi = require('../../shared/ansi'); +var exit = require('../../shared/exit'); +var tildify = require('../../shared/tildify'); + +var logTasks = require('../../shared/log/tasks'); +var logEvents = require('./log/events'); +var logSyncTask = require('./log/sync-task'); +var logTasksSimple = require('./log/tasks-simple'); +var registerExports = require('../../shared/register-exports'); + +var copyTree = require('../../shared/log/copy-tree'); +var getTask = require('./log/get-task'); +var requireOrImport = require('../../shared/require-or-import'); + +function execute(opts, env, config) { + + var tasks = opts._; + var toRun = tasks.length ? tasks : ['default']; + + if (opts.tasksSimple || opts.tasks || opts.tasksJson) { + // Mute stdout if we are listing tasks + stdout.mute(); + } + + var gulpInst = require(env.modulePath); + logEvents(gulpInst); + logSyncTask(gulpInst, opts); + + // This is what actually loads up the gulpfile + requireOrImport(env.configPath, function(err, exported) { + // Before import(), if require() failed we got an unhandled exception on the module level. + // So console.error() & exit() were added here to mimic the old behavior as close as possible. + if (err) { + console.error(err); + exit(1); + } + + registerExports(gulpInst, exported); + + // Always unmute stdout after gulpfile is required + stdout.unmute(); + + var tree; + if (opts.tasksSimple) { + tree = gulpInst.tree(); + return logTasksSimple(tree.nodes); + } + if (opts.tasks) { + tree = gulpInst.tree({ deep: true }); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + ansi.magenta(tildify(env.configPath)); + } + + return logTasks(tree, opts, getTask(gulpInst)); + } + if (opts.tasksJson) { + tree = gulpInst.tree({ deep: true }); + if (config.description && typeof config.description === 'string') { + tree.label = config.description; + } else { + tree.label = 'Tasks for ' + tildify(env.configPath); + } + + var output = JSON.stringify(copyTree(tree, opts)); + + if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) { + return console.log(output); + } + return fs.writeFileSync(opts.tasksJson, output, 'utf-8'); + } + try { + log.info('Using gulpfile', ansi.magenta(tildify(env.configPath))); + var runMethod = opts.series ? 'series' : 'parallel'; + gulpInst[runMethod](toRun)(function(err) { + if (err) { + exit(1); + } + }); + } catch (err) { + log.error(ansi.red(err.message)); + log.error('To list available tasks, try running: gulp --tasks'); + exit(1); + } + }); +} + +module.exports = execute; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js new file mode 100644 index 0000000..1f6e7b1 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js @@ -0,0 +1,50 @@ +'use strict'; + +var log = require('gulplog'); +var prettyTime = require('pretty-hrtime'); + +var ansi = require('../../../shared/ansi'); +var formatError = require('../format-error'); + +// Wire up logging events +function logEvents(gulpInst) { + + var loggedErrors = []; + + gulpInst.on('start', function(evt) { + /* istanbul ignore next */ + // TODO: batch these + // so when 5 tasks start at once it only logs one time with all 5 + var level = evt.branch ? 'debug' : 'info'; + log[level]('Starting', '\'' + ansi.cyan(evt.name) + '\'...'); + }); + + gulpInst.on('stop', function(evt) { + var time = prettyTime(evt.duration); + /* istanbul ignore next */ + var level = evt.branch ? 'debug' : 'info'; + log[level]( + 'Finished', '\'' + ansi.cyan(evt.name) + '\'', + 'after', ansi.magenta(time) + ); + }); + + gulpInst.on('error', function(evt) { + var msg = formatError(evt); + var time = prettyTime(evt.duration); + var level = evt.branch ? 'debug' : 'error'; + log[level]( + '\'' + ansi.cyan(evt.name) + '\'', + ansi.red('errored after'), + ansi.magenta(time) + ); + + // If we haven't logged this before, log it and add to list + if (loggedErrors.indexOf(evt.error) === -1) { + log.error(msg); + loggedErrors.push(evt.error); + } + }); +} + +module.exports = logEvents; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/log/get-task.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/get-task.js new file mode 100644 index 0000000..1b15871 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/get-task.js @@ -0,0 +1,43 @@ +'use strict'; + +var isObject = require('isobject'); + +function getTask(gulpInst) { + return function(name) { + var task = gulpInst.task(name); + return { + description: getDescription(task), + flags: getFlags(task), + }; + }; +} + +function getDescription(task) { + if (typeof task.description === 'string') { + return task.description; + } + /* istanbul ignore else */ + if (typeof task.unwrap === 'function') { + var origFn = task.unwrap(); + if (typeof origFn.description === 'string') { + return origFn.description; + } + } + return undefined; +} + +function getFlags(task) { + if (isObject(task.flags)) { + return task.flags; + } + /* istanbul ignore else */ + if (typeof task.unwrap === 'function') { + var origFn = task.unwrap(); + if (isObject(origFn.flags)) { + return origFn.flags; + } + } + return undefined; +} + +module.exports = getTask; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/log/sync-task.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/sync-task.js new file mode 100644 index 0000000..39cb453 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/sync-task.js @@ -0,0 +1,52 @@ +'use strict'; + +var log = require('gulplog'); +var ansi = require('../../../shared/ansi'); + +var tasks = {}; + +function warn() { + var taskKeys = Object.keys(tasks); + + if (!taskKeys.length) { + return; + } + + var taskNames = taskKeys.map(function(key) { + return tasks[key]; + }).join(', '); + + process.exitCode = 1; + + log.warn( + ansi.red('The following tasks did not complete:'), + ansi.cyan(taskNames) + ); + log.warn( + ansi.red('Did you forget to signal async completion?') + ); +} + +function start(e) { + tasks[e.uid] = e.name; +} + +function clear(e) { + delete tasks[e.uid]; +} + +function clearAll() { + tasks = {}; +} + +function logSyncTask(gulpInst, opts) { + + process.once('exit', warn); + gulpInst.on('start', start); + gulpInst.on('stop', clear); + // When not running in --continue mode, we need to clear everything on error to avoid + // false positives. + gulpInst.on('error', opts.continue ? clear : clearAll); +} + +module.exports = logSyncTask; diff --git a/node_modules/gulp-cli/lib/versioned/^4.0.0/log/tasks-simple.js b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/tasks-simple.js new file mode 100644 index 0000000..65cde51 --- /dev/null +++ b/node_modules/gulp-cli/lib/versioned/^4.0.0/log/tasks-simple.js @@ -0,0 +1,7 @@ +'use strict'; + +function logTasksSimple(nodes) { + console.log(nodes.join('\n').trim()); +} + +module.exports = logTasksSimple; diff --git a/node_modules/gulp-cli/package.json b/node_modules/gulp-cli/package.json new file mode 100644 index 0000000..bed47c0 --- /dev/null +++ b/node_modules/gulp-cli/package.json @@ -0,0 +1,77 @@ +{ + "name": "gulp-cli", + "version": "2.3.0", + "description": "Command line interface for gulp", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [], + "homepage": "https://gulpjs.com", + "repository": "gulpjs/gulp-cli", + "license": "MIT", + "man": "gulp.1", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "bin": { + "gulp": "bin/gulp.js" + }, + "files": [ + "index.js", + "lib", + "bin", + "completion", + "gulp.1" + ], + "scripts": { + "lint": "eslint .", + "prepublish": "marked-man --name gulp docs/CLI.md > gulp.1", + "pretest": "npm run lint", + "test": "mocha --async-only --timeout 5000 test/lib test", + "cover": "nyc --reporter=lcov --reporter=text-summary npm test", + "coveralls": "nyc --reporter=text-lcov npm test | coveralls" + }, + "dependencies": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "concat-stream": "^1.6.0", + "color-support": "^1.1.3", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + }, + "devDependencies": { + "babel-preset-es2015": "^6.5.0", + "babel-register": "^6.5.1", + "coveralls": "^3.0.3", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "gulp": "^4.0.0", + "gulp-test-tools": "^0.6.1", + "marked-man": "^0.2.1", + "mocha": "^3.2.0", + "nyc": "^13.3.0", + "rimraf": "^2.6.1", + "semver": "^5.7.1" + }, + "keywords": [ + "build", + "stream", + "system", + "make", + "tool", + "asset", + "pipeline" + ] +} diff --git a/node_modules/gulp-sass/CHANGELOG.md b/node_modules/gulp-sass/CHANGELOG.md new file mode 100644 index 0000000..4d1e136 --- /dev/null +++ b/node_modules/gulp-sass/CHANGELOG.md @@ -0,0 +1,168 @@ +# gulp-sass Changelog + +## v5.0.0 + +**June 25, 2021** + + + +## v4.1.1 + +**June 24, 2021** + + + +## v4.1.0 + +**April 23, 2020** + + + +## v4.0.2 + +**October 16, 2018** + + + +## v4.0.1 + +**Apr 8, 2018** + + + +## v4.0.0 + +**April 5, 2018** + + + +## v3.2.1 + +**March 24, 2018** + + + +## v3.2.0 + +**March 12, 2018** + + + +## v3.1.0 + +**January 9, 2017** + + + +## v3.0.0 + +**January 9, 2017** + + + +## v2.3.2 + +**June 15, 2016** + + + +## v2.3.1 + +**April 22, 2016** + + + +## v2.3.0 + +**April 21, 2016** + + + +## v2.3.0-beta.1 + +**February 4, 2016** + + + +## v2.2.0 + +**February 4, 2016** + + + +## v2.1.0 + +**November 2, 2015** + + + +## v2.1.0-beta + +**September 21, 2015** + +* **Change** Updated to `node-sass` 3.4.0-beta1 + +## v2.0.4 + +**July 15, 2015** + +* **Fix** Relative file path now uses `file.relative` instead of arcane `split('/').pop` magic. Resolves lots of issues with source map paths. +* **Fix** Empty partials no longer copied to CSS folder + +## v2.0.3 + +**June 27, 2015** + +* **Fix** Empty partials are no longer copied to CSS folder + +## v2.0.2 + +**June 25, 2015** + +* **Fix** Error in watch stream preventing watch from continuing + +## v2.0.1 + +**May 13, 2015** + +* **Fix** Source maps now work as expected with Autoprefixer +* **Fix** Current file directory `unshift` onto includePaths stack so it's checked first +* **Fix** Error message returned is unformatted so as to not break other error handling (*i.e.* `gulp-notify`) + +## v2.0.0 + +**May 6, 2015** + +* **Change** Updated to `node-sass` 3.0.0 + +## v2.0.0-alpha.1 + +**March 26, 2015** + +* **New** Added `renderSync` option that can be used through `sass.sync()` + +### March 24, 2015 + +* **Change** Updated to `node-sass` 3.0.0-alpha.1 +* **New** Added support for `gulp-sourcemaps` including tests +* **New** Added `.editorconfig` for development consistency +* **New** Added linting and test for said linting +* **Change** Updated the README +* **New** `logError` function to make streaming errors possible instead of breaking the stream + +### 1.3.3 + +* updated to `node-sass` 2.0 (final) +* should now work with Node.js 0.12 and io.js + +### 1.3.2 + +* fixed `errLogToConsole` + +### 1.3.1 + +* bug fix + +## Version 1.3.0 + +* Supports `node-sass` 2.0 (thanks laurelnaiad!) diff --git a/node_modules/gulp-sass/LICENSE b/node_modules/gulp-sass/LICENSE new file mode 100644 index 0000000..33ef8c1 --- /dev/null +++ b/node_modules/gulp-sass/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 David Manning + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-sass/README.md b/node_modules/gulp-sass/README.md new file mode 100644 index 0000000..53367aa --- /dev/null +++ b/node_modules/gulp-sass/README.md @@ -0,0 +1,196 @@ +# gulp-sass ![npm package version](https://img.shields.io/npm/v/gulp-sass?label=npm%20version) [![Build Status](https://img.shields.io/github/workflow/status/dlmanning/gulp-sass/CI/master)](https://github.com/dlmanning/gulp-sass/actions?query=workflow%3ACI+branch%3Amaster) [![Join the chat at https://gitter.im/dlmanning/gulp-sass](https://img.shields.io/gitter/room/dlmanning/gulp-sass?color=%2346b091&label=chat&logo=gitter)](https://gitter.im/dlmanning/gulp-sass) ![Node.js support](https://img.shields.io/node/v/gulp-sass) + +Sass plugin for [Gulp](https://github.com/gulpjs/gulp). + +**_Before filing an issue, please make sure you have [updated to the latest version of `gulp-sass`](https://github.com/dlmanning/gulp-sass/wiki/Update-to-the-latest-Gulp-Sass) and have gone through our [Common Issues and Their Fixes](https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes) section._** + +**Migrating your existing project to version 5? Please read our (short!) [migration guide](#migrating-to-version-5).** + +## Support + +Only [Active LTS and Current releases](https://github.com/nodejs/Release#release-schedule) are supported. + +## Installation + +To use `gulp-sass`, you must install both `gulp-sass` itself *and* a Sass compiler. `gulp-sass` supports both [Dart Sass][] and [Node Sass][], although Node Sass is [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). We recommend that you use Dart Sass for new projects, and migrate Node Sass projects to Dart Sass when possible. + +Whichever compiler you choose, it's best to install these as dev dependencies: + +```sh +npm install sass gulp-sass --save-dev +``` + +### Importing it into your project + +`gulp-sass` must be imported into your gulpfile, where you provide it the compiler of your choice. To use `gulp-sass` in a CommonJS module (which is most Node.js environments), do something like this: + +```js +const sass = require('gulp-sass')(require('sass')); +``` + +To use `gulp-sass` in an ECMAScript module (which is supported in newer Node.js 14 and later), do something like this: + +```js +import dartSass from 'sass'; +import gulpSass from 'gulp-sass'; +const sass = gulpSass(dartSass); +``` + +## Usage + +**Note:** These examples are written for CommonJS modules and assume you're using Gulp 4. For examples that work with Gulp 3, [check the docs for an earlier version of `gulp-sass`](https://github.com/dlmanning/gulp-sass/tree/v4.1.1). + +`gulp-sass` must be used in a Gulp task. Your task can call `sass()` (to asynchronously render your CSS), or `sass.sync()` (to synchronously render your CSS). Then, export your task with the `export` keyword. We'll show some examples of how to do that. + +**⚠️ Note:** When using Dart Sass, **synchronous rendering is twice as fast as asynchronous rendering**. The Sass team is exploring ways to improve asynchronous rendering with Dart Sass, but for now, you will get the best performance from `sass.sync()`. If performance is critical, you can use `node-sass` instead, but bear in mind that `node-sass` may not support modern Sass features you rely on. + +### Render your CSS + +To render your CSS with a build task, then watch your files for changes, you might write something like this: + +```js +'use strict'; + +const gulp = require('gulp'); +const sass = require('gulp-sass')(require('sass')); + +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sass().on('error', sass.logError)) + .pipe(gulp.dest('./css')); +}; + +exports.buildStyles = buildStyles; +exports.watch = function () { + gulp.watch('./sass/**/*.scss', ['sass']); +}; +``` + +With synchronous rendering, that Gulp task looks like this: + +```js +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sass.sync().on('error', sass.logError)) + .pipe(gulp.dest('./css')); +}; +``` + +### Render with options + +To change the final output of your CSS, you can pass an options object to your renderer. `gulp-sass` supports [Node Sass's render options](https://github.com/sass/node-sass#options), with two unsupported exceptions: + +- The `data` option, which is used by `gulp-sass` internally. +- The `file` option, which has undefined behavior that may change without notice. + +For example, to compress your CSS, you can call `sass({outputStyle: 'compressed'}`. In the context of a Gulp task, that looks like this: + +```js +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) + .pipe(gulp.dest('./css')); +}; + +exports.buildStyles = buildStyles; +``` + +Or this for synchronous rendering: + +```js +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sass.sync({outputStyle: 'compressed'}).on('error', sass.logError)) + .pipe(gulp.dest('./css')); +}; + +exports.buildStyles = buildStyles; +``` + +### Include a source map + +`gulp-sass` can be used in tandem with [`gulp-sourcemaps`](https://github.com/gulp-sourcemaps/gulp-sourcemaps) to generate source maps for the Sass-to-CSS compilation. You will need to initialize `gulp-sourcemaps` _before_ running `gulp-sass`, and write the source maps after. + +```js +const sourcemaps = require('gulp-sourcemaps'); + +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sourcemaps.init()) + .pipe(sass().on('error', sass.logError)) + .pipe(sourcemaps.write()) + .pipe(gulp.dest('./css')); +} + +exports.buildStyles = buildStyles; +``` + +By default, `gulp-sourcemaps` writes the source maps inline, in the compiled CSS files. To write them to a separate file, specify a path relative to the `gulp.dest()` destination in the `sourcemaps.write()` function. + +```js +const sourcemaps = require('gulp-sourcemaps'); + +function buildStyles() { + return gulp.src('./sass/**/*.scss') + .pipe(sourcemaps.init()) + .pipe(sass().on('error', sass.logError)) + .pipe(sourcemaps.write('./maps')) + .pipe(gulp.dest('./css')); +}; + +exports.buildStyles = buildStyles; +``` + +

Migrating to version 5

+ +`gulp-sass` version 5 requires Node.js 12 or later, and introduces some breaking changes. Additionally, changes in Node.js itself mean that Node fibers can no longer be used to speed up Dart Sass in Node.js 16. + +### Setting a Sass compiler + +As of version 5, `gulp-sass` _does not include a default Sass compiler_, so you must install one (either `node-sass` or `sass`) along with `gulp-sass`. + +```sh +npm install sass gulp-sass --save-dev +``` + +Then, you must explicitly set that compiler in your gulpfille. Instead of setting a `compiler` prop on the `gulp-sass` instance, you pass the compiler into a function call when instantiating `gulp-sass`. + +These changes look something like this: + +```diff +- const sass = require('gulp-sass')); +- const compiler = require('sass'); +- sass.compiler = compiler; ++ const sass = require('gulp-sass')(require('sass')); +``` + +If you're migrating an ECMAScript module, that'll look something like this: + +```diff +import dartSass from 'sass'; +- import sass from 'gulp-sass'; +- sass.compiler = dartSass; + +import dartSass from 'sass'; ++ import gulpSass from 'gulp-sass'; ++ const sass = gulpSass(dartSass); +``` + +### What about fibers? + +We used to recommend Node fibers as a way to speed up asynchronous rendering with Dart Sass. Unfortunately, [Node fibers are discontinued](https://sass-lang.com/blog/node-fibers-discontinued) and will not work in Node.js 16. The Sass team is exploring its options for future performance improvements, but for now, you will get the best performance from `sass.sync()`. + +## Issues + +`gulp-sass` is a light-weight wrapper around either [Dart Sass][] or [Node Sass][] (which in turn is a Node.js binding for [LibSass][]. Because of this, the issue you're having likely isn't a `gulp-sass` issue, but an issue with one those projects or with [Sass][] as a whole. + +If you have a feature request/question about how Sass works/concerns on how your Sass gets compiled/errors in your compiling, it's likely a Dart Sass or LibSass issue and you should file your issue with one of those projects. + +If you're having problems with the options you're passing in, it's likely a Dart Sass or Node Sass issue and you should file your issue with one of those projects. + +We may, in the course of resolving issues, direct you to one of these other projects. If we do so, please follow up by searching that project's issue queue (both open and closed) for your problem and, if it doesn't exist, filing an issue with them. + +[Dart Sass]: https://sass-lang.com/dart-sass +[LibSass]: https://sass-lang.com/libsass +[Node Sass]: https://github.com/sass/node-sass +[Sass]: https://sass-lang.com diff --git a/node_modules/gulp-sass/index.js b/node_modules/gulp-sass/index.js new file mode 100644 index 0000000..3a027bc --- /dev/null +++ b/node_modules/gulp-sass/index.js @@ -0,0 +1,193 @@ +'use strict'; + +const path = require('path'); +const { Transform } = require('stream'); +const picocolors = require('picocolors'); +const PluginError = require('plugin-error'); +const replaceExtension = require('replace-ext'); +const stripAnsi = require('strip-ansi'); +const clonedeep = require('lodash.clonedeep'); +const applySourceMap = require('vinyl-sourcemaps-apply'); + +const PLUGIN_NAME = 'gulp-sass'; + +const MISSING_COMPILER_MESSAGE = ` +gulp-sass no longer has a default Sass compiler; please set one yourself. +Both the "sass" and "node-sass" packages are permitted. +For example, in your gulpfile: + + const sass = require('gulp-sass')(require('sass')); +`; + +const transfob = (transform) => new Transform({ transform, objectMode: true }); + +/** + * Handles returning the file to the stream + */ +const filePush = (file, sassObject, callback) => { + // Build Source Maps! + if (sassObject.map) { + // Transform map into JSON + const sassMap = JSON.parse(sassObject.map.toString()); + // Grab the stdout and transform it into stdin + const sassMapFile = sassMap.file.replace(/^stdout$/, 'stdin'); + // Grab the base filename that's being worked on + const sassFileSrc = file.relative; + // Grab the path portion of the file that's being worked on + const sassFileSrcPath = path.dirname(sassFileSrc); + + if (sassFileSrcPath) { + const sourceFileIndex = sassMap.sources.indexOf(sassMapFile); + // Prepend the path to all files in the sources array except the file that's being worked on + sassMap.sources = sassMap.sources.map((source, index) => ( + index === sourceFileIndex + ? source + : path.join(sassFileSrcPath, source) + )); + } + + // Remove 'stdin' from souces and replace with filenames! + sassMap.sources = sassMap.sources.filter((src) => src !== 'stdin' && src); + + // Replace the map file with the original filename (but new extension) + sassMap.file = replaceExtension(sassFileSrc, '.css'); + // Apply the map + applySourceMap(file, sassMap); + } + + file.contents = sassObject.css; + file.path = replaceExtension(file.path, '.css'); + + if (file.stat) { + file.stat.atime = file.stat.mtime = file.stat.ctime = new Date(); + } + + callback(null, file); +}; + +/** + * Handles error message + */ +const handleError = (error, file, callback) => { + const filePath = (error.file === 'stdin' ? file.path : error.file) || file.path; + const relativePath = path.relative(process.cwd(), filePath); + const message = `${picocolors.underline(relativePath)}\n${error.formatted}`; + + error.messageFormatted = message; + error.messageOriginal = error.message; + error.message = stripAnsi(message); + error.relativePath = relativePath; + + return callback(new PluginError(PLUGIN_NAME, error)); +}; + +/** + * Main Gulp Sass function + */ + +// eslint-disable-next-line arrow-body-style +const gulpSass = (options, sync) => { + return transfob((file, encoding, callback) => { + if (file.isNull()) { + callback(null, file); + return; + } + + if (file.isStream()) { + callback(new PluginError(PLUGIN_NAME, 'Streaming not supported')); + return; + } + + if (path.basename(file.path).startsWith('_')) { + callback(); + return; + } + + if (!file.contents.length) { + file.path = replaceExtension(file.path, '.css'); + callback(null, file); + return; + } + + const opts = clonedeep(options || {}); + opts.data = file.contents.toString(); + + // We set the file path here so that libsass can correctly resolve import paths + opts.file = file.path; + + // Ensure `indentedSyntax` is true if a `.sass` file + if (path.extname(file.path) === '.sass') { + opts.indentedSyntax = true; + } + + // Ensure file's parent directory in the include path + if (opts.includePaths) { + if (typeof opts.includePaths === 'string') { + opts.includePaths = [opts.includePaths]; + } + } else { + opts.includePaths = []; + } + + opts.includePaths.unshift(path.dirname(file.path)); + + // Generate Source Maps if the source-map plugin is present + if (file.sourceMap) { + opts.sourceMap = file.path; + opts.omitSourceMapUrl = true; + opts.sourceMapContents = true; + } + + if (sync !== true) { + /** + * Async Sass render + */ + gulpSass.compiler.render(opts, (error, obj) => { + if (error) { + handleError(error, file, callback); + return; + } + + filePush(file, obj, callback); + }); + } else { + /** + * Sync Sass render + */ + try { + filePush(file, gulpSass.compiler.renderSync(opts), callback); + } catch (error) { + handleError(error, file, callback); + } + } + }); +}; + +/** + * Sync Sass render + */ +gulpSass.sync = (options) => gulpSass(options, true); + +/** + * Log errors nicely + */ +gulpSass.logError = function logError(error) { + const message = new PluginError('sass', error.messageFormatted).toString(); + process.stderr.write(`${message}\n`); + this.emit('end'); +}; + +module.exports = (compiler) => { + if (!compiler || !compiler.render) { + const message = new PluginError( + PLUGIN_NAME, + MISSING_COMPILER_MESSAGE, + { showProperties: false }, + ).toString(); + process.stderr.write(`${message}\n`); + process.exit(1); + } + + gulpSass.compiler = compiler; + return gulpSass; +}; diff --git a/node_modules/gulp-sass/node_modules/ansi-regex/index.d.ts b/node_modules/gulp-sass/node_modules/ansi-regex/index.d.ts new file mode 100644 index 0000000..2dbf6af --- /dev/null +++ b/node_modules/gulp-sass/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,37 @@ +declare namespace ansiRegex { + interface Options { + /** + Match only the first ANSI escape. + + @default false + */ + onlyFirst: boolean; + } +} + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +declare function ansiRegex(options?: ansiRegex.Options): RegExp; + +export = ansiRegex; diff --git a/node_modules/gulp-sass/node_modules/ansi-regex/index.js b/node_modules/gulp-sass/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..616ff83 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/node_modules/gulp-sass/node_modules/ansi-regex/license b/node_modules/gulp-sass/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +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/node_modules/gulp-sass/node_modules/ansi-regex/package.json b/node_modules/gulp-sass/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..017f531 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/gulp-sass/node_modules/ansi-regex/readme.md b/node_modules/gulp-sass/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..4d848bc --- /dev/null +++ b/node_modules/gulp-sass/node_modules/ansi-regex/readme.md @@ -0,0 +1,78 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## 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/node_modules/gulp-sass/node_modules/replace-ext/LICENSE b/node_modules/gulp-sass/node_modules/replace-ext/LICENSE new file mode 100644 index 0000000..1b256a9 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/replace-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2020 Blaine Bublitz , Eric Schoffstall 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/node_modules/gulp-sass/node_modules/replace-ext/README.md b/node_modules/gulp-sass/node_modules/replace-ext/README.md new file mode 100644 index 0000000..d77533f --- /dev/null +++ b/node_modules/gulp-sass/node_modules/replace-ext/README.md @@ -0,0 +1,54 @@ +

+ + + +

+ +# replace-ext + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] + +Replaces a file extension with another one. + +## Usage + +```js +var replaceExt = require('replace-ext'); + +var path = '/some/dir/file.js'; +var newPath = replaceExt(path, '.coffee'); + +console.log(newPath); // /some/dir/file.coffee +``` + +## API + +### `replaceExt(path, extension)` + +Replaces the extension from `path` with `extension` and returns the updated path string. + +Does not replace the extension if `path` is not a string or is empty. + +## `replace-ext` for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `replace-ext` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.][tidelift-url] + +## License + +MIT + + +[downloads-image]: https://img.shields.io/npm/dm/replace-ext.svg?style=flat-square +[npm-url]: https://www.npmjs.com/package/replace-ext +[npm-image]: https://img.shields.io/npm/v/replace-ext.svg?style=flat-square + +[ci-url]: https://github.com/gulpjs/replace-ext/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/replace-ext/dev?style=flat-square + +[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/replace-ext/master.svg?style=flat-square + +[tidelift-url]: https://tidelift.com/subscription/pkg/npm-replace-ext?utm_source=npm-replace-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo + diff --git a/node_modules/gulp-sass/node_modules/replace-ext/index.js b/node_modules/gulp-sass/node_modules/replace-ext/index.js new file mode 100644 index 0000000..b05741b --- /dev/null +++ b/node_modules/gulp-sass/node_modules/replace-ext/index.js @@ -0,0 +1,32 @@ +'use strict'; + +var path = require('path'); + +function replaceExt(npath, ext) { + if (typeof npath !== 'string') { + return npath; + } + + if (npath.length === 0) { + return npath; + } + + var nFileName = path.basename(npath, path.extname(npath)) + ext; + var nFilepath = path.join(path.dirname(npath), nFileName); + + // Because `path.join` removes the head './' from the given path. + // This removal can cause a problem when passing the result to `require` or + // `import`. + if (startsWithSingleDot(npath)) { + return '.' + path.sep + nFilepath; + } + + return nFilepath; +} + +function startsWithSingleDot(fpath) { + var first2chars = fpath.slice(0, 2); + return first2chars === '.' + path.sep || first2chars === './'; +} + +module.exports = replaceExt; diff --git a/node_modules/gulp-sass/node_modules/replace-ext/package.json b/node_modules/gulp-sass/node_modules/replace-ext/package.json new file mode 100644 index 0000000..16077b6 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/replace-ext/package.json @@ -0,0 +1,47 @@ +{ + "name": "replace-ext", + "version": "2.0.0", + "description": "Replaces a file extension with another one.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Eric Schoffstall ", + "Blaine Bublitz " + ], + "repository": "gulpjs/replace-ext", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" + }, + "devDependencies": { + "eslint": "^6.8.0", + "eslint-config-gulp": "^4.0.0", + "expect": "^25.4.0", + "mocha": "^7.1.2", + "nyc": "^15.0.1" + }, + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": { + "singleQuote": true + }, + "keywords": [ + "gulp", + "extensions", + "filepath", + "basename" + ] +} diff --git a/node_modules/gulp-sass/node_modules/strip-ansi/index.d.ts b/node_modules/gulp-sass/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000..907fccc --- /dev/null +++ b/node_modules/gulp-sass/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,17 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +declare function stripAnsi(string: string): string; + +export = stripAnsi; diff --git a/node_modules/gulp-sass/node_modules/strip-ansi/index.js b/node_modules/gulp-sass/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..9a593df --- /dev/null +++ b/node_modules/gulp-sass/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/gulp-sass/node_modules/strip-ansi/license b/node_modules/gulp-sass/node_modules/strip-ansi/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +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/node_modules/gulp-sass/node_modules/strip-ansi/package.json b/node_modules/gulp-sass/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..1a41108 --- /dev/null +++ b/node_modules/gulp-sass/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/gulp-sass/node_modules/strip-ansi/readme.md b/node_modules/gulp-sass/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..7c4b56d --- /dev/null +++ b/node_modules/gulp-sass/node_modules/strip-ansi/readme.md @@ -0,0 +1,46 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + diff --git a/node_modules/gulp-sass/package.json b/node_modules/gulp-sass/package.json new file mode 100644 index 0000000..e074d62 --- /dev/null +++ b/node_modules/gulp-sass/package.json @@ -0,0 +1,60 @@ +{ + "name": "gulp-sass", + "version": "5.1.0", + "description": "Gulp plugin for sass", + "main": "index.js", + "engines": { + "node": ">=12" + }, + "scripts": { + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "fix": "npm run lint -- --fix", + "mocha": "mocha", + "test": "npm run test:node-sass && npm run test:dart-sass", + "test:node-sass": "mocha", + "test:dart-sass": "mocha -- --sass" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dlmanning/gulp-sass.git" + }, + "keywords": [ + "gulpplugin", + "sass", + "gulp" + ], + "author": "David Manning", + "license": "MIT", + "bugs": { + "url": "https://github.com/dlmanning/gulp-sass/issues" + }, + "homepage": "https://github.com/dlmanning/gulp-sass#readme", + "files": [ + "index.js" + ], + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "picocolors": "^1.0.0", + "plugin-error": "^1.0.1", + "replace-ext": "^2.0.0", + "strip-ansi": "^6.0.1", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "devDependencies": { + "autoprefixer": "^10.4.0", + "eslint": "^8.5.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.25.3", + "globule": "^1.3.3", + "gulp": "^4.0.2", + "gulp-postcss": "^9.0.1", + "gulp-sourcemaps": "^3.0.0", + "gulp-tap": "^2.0.0", + "mocha": "^9.1.3", + "node-sass": "^7.0.1", + "postcss": "^8.4.5", + "rimraf": "^3.0.2", + "sass": "^1.45.1", + "vinyl": "^2.2.1" + } +} diff --git a/node_modules/gulp/CHANGELOG.md b/node_modules/gulp/CHANGELOG.md new file mode 100644 index 0000000..d6555de --- /dev/null +++ b/node_modules/gulp/CHANGELOG.md @@ -0,0 +1,269 @@ +# gulp changelog + +## 4.0.0 + +### Task system changes + +- replaced 3.x task system (orchestrator) with new task system (bach) + - removed gulp.reset + - removed 3 argument syntax for `gulp.task` + - `gulp.task` should only be used when you will call the task with the CLI + - added `gulp.series` and `gulp.parallel` methods for composing tasks. Everything must use these now. + - added single argument syntax for `gulp.task` which allows a named function to be used as the name of the task and task function. + - added `gulp.tree` method for retrieving the task tree. Pass `{ deep: true }` for an `archy` compatible node list. + - added `gulp.registry` for setting custom registries. + +### CLI changes + +- split CLI out into a module if you want to save bandwidth/disk space. you can install the gulp CLI using either `npm install gulp -g` or `npm install gulp-cli -g`, where gulp-cli is the smaller one (no module code included) +- add `--tasks-json` flag to CLI to dump the whole tree out for other tools to consume +- added `--verify` flag to check the dependencies in package.json against the plugin blacklist. + +### vinyl/vinyl-fs changes + +- added `gulp.symlink` which functions exactly like `gulp.dest`, but symlinks instead. +- added `dirMode` param to `gulp.dest` and `gulp.symlink` which allows better control over the mode of the destination folder that is created. +- globs passed to `gulp.src` will be evaluated in order, which means this is possible `gulp.src(['*.js', '!b*.js', 'bad.js'])` (exclude every JS file that starts with a b except bad.js) +- performance for gulp.src has improved massively + - `gulp.src(['**/*', '!b.js'])` will no longer eat CPU since negations happen during walking now +- added `since` option to `gulp.src` which lets you only match files that have been modified since a certain date (for incremental builds) +- fixed `gulp.src` not following symlinks +- added `overwrite` option to `gulp.dest` which allows you to enable or disable overwriting of existing files + +## 3.9.1 + +- update interpret to 1.0.0 (support for babel-register) +- fix to include manpages in published tarball +- documentation/recipe updates + +## 3.9.0 + +- add babel support +- add transpiler fallback support +- add support for some renamed transpilers: livescript, etc +- add JSCS +- update dependencies (liftoff, interpret) +- documentation tweaks + +## 3.8.11 + +- fix node 0.12/iojs problems +- add node 0.12 and iojs to travis +- update dependencies (liftoff, v8flags) +- documentation tweaks + +## 3.8.10 + +- add link to spanish docs +- update dependencies (archy, semver, mocha, etc) +- documentation tweaks + +## 3.8.9 + +- fix local version undefined output +- add completion for fish shell +- fix powershell completion line splitting +- add support for arbitrary node flags (oops, should have been a minor bump) +- add v8flags dependency +- update dependencies (liftoff) +- documentation tweaks + +## 3.8.8 + +- update dependencies (minimist, tildify) +- documentation tweaks + +## 3.8.7 + +- handle errors a bit better +- update dependencies (gulp-util, semver, etc) +- documentation tweaks + +## 3.8.6 + +- remove executable flag from LICENSE +- update dependencies (chalk, minimist, liftoff, etc) +- documentation tweaks + +## 3.8.5 + +- simplify --silent and --tasks-simple +- fix bug in autocomplete where errors would come out + +## 3.8.4 + +- CLI will use exit code 1 on exit when any task fails during the lifetime of the process + + +## 3.8.3 + +- Tweak error formatting to work better with PluginErrors and strings + +## 3.8.2 + +- add manpage generation + +## 3.8.1 + +- the CLI now adds process.env.INIT_CWD which is the original cwd it was launched from + +## 3.8.0 + +- update vinyl-fs + - gulp.src is now a writable passthrough, this means you can use it to add files to your pipeline at any point + - gulp.dest can now take a function to determine the folder + +This is now possible! + +```js +gulp.src('lib/*.js') + .pipe(uglify()) + .pipe(gulp.src('styles/*.css')) + .pipe(gulp.dest(function(file){ + // I don't know, you can do something cool here + return 'build/whatever'; + })); +``` + +## 3.7.0 + +- update vinyl-fs to remove BOM from UTF8 files +- add --tasks-simple flag for plaintext task listings +- updated autocomplete scripts to be simpler and use new --tasks-simple flag +- added support for transpilers via liftoff 0.11 and interpret + - just npm install your compiler (coffee-script for example) and it will work out of the box + +## 3.5.5 + +- update deps +- gulp.dest now support mode option, uses source file mode by default (file.stat.mode) +- use chalk for colors in bin +- update gulp.env deprecation msg to be more helpful + + +## 3.5.2 + +- add -V for version on CLI (unix standard) +- -v is deprecated, use -V +- add -T as an alias for --tasks +- documentation + +## 3.5 + +- added `gulp.watch(globs, tasksArray)` sugar +- remove gulp.taskQueue +- deprecate gulp.run +- deprecate gulp.env +- add engineStrict to prevent people with node < 0.9 from installing + +## 3.4 + +- added `--tasks` that prints out the tree of tasks + deps +- global cli + local install mismatch is no longer fatal +- remove tests for fs stuff +- switch core src, dest, and watch to vinyl-fs +- internal cleaning + +## 3.3.4 + +- `--base` is now `--cwd` + +## 3.3.3 + +- support for `--base` CLI arg to change where the search for gulpfile/`--require`s starts +- support for `--gulpfile` CLI arg to point to a gulpfile specifically + +## 3.3.0 + +- file.contents streams are no longer paused coming out of src +- dest now passes files through before they are empty to fix passing to multiple dests + +## 3.2.4 + +- Bug fix - we didn't have any CLI tests + +## 3.2.3 + +- Update dependencies for bug fixes +- autocomplete stuff in the completion folder + +## 3.2 + +- File object is now [vinyl](https://github.com/wearefractal/vinyl) +- .watch() is now [glob-watcher](https://github.com/wearefractal/glob-watcher) +- Fix CLI -v when no gulpfile found +- gulp-util updated +- Logging moved to CLI bin file + - Will cause double logging if you update global CLI to 3.2 but not local + - Will cause no logging if you update local to 3.1 but not global CLI +- Drop support for < 0.9 + +## 3.1.3 + +- Move isStream and isBuffer to gulp-util + +## 3.1 + +- Move file class to gulp-util + +## 3.0 + +- Ability to pass multiple globs and glob negations to glob-stream +- Breaking change to the way glob-stream works +- File object is now a class +- file.shortened changed to file.relative +- file.cwd added +- Break out getStats to avoid nesting +- Major code reorganization + +## 2.7 + +- Breaking change to the way options are passed to glob-stream +- Introduce new File object to ease pain of computing shortened names (now a getter) + +## 2.4 - 2.6 + +- Moved stuff to gulp-util +- Quit exposing createGlobStream (just use the glob-stream module) +- More logging +- Prettier time durations +- Tons of documentation changes +- gulp.trigger(tasks...) as a through stream + +## 1.2-2.4 (11/12/13) + +- src buffer=false fixed for 0.8 and 0.9 (remember to .resume() on these versions before consuming) +- CLI completely rewritten + - Colorful logging + - Uses local version of gulp to run tasks + - Uses findup to locate gulpfile (so you can run it anywhere in your project) + - chdir to gulpfile directory before loading it + - Correct exit codes on errors +- silent flag added to gulp to disable logging +- Fixes to task orchestration (3rd party) +- Better support for globbed directories (thanks @robrich) + +## 1.2 (10/28/13) + +- Can specify buffer=false on src streams to make file.content a stream +- Can specify read=false on src streams to disable file.content + +## 1.1 (10/21/13) + +- Can specify run callback +- Can specify task dependencies +- Tasks can accept callback or return promise +- `gulp.verbose` exposes run-time internals + +## 1.0 (9/26/13) + +- Specify dependency versions +- Updated docs + +## 0.2 (8/6/13) + +- Rename .files() to .src() and .folder() to .dest() + +## 0.1 (7/18/13) + +- Initial Release diff --git a/node_modules/gulp/LICENSE b/node_modules/gulp/LICENSE new file mode 100644 index 0000000..6a29df9 --- /dev/null +++ b/node_modules/gulp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2018 Blaine Bublitz , Eric Schoffstall 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/node_modules/gulp/README.md b/node_modules/gulp/README.md new file mode 100644 index 0000000..aac4230 --- /dev/null +++ b/node_modules/gulp/README.md @@ -0,0 +1,284 @@ +

+ + + +

The streaming build system

+

+ +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![OpenCollective Backers][backer-badge]][backer-url] [![OpenCollective Sponsors][sponsor-badge]][sponsor-url] [![Gitter chat][gitter-image]][gitter-url] + + +## What is gulp? + +- **Automation** - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow. +- **Platform-agnostic** - Integrations are built into all major IDEs and people are using gulp with PHP, .NET, Node.js, Java, and other platforms. +- **Strong Ecosystem** - Use npm modules to do anything you want + over 2000 curated plugins for streaming file transformations +- **Simple** - By providing only a minimal API surface, gulp is easy to learn and simple to use + +## What's new in 4.0?! + +* The task system was rewritten from the ground-up, allowing task composition using `series()` and `parallel()` methods +* The watcher was updated, now using chokidar (no more need for gulp-watch!), with feature parity to our task system +* First-class support was added for incremental builds using `lastRun()` +* A `symlink()` method was exposed to create symlinks instead of copying files +* Built-in support for sourcemaps was added - the gulp-sourcemaps plugin is no longer necessary! +* Task registration of exported functions - using node or ES exports - is now recommended +* Custom registries were designed, allowing for shared tasks or augmented functionality +* Stream implementations were improved, allowing for better conditional and phased builds + +## Installation + +Follow our [Quick Start guide][quick-start]. + +## Roadmap + +Find out about all our work-in-progress and outstanding issues at https://github.com/orgs/gulpjs/projects. + +## Documentation + +Check out the [Getting Started guide][getting-started-guide] and [API docs][api-docs] on our website! + +__Excuse our dust! All other docs will be behind until we get everything updated. Please open an issue if something isn't working.__ + +## Sample `gulpfile.js` + +This file will give you a taste of what gulp does. + +```js +var gulp = require('gulp'); +var less = require('gulp-less'); +var babel = require('gulp-babel'); +var concat = require('gulp-concat'); +var uglify = require('gulp-uglify'); +var rename = require('gulp-rename'); +var cleanCSS = require('gulp-clean-css'); +var del = require('del'); + +var paths = { + styles: { + src: 'src/styles/**/*.less', + dest: 'assets/styles/' + }, + scripts: { + src: 'src/scripts/**/*.js', + dest: 'assets/scripts/' + } +}; + +/* Not all tasks need to use streams, a gulpfile is just another node program + * and you can use all packages available on npm, but it must return either a + * Promise, a Stream or take a callback and call it + */ +function clean() { + // You can use multiple globbing patterns as you would with `gulp.src`, + // for example if you are using del 2.0 or above, return its promise + return del([ 'assets' ]); +} + +/* + * Define our tasks using plain functions + */ +function styles() { + return gulp.src(paths.styles.src) + .pipe(less()) + .pipe(cleanCSS()) + // pass in options to the stream + .pipe(rename({ + basename: 'main', + suffix: '.min' + })) + .pipe(gulp.dest(paths.styles.dest)); +} + +function scripts() { + return gulp.src(paths.scripts.src, { sourcemaps: true }) + .pipe(babel()) + .pipe(uglify()) + .pipe(concat('main.min.js')) + .pipe(gulp.dest(paths.scripts.dest)); +} + +function watch() { + gulp.watch(paths.scripts.src, scripts); + gulp.watch(paths.styles.src, styles); +} + +/* + * Specify if tasks run in series or parallel using `gulp.series` and `gulp.parallel` + */ +var build = gulp.series(clean, gulp.parallel(styles, scripts)); + +/* + * You can use CommonJS `exports` module notation to declare tasks + */ +exports.clean = clean; +exports.styles = styles; +exports.scripts = scripts; +exports.watch = watch; +exports.build = build; +/* + * Define default task that can be called by just running `gulp` from cli + */ +exports.default = build; +``` + +## Use latest JavaScript version in your gulpfile + +__Most new versions of node support most features that Babel provides, except the `import`/`export` syntax. When only that syntax is desired, rename to `gulpfile.esm.js`, install the [esm][esm-module] module, and skip the Babel portion below.__ + +Node already supports a lot of __ES2015+__ features, but to avoid compatibility problems we suggest to install Babel and rename your `gulpfile.js` to `gulpfile.babel.js`. + +```sh +npm install --save-dev @babel/register @babel/core @babel/preset-env +``` + +Then create a **.babelrc** file with the preset configuration. + +```js +{ + "presets": [ "@babel/preset-env" ] +} +``` + +And here's the same sample from above written in **ES2015+**. + +```js +import gulp from 'gulp'; +import less from 'gulp-less'; +import babel from 'gulp-babel'; +import concat from 'gulp-concat'; +import uglify from 'gulp-uglify'; +import rename from 'gulp-rename'; +import cleanCSS from 'gulp-clean-css'; +import del from 'del'; + +const paths = { + styles: { + src: 'src/styles/**/*.less', + dest: 'assets/styles/' + }, + scripts: { + src: 'src/scripts/**/*.js', + dest: 'assets/scripts/' + } +}; + +/* + * For small tasks you can export arrow functions + */ +export const clean = () => del([ 'assets' ]); + +/* + * You can also declare named functions and export them as tasks + */ +export function styles() { + return gulp.src(paths.styles.src) + .pipe(less()) + .pipe(cleanCSS()) + // pass in options to the stream + .pipe(rename({ + basename: 'main', + suffix: '.min' + })) + .pipe(gulp.dest(paths.styles.dest)); +} + +export function scripts() { + return gulp.src(paths.scripts.src, { sourcemaps: true }) + .pipe(babel()) + .pipe(uglify()) + .pipe(concat('main.min.js')) + .pipe(gulp.dest(paths.scripts.dest)); +} + + /* + * You could even use `export as` to rename exported tasks + */ +function watchFiles() { + gulp.watch(paths.scripts.src, scripts); + gulp.watch(paths.styles.src, styles); +} +export { watchFiles as watch }; + +const build = gulp.series(clean, gulp.parallel(styles, scripts)); +/* + * Export a default task + */ +export default build; +``` + +## Incremental Builds + +You can filter out unchanged files between runs of a task using +the `gulp.src` function's `since` option and `gulp.lastRun`: +```js +const paths = { + ... + images: { + src: 'src/images/**/*.{jpg,jpeg,png}', + dest: 'build/img/' + } +} + +function images() { + return gulp.src(paths.images.src, {since: gulp.lastRun(images)}) + .pipe(imagemin({optimizationLevel: 5})) + .pipe(gulp.dest(paths.images.dest)); +} + +function watch() { + gulp.watch(paths.images.src, images); +} +``` +Task run times are saved in memory and are lost when gulp exits. It will only +save time during the `watch` task when running the `images` task +for a second time. + +## Want to contribute? + +Anyone can help make this project better - check out our [Contributing guide](/CONTRIBUTING.md)! + +## Backers + +Support us with a monthly donation and help us continue our activities. + +[![Backers][backers-image]][support-url] + +## Sponsors + +Become a sponsor to get your logo on our README on Github. + +[![Sponsors][sponsors-image]][support-url] + +[downloads-image]: https://img.shields.io/npm/dm/gulp.svg +[npm-url]: https://www.npmjs.com/package/gulp +[npm-image]: https://img.shields.io/npm/v/gulp.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=1&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/gulp?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/gulp +[travis-image]: https://img.shields.io/travis/gulpjs/gulp.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/gulp +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/gulp.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/gulp +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg + +[backer-url]: #backers +[backer-badge]: https://opencollective.com/gulpjs/backers/badge.svg?color=blue +[sponsor-url]: #sponsors +[sponsor-badge]: https://opencollective.com/gulpjs/sponsors/badge.svg?color=blue + +[support-url]: https://opencollective.com/gulpjs#support + +[backers-image]: https://opencollective.com/gulpjs/backers.svg +[sponsors-image]: https://opencollective.com/gulpjs/sponsors.svg + +[quick-start]: https://gulpjs.com/docs/en/getting-started/quick-start +[getting-started-guide]: https://gulpjs.com/docs/en/getting-started/quick-start +[api-docs]: https://gulpjs.com/docs/en/api/concepts diff --git a/node_modules/gulp/bin/gulp.js b/node_modules/gulp/bin/gulp.js new file mode 100755 index 0000000..f4b80cc --- /dev/null +++ b/node_modules/gulp/bin/gulp.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('gulp-cli')(); diff --git a/node_modules/gulp/index.js b/node_modules/gulp/index.js new file mode 100644 index 0000000..8b73521 --- /dev/null +++ b/node_modules/gulp/index.js @@ -0,0 +1,55 @@ +'use strict'; + +var util = require('util'); +var Undertaker = require('undertaker'); +var vfs = require('vinyl-fs'); +var watch = require('glob-watcher'); + +function Gulp() { + Undertaker.call(this); + + // Bind the functions for destructuring + this.watch = this.watch.bind(this); + this.task = this.task.bind(this); + this.series = this.series.bind(this); + this.parallel = this.parallel.bind(this); + this.registry = this.registry.bind(this); + this.tree = this.tree.bind(this); + this.lastRun = this.lastRun.bind(this); + this.src = this.src.bind(this); + this.dest = this.dest.bind(this); + this.symlink = this.symlink.bind(this); +} +util.inherits(Gulp, Undertaker); + +Gulp.prototype.src = vfs.src; +Gulp.prototype.dest = vfs.dest; +Gulp.prototype.symlink = vfs.symlink; +Gulp.prototype.watch = function(glob, opt, task) { + if (typeof opt === 'string' || typeof task === 'string' || + Array.isArray(opt) || Array.isArray(task)) { + throw new Error('watching ' + glob + ': watch task has to be ' + + 'a function (optionally generated by using gulp.parallel ' + + 'or gulp.series)'); + } + + if (typeof opt === 'function') { + task = opt; + opt = {}; + } + + opt = opt || {}; + + var fn; + if (typeof task === 'function') { + fn = this.parallel(task); + } + + return watch(glob, opt, fn); +}; + +// Let people use this class from our instance +Gulp.prototype.Gulp = Gulp; + +var inst = new Gulp(); +module.exports = inst; diff --git a/node_modules/gulp/package.json b/node_modules/gulp/package.json new file mode 100644 index 0000000..256684a --- /dev/null +++ b/node_modules/gulp/package.json @@ -0,0 +1,60 @@ +{ + "name": "gulp", + "version": "4.0.2", + "description": "The streaming build system.", + "homepage": "https://gulpjs.com", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Eric Schoffstall ", + "Blaine Bublitz " + ], + "repository": "gulpjs/gulp", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js", + "bin" + ], + "bin": { + "gulp": "./bin/gulp.js" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "devDependencies": { + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mkdirp": "^0.5.1", + "mocha": "^3.0.0", + "nyc": "^10.3.2", + "rimraf": "^2.6.3" + }, + "keywords": [ + "build", + "stream", + "system", + "make", + "tool", + "asset", + "pipeline", + "series", + "parallel", + "streaming" + ] +} diff --git a/node_modules/gulplog/CHANGELOG.md b/node_modules/gulplog/CHANGELOG.md new file mode 100644 index 0000000..5f84e9b --- /dev/null +++ b/node_modules/gulplog/CHANGELOG.md @@ -0,0 +1,10 @@ +# gulplog changelog + +## 1.0.0 + +- Initial release +- No implementation changed since initial commit + +## 0.0.0 + +- Experimentation diff --git a/node_modules/gulplog/LICENSE b/node_modules/gulplog/LICENSE new file mode 100644 index 0000000..8ac3554 --- /dev/null +++ b/node_modules/gulplog/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall 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/node_modules/gulplog/README.md b/node_modules/gulplog/README.md new file mode 100644 index 0000000..484e939 --- /dev/null +++ b/node_modules/gulplog/README.md @@ -0,0 +1,79 @@ +

+ + + +

+ +# gulplog + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Gitter chat][gitter-image]][gitter-url] + +Logger for gulp and gulp plugins + +## Usage + +```js +var logger = require('gulplog'); + +// logs strings +logger.debug('The MOST verbose!'); +logger.info('Some important info'); +logger.warn('All the warnings to you'); +logger.error('OH NO! SOMETHING HAPPENED!'); + +// supports util.format! +logger.info('%s style!', 'printf'); + +// log anything +logger.debug({ my: 'obj' }); +logger.info([1, 2, 3]); +``` + +## API + +Logging (and level of logging) is controlled by [`gulp-cli`][gulp-cli-url] + +#### logger.debug(msg) + +Highest log level. Typically used for debugging purposes. + +If the first argument is a string, all arguments are passed to node's +[`util.format()`][util-format-url] before being emitted. + +#### logger.info(msg) + +Standard log level. Typically used for user information. + +If the first argument is a string, all arguments are passed to node's +[`util.format()`][util-format-url] before being emitted. + +#### logger.warn(msg) + +Warning log level. Typically used for warnings. + +If the first argument is a string, all arguments are passed to node's +[`util.format()`][util-format-url] before being emitted. + +#### logger.error(msg) + +Error log level. Typically used when things went horribly wrong. + +If the first argument is a string, all arguments are passed to node's +[`util.format()`][util-format-url] before being emitted. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/gulplog.svg +[npm-url]: https://npmjs.org/package/gulplog +[npm-image]: http://img.shields.io/npm/v/gulplog.svg + +[travis-url]: https://travis-ci.org/gulpjs/gulplog +[travis-image]: http://img.shields.io/travis/gulpjs/gulplog.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png + +[gulp-cli-url]: https://github.com/gulpjs/gulp-cli +[util-format-url]: https://nodejs.org/docs/latest/api/util.html#util_util_format_format diff --git a/node_modules/gulplog/index.js b/node_modules/gulplog/index.js new file mode 100644 index 0000000..b92a646 --- /dev/null +++ b/node_modules/gulplog/index.js @@ -0,0 +1,7 @@ +'use strict'; + +var getLogger = require('glogg'); + +var logger = getLogger('gulplog'); + +module.exports = logger; diff --git a/node_modules/gulplog/package.json b/node_modules/gulplog/package.json new file mode 100644 index 0000000..047bc7c --- /dev/null +++ b/node_modules/gulplog/package.json @@ -0,0 +1,34 @@ +{ + "name": "gulplog", + "version": "1.0.0", + "description": "Logger for gulp and gulp plugins", + "author": "Blaine Bublitz (http://iceddev.com)", + "contributors": [], + "repository": "gulpjs/gulplog", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "test": "eslint index.js && jscs index.js" + }, + "dependencies": { + "glogg": "^1.0.0" + }, + "devDependencies": { + "eslint": "^1.5.1", + "eslint-config-node-style-guide": "^1.0.1", + "jscs": "^2.1.1" + }, + "keywords": [ + "gulp", + "gulp-util", + "log", + "logging" + ] +} diff --git a/node_modules/has-property-descriptors/.eslintrc b/node_modules/has-property-descriptors/.eslintrc new file mode 100644 index 0000000..2fcc002 --- /dev/null +++ b/node_modules/has-property-descriptors/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": ["GetIntrinsic"], + }], + }, +} diff --git a/node_modules/has-property-descriptors/.github/FUNDING.yml b/node_modules/has-property-descriptors/.github/FUNDING.yml new file mode 100644 index 0000000..817aacf --- /dev/null +++ b/node_modules/has-property-descriptors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/has-property-descriptors +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/node_modules/has-property-descriptors/.nycrc b/node_modules/has-property-descriptors/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/has-property-descriptors/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-property-descriptors/CHANGELOG.md b/node_modules/has-property-descriptors/CHANGELOG.md new file mode 100644 index 0000000..ae64b47 --- /dev/null +++ b/node_modules/has-property-descriptors/CHANGELOG.md @@ -0,0 +1,16 @@ +# 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-04-14 + +### Commits + +- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a) +- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749) +- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767) +- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85) +- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0) diff --git a/node_modules/has-property-descriptors/LICENSE b/node_modules/has-property-descriptors/LICENSE new file mode 100644 index 0000000..2e7b9a3 --- /dev/null +++ b/node_modules/has-property-descriptors/LICENSE @@ -0,0 +1,21 @@ +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/node_modules/has-property-descriptors/README.md b/node_modules/has-property-descriptors/README.md new file mode 100644 index 0000000..d81fbd9 --- /dev/null +++ b/node_modules/has-property-descriptors/README.md @@ -0,0 +1,43 @@ +# has-property-descriptors [![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] + +Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD. + +## Example + +```js +var hasPropertyDescriptors = require('has-property-descriptors'); +var assert = require('assert'); + +assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines + +// Arrays can not have their length `[[Defined]]` in some engines +assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-property-descriptors +[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg +[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg +[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors +[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors +[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors +[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions diff --git a/node_modules/has-property-descriptors/index.js b/node_modules/has-property-descriptors/index.js new file mode 100644 index 0000000..8e30683 --- /dev/null +++ b/node_modules/has-property-descriptors/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; diff --git a/node_modules/has-property-descriptors/package.json b/node_modules/has-property-descriptors/package.json new file mode 100644 index 0000000..9404b71 --- /dev/null +++ b/node_modules/has-property-descriptors/package.json @@ -0,0 +1,70 @@ +{ + "name": "has-property-descriptors", + "version": "1.0.0", + "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "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/has-property-descriptors.git" + }, + "keywords": [ + "property", + "descriptors", + "has", + "environment", + "env", + "defineProperty", + "getOwnPropertyDescriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-property-descriptors/issues" + }, + "homepage": "https://github.com/inspect-js/has-property-descriptors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "evalmd": "^0.0.19", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/has-property-descriptors/test/index.js b/node_modules/has-property-descriptors/test/index.js new file mode 100644 index 0000000..7f02bd3 --- /dev/null +++ b/node_modules/has-property-descriptors/test/index.js @@ -0,0 +1,57 @@ +'use strict'; + +var test = require('tape'); + +var hasPropertyDescriptors = require('../'); + +var sentinel = {}; + +test('hasPropertyDescriptors', function (t) { + t.equal(typeof hasPropertyDescriptors, 'function', 'is a function'); + t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function'); + + var yes = hasPropertyDescriptors(); + t.test('property descriptors', { skip: !yes }, function (st) { + var o = { a: sentinel }; + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: true, + value: sentinel, + writable: true + }, + 'has expected property descriptor' + ); + + Object.defineProperty(o, 'a', { enumerable: false, writable: false }); + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: false, + value: sentinel, + writable: false + }, + 'has expected property descriptor after [[Define]]' + ); + + st.end(); + }); + + var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) { + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + st.equal(arr.length, 3, 'array starts with length 3'); + + Object.defineProperty(arr, 'length', { value: 5 }); + + st.equal(arr.length, 5, 'array ends with length 5'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc new file mode 100644 index 0000000..2d9a66a --- /dev/null +++ b/node_modules/has-symbols/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000..04cf87e --- /dev/null +++ b/node_modules/has-symbols/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/has-symbols +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/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000..cd532a2 --- /dev/null +++ b/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,75 @@ +# 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.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000..df31cbf --- /dev/null +++ b/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md new file mode 100644 index 0000000..33905f0 --- /dev/null +++ b/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js new file mode 100644 index 0000000..17044fa --- /dev/null +++ b/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json new file mode 100644 index 0000000..fe7004a --- /dev/null +++ b/node_modules/has-symbols/package.json @@ -0,0 +1,101 @@ +{ + "name": "has-symbols", + "version": "1.0.3", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "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://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + } +} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js new file mode 100644 index 0000000..1285210 --- /dev/null +++ b/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000..352129c --- /dev/null +++ b/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000..df5365c --- /dev/null +++ b/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000..9191b24 --- /dev/null +++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000..89edd12 --- /dev/null +++ b/node_modules/has-symbols/test/tests.js @@ -0,0 +1,56 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has-value/LICENSE b/node_modules/has-value/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-value/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/has-value/README.md b/node_modules/has-value/README.md new file mode 100644 index 0000000..f9b428c --- /dev/null +++ b/node_modules/has-value/README.md @@ -0,0 +1,149 @@ +# has-value [![NPM version](https://img.shields.io/npm/v/has-value.svg?style=flat)](https://www.npmjs.com/package/has-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![NPM total downloads](https://img.shields.io/npm/dt/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/has-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/has-value) + +> Returns true if a value exists, false if empty. Works with deeply nested values using object paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save has-value +``` + +**Works for:** + +* booleans +* functions +* numbers +* strings +* nulls +* object +* arrays + +## Usage + +Works with property values (supports object-path notation, like `foo.bar`) or a single value: + +```js +var hasValue = require('has-value'); + +hasValue('foo'); +hasValue({foo: 'bar'}, 'foo'); +hasValue({a: {b: {c: 'foo'}}}, 'a.b.c'); +//=> true + +hasValue(''); +hasValue({foo: ''}, 'foo'); +//=> false + +hasValue(0); +hasValue(1); +hasValue({foo: 0}, 'foo'); +hasValue({foo: 1}, 'foo'); +hasValue({foo: null}, 'foo'); +hasValue({foo: {bar: 'a'}}}, 'foo'); +hasValue({foo: {bar: 'a'}}}, 'foo.bar'); +//=> true + +hasValue({foo: {}}}, 'foo'); +hasValue({foo: {bar: {}}}}, 'foo.bar'); +hasValue({foo: undefined}, 'foo'); +//=> false + +hasValue([]); +hasValue([[]]); +hasValue([[], []]); +hasValue([undefined]); +hasValue({foo: []}, 'foo'); +//=> false + +hasValue([0]); +hasValue([null]); +hasValue(['foo']); +hasValue({foo: ['a']}, 'foo'); +//=> true + +hasValue(function() {}) +hasValue(function(foo) {}) +hasValue({foo: function(foo) {}}, 'foo'); +hasValue({foo: function() {}}, 'foo'); +//=> true + +hasValue(true); +hasValue(false); +hasValue({foo: true}, 'foo'); +hasValue({foo: false}, 'foo'); +//=> true +``` + +## isEmpty + +To do the opposite and test for empty values, do: + +```js +function isEmpty(o) { + return !hasValue.apply(hasValue, arguments); +} +``` + +## Release history + +### v1.0.0 + +* `zero` always returns true +* `array` now recurses, so that an array of empty arrays will return `false` +* `null` now returns true + +## About + +### Related projects + +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [rmharrison](https://github.com/rmharrison) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-value/index.js b/node_modules/has-value/index.js new file mode 100644 index 0000000..c237494 --- /dev/null +++ b/node_modules/has-value/index.js @@ -0,0 +1,16 @@ +/*! + * has-value + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var hasValues = require('has-values'); +var get = require('get-value'); + +module.exports = function(val, prop) { + return hasValues(isObject(val) && prop ? get(val, prop) : val); +}; diff --git a/node_modules/has-value/package.json b/node_modules/has-value/package.json new file mode 100644 index 0000000..e65d438 --- /dev/null +++ b/node_modules/has-value/package.json @@ -0,0 +1,83 @@ +{ + "name": "has-value", + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/has-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ryan M Harrison (https://linkedin.com/in/harrisonrm)" + ], + "repository": "jonschlinkert/has-value", + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "define-property", + "get-value", + "set-value", + "unset-value" + ] + }, + "reflinks": [], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/has-values/LICENSE b/node_modules/has-values/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-values/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/has-values/README.md b/node_modules/has-values/README.md new file mode 100644 index 0000000..98d4367 --- /dev/null +++ b/node_modules/has-values/README.md @@ -0,0 +1,129 @@ +# has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM monthly downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![NPM total downloads](https://img.shields.io/npm/dt/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/has-values) + +> Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save has-values +``` + +## Usage + +```js +var hasValue = require('has-values'); + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue({a: 'a'}}); +//=> true + +hasValue({}); +hasValue({foo: undefined}); +//=> false + +hasValue({foo: null}); +//=> true + +hasValue(['a']); +//=> true + +hasValue([]); +hasValue([[], []]); +hasValue([[[]]]); +//=> false + +hasValue(['foo']); +hasValue([0]); +//=> true + +hasValue(function(foo) {}); +//=> true + +hasValue(function() {}); +//=> true + +hasValue(true); +//=> true + +hasValue(false); +//=> true +``` + +## isEmpty + +To test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue(o, isZero); +} +``` + +## Release history + +### v1.0.0 + +* `zero` always returns true +* `array` now recurses, so that an array of empty arrays will return `false` +* `null` now returns true + +## About + +### Related projects + +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-values/index.js b/node_modules/has-values/index.js new file mode 100644 index 0000000..9bebb9f --- /dev/null +++ b/node_modules/has-values/index.js @@ -0,0 +1,60 @@ +/*! + * has-values + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isNumber = require('is-number'); + +module.exports = function hasValue(val) { + // is-number checks for NaN and other edge cases + if (isNumber(val)) { + return true; + } + + switch (typeOf(val)) { + case 'null': + case 'boolean': + case 'function': + return true; + case 'string': + case 'arguments': + return val.length !== 0; + case 'error': + return val.message !== ''; + case 'array': + var len = val.length; + if (len === 0) { + return false; + } + for (var i = 0; i < len; i++) { + if (hasValue(val[i])) { + return true; + } + } + return false; + case 'file': + case 'map': + case 'set': + return val.size !== 0; + case 'object': + var keys = Object.keys(val); + if (keys.length === 0) { + return false; + } + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (hasValue(val[key])) { + return true; + } + } + return false; + default: { + return false; + } + } +}; diff --git a/node_modules/has-values/node_modules/kind-of/LICENSE b/node_modules/has-values/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/has-values/node_modules/kind-of/README.md b/node_modules/has-values/node_modules/kind-of/README.md new file mode 100644 index 0000000..83469b0 --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/README.md @@ -0,0 +1,267 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 64 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-values/node_modules/kind-of/index.js b/node_modules/has-values/node_modules/kind-of/index.js new file mode 100644 index 0000000..4c0233b --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/index.js @@ -0,0 +1,119 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/has-values/node_modules/kind-of/package.json b/node_modules/has-values/node_modules/kind-of/package.json new file mode 100644 index 0000000..222afc0 --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/has-values/package.json b/node_modules/has-values/package.json new file mode 100644 index 0000000..bdd841d --- /dev/null +++ b/node_modules/has-values/package.json @@ -0,0 +1,82 @@ +{ + "name": "has-values", + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/has-values", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-values", + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value", + "values" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-value", + "kind-of", + "is-number", + "is-plain-object", + "isobject" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT new file mode 100644 index 0000000..ae7014d --- /dev/null +++ b/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has/README.md b/node_modules/has/README.md new file mode 100644 index 0000000..635e3a4 --- /dev/null +++ b/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json new file mode 100644 index 0000000..7c4592f --- /dev/null +++ b/node_modules/has/package.json @@ -0,0 +1,48 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } +} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js new file mode 100644 index 0000000..dd92dd9 --- /dev/null +++ b/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js new file mode 100644 index 0000000..43d480b --- /dev/null +++ b/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t.end(); +}); diff --git a/node_modules/homedir-polyfill/LICENSE b/node_modules/homedir-polyfill/LICENSE new file mode 100644 index 0000000..f92fdcf --- /dev/null +++ b/node_modules/homedir-polyfill/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Brian Woodward + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/homedir-polyfill/README.md b/node_modules/homedir-polyfill/README.md new file mode 100644 index 0000000..8770050 --- /dev/null +++ b/node_modules/homedir-polyfill/README.md @@ -0,0 +1,96 @@ +# homedir-polyfill [![NPM version](https://img.shields.io/npm/v/homedir-polyfill.svg?style=flat)](https://www.npmjs.com/package/homedir-polyfill) [![NPM monthly downloads](https://img.shields.io/npm/dm/homedir-polyfill.svg?style=flat)](https://npmjs.org/package/homedir-polyfill) [![NPM total downloads](https://img.shields.io/npm/dt/homedir-polyfill.svg?style=flat)](https://npmjs.org/package/homedir-polyfill) [![Linux Build Status](https://img.shields.io/travis/doowb/homedir-polyfill.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/homedir-polyfill) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/homedir-polyfill.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/homedir-polyfill) + +> Node.js os.homedir polyfill for older versions of node.js. + +Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save homedir-polyfill +``` + +## Usage + +```js +var homedir = require('homedir-polyfill'); +console.log(homedir()); +//=> /Users/doowb +``` + +## Reasoning + +This library is a polyfill for the [node.js os.homedir](https://nodejs.org/api/os.html#os_os_homedir) method found in modern versions of node.js. + +This implementation tries to follow the implementation found in `libuv` by finding the current user using the `process.geteuid()` method and the `/etc/passwd` file. This should usually work in a linux environment, but will also fallback to looking at user specific environment variables to build the user's home directory if neccessary. + +Since `/etc/passwd` is not available on windows platforms, this implementation will use environment variables to find the home directory. + +In modern versions of node.js, [os.homedir](https://nodejs.org/api/os.html#os_os_homedir) is used. + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +[parse-passwd](https://www.npmjs.com/package/parse-passwd): Parse a passwd file into a list of users. | [homepage](https://github.com/doowb/parse-passwd "Parse a passwd file into a list of users.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [doowb](https://github.com/doowb) | +| 2 | [martinheidegger](https://github.com/martinheidegger) | + +### Author + +**Brian Woodward** + +* [GitHub Profile](https://github.com/doowb) +* [Twitter Profile](https://twitter.com/doowb) +* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) + +### License + +Copyright © 2016 - 2019, [Brian Woodward](https://github.com/doowb). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on February 21, 2019._ diff --git a/node_modules/homedir-polyfill/index.js b/node_modules/homedir-polyfill/index.js new file mode 100644 index 0000000..298168e --- /dev/null +++ b/node_modules/homedir-polyfill/index.js @@ -0,0 +1,9 @@ +'use strict'; + +var os = require('os'); +if (typeof os.homedir !== 'undefined') { + module.exports = os.homedir; +} else { + module.exports = require('./polyfill.js'); +} + diff --git a/node_modules/homedir-polyfill/package.json b/node_modules/homedir-polyfill/package.json new file mode 100644 index 0000000..ab5bc71 --- /dev/null +++ b/node_modules/homedir-polyfill/package.json @@ -0,0 +1,62 @@ +{ + "name": "homedir-polyfill", + "description": "Node.js os.homedir polyfill for older versions of node.js.", + "version": "1.0.3", + "homepage": "https://github.com/doowb/homedir-polyfill", + "author": "Brian Woodward (https://github.com/doowb)", + "repository": "doowb/homedir-polyfill", + "bugs": { + "url": "https://github.com/doowb/homedir-polyfill/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "polyfill.js", + "LICENSE" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.1.2" + }, + "keywords": [ + "home", + "homedir", + "homedirectory", + "os", + "os-homedir", + "polyfill", + "userhome" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "parse-passwd" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + }, + "dependencies": { + "parse-passwd": "^1.0.0" + } +} diff --git a/node_modules/homedir-polyfill/polyfill.js b/node_modules/homedir-polyfill/polyfill.js new file mode 100644 index 0000000..83aee38 --- /dev/null +++ b/node_modules/homedir-polyfill/polyfill.js @@ -0,0 +1,81 @@ +'use strict'; + +var fs = require('fs'); +var parse = require('parse-passwd'); + +function homedir() { + // The following logic is from looking at logic used in the different platform + // versions of the uv_os_homedir function found in https://github.com/libuv/libuv + // This is the function used in modern versions of node.js + + if (process.platform === 'win32') { + // check the USERPROFILE first + if (process.env.USERPROFILE) { + return process.env.USERPROFILE; + } + + // check HOMEDRIVE and HOMEPATH + if (process.env.HOMEDRIVE && process.env.HOMEPATH) { + return process.env.HOMEDRIVE + process.env.HOMEPATH; + } + + // fallback to HOME + if (process.env.HOME) { + return process.env.HOME; + } + + return null; + } + + // check HOME environment variable first + if (process.env.HOME) { + return process.env.HOME; + } + + // on linux platforms (including OSX) find the current user and get their homedir from the /etc/passwd file + var passwd = tryReadFileSync('/etc/passwd'); + var home = find(parse(passwd), getuid()); + if (home) { + return home; + } + + // fallback to using user environment variables + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (!user) { + return null; + } + + if (process.platform === 'darwin') { + return '/Users/' + user; + } + + return '/home/' + user; +} + +function find(arr, uid) { + var len = arr.length; + for (var i = 0; i < len; i++) { + if (+arr[i].uid === uid) { + return arr[i].homedir; + } + } +} + +function getuid() { + if (typeof process.geteuid === 'function') { + return process.geteuid(); + } + return process.getuid(); +} + +function tryReadFileSync(fp) { + try { + return fs.readFileSync(fp, 'utf8'); + } catch (err) { + return ''; + } +} + +module.exports = homedir; + diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md new file mode 100644 index 0000000..6987fb4 --- /dev/null +++ b/node_modules/hosted-git-info/CHANGELOG.md @@ -0,0 +1,151 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [2.8.9](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) (2021-04-07) + + +### Bug Fixes + +* backport regex fix from [#76](https://github.com/npm/hosted-git-info/issues/76) ([29adfe5](https://github.com/npm/hosted-git-info/commit/29adfe5)), closes [#84](https://github.com/npm/hosted-git-info/issues/84) + + + + +## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29) + + +### Bug Fixes + +* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66) + + + + +## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) + + +### Bug Fixes + +* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) +* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) + + + + +## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) + + + + +## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) + + +### Bug Fixes + +* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) +* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) + + + + +## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) + + + + +## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) + + + + +## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) + + +### Bug Fixes + +* http protocol use sshurl by default ([3b1d629](https://github.com/npm/hosted-git-info/commit/3b1d629)), closes [#48](https://github.com/npm/hosted-git-info/issues/48) + + + + +## [2.8.1](https://github.com/npm/hosted-git-info/compare/v2.8.0...v2.8.1) (2019-08-05) + + +### Bug Fixes + +* ignore noCommittish on tarball url generation ([5d4a8d7](https://github.com/npm/hosted-git-info/commit/5d4a8d7)) +* use gist tarball url that works for anonymous gists ([1692435](https://github.com/npm/hosted-git-info/commit/1692435)) + + + + +# [2.8.0](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.0) (2019-08-05) + + +### Bug Fixes + +* Allow slashes in gitlab project section ([bbcf7b2](https://github.com/npm/hosted-git-info/commit/bbcf7b2)), closes [#46](https://github.com/npm/hosted-git-info/issues/46) [#43](https://github.com/npm/hosted-git-info/issues/43) +* **git-host:** disallow URI-encoded slash (%2F) in `path` ([3776fa5](https://github.com/npm/hosted-git-info/commit/3776fa5)), closes [#44](https://github.com/npm/hosted-git-info/issues/44) +* **gitlab:** Do not URL encode slashes in project name for GitLab https URL ([cbf04f9](https://github.com/npm/hosted-git-info/commit/cbf04f9)), closes [#47](https://github.com/npm/hosted-git-info/issues/47) +* do not allow invalid gist urls ([d5cf830](https://github.com/npm/hosted-git-info/commit/d5cf830)) +* **cache:** Switch to lru-cache to save ourselves from unlimited memory consumption ([e518222](https://github.com/npm/hosted-git-info/commit/e518222)), closes [#38](https://github.com/npm/hosted-git-info/issues/38) + + +### Features + +* give these objects a name ([60abaea](https://github.com/npm/hosted-git-info/commit/60abaea)) + + + + +## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07) + + +### Bug Fixes + +* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d)) +* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35) + + + + +# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06) + + +### Bug Fixes + +* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34) +* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1)) + + +### Features + +* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32) + + + + +## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25) + +### Bug Fixes + +* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62)) +* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9)) + + + + +# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07) + + +### Bug Fixes + +* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55)) +* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b)) + + +### Features + +* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb)) diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE new file mode 100644 index 0000000..4505576 --- /dev/null +++ b/node_modules/hosted-git-info/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md new file mode 100644 index 0000000..7b723f6 --- /dev/null +++ b/node_modules/hosted-git-info/README.md @@ -0,0 +1,133 @@ +# hosted-git-info + +This will let you identify and transform various git hosts URLs between +protocols. It also can tell you what the URL is for the raw path for +particular file for direct access without git. + +## Example + +```javascript +var hostedGitInfo = require("hosted-git-info") +var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts) +/* info looks like: +{ + type: "github", + domain: "github.com", + user: "npm", + project: "hosted-git-info" +} +*/ +``` + +If the URL can't be matched with a git host, `null` will be returned. We +can match git, ssh and https urls. Additionally, we can match ssh connect +strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, +`github:npm/hosted-git-info`). Github specifically, is detected in the case +of a third, unprefixed, form: `npm/hosted-git-info`. + +If it does match, the returned object has properties of: + +* info.type -- The short name of the service +* info.domain -- The domain for git protocol use +* info.user -- The name of the user/org on the git host +* info.project -- The name of the project on the git host + +## Version Contract + +The major version will be bumped any time… + +* The constructor stops accepting URLs that it previously accepted. +* A method is removed. +* A method can no longer accept the number and type of arguments it previously accepted. +* A method can return a different type than it currently returns. + +Implications: + +* I do not consider the specific format of the urls returned from, say + `.https()` to be a part of the contract. The contract is that it will + return a string that can be used to fetch the repo via HTTPS. But what + that string looks like, specifically, can change. +* Dropping support for a hosted git provider would constitute a breaking + change. + +## Usage + +### var info = hostedGitInfo.fromUrl(gitSpecifier[, options]) + +* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one. +* *options* is an optional object. It can have the following properties: + * *noCommittish* — If true then committishes won't be included in generated URLs. + * *noGitPlus* — If true then `git+` won't be prefixed on URLs. + +## Methods + +All of the methods take the same options as the `fromUrl` factory. Options +provided to a method override those provided to the constructor. + +* info.file(path, opts) + +Given the path of a file relative to the repository, returns a URL for +directly fetching it from the githost. If no committish was set then +`master` will be used as the default. + +For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` +would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` + +* info.shortcut(opts) + +eg, `github:npm/hosted-git-info` + +* info.browse(path, fragment, opts) + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts` + +* info.bugs(opts) + +eg, `https://github.com/npm/hosted-git-info/issues` + +* info.docs(opts) + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` + +* info.https(opts) + +eg, `git+https://github.com/npm/hosted-git-info.git` + +* info.sshurl(opts) + +eg, `git+ssh://git@github.com/npm/hosted-git-info.git` + +* info.ssh(opts) + +eg, `git@github.com:npm/hosted-git-info.git` + +* info.path(opts) + +eg, `npm/hosted-git-info` + +* info.tarball(opts) + +eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz` + +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString(opts) + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + +## Supported hosts + +Currently this supports Github, Bitbucket and Gitlab. Pull requests for +additional hosts welcome. diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js new file mode 100644 index 0000000..8147e33 --- /dev/null +++ b/node_modules/hosted-git-info/git-host-info.js @@ -0,0 +1,79 @@ +'use strict' + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', + 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', + 'hashformat': function (fragment) { + return 'file-' + formatHashFragment(fragment) + } + } +} + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/, + 'hashformat': formatHashFragment +} + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key] + }) + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') + }).join('|') + '):$') +}) + +function formatHashFragment (fragment) { + return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') +} diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js new file mode 100644 index 0000000..9616fba --- /dev/null +++ b/node_modules/hosted-git-info/git-host.js @@ -0,0 +1,156 @@ +'use strict' +var gitHosts = require('./git-host-info.js') +/* eslint-disable node/no-deprecated-api */ + +// copy-pasta util._extend from node's source, to avoid pulling +// the whole util module into peoples' webpack bundles. +/* istanbul ignore next */ +var extend = Object.assign || function _extend (target, source) { + // Don't do anything if source isn't an object + if (source === null || typeof source !== 'object') return target + + var keys = Object.keys(source) + var i = keys.length + while (i--) { + target[keys[i]] = source[keys[i]] + } + return target +} + +module.exports = GitHost +function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) { + var gitHostInfo = this + gitHostInfo.type = type + Object.keys(gitHosts[type]).forEach(function (key) { + gitHostInfo[key] = gitHosts[type][key] + }) + gitHostInfo.user = user + gitHostInfo.auth = auth + gitHostInfo.project = project + gitHostInfo.committish = committish + gitHostInfo.default = defaultRepresentation + gitHostInfo.opts = opts || {} +} + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts) + vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' + opts = extend(extend({}, this.opts), opts) + var self = this + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key] + }) + var rawAuth = vars.auth + var rawcommittish = vars.committish + var rawFragment = vars.fragment + var rawPath = vars.path + var rawProject = vars.project + Object.keys(vars).forEach(function (key) { + var value = vars[key] + if ((key === 'path' || key === 'project') && typeof value === 'string') { + vars[key] = value.split('/').map(function (pathComponent) { + return encodeURIComponent(pathComponent) + }).join('/') + } else { + vars[key] = encodeURIComponent(value) + } + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' + vars.fragment = vars.fragment ? vars.fragment : '' + vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' + vars['/path'] = vars.path ? '/' + vars.path : '' + vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/') + if (opts.noCommittish) { + vars['#committish'] = '' + vars['/tree/committish'] = '' + vars['/committish'] = '' + vars.committish = '' + } else { + vars['#committish'] = rawcommittish ? '#' + rawcommittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : '' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' + } + var res = template + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) + }) + if (opts.noGitPlus) { + return res.replace(/^git[+]/, '') + } else { + return res + } +} + +GitHost.prototype.ssh = function (opts) { + return this._fill(this.sshtemplate, opts) +} + +GitHost.prototype.sshurl = function (opts) { + return this._fill(this.sshurltemplate, opts) +} + +GitHost.prototype.browse = function (P, F, opts) { + if (typeof P === 'string') { + if (typeof F !== 'string') { + opts = F + F = null + } + return this._fill(this.browsefiletemplate, extend({ + fragment: F, + path: P + }, opts)) + } else { + return this._fill(this.browsetemplate, P) + } +} + +GitHost.prototype.docs = function (opts) { + return this._fill(this.docstemplate, opts) +} + +GitHost.prototype.bugs = function (opts) { + return this._fill(this.bugstemplate, opts) +} + +GitHost.prototype.https = function (opts) { + return this._fill(this.httpstemplate, opts) +} + +GitHost.prototype.git = function (opts) { + return this._fill(this.gittemplate, opts) +} + +GitHost.prototype.shortcut = function (opts) { + return this._fill(this.shortcuttemplate, opts) +} + +GitHost.prototype.path = function (opts) { + return this._fill(this.pathtemplate, opts) +} + +GitHost.prototype.tarball = function (opts_) { + var opts = extend({}, opts_, { noCommittish: false }) + return this._fill(this.tarballtemplate, opts) +} + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ path: P }, opts)) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function (opts) { + if (this.default && typeof this[this.default] === 'function') return this[this.default](opts) + return this.sshurl(opts) +} diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js new file mode 100644 index 0000000..0885772 --- /dev/null +++ b/node_modules/hosted-git-info/index.js @@ -0,0 +1,148 @@ +'use strict' +var url = require('url') +var gitHosts = require('./git-host-info.js') +var GitHost = module.exports = require('./git-host.js') + +var protocolToRepresentationMap = { + 'git+ssh:': 'sshurl', + 'git+https:': 'https', + 'ssh:': 'sshurl', + 'git:': 'git' +} + +function protocolToRepresentation (protocol) { + return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +var cache = {} + +module.exports.fromUrl = function (giturl, opts) { + if (typeof giturl !== 'string') return + var key = giturl + JSON.stringify(opts || {}) + + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) + } + + return cache[key] +} + +function fromUrl (giturl, opts) { + if (giturl == null || giturl === '') return + var url = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ) + var parsed = parseGitUrl(url) + var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + try { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = parsed.auth + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var user = null + var project = null + var defaultRepresentation = null + if (shortcutMatch && shortcutMatch[1] === gitHostName) { + user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) + project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, '')) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return + if (!gitHostInfo.protocols_re.test(parsed.protocol)) return + if (!parsed.path) return + var pathmatch = gitHostInfo.pathmatch + var matched = parsed.path.match(pathmatch) + if (!matched) return + /* istanbul ignore else */ + if (matched[1] !== null && matched[1] !== undefined) { + user = decodeURIComponent(matched[1].replace(/^:/, '')) + } + project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + /* istanbul ignore else */ + if (ex instanceof URIError) { + } else throw ex + } + }).filter(function (gitHostInfo) { return gitHostInfo }) + if (matches.length !== 1) return + return matches[0] +} + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl) + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) { + var legacy = url.parse(giturl) + // If we don't have url.URL, then sorry, this is just not fixable. + // This affects Node <= 6.12. + if (legacy.auth && typeof url.URL === 'function') { + // git urls can be in the form of scp-style/ssh-connect strings, like + // git+ssh://user@host.com:some/path, which the legacy url parser + // supports, but WhatWG url.URL class does not. However, the legacy + // parser de-urlencodes the username and password, so something like + // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes + // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. + // Pull off just the auth and host, so we dont' get the confusing + // scp-style URL, then pass that to the WhatWG parser to get the + // auth properly escaped. + var authmatch = giturl.match(/[^@]+@[^:/]+/) + /* istanbul ignore else - this should be impossible */ + if (authmatch) { + var whatwg = new url.URL(authmatch[0]) + legacy.auth = whatwg.username || '' + if (whatwg.password) legacy.auth += ':' + whatwg.password + } + } + return legacy + } + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json new file mode 100644 index 0000000..8cc554c --- /dev/null +++ b/node_modules/hosted-git-info/package.json @@ -0,0 +1,40 @@ +{ + "name": "hosted-git-info", + "version": "2.8.9", + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "author": "Rebecca Turner (http://re-becca.org)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/hosted-git-info/issues" + }, + "homepage": "https://github.com/npm/hosted-git-info", + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", + "posttest": "standard", + "release": "standard-version -s", + "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", + "test": "tap -J --coverage=90 --no-esm test/*.js" + }, + "devDependencies": { + "standard": "^11.0.1", + "standard-version": "^4.4.0", + "tap": "^12.7.0" + }, + "files": [ + "index.js", + "git-host.js", + "git-host-info.js" + ] +} diff --git a/node_modules/immutable/LICENSE b/node_modules/immutable/LICENSE new file mode 100644 index 0000000..1e3c4f3 --- /dev/null +++ b/node_modules/immutable/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-present, Lee Byron 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/node_modules/immutable/README.md b/node_modules/immutable/README.md new file mode 100644 index 0000000..678257f --- /dev/null +++ b/node_modules/immutable/README.md @@ -0,0 +1,717 @@ +# Immutable collections for JavaScript + +[![Build Status](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml?query=branch%3Amain) [Chat on slack](https://immutable-js.slack.com) + +[Read the docs](https://immutable-js.com) and eat your vegetables. + +Docs are automatically generated from [README.md][] and [immutable.d.ts][]. +Please contribute! Also, don't miss the [wiki][] which contains articles on +additional specific topics. Can't find something? Open an [issue][]. + +**Table of contents:** + +- [Introduction](#introduction) +- [Getting started](#getting-started) +- [The case for Immutability](#the-case-for-immutability) +- [JavaScript-first API](#javaScript-first-api) +- [Nested Structures](#nested-structures) +- [Equality treats Collections as Values](#equality-treats-collections-as-values) +- [Batching Mutations](#batching-mutations) +- [Lazy Seq](#lazy-seq) +- [Additional Tools and Resources](#additional-tools-and-resources) +- [Contributing](#contributing) + +## Introduction + +[Immutable][] data cannot be changed once created, leading to much simpler +application development, no defensive copying, and enabling advanced memoization +and change detection techniques with simple logic. [Persistent][] data presents +a mutative API which does not update the data in-place, but instead always +yields new updated data. + +Immutable.js provides many Persistent Immutable data structures including: +`List`, `Stack`, `Map`, `OrderedMap`, `Set`, `OrderedSet` and `Record`. + +These data structures are highly efficient on modern JavaScript VMs by using +structural sharing via [hash maps tries][] and [vector tries][] as popularized +by Clojure and Scala, minimizing the need to copy or cache data. + +Immutable.js also provides a lazy `Seq`, allowing efficient +chaining of collection methods like `map` and `filter` without creating +intermediate representations. Create some `Seq` with `Range` and `Repeat`. + +Want to hear more? Watch the presentation about Immutable.js: + +[![Immutable Data and React](website/public/Immutable-Data-and-React-YouTube.png)](https://youtu.be/I7IdS-PbEgI) + +[README.md]: https://github.com/immutable-js/immutable-js/blob/main/README.md +[immutable.d.ts]: https://github.com/immutable-js/immutable-js/blob/main/type-definitions/immutable.d.ts +[wiki]: https://github.com/immutable-js/immutable-js/wiki +[issue]: https://github.com/immutable-js/immutable-js/issues +[Persistent]: https://en.wikipedia.org/wiki/Persistent_data_structure +[Immutable]: https://en.wikipedia.org/wiki/Immutable_object +[hash maps tries]: https://en.wikipedia.org/wiki/Hash_array_mapped_trie +[vector tries]: https://hypirion.com/musings/understanding-persistent-vector-pt-1 + +## Getting started + +Install `immutable` using npm. + +```shell +npm install immutable +``` + +Or install using yarn. + +```shell +yarn add immutable +``` + +Then require it into any module. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = map1.set('b', 50); +map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50 +``` + +### Browser + +Immutable.js has no dependencies, which makes it predictable to include in a Browser. + +It's highly recommended to use a module bundler like [webpack](https://webpack.github.io/), +[rollup](https://rollupjs.org/), or +[browserify](https://browserify.org/). The `immutable` npm module works +without any additional consideration. All examples throughout the documentation +will assume use of this kind of tool. + +Alternatively, Immutable.js may be directly included as a script tag. Download +or link to a CDN such as [CDNJS](https://cdnjs.com/libraries/immutable) +or [jsDelivr](https://www.jsdelivr.com/package/npm/immutable). + +Use a script tag to directly add `Immutable` to the global scope: + +```html + + +``` + +Or use an AMD-style loader (such as [RequireJS](https://requirejs.org/)): + +```js +require(['./immutable.min.js'], function (Immutable) { + var map1 = Immutable.Map({ a: 1, b: 2, c: 3 }); + var map2 = map1.set('b', 50); + map1.get('b'); // 2 + map2.get('b'); // 50 +}); +``` + +### Flow & TypeScript + +Use these Immutable collections and sequences as you would use native +collections in your [Flowtype](https://flowtype.org/) or [TypeScript](https://typescriptlang.org) programs while still taking +advantage of type generics, error detection, and auto-complete in your IDE. + +Installing `immutable` via npm brings with it type definitions for Flow (v0.55.0 or higher) +and TypeScript (v2.1.0 or higher), so you shouldn't need to do anything at all! + +#### Using TypeScript with Immutable.js v4 + +Immutable.js type definitions embrace ES2015. While Immutable.js itself supports +legacy browsers and environments, its type definitions require TypeScript's 2015 +lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your +`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the +`tsc` command. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = map1.set('b', 50); +map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50 +``` + +#### Using TypeScript with Immutable.js v3 and earlier: + +Previous versions of Immutable.js include a reference file which you can include +via relative path to the type definitions at the top of your file. + +```js +/// +import Immutable from 'immutable'; +var map1: Immutable.Map; +map1 = Immutable.Map({ a: 1, b: 2, c: 3 }); +var map2 = map1.set('b', 50); +map1.get('b'); // 2 +map2.get('b'); // 50 +``` + +## The case for Immutability + +Much of what makes application development difficult is tracking mutation and +maintaining state. Developing with immutable data encourages you to think +differently about how data flows through your application. + +Subscribing to data events throughout your application creates a huge overhead of +book-keeping which can hurt performance, sometimes dramatically, and creates +opportunities for areas of your application to get out of sync with each other +due to easy to make programmer error. Since immutable data never changes, +subscribing to changes throughout the model is a dead-end and new data can only +ever be passed from above. + +This model of data flow aligns well with the architecture of [React][] +and especially well with an application designed using the ideas of [Flux][]. + +When data is passed from above rather than being subscribed to, and you're only +interested in doing work when something has changed, you can use equality. + +Immutable collections should be treated as _values_ rather than _objects_. While +objects represent some thing which could change over time, a value represents +the state of that thing at a particular instance of time. This principle is most +important to understanding the appropriate use of immutable data. In order to +treat Immutable.js collections as values, it's important to use the +`Immutable.is()` function or `.equals()` method to determine _value equality_ +instead of the `===` operator which determines object _reference identity_. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +map1.equals(map2); // true +map1 === map2; // false +``` + +Note: As a performance optimization Immutable.js attempts to return the existing +collection when an operation would result in an identical collection, allowing +for using `===` reference equality to determine if something definitely has not +changed. This can be extremely useful when used within a memoization function +which would prefer to re-run the function if a deeper equality check could +potentially be more costly. The `===` equality check is also used internally by +`Immutable.is` and `.equals()` as a performance optimization. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = map1.set('b', 2); // Set to same value +map1 === map2; // true +``` + +If an object is immutable, it can be "copied" simply by making another reference +to it instead of copying the entire object. Because a reference is much smaller +than the object itself, this results in memory savings and a potential boost in +execution speed for programs which rely on copies (such as an undo-stack). + + + +```js +const { Map } = require('immutable'); +const map = Map({ a: 1, b: 2, c: 3 }); +const mapCopy = map; // Look, "copies" are free! +``` + +[React]: https://reactjs.org/ +[Flux]: https://facebook.github.io/flux/docs/in-depth-overview/ + + +## JavaScript-first API + +While Immutable.js is inspired by Clojure, Scala, Haskell and other functional +programming environments, it's designed to bring these powerful concepts to +JavaScript, and therefore has an Object-Oriented API that closely mirrors that +of [ES2015][] [Array][], [Map][], and [Set][]. + +[es2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla +[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array +[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map +[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set + +The difference for the immutable collections is that methods which would mutate +the collection, like `push`, `set`, `unshift` or `splice`, instead return a new +immutable collection. Methods which return new arrays, like `slice` or `concat`, +instead return new immutable collections. + + + +```js +const { List } = require('immutable'); +const list1 = List([1, 2]); +const list2 = list1.push(3, 4, 5); +const list3 = list2.unshift(0); +const list4 = list1.concat(list2, list3); +assert.equal(list1.size, 2); +assert.equal(list2.size, 5); +assert.equal(list3.size, 6); +assert.equal(list4.size, 13); +assert.equal(list4.get(0), 1); +``` + +Almost all of the methods on [Array][] will be found in similar form on +`Immutable.List`, those of [Map][] found on `Immutable.Map`, and those of [Set][] +found on `Immutable.Set`, including collection operations like `forEach()` +and `map()`. + + + +```js +const { Map } = require('immutable'); +const alpha = Map({ a: 1, b: 2, c: 3, d: 4 }); +alpha.map((v, k) => k.toUpperCase()).join(); +// 'A,B,C,D' +``` + +### Convert from raw JavaScript objects and arrays. + +Designed to inter-operate with your existing JavaScript, Immutable.js +accepts plain JavaScript Arrays and Objects anywhere a method expects a +`Collection`. + + + +```js +const { Map, List } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3, d: 4 }); +const map2 = Map({ c: 10, a: 20, t: 30 }); +const obj = { d: 100, o: 200, g: 300 }; +const map3 = map1.merge(map2, obj); +// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 } +const list1 = List([1, 2, 3]); +const list2 = List([4, 5, 6]); +const array = [7, 8, 9]; +const list3 = list1.concat(list2, array); +// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +``` + +This is possible because Immutable.js can treat any JavaScript Array or Object +as a Collection. You can take advantage of this in order to get sophisticated +collection methods on JavaScript Objects, which otherwise have a very sparse +native API. Because Seq evaluates lazily and does not cache intermediate +results, these operations can be extremely efficient. + + + +```js +const { Seq } = require('immutable'); +const myObject = { a: 1, b: 2, c: 3 }; +Seq(myObject) + .map(x => x * x) + .toObject(); +// { a: 1, b: 4, c: 9 } +``` + +Keep in mind, when using JS objects to construct Immutable Maps, that +JavaScript Object properties are always strings, even if written in a quote-less +shorthand, while Immutable Maps accept keys of any type. + + + +```js +const { fromJS } = require('immutable'); + +const obj = { 1: 'one' }; +console.log(Object.keys(obj)); // [ "1" ] +console.log(obj['1'], obj[1]); // "one", "one" + +const map = fromJS(obj); +console.log(map.get('1'), map.get(1)); // "one", undefined +``` + +Property access for JavaScript Objects first converts the key to a string, but +since Immutable Map keys can be of any type the argument to `get()` is +not altered. + +### Converts back to raw JavaScript objects. + +All Immutable.js Collections can be converted to plain JavaScript Arrays and +Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`. +All Immutable Collections also implement `toJSON()` allowing them to be passed +to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of +nested objects. + + + +```js +const { Map, List } = require('immutable'); +const deep = Map({ a: 1, b: 2, c: List([3, 4, 5]) }); +console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] } +console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ] +console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] } +JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}' +``` + +### Embraces ES2015 + +Immutable.js supports all JavaScript environments, including legacy +browsers (even IE11). However it also takes advantage of features added to +JavaScript in [ES2015][], the latest standard version of JavaScript, including +[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired +by the native [Map][] and [Set][] collections added to ES2015. + +All examples in the Documentation are presented in ES2015. To run in all +browsers, they need to be translated to ES5. + +```js +// ES2015 +const mapped = foo.map(x => x * x); +// ES5 +var mapped = foo.map(function (x) { + return x * x; +}); +``` + +All Immutable.js collections are [Iterable][iterators], which allows them to be +used anywhere an Iterable is expected, such as when spreading into an Array. + + + +```js +const { List } = require('immutable'); +const aList = List([1, 2, 3]); +const anArray = [0, ...aList, 4, 5]; // [ 0, 1, 2, 3, 4, 5 ] +``` + +Note: A Collection is always iterated in the same order, however that order may +not always be well defined, as is the case for the `Map` and `Set`. + +[Iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol +[Arrow Functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions +[Classes]: https://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes +[Modules]: https://www.2ality.com/2014/09/es6-modules-final.html + + +## Nested Structures + +The collections in Immutable.js are intended to be nested, allowing for deep +trees of data, similar to JSON. + + + +```js +const { fromJS } = require('immutable'); +const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } } +``` + +A few power-tools allow for reading and operating on nested data. The +most useful are `mergeDeep`, `getIn`, `setIn`, and `updateIn`, found on `List`, +`Map` and `OrderedMap`. + + + +```js +const { fromJS } = require('immutable'); +const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); + +const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } }); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } } + +console.log(nested2.getIn(['a', 'b', 'd'])); // 6 + +const nested3 = nested2.updateIn(['a', 'b', 'd'], value => value + 1); +console.log(nested3); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } } + +const nested4 = nested3.updateIn(['a', 'b', 'c'], list => list.push(6)); +// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } } +``` + +## Equality treats Collections as Values + +Immutable.js collections are treated as pure data _values_. Two immutable +collections are considered _value equal_ (via `.equals()` or `is()`) if they +represent the same collection of values. This differs from JavaScript's typical +_reference equal_ (via `===` or `==`) for Objects and Arrays which only +determines if two variables represent references to the same object instance. + +Consider the example below where two identical `Map` instances are not +_reference equal_ but are _value equal_. + + + +```js +// First consider: +const obj1 = { a: 1, b: 2, c: 3 }; +const obj2 = { a: 1, b: 2, c: 3 }; +obj1 !== obj2; // two different instances are always not equal with === + +const { Map, is } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +map1 !== map2; // two different instances are not reference-equal +map1.equals(map2); // but are value-equal if they have the same values +is(map1, map2); // alternatively can use the is() function +``` + +Value equality allows Immutable.js collections to be used as keys in Maps or +values in Sets, and retrieved with different but equivalent collections: + + + +```js +const { Map, Set } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +const set = Set().add(map1); +set.has(map2); // true because these are value-equal +``` + +Note: `is()` uses the same measure of equality as [Object.is][] for scalar +strings and numbers, but uses value equality for Immutable collections, +determining if both are immutable and all keys and values are equal +using the same measure of equality. + +[object.is]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + +#### Performance tradeoffs + +While value equality is useful in many circumstances, it has different +performance characteristics than reference equality. Understanding these +tradeoffs may help you decide which to use in each case, especially when used +to memoize some operation. + +When comparing two collections, value equality may require considering every +item in each collection, on an `O(N)` time complexity. For large collections of +values, this could become a costly operation. Though if the two are not equal +and hardly similar, the inequality is determined very quickly. In contrast, when +comparing two collections with reference equality, only the initial references +to memory need to be compared which is not based on the size of the collections, +which has an `O(1)` time complexity. Checking reference equality is always very +fast, however just because two collections are not reference-equal does not rule +out the possibility that they may be value-equal. + +#### Return self on no-op optimization + +When possible, Immutable.js avoids creating new objects for updates where no +change in _value_ occurred, to allow for efficient _reference equality_ checking +to quickly determine if no change occurred. + + + +```js +const { Map } = require('immutable'); +const originalMap = Map({ a: 1, b: 2, c: 3 }); +const updatedMap = originalMap.set('b', 2); +updatedMap === originalMap; // No-op .set() returned the original reference. +``` + +However updates which do result in a change will return a new reference. Each +of these operations occur independently, so two similar updates will not return +the same reference: + + + +```js +const { Map } = require('immutable'); +const originalMap = Map({ a: 1, b: 2, c: 3 }); +const updatedMap = originalMap.set('b', 1000); +// New instance, leaving the original immutable. +updatedMap !== originalMap; +const anotherUpdatedMap = originalMap.set('b', 1000); +// Despite both the results of the same operation, each created a new reference. +anotherUpdatedMap !== updatedMap; +// However the two are value equal. +anotherUpdatedMap.equals(updatedMap); +``` + +## Batching Mutations + +> If a tree falls in the woods, does it make a sound? +> +> If a pure function mutates some local data in order to produce an immutable +> return value, is that ok? +> +> — Rich Hickey, Clojure + +Applying a mutation to create a new immutable object results in some overhead, +which can add up to a minor performance penalty. If you need to apply a series +of mutations locally before returning, Immutable.js gives you the ability to +create a temporary mutable (transient) copy of a collection and apply a batch of +mutations in a performant manner by using `withMutations`. In fact, this is +exactly how Immutable.js applies complex mutations itself. + +As an example, building `list2` results in the creation of 1, not 3, new +immutable Lists. + + + +```js +const { List } = require('immutable'); +const list1 = List([1, 2, 3]); +const list2 = list1.withMutations(function (list) { + list.push(4).push(5).push(6); +}); +assert.equal(list1.size, 3); +assert.equal(list2.size, 6); +``` + +Note: Immutable.js also provides `asMutable` and `asImmutable`, but only +encourages their use when `withMutations` will not suffice. Use caution to not +return a mutable copy, which could result in undesired behavior. + +_Important!_: Only a select few methods can be used in `withMutations` including +`set`, `push` and `pop`. These methods can be applied directly against a +persistent data-structure where other methods like `map`, `filter`, `sort`, +and `splice` will always return new immutable data-structures and never mutate +a mutable collection. + +## Lazy Seq + +`Seq` describes a lazy operation, allowing them to efficiently chain +use of all the higher-order collection methods (such as `map` and `filter`) +by not creating intermediate collections. + +**Seq is immutable** — Once a Seq is created, it cannot be +changed, appended to, rearranged or otherwise modified. Instead, any mutative +method called on a `Seq` will return a new `Seq`. + +**Seq is lazy** — `Seq` does as little work as necessary to respond to any +method call. Values are often created during iteration, including implicit +iteration when reducing or converting to a concrete data structure such as +a `List` or JavaScript `Array`. + +For example, the following performs no work, because the resulting +`Seq`'s values are never iterated: + +```js +const { Seq } = require('immutable'); +const oddSquares = Seq([1, 2, 3, 4, 5, 6, 7, 8]) + .filter(x => x % 2 !== 0) + .map(x => x * x); +``` + +Once the `Seq` is used, it performs only the work necessary. In this +example, no intermediate arrays are ever created, filter is called three +times, and map is only called once: + +```js +oddSquares.get(1); // 9 +``` + +Any collection can be converted to a lazy Seq with `Seq()`. + + + +```js +const { Map, Seq } = require('immutable'); +const map = Map({ a: 1, b: 2, c: 3 }); +const lazySeq = Seq(map); +``` + +`Seq` allows for the efficient chaining of operations, allowing for the +expression of logic that can otherwise be very tedious: + +```js +lazySeq + .flip() + .map(key => key.toUpperCase()) + .flip(); +// Seq { A: 1, B: 2, C: 3 } +``` + +As well as expressing logic that would otherwise seem memory or time +limited, for example `Range` is a special kind of Lazy sequence. + + + +```js +const { Range } = require('immutable'); +Range(1, Infinity) + .skip(1000) + .map(n => -n) + .filter(n => n % 2 === 0) + .take(2) + .reduce((r, n) => r * n, 1); +// 1006008 +``` + +## Additional Tools and Resources + +- [Atom-store](https://github.com/jameshopkins/atom-store/) + - A Clojure-inspired atom implementation in Javascript with configurability + for external persistance. + +- [Chai Immutable](https://github.com/astorije/chai-immutable) + - If you are using the [Chai Assertion Library](https://chaijs.com/), this + provides a set of assertions to use against Immutable.js collections. + +- [Fantasy-land](https://github.com/fantasyland/fantasy-land) + - Specification for interoperability of common algebraic structures in JavaScript. + +- [Immutagen](https://github.com/pelotom/immutagen) + - A library for simulating immutable generators in JavaScript. + +- [Immutable-cursor](https://github.com/redbadger/immutable-cursor) + - Immutable cursors incorporating the Immutable.js interface over + Clojure-inspired atom. + +- [Immutable-ext](https://github.com/DrBoolean/immutable-ext) + - Fantasyland extensions for immutablejs + +- [Immutable-js-tools](https://github.com/madeinfree/immutable-js-tools) + - Util tools for immutable.js + +- [Immutable-Redux](https://github.com/gajus/redux-immutable) + - redux-immutable is used to create an equivalent function of Redux + combineReducers that works with Immutable.js state. + +- [Immutable-Treeutils](https://github.com/lukasbuenger/immutable-treeutils) + - Functional tree traversal helpers for ImmutableJS data structures. + +- [Irecord](https://github.com/ericelliott/irecord) + - An immutable store that exposes an RxJS observable. Great for React. + +- [Mudash](https://github.com/brianneisler/mudash) + - Lodash wrapper providing Immutable.JS support. + +- [React-Immutable-PropTypes](https://github.com/HurricaneJames/react-immutable-proptypes) + - PropType validators that work with Immutable.js. + +- [Redux-Immutablejs](https://github.com/indexiatech/redux-immutablejs) + - Redux Immutable facilities. + +- [Rxstate](https://github.com/yamalight/rxstate) + - Simple opinionated state management library based on RxJS and Immutable.js. + +- [Transit-Immutable-js](https://github.com/glenjamin/transit-immutable-js) + - Transit serialisation for Immutable.js. + - See also: [Transit-js](https://github.com/cognitect/transit-js) + +Have an additional tool designed to work with Immutable.js? +Submit a PR to add it to this list in alphabetical order. + +## Contributing + +Use [Github issues](https://github.com/immutable-js/immutable-js/issues) for requests. + +We actively welcome pull requests, learn how to [contribute](https://github.com/immutable-js/immutable-js/blob/main/.github/CONTRIBUTING.md). + +Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). + +### Changelog + +Changes are tracked as [Github releases](https://github.com/immutable-js/immutable-js/releases). + +### License + +Immutable.js is [MIT-licensed](./LICENSE). + +### Thanks + +[Phil Bagwell](https://www.youtube.com/watch?v=K2NYwP90bNs), for his inspiration +and research in persistent data structures. + +[Hugh Jackson](https://github.com/hughfdjackson/), for providing the npm package +name. If you're looking for his unsupported package, see [this repository](https://github.com/hughfdjackson/immutable). diff --git a/node_modules/immutable/dist/immutable.d.ts b/node_modules/immutable/dist/immutable.d.ts new file mode 100644 index 0000000..a8c62e1 --- /dev/null +++ b/node_modules/immutable/dist/immutable.d.ts @@ -0,0 +1,5636 @@ +/** + * Immutable data encourages pure functions (data-in, data-out) and lends itself + * to much simpler application development and enabling techniques from + * functional programming such as lazy evaluation. + * + * While designed to bring these powerful functional concepts to JavaScript, it + * presents an Object-Oriented API familiar to Javascript engineers and closely + * mirroring that of Array, Map, and Set. It is easy and efficient to convert to + * and from plain Javascript types. + * + * ## How to read these docs + * + * In order to better explain what kinds of values the Immutable.js API expects + * and produces, this documentation is presented in a statically typed dialect of + * JavaScript (like [Flow][] or [TypeScript][]). You *don't need* to use these + * type checking tools in order to use Immutable.js, however becoming familiar + * with their syntax will help you get a deeper understanding of this API. + * + * **A few examples and how to read them.** + * + * All methods describe the kinds of data they accept and the kinds of data + * they return. For example a function which accepts two numbers and returns + * a number would look like this: + * + * ```js + * sum(first: number, second: number): number + * ``` + * + * Sometimes, methods can accept different kinds of data or return different + * kinds of data, and this is described with a *type variable*, which is + * typically in all-caps. For example, a function which always returns the same + * kind of data it was provided would look like this: + * + * ```js + * identity(value: T): T + * ``` + * + * Type variables are defined with classes and referred to in methods. For + * example, a class that holds onto a value for you might look like this: + * + * ```js + * class Box { + * constructor(value: T) + * getValue(): T + * } + * ``` + * + * In order to manipulate Immutable data, methods that we're used to affecting + * a Collection instead return a new Collection of the same type. The type + * `this` refers to the same kind of class. For example, a List which returns + * new Lists when you `push` a value onto it might look like: + * + * ```js + * class List { + * push(value: T): this + * } + * ``` + * + * Many methods in Immutable.js accept values which implement the JavaScript + * [Iterable][] protocol, and might appear like `Iterable` for something + * which represents sequence of strings. Typically in JavaScript we use plain + * Arrays (`[]`) when an Iterable is expected, but also all of the Immutable.js + * collections are iterable themselves! + * + * For example, to get a value deep within a structure of data, we might use + * `getIn` which expects an `Iterable` path: + * + * ``` + * getIn(path: Iterable): unknown + * ``` + * + * To use this method, we could pass an array: `data.getIn([ "key", 2 ])`. + * + * + * Note: All examples are presented in the modern [ES2015][] version of + * JavaScript. Use tools like Babel to support older browsers. + * + * For example: + * + * ```js + * // ES2015 + * const mappedFoo = foo.map(x => x * x); + * // ES5 + * var mappedFoo = foo.map(function (x) { return x * x; }); + * ``` + * + * [ES2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla + * [TypeScript]: https://www.typescriptlang.org/ + * [Flow]: https://flowtype.org/ + * [Iterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols + */ + +declare namespace Immutable { + /** + * Lists are ordered indexed dense collections, much like a JavaScript + * Array. + * + * Lists are immutable and fully persistent with O(log32 N) gets and sets, + * and O(1) push and pop. + * + * Lists implement Deque, with efficient addition and removal from both the + * end (`push`, `pop`) and beginning (`unshift`, `shift`). + * + * Unlike a JavaScript Array, there is no distinction between an + * "unset" index and an index set to `undefined`. `List#forEach` visits all + * indices from 0 to size, regardless of whether they were explicitly defined. + */ + namespace List { + /** + * True if the provided value is a List + * + * + * ```js + * const { List } = require('immutable'); + * List.isList([]); // false + * List.isList(List()); // true + * ``` + */ + function isList(maybeList: unknown): maybeList is List; + + /** + * Creates a new List containing `values`. + * + * + * ```js + * const { List } = require('immutable'); + * List.of(1, 2, 3, 4) + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: Values are not altered or converted in any way. + * + * + * ```js + * const { List } = require('immutable'); + * List.of({x:1}, 2, [3], 4) + * // List [ { x: 1 }, 2, [ 3 ], 4 ] + * ``` + */ + function of(...values: Array): List; + } + + /** + * Create a new immutable List containing the values of the provided + * collection-like. + * + * Note: `List` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * + * ```js + * const { List, Set } = require('immutable') + * + * const emptyList = List() + * // List [] + * + * const plainArray = [ 1, 2, 3, 4 ] + * const listFromPlainArray = List(plainArray) + * // List [ 1, 2, 3, 4 ] + * + * const plainSet = Set([ 1, 2, 3, 4 ]) + * const listFromPlainSet = List(plainSet) + * // List [ 1, 2, 3, 4 ] + * + * const arrayIterator = plainArray[Symbol.iterator]() + * const listFromCollectionArray = List(arrayIterator) + * // List [ 1, 2, 3, 4 ] + * + * listFromPlainArray.equals(listFromCollectionArray) // true + * listFromPlainSet.equals(listFromCollectionArray) // true + * listFromPlainSet.equals(listFromPlainArray) // true + * ``` + */ + function List(collection?: Iterable | ArrayLike): List; + + interface List extends Collection.Indexed { + /** + * The number of items in this List. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new List which includes `value` at `index`. If `index` already + * exists in this List, it will be replaced. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.set(-1, "value")` sets the last item in the List. + * + * If `index` larger than `size`, the returned List's `size` will be large + * enough to include the `index`. + * + * + * ```js + * const originalList = List([ 0 ]); + * // List [ 0 ] + * originalList.set(1, 1); + * // List [ 0, 1 ] + * originalList.set(0, 'overwritten'); + * // List [ "overwritten" ] + * originalList.set(2, 2); + * // List [ 0, undefined, 2 ] + * + * List().set(50000, 'value').size; + * // 50001 + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(index: number, value: T): List; + + /** + * Returns a new List which excludes this `index` and with a size 1 less + * than this List. Values at indices above `index` are shifted down by 1 to + * fill the position. + * + * This is synonymous with `list.splice(index, 1)`. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.delete(-1)` deletes the last item in the List. + * + * Note: `delete` cannot be safely used in IE8 + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).delete(0); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Since `delete()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `delete` *cannot* be used in `withMutations`. + * + * @alias remove + */ + delete(index: number): List; + remove(index: number): List; + + /** + * Returns a new List with `value` at `index` with a size 1 more than this + * List. Values at indices above `index` are shifted over by 1. + * + * This is synonymous with `list.splice(index, 0, value)`. + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).insert(6, 5) + * // List [ 0, 1, 2, 3, 4, 5 ] + * ``` + * + * Since `insert()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `insert` *cannot* be used in `withMutations`. + */ + insert(index: number, value: T): List; + + /** + * Returns a new List with 0 size and no values in constant time. + * + * + * ```js + * List([ 1, 2, 3, 4 ]).clear() + * // List [] + * ``` + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): List; + + /** + * Returns a new List with the provided `values` appended, starting at this + * List's `size`. + * + * + * ```js + * List([ 1, 2, 3, 4 ]).push(5) + * // List [ 1, 2, 3, 4, 5 ] + * ``` + * + * Note: `push` can be used in `withMutations`. + */ + push(...values: Array): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the last index in this List. + * + * Note: this differs from `Array#pop` because it returns a new + * List rather than the removed value. Use `last()` to get the last value + * in this List. + * + * ```js + * List([ 1, 2, 3, 4 ]).pop() + * // List[ 1, 2, 3 ] + * ``` + * + * Note: `pop` can be used in `withMutations`. + */ + pop(): List; + + /** + * Returns a new List with the provided `values` prepended, shifting other + * values ahead to higher indices. + * + * + * ```js + * List([ 2, 3, 4]).unshift(1); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: `unshift` can be used in `withMutations`. + */ + unshift(...values: Array): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the first index in this List, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * List rather than the removed value. Use `first()` to get the first + * value in this List. + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).shift(); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: `shift` can be used in `withMutations`. + */ + shift(): List; + + /** + * Returns a new List with an updated value at `index` with the return + * value of calling `updater` with the existing value, or `notSetValue` if + * `index` was not set. If called with a single argument, `updater` is + * called with the List itself. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.update(-1)` updates the last item in the List. + * + * + * ```js + * const list = List([ 'a', 'b', 'c' ]) + * const result = list.update(2, val => val.toUpperCase()) + * // List [ "a", "b", "C" ] + * ``` + * + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum a List after mapping and filtering: + * + * + * ```js + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * List([ 1, 2, 3 ]) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + * + * Note: `update(index)` can be used in `withMutations`. + * + * @see `Map#update` + */ + update(index: number, notSetValue: T, updater: (value: T) => T): this; + update(index: number, updater: (value: T | undefined) => T): this; + update(updater: (value: this) => R): R; + + /** + * Returns a new List with size `size`. If `size` is less than this + * List's size, the new List will exclude values at the higher indices. + * If `size` is greater than this List's size, the new List will have + * undefined values for the newly available indices. + * + * When building a new List and the final size is known up front, `setSize` + * used in conjunction with `withMutations` may result in the more + * performant construction. + */ + setSize(size: number): List; + + // Deep persistent changes + + /** + * Returns a new List having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + * + * Index numbers are used as keys to determine the path to follow in + * the List. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, List([ 3, 4 ])]) + * list.setIn([3, 0], 999); + * // List [ 0, 1, 2, List [ 999, 4 ] ] + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and setIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, { plain: 'object' }]) + * list.setIn([3, 'plain'], 'value'); + * // List([ 0, 1, 2, { plain: 'value' }]) + * ``` + * + * Note: `setIn` can be used in `withMutations`. + */ + setIn(keyPath: Iterable, value: unknown): this; + + /** + * Returns a new List having removed the value at this `keyPath`. If any + * keys in `keyPath` do not exist, no change will occur. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, List([ 3, 4 ])]) + * list.deleteIn([3, 0]); + * // List [ 0, 1, 2, List [ 4 ] ] + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and removeIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, { plain: 'object' }]) + * list.removeIn([3, 'plain']); + * // List([ 0, 1, 2, {}]) + * ``` + * + * Note: `deleteIn` *cannot* be safely used in `withMutations`. + * + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + /** + * Note: `updateIn` can be used in `withMutations`. + * + * @see `Map#updateIn` + */ + updateIn( + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + + /** + * Note: `mergeIn` can be used in `withMutations`. + * + * @see `Map#mergeIn` + */ + mergeIn(keyPath: Iterable, ...collections: Array): this; + + /** + * Note: `mergeDeepIn` can be used in `withMutations`. + * + * @see `Map#mergeDeepIn` + */ + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + // Transient changes + + /** + * Note: Not all methods can be safely used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * allows being used in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * An alternative API for withMutations() + * + * Note: Not all methods can be safely used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * allows being used in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new List with other values or collections concatenated to this one. + * + * Note: `concat` can be used in `withMutations`. + * + * @alias merge + */ + concat(...valuesOrCollections: Array | C>): List; + merge(...collections: Array>): List; + + /** + * Returns a new List with values passed through a + * `mapper` function. + * + * + * ```js + * List([ 1, 2 ]).map(x => 10 * x) + * // List [ 10, 20 ] + * ``` + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): List; + + /** + * Flat-maps the List, returning a new List. + * + * Similar to `list.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): List; + + /** + * Returns a new List with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): List; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a List "zipped" with the provided collection. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): List<[T, U]>; + zip( + other: Collection, + other2: Collection + ): List<[T, U, V]>; + zip(...collections: Array>): List; + + /** + * Returns a List "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * + * ```js + * const a = List([ 1, 2 ]); + * const b = List([ 3, 4, 5 ]); + * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): List<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): List<[T, U, V]>; + zipAll(...collections: Array>): List; + + /** + * Returns a List "zipped" with the provided collections by using a + * custom `zipper` function. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // List [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): List; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): List; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): List; + } + + /** + * Immutable Map is an unordered Collection.Keyed of (key, value) pairs with + * `O(log32 N)` gets and `O(log32 N)` persistent sets. + * + * Iteration order of a Map is undefined, however is stable. Multiple + * iterations of the same Map will iterate in the same order. + * + * Map's keys can be of any type, and use `Immutable.is` to determine key + * equality. This allows the use of any value (including NaN) as a key. + * + * Because `Immutable.is` returns equality based on value semantics, and + * Immutable collections are treated as values, any Immutable collection may + * be used as a key. + * + * + * ```js + * const { Map, List } = require('immutable'); + * Map().set(List([ 1 ]), 'listofone').get(List([ 1 ])); + * // 'listofone' + * ``` + * + * Any JavaScript object may be used as a key, however strict identity is used + * to evaluate key equality. Two similar looking objects will represent two + * different keys. + * + * Implemented by a hash-array mapped trie. + */ + namespace Map { + /** + * True if the provided value is a Map + * + * + * ```js + * const { Map } = require('immutable') + * Map.isMap({}) // false + * Map.isMap(Map()) // true + * ``` + */ + function isMap(maybeMap: unknown): maybeMap is Map; + + /** + * Creates a new Map from alternating keys and values + * + * + * ```js + * const { Map } = require('immutable') + * Map.of( + * 'key', 'value', + * 'numerical value', 3, + * 0, 'numerical key' + * ) + * // Map { 0: "numerical key", "key": "value", "numerical value": 3 } + * ``` + * + * @deprecated Use Map([ [ 'k', 'v' ] ]) or Map({ k: 'v' }) + */ + function of(...keyValues: Array): Map; + } + + /** + * Creates a new Immutable Map. + * + * Created with the same key value pairs as the provided Collection.Keyed or + * JavaScript Object or expects a Collection of [K, V] tuple entries. + * + * Note: `Map` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ key: "value" }) + * Map([ [ "key", "value" ] ]) + * ``` + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * + * ```js + * let obj = { 1: "one" } + * Object.keys(obj) // [ "1" ] + * assert.equal(obj["1"], obj[1]) // "one" === "one" + * + * let map = Map(obj) + * assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + */ + function Map(collection?: Iterable<[K, V]>): Map; + function Map(obj: { [key: string]: V }): Map; + function Map(obj: { [P in K]?: V }): Map; + + interface Map extends Collection.Keyed { + /** + * The number of entries in this Map. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new Map also containing the new key, value pair. If an equivalent + * key already exists in this Map, it will be replaced. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map() + * const newerMap = originalMap.set('key', 'value') + * const newestMap = newerMap.set('key', 'newer value') + * + * originalMap + * // Map {} + * newerMap + * // Map { "key": "value" } + * newestMap + * // Map { "key": "newer value" } + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(key: K, value: V): this; + + /** + * Returns a new Map which excludes this `key`. + * + * Note: `delete` cannot be safely used in IE8, but is provided to mirror + * the ES6 collection API. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * key: 'value', + * otherKey: 'other value' + * }) + * // Map { "key": "value", "otherKey": "other value" } + * originalMap.delete('otherKey') + * // Map { "key": "value" } + * ``` + * + * Note: `delete` can be used in `withMutations`. + * + * @alias remove + */ + delete(key: K): this; + remove(key: K): this; + + /** + * Returns a new Map which excludes the provided `keys`. + * + * + * ```js + * const { Map } = require('immutable') + * const names = Map({ a: "Aaron", b: "Barry", c: "Connor" }) + * names.deleteAll([ 'a', 'c' ]) + * // Map { "b": "Barry" } + * ``` + * + * Note: `deleteAll` can be used in `withMutations`. + * + * @alias removeAll + */ + deleteAll(keys: Iterable): this; + removeAll(keys: Iterable): this; + + /** + * Returns a new Map containing no keys or values. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ key: 'value' }).clear() + * // Map {} + * ``` + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): this; + + /** + * Returns a new Map having updated the value at this `key` with the return + * value of calling `updater` with the existing value. + * + * Similar to: `map.set(key, updater(map.get(key)))`. + * + * + * ```js + * const { Map } = require('immutable') + * const aMap = Map({ key: 'value' }) + * const newMap = aMap.update('key', value => value + value) + * // Map { "key": "valuevalue" } + * ``` + * + * This is most commonly used to call methods on collections within a + * structure of data. For example, in order to `.push()` onto a nested `List`, + * `update` and `push` can be used together: + * + * + * ```js + * const aMap = Map({ nestedList: List([ 1, 2, 3 ]) }) + * const newMap = aMap.update('nestedList', list => list.push(4)) + * // Map { "nestedList": List [ 1, 2, 3, 4 ] } + * ``` + * + * When a `notSetValue` is provided, it is provided to the `updater` + * function when the value at the key does not exist in the Map. + * + * + * ```js + * const aMap = Map({ key: 'value' }) + * const newMap = aMap.update('noKey', 'no value', value => value + value) + * // Map { "key": "value", "noKey": "no valueno value" } + * ``` + * + * However, if the `updater` function returns the same value it was called + * with, then no change will occur. This is still true if `notSetValue` + * is provided. + * + * + * ```js + * const aMap = Map({ apples: 10 }) + * const newMap = aMap.update('oranges', 0, val => val) + * // Map { "apples": 10 } + * assert.strictEqual(newMap, map); + * ``` + * + * For code using ES2015 or later, using `notSetValue` is discourged in + * favor of function parameter default values. This helps to avoid any + * potential confusion with identify functions as described above. + * + * The previous example behaves differently when written with default values: + * + * + * ```js + * const aMap = Map({ apples: 10 }) + * const newMap = aMap.update('oranges', (val = 0) => val) + * // Map { "apples": 10, "oranges": 0 } + * ``` + * + * If no key is provided, then the `updater` function return value is + * returned as well. + * + * + * ```js + * const aMap = Map({ key: 'value' }) + * const result = aMap.update(aMap => aMap.get('key')) + * // "value" + * ``` + * + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum the values in a Map + * + * + * ```js + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * Map({ x: 1, y: 2, z: 3 }) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + * + * Note: `update(key)` can be used in `withMutations`. + */ + update(key: K, notSetValue: V, updater: (value: V) => V): this; + update(key: K, updater: (value: V | undefined) => V): this; + update(updater: (value: this) => R): R; + + /** + * Returns a new Map resulting from merging the provided Collections + * (or JS objects) into this Map. In other words, this takes each entry of + * each collection and sets it on this Map. + * + * Note: Values provided to `merge` are shallowly converted before being + * merged. No nested values are altered. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: 10, b: 20, c: 30 }) + * const two = Map({ b: 40, a: 50, d: 60 }) + * one.merge(two) // Map { "a": 50, "b": 40, "c": 30, "d": 60 } + * two.merge(one) // Map { "b": 20, "a": 10, "d": 60, "c": 30 } + * ``` + * + * Note: `merge` can be used in `withMutations`. + * + * @alias concat + */ + merge( + ...collections: Array> + ): Map; + merge( + ...collections: Array<{ [key: string]: C }> + ): Map; + concat( + ...collections: Array> + ): Map; + concat( + ...collections: Array<{ [key: string]: C }> + ): Map; + + /** + * Like `merge()`, `mergeWith()` returns a new Map resulting from merging + * the provided Collections (or JS objects) into this Map, but uses the + * `merger` function for dealing with conflicts. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: 10, b: 20, c: 30 }) + * const two = Map({ b: 40, a: 50, d: 60 }) + * one.mergeWith((oldVal, newVal) => oldVal / newVal, two) + * // { "a": 0.2, "b": 0.5, "c": 30, "d": 60 } + * two.mergeWith((oldVal, newVal) => oldVal / newVal, one) + * // { "b": 2, "a": 5, "d": 60, "c": 30 } + * ``` + * + * Note: `mergeWith` can be used in `withMutations`. + */ + mergeWith( + merger: (oldVal: V, newVal: V, key: K) => V, + ...collections: Array | { [key: string]: V }> + ): this; + + /** + * Like `merge()`, but when two compatible collections are encountered with + * the same key, it merges them as well, recursing deeply through the nested + * data. Two collections are considered to be compatible (and thus will be + * merged together) if they both fall into one of three categories: keyed + * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and + * arrays), or set-like (e.g., `Set`s). If they fall into separate + * categories, `mergeDeep` will replace the existing collection with the + * collection being merged in. This behavior can be customized by using + * `mergeDeepWith()`. + * + * Note: Indexed and set-like collections are merged using + * `concat()`/`union()` and therefore do not recurse. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) + * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) + * one.mergeDeep(two) + * // Map { + * // "a": Map { "x": 2, "y": 10 }, + * // "b": Map { "x": 20, "y": 5 }, + * // "c": Map { "z": 3 } + * // } + * ``` + * + * Note: `mergeDeep` can be used in `withMutations`. + */ + mergeDeep( + ...collections: Array | { [key: string]: V }> + ): this; + + /** + * Like `mergeDeep()`, but when two non-collections or incompatible + * collections are encountered at the same key, it uses the `merger` + * function to determine the resulting value. Collections are considered + * incompatible if they fall into separate categories between keyed, + * indexed, and set-like. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) + * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) + * one.mergeDeepWith((oldVal, newVal) => oldVal / newVal, two) + * // Map { + * // "a": Map { "x": 5, "y": 10 }, + * // "b": Map { "x": 20, "y": 10 }, + * // "c": Map { "z": 3 } + * // } + * ``` + * + * Note: `mergeDeepWith` can be used in `withMutations`. + */ + mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + ...collections: Array | { [key: string]: V }> + ): this; + + // Deep persistent changes + + /** + * Returns a new Map having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * subObject: Map({ + * subKey: 'subvalue', + * subSubObject: Map({ + * subSubKey: 'subSubValue' + * }) + * }) + * }) + * + * const newMap = originalMap.setIn(['subObject', 'subKey'], 'ha ha!') + * // Map { + * // "subObject": Map { + * // "subKey": "ha ha!", + * // "subSubObject": Map { "subSubKey": "subSubValue" } + * // } + * // } + * + * const newerMap = originalMap.setIn( + * ['subObject', 'subSubObject', 'subSubKey'], + * 'ha ha ha!' + * ) + * // Map { + * // "subObject": Map { + * // "subKey": "subvalue", + * // "subSubObject": Map { "subSubKey": "ha ha ha!" } + * // } + * // } + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and setIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * subObject: { + * subKey: 'subvalue', + * subSubObject: { + * subSubKey: 'subSubValue' + * } + * } + * }) + * + * originalMap.setIn(['subObject', 'subKey'], 'ha ha!') + * // Map { + * // "subObject": { + * // subKey: "ha ha!", + * // subSubObject: { subSubKey: "subSubValue" } + * // } + * // } + * ``` + * + * If any key in the path exists but cannot be updated (such as a primitive + * like number or a custom Object like Date), an error will be thrown. + * + * Note: `setIn` can be used in `withMutations`. + */ + setIn(keyPath: Iterable, value: unknown): this; + + /** + * Returns a new Map having removed the value at this `keyPath`. If any keys + * in `keyPath` do not exist, no change will occur. + * + * Note: `deleteIn` can be used in `withMutations`. + * + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + /** + * Returns a new Map having applied the `updater` to the entry found at the + * keyPath. + * + * This is most commonly used to call methods on collections nested within a + * structure of data. For example, in order to `.push()` onto a nested `List`, + * `updateIn` and `push` can be used together: + * + * + * ```js + * const { Map, List } = require('immutable') + * const map = Map({ inMap: Map({ inList: List([ 1, 2, 3 ]) }) }) + * const newMap = map.updateIn(['inMap', 'inList'], list => list.push(4)) + * // Map { "inMap": Map { "inList": List [ 1, 2, 3, 4 ] } } + * ``` + * + * If any keys in `keyPath` do not exist, new Immutable `Map`s will + * be created at those keys. If the `keyPath` does not already contain a + * value, the `updater` function will be called with `notSetValue`, if + * provided, otherwise `undefined`. + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) + * // Map { "a": Map { "b": Map { "c": 20 } } } + * ``` + * + * If the `updater` function returns the same value it was called with, then + * no change will occur. This is still true if `notSetValue` is provided. + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'x'], 100, val => val) + * // Map { "a": Map { "b": Map { "c": 10 } } } + * assert.strictEqual(newMap, aMap) + * ``` + * + * For code using ES2015 or later, using `notSetValue` is discourged in + * favor of function parameter default values. This helps to avoid any + * potential confusion with identify functions as described above. + * + * The previous example behaves differently when written with default values: + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'x'], (val = 100) => val) + * // Map { "a": Map { "b": Map { "c": 10, "x": 100 } } } + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and updateIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const map = Map({ a: { b: { c: 10 } } }) + * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) + * // Map { "a": { b: { c: 20 } } } + * ``` + * + * If any key in the path exists but cannot be updated (such as a primitive + * like number or a custom Object like Date), an error will be thrown. + * + * Note: `updateIn` can be used in `withMutations`. + */ + updateIn( + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + + /** + * A combination of `updateIn` and `merge`, returning a new Map, but + * performing the merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * ```js + * map.updateIn(['a', 'b', 'c'], abc => abc.merge(y)) + * map.mergeIn(['a', 'b', 'c'], y) + * ``` + * + * Note: `mergeIn` can be used in `withMutations`. + */ + mergeIn(keyPath: Iterable, ...collections: Array): this; + + /** + * A combination of `updateIn` and `mergeDeep`, returning a new Map, but + * performing the deep merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * ```js + * map.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y)) + * map.mergeDeepIn(['a', 'b', 'c'], y) + * ``` + * + * Note: `mergeDeepIn` can be used in `withMutations`. + */ + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + // Transient changes + + /** + * Every time you call one of the above functions, a new immutable Map is + * created. If a pure function calls a number of these to produce a final + * return value, then a penalty on performance and memory has been paid by + * creating all of the intermediate immutable Maps. + * + * If you need to apply a series of mutations to produce a new immutable + * Map, `withMutations()` creates a temporary mutable copy of the Map which + * can apply mutations in a highly performant manner. In fact, this is + * exactly how complex mutations like `merge` are done. + * + * As an example, this results in the creation of 2, not 4, new Maps: + * + * + * ```js + * const { Map } = require('immutable') + * const map1 = Map() + * const map2 = map1.withMutations(map => { + * map.set('a', 1).set('b', 2).set('c', 3) + * }) + * assert.equal(map1.size, 0) + * assert.equal(map2.size, 3) + * ``` + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Read the documentation for each method to see if it + * is safe to use in `withMutations`. + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Another way to avoid creation of intermediate Immutable maps is to create + * a mutable copy of this collection. Mutable copies *always* return `this`, + * and thus shouldn't be used for equality. Your function should never return + * a mutable copy of a collection, only use it internally to create a new + * collection. + * + * If possible, use `withMutations` to work with temporary mutable copies as + * it provides an easier to use API and considers many common optimizations. + * + * Note: if the collection is already mutable, `asMutable` returns itself. + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Read the documentation for each method to see if it + * is safe to use in `withMutations`. + * + * @see `Map#asImmutable` + */ + asMutable(): this; + + /** + * Returns true if this is a mutable copy (see `asMutable()`) and mutative + * alterations have been applied. + * + * @see `Map#asMutable` + */ + wasAltered(): boolean; + + /** + * The yin to `asMutable`'s yang. Because it applies to mutable collections, + * this operation is *mutable* and may return itself (though may not + * return itself, i.e. if the result is an empty collection). Once + * performed, the original mutable copy must no longer be mutated since it + * may be the immutable result. + * + * If possible, use `withMutations` to work with temporary mutable copies as + * it provides an easier to use API and considers many common optimizations. + * + * @see `Map#asMutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Map with values passed through a + * `mapper` function. + * + * Map({ a: 1, b: 2 }).map(x => 10 * x) + * // Map { a: 10, b: 20 } + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Map; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Map; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Map; + + /** + * Flat-maps the Map, returning a new Map. + * + * Similar to `data.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Map; + + /** + * Returns a new Map with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Map; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * @see Collection.Keyed.flip + */ + flip(): Map; + } + + /** + * A type of Map that has the additional guarantee that the iteration order of + * entries will be the order in which they were set(). + * + * The iteration behavior of OrderedMap is the same as native ES6 Map and + * JavaScript Object. + * + * Note that `OrderedMap` are more expensive than non-ordered `Map` and may + * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not + * stable. + */ + namespace OrderedMap { + /** + * True if the provided value is an OrderedMap. + */ + function isOrderedMap( + maybeOrderedMap: unknown + ): maybeOrderedMap is OrderedMap; + } + + /** + * Creates a new Immutable OrderedMap. + * + * Created with the same key value pairs as the provided Collection.Keyed or + * JavaScript Object or expects a Collection of [K, V] tuple entries. + * + * The iteration order of key-value pairs provided to this constructor will + * be preserved in the OrderedMap. + * + * let newOrderedMap = OrderedMap({key: "value"}) + * let newOrderedMap = OrderedMap([["key", "value"]]) + * + * Note: `OrderedMap` is a factory function and not a class, and does not use + * the `new` keyword during construction. + */ + function OrderedMap(collection?: Iterable<[K, V]>): OrderedMap; + function OrderedMap(obj: { [key: string]: V }): OrderedMap; + + interface OrderedMap extends Map { + /** + * The number of entries in this OrderedMap. + */ + readonly size: number; + + /** + * Returns a new OrderedMap also containing the new key, value pair. If an + * equivalent key already exists in this OrderedMap, it will be replaced + * while maintaining the existing order. + * + * + * ```js + * const { OrderedMap } = require('immutable') + * const originalMap = OrderedMap({a:1, b:1, c:1}) + * const updatedMap = originalMap.set('b', 2) + * + * originalMap + * // OrderedMap {a: 1, b: 1, c: 1} + * updatedMap + * // OrderedMap {a: 1, b: 2, c: 1} + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(key: K, value: V): this; + + /** + * Returns a new OrderedMap resulting from merging the provided Collections + * (or JS objects) into this OrderedMap. In other words, this takes each + * entry of each collection and sets it on this OrderedMap. + * + * Note: Values provided to `merge` are shallowly converted before being + * merged. No nested values are altered. + * + * + * ```js + * const { OrderedMap } = require('immutable') + * const one = OrderedMap({ a: 10, b: 20, c: 30 }) + * const two = OrderedMap({ b: 40, a: 50, d: 60 }) + * one.merge(two) // OrderedMap { "a": 50, "b": 40, "c": 30, "d": 60 } + * two.merge(one) // OrderedMap { "b": 20, "a": 10, "d": 60, "c": 30 } + * ``` + * + * Note: `merge` can be used in `withMutations`. + * + * @alias concat + */ + merge( + ...collections: Array> + ): OrderedMap; + merge( + ...collections: Array<{ [key: string]: C }> + ): OrderedMap; + concat( + ...collections: Array> + ): OrderedMap; + concat( + ...collections: Array<{ [key: string]: C }> + ): OrderedMap; + + // Sequence algorithms + + /** + * Returns a new OrderedMap with values passed through a + * `mapper` function. + * + * OrderedMap({ a: 1, b: 2 }).map(x => 10 * x) + * // OrderedMap { "a": 10, "b": 20 } + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): OrderedMap; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): OrderedMap; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): OrderedMap; + + /** + * Flat-maps the OrderedMap, returning a new OrderedMap. + * + * Similar to `data.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): OrderedMap; + + /** + * Returns a new OrderedMap with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): OrderedMap; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * @see Collection.Keyed.flip + */ + flip(): OrderedMap; + } + + /** + * A Collection of unique values with `O(log32 N)` adds and has. + * + * When iterating a Set, the entries will be (value, value) pairs. Iteration + * order of a Set is undefined, however is stable. Multiple iterations of the + * same Set will iterate in the same order. + * + * Set values, like Map keys, may be of any type. Equality is determined using + * `Immutable.is`, enabling Sets to uniquely include other Immutable + * collections, custom value types, and NaN. + */ + namespace Set { + /** + * True if the provided value is a Set + */ + function isSet(maybeSet: unknown): maybeSet is Set; + + /** + * Creates a new Set containing `values`. + */ + function of(...values: Array): Set; + + /** + * `Set.fromKeys()` creates a new immutable Set containing the keys from + * this Collection or JavaScript Object. + */ + function fromKeys(iter: Collection): Set; + function fromKeys(obj: { [key: string]: unknown }): Set; + + /** + * `Set.intersect()` creates a new immutable Set that is the intersection of + * a collection of other sets. + * + * ```js + * const { Set } = require('immutable') + * const intersected = Set.intersect([ + * Set([ 'a', 'b', 'c' ]) + * Set([ 'c', 'a', 't' ]) + * ]) + * // Set [ "a", "c" ] + * ``` + */ + function intersect(sets: Iterable>): Set; + + /** + * `Set.union()` creates a new immutable Set that is the union of a + * collection of other sets. + * + * ```js + * const { Set } = require('immutable') + * const unioned = Set.union([ + * Set([ 'a', 'b', 'c' ]) + * Set([ 'c', 'a', 't' ]) + * ]) + * // Set [ "a", "b", "c", "t" ] + * ``` + */ + function union(sets: Iterable>): Set; + } + + /** + * Create a new immutable Set containing the values of the provided + * collection-like. + * + * Note: `Set` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Set; + + interface Set extends Collection.Set { + /** + * The number of items in this Set. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new Set which also includes this value. + * + * Note: `add` can be used in `withMutations`. + */ + add(value: T): this; + + /** + * Returns a new Set which excludes this value. + * + * Note: `delete` can be used in `withMutations`. + * + * Note: `delete` **cannot** be safely used in IE8, use `remove` if + * supporting old browsers. + * + * @alias remove + */ + delete(value: T): this; + remove(value: T): this; + + /** + * Returns a new Set containing no values. + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): this; + + /** + * Returns a Set including any value from `collections` that does not already + * exist in this Set. + * + * Note: `union` can be used in `withMutations`. + * @alias merge + * @alias concat + */ + union(...collections: Array>): Set; + merge(...collections: Array>): Set; + concat(...collections: Array>): Set; + + /** + * Returns a Set which has removed any values not also contained + * within `collections`. + * + * Note: `intersect` can be used in `withMutations`. + */ + intersect(...collections: Array>): this; + + /** + * Returns a Set excluding any values contained within `collections`. + * + * + * ```js + * const { OrderedSet } = require('immutable') + * OrderedSet([ 1, 2, 3 ]).subtract([1, 3]) + * // OrderedSet [2] + * ``` + * + * Note: `subtract` can be used in `withMutations`. + */ + subtract(...collections: Array>): this; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Set with values passed through a + * `mapper` function. + * + * Set([1,2]).map(x => 10 * x) + * // Set [10,20] + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Set; + + /** + * Flat-maps the Set, returning a new Set. + * + * Similar to `set.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Set; + + /** + * Returns a new Set with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + } + + /** + * A type of Set that has the additional guarantee that the iteration order of + * values will be the order in which they were `add`ed. + * + * The iteration behavior of OrderedSet is the same as native ES6 Set. + * + * Note that `OrderedSet` are more expensive than non-ordered `Set` and may + * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not + * stable. + */ + namespace OrderedSet { + /** + * True if the provided value is an OrderedSet. + */ + function isOrderedSet(maybeOrderedSet: unknown): boolean; + + /** + * Creates a new OrderedSet containing `values`. + */ + function of(...values: Array): OrderedSet; + + /** + * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing + * the keys from this Collection or JavaScript Object. + */ + function fromKeys(iter: Collection): OrderedSet; + function fromKeys(obj: { [key: string]: unknown }): OrderedSet; + } + + /** + * Create a new immutable OrderedSet containing the values of the provided + * collection-like. + * + * Note: `OrderedSet` is a factory function and not a class, and does not use + * the `new` keyword during construction. + */ + function OrderedSet( + collection?: Iterable | ArrayLike + ): OrderedSet; + + interface OrderedSet extends Set { + /** + * The number of items in this OrderedSet. + */ + readonly size: number; + + /** + * Returns an OrderedSet including any value from `collections` that does + * not already exist in this OrderedSet. + * + * Note: `union` can be used in `withMutations`. + * @alias merge + * @alias concat + */ + union(...collections: Array>): OrderedSet; + merge(...collections: Array>): OrderedSet; + concat(...collections: Array>): OrderedSet; + + // Sequence algorithms + + /** + * Returns a new Set with values passed through a + * `mapper` function. + * + * OrderedSet([ 1, 2 ]).map(x => 10 * x) + * // OrderedSet [10, 20] + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): OrderedSet; + + /** + * Flat-maps the OrderedSet, returning a new OrderedSet. + * + * Similar to `set.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): OrderedSet; + + /** + * Returns a new OrderedSet with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): OrderedSet; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns an OrderedSet of the same type "zipped" with the provided + * collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = OrderedSet([ 1, 2, 3 ]) + * const b = OrderedSet([ 4, 5, 6 ]) + * const c = a.zip(b) + * // OrderedSet [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): OrderedSet<[T, U]>; + zip( + other1: Collection, + other2: Collection + ): OrderedSet<[T, U, V]>; + zip( + ...collections: Array> + ): OrderedSet; + + /** + * Returns a OrderedSet of the same type "zipped" with the provided + * collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = OrderedSet([ 1, 2 ]); + * const b = OrderedSet([ 3, 4, 5 ]); + * const c = a.zipAll(b); // OrderedSet [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): OrderedSet<[T, U]>; + zipAll( + other1: Collection, + other2: Collection + ): OrderedSet<[T, U, V]>; + zipAll( + ...collections: Array> + ): OrderedSet; + + /** + * Returns an OrderedSet of the same type "zipped" with the provided + * collections by using a custom `zipper` function. + * + * @see Seq.Indexed.zipWith + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): OrderedSet; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): OrderedSet; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): OrderedSet; + } + + /** + * Stacks are indexed collections which support very efficient O(1) addition + * and removal from the front using `unshift(v)` and `shift()`. + * + * For familiarity, Stack also provides `push(v)`, `pop()`, and `peek()`, but + * be aware that they also operate on the front of the list, unlike List or + * a JavaScript Array. + * + * Note: `reverse()` or any inherent reverse traversal (`reduceRight`, + * `lastIndexOf`, etc.) is not efficient with a Stack. + * + * Stack is implemented with a Single-Linked List. + */ + namespace Stack { + /** + * True if the provided value is a Stack + */ + function isStack(maybeStack: unknown): maybeStack is Stack; + + /** + * Creates a new Stack containing `values`. + */ + function of(...values: Array): Stack; + } + + /** + * Create a new immutable Stack containing the values of the provided + * collection-like. + * + * The iteration order of the provided collection is preserved in the + * resulting `Stack`. + * + * Note: `Stack` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Stack(collection?: Iterable | ArrayLike): Stack; + + interface Stack extends Collection.Indexed { + /** + * The number of items in this Stack. + */ + readonly size: number; + + // Reading values + + /** + * Alias for `Stack.first()`. + */ + peek(): T | undefined; + + // Persistent changes + + /** + * Returns a new Stack with 0 size and no values. + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): Stack; + + /** + * Returns a new Stack with the provided `values` prepended, shifting other + * values ahead to higher indices. + * + * This is very efficient for Stack. + * + * Note: `unshift` can be used in `withMutations`. + */ + unshift(...values: Array): Stack; + + /** + * Like `Stack#unshift`, but accepts a collection rather than varargs. + * + * Note: `unshiftAll` can be used in `withMutations`. + */ + unshiftAll(iter: Iterable): Stack; + + /** + * Returns a new Stack with a size ones less than this Stack, excluding + * the first item in this Stack, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * Stack rather than the removed value. Use `first()` or `peek()` to get the + * first value in this Stack. + * + * Note: `shift` can be used in `withMutations`. + */ + shift(): Stack; + + /** + * Alias for `Stack#unshift` and is not equivalent to `List#push`. + */ + push(...values: Array): Stack; + + /** + * Alias for `Stack#unshiftAll`. + */ + pushAll(iter: Iterable): Stack; + + /** + * Alias for `Stack#shift` and is not equivalent to `List#pop`. + */ + pop(): Stack; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Stack with other collections concatenated to this one. + */ + concat(...valuesOrCollections: Array | C>): Stack; + + /** + * Returns a new Stack with values passed through a + * `mapper` function. + * + * Stack([ 1, 2 ]).map(x => 10 * x) + * // Stack [ 10, 20 ] + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Stack; + + /** + * Flat-maps the Stack, returning a new Stack. + * + * Similar to `stack.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Stack; + + /** + * Returns a new Set with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Set; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a Stack "zipped" with the provided collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = Stack([ 1, 2, 3 ]); + * const b = Stack([ 4, 5, 6 ]); + * const c = a.zip(b); // Stack [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Stack<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Stack<[T, U, V]>; + zip(...collections: Array>): Stack; + + /** + * Returns a Stack "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = Stack([ 1, 2 ]); + * const b = Stack([ 3, 4, 5 ]); + * const c = a.zipAll(b); // Stack [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): Stack<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Stack<[T, U, V]>; + zipAll(...collections: Array>): Stack; + + /** + * Returns a Stack "zipped" with the provided collections by using a + * custom `zipper` function. + * + * ```js + * const a = Stack([ 1, 2, 3 ]); + * const b = Stack([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // Stack [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Stack; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Stack; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Stack; + } + + /** + * Returns a Seq.Indexed of numbers from `start` (inclusive) to `end` + * (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to + * infinity. When `start` is equal to `end`, returns empty range. + * + * Note: `Range` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * ```js + * const { Range } = require('immutable') + * Range() // [ 0, 1, 2, 3, ... ] + * Range(10) // [ 10, 11, 12, 13, ... ] + * Range(10, 15) // [ 10, 11, 12, 13, 14 ] + * Range(10, 30, 5) // [ 10, 15, 20, 25 ] + * Range(30, 10, 5) // [ 30, 25, 20, 15 ] + * Range(30, 30, 5) // [] + * ``` + */ + function Range( + start?: number, + end?: number, + step?: number + ): Seq.Indexed; + + /** + * Returns a Seq.Indexed of `value` repeated `times` times. When `times` is + * not defined, returns an infinite `Seq` of `value`. + * + * Note: `Repeat` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * ```js + * const { Repeat } = require('immutable') + * Repeat('foo') // [ 'foo', 'foo', 'foo', ... ] + * Repeat('bar', 4) // [ 'bar', 'bar', 'bar', 'bar' ] + * ``` + */ + function Repeat(value: T, times?: number): Seq.Indexed; + + /** + * A record is similar to a JS object, but enforces a specific set of allowed + * string keys, and has default values. + * + * The `Record()` function produces new Record Factories, which when called + * create Record instances. + * + * ```js + * const { Record } = require('immutable') + * const ABRecord = Record({ a: 1, b: 2 }) + * const myRecord = ABRecord({ b: 3 }) + * ``` + * + * Records always have a value for the keys they define. `remove`ing a key + * from a record simply resets it to the default value for that key. + * + * ```js + * myRecord.get('a') // 1 + * myRecord.get('b') // 3 + * const myRecordWithoutB = myRecord.remove('b') + * myRecordWithoutB.get('b') // 2 + * ``` + * + * Values provided to the constructor not found in the Record type will + * be ignored. For example, in this case, ABRecord is provided a key "x" even + * though only "a" and "b" have been defined. The value for "x" will be + * ignored for this record. + * + * ```js + * const myRecord = ABRecord({ b: 3, x: 10 }) + * myRecord.get('x') // undefined + * ``` + * + * Because Records have a known set of string keys, property get access works + * as expected, however property sets will throw an Error. + * + * Note: IE8 does not support property access. Only use `get()` when + * supporting IE8. + * + * ```js + * myRecord.b // 3 + * myRecord.b = 5 // throws Error + * ``` + * + * Record Types can be extended as well, allowing for custom methods on your + * Record. This is not a common pattern in functional environments, but is in + * many JS programs. + * + * However Record Types are more restricted than typical JavaScript classes. + * They do not use a class constructor, which also means they cannot use + * class properties (since those are technically part of a constructor). + * + * While Record Types can be syntactically created with the JavaScript `class` + * form, the resulting Record function is actually a factory function, not a + * class constructor. Even though Record Types are not classes, JavaScript + * currently requires the use of `new` when creating new Record instances if + * they are defined as a `class`. + * + * ``` + * class ABRecord extends Record({ a: 1, b: 2 }) { + * getAB() { + * return this.a + this.b; + * } + * } + * + * var myRecord = new ABRecord({b: 3}) + * myRecord.getAB() // 4 + * ``` + * + * + * **Flow Typing Records:** + * + * Immutable.js exports two Flow types designed to make it easier to use + * Records with flow typed code, `RecordOf` and `RecordFactory`. + * + * When defining a new kind of Record factory function, use a flow type that + * describes the values the record contains along with `RecordFactory`. + * To type instances of the Record (which the factory function returns), + * use `RecordOf`. + * + * Typically, new Record definitions will export both the Record factory + * function as well as the Record instance type for use in other code. + * + * ```js + * import type { RecordFactory, RecordOf } from 'immutable'; + * + * // Use RecordFactory for defining new Record factory functions. + * type Point3DProps = { x: number, y: number, z: number }; + * const defaultValues: Point3DProps = { x: 0, y: 0, z: 0 }; + * const makePoint3D: RecordFactory = Record(defaultValues); + * export makePoint3D; + * + * // Use RecordOf for defining new instances of that Record. + * export type Point3D = RecordOf; + * const some3DPoint: Point3D = makePoint3D({ x: 10, y: 20, z: 30 }); + * ``` + * + * **Flow Typing Record Subclasses:** + * + * Records can be subclassed as a means to add additional methods to Record + * instances. This is generally discouraged in favor of a more functional API, + * since Subclasses have some minor overhead. However the ability to create + * a rich API on Record types can be quite valuable. + * + * When using Flow to type Subclasses, do not use `RecordFactory`, + * instead apply the props type when subclassing: + * + * ```js + * type PersonProps = {name: string, age: number}; + * const defaultValues: PersonProps = {name: 'Aristotle', age: 2400}; + * const PersonRecord = Record(defaultValues); + * class Person extends PersonRecord { + * getName(): string { + * return this.get('name') + * } + * + * setName(name: string): this { + * return this.set('name', name); + * } + * } + * ``` + * + * **Choosing Records vs plain JavaScript objects** + * + * Records offer a persistently immutable alternative to plain JavaScript + * objects, however they're not required to be used within Immutable.js + * collections. In fact, the deep-access and deep-updating functions + * like `getIn()` and `setIn()` work with plain JavaScript Objects as well. + * + * Deciding to use Records or Objects in your application should be informed + * by the tradeoffs and relative benefits of each: + * + * - *Runtime immutability*: plain JS objects may be carefully treated as + * immutable, however Record instances will *throw* if attempted to be + * mutated directly. Records provide this additional guarantee, however at + * some marginal runtime cost. While JS objects are mutable by nature, the + * use of type-checking tools like [Flow](https://medium.com/@gcanti/immutability-with-flow-faa050a1aef4) + * can help gain confidence in code written to favor immutability. + * + * - *Value equality*: Records use value equality when compared with `is()` + * or `record.equals()`. That is, two Records with the same keys and values + * are equal. Plain objects use *reference equality*. Two objects with the + * same keys and values are not equal since they are different objects. + * This is important to consider when using objects as keys in a `Map` or + * values in a `Set`, which use equality when retrieving values. + * + * - *API methods*: Records have a full featured API, with methods like + * `.getIn()`, and `.equals()`. These can make working with these values + * easier, but comes at the cost of not allowing keys with those names. + * + * - *Default values*: Records provide default values for every key, which + * can be useful when constructing Records with often unchanging values. + * However default values can make using Flow and TypeScript more laborious. + * + * - *Serialization*: Records use a custom internal representation to + * efficiently store and update their values. Converting to and from this + * form isn't free. If converting Records to plain objects is common, + * consider sticking with plain objects to begin with. + */ + namespace Record { + /** + * True if `maybeRecord` is an instance of a Record. + */ + function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; + + /** + * Records allow passing a second parameter to supply a descriptive name + * that appears when converting a Record to a string or in any error + * messages. A descriptive name for any record can be accessed by using this + * method. If one was not provided, the string "Record" is returned. + * + * ```js + * const { Record } = require('immutable') + * const Person = Record({ + * name: null + * }, 'Person') + * + * var me = Person({ name: 'My Name' }) + * me.toString() // "Person { "name": "My Name" }" + * Record.getDescriptiveName(me) // "Person" + * ``` + */ + function getDescriptiveName(record: Record): string; + + /** + * A Record.Factory is created by the `Record()` function. Record instances + * are created by passing it some of the accepted values for that Record + * type: + * + * + * ```js + * // makePerson is a Record Factory function + * const makePerson = Record({ name: null, favoriteColor: 'unknown' }); + * + * // alan is a Record instance + * const alan = makePerson({ name: 'Alan' }); + * ``` + * + * Note that Record Factories return `Record & Readonly`, + * this allows use of both the Record instance API, and direct property + * access on the resulting instances: + * + * + * ```js + * // Use the Record API + * console.log('Record API: ' + alan.get('name')) + * + * // Or direct property access (Readonly) + * console.log('property access: ' + alan.name) + * ``` + * + * **Flow Typing Records:** + * + * Use the `RecordFactory` Flow type to get high quality type checking of + * Records: + * + * ```js + * import type { RecordFactory, RecordOf } from 'immutable'; + * + * // Use RecordFactory for defining new Record factory functions. + * type PersonProps = { name: ?string, favoriteColor: string }; + * const makePerson: RecordFactory = Record({ name: null, favoriteColor: 'unknown' }); + * + * // Use RecordOf for defining new instances of that Record. + * type Person = RecordOf; + * const alan: Person = makePerson({ name: 'Alan' }); + * ``` + */ + namespace Factory {} + + interface Factory { + (values?: Partial | Iterable<[string, unknown]>): Record & + Readonly; + new ( + values?: Partial | Iterable<[string, unknown]> + ): Record & Readonly; + + /** + * The name provided to `Record(values, name)` can be accessed with + * `displayName`. + */ + displayName: string; + } + + function Factory( + values?: Partial | Iterable<[string, unknown]> + ): Record & Readonly; + } + + /** + * Unlike other types in Immutable.js, the `Record()` function creates a new + * Record Factory, which is a function that creates Record instances. + * + * See above for examples of using `Record()`. + * + * Note: `Record` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Record( + defaultValues: TProps, + name?: string + ): Record.Factory; + + interface Record { + // Reading values + + has(key: string): key is keyof TProps & string; + + /** + * Returns the value associated with the provided key, which may be the + * default value defined when creating the Record factory function. + * + * If the requested key is not defined by this Record type, then + * notSetValue will be returned if provided. Note that this scenario would + * produce an error when using Flow or TypeScript. + */ + get(key: K, notSetValue?: unknown): TProps[K]; + get(key: string, notSetValue: T): T; + + // Reading deep values + + hasIn(keyPath: Iterable): boolean; + getIn(keyPath: Iterable): unknown; + + // Value equality + + equals(other: unknown): boolean; + hashCode(): number; + + // Persistent changes + + set(key: K, value: TProps[K]): this; + update( + key: K, + updater: (value: TProps[K]) => TProps[K] + ): this; + merge( + ...collections: Array | Iterable<[string, unknown]>> + ): this; + mergeDeep( + ...collections: Array | Iterable<[string, unknown]>> + ): this; + + mergeWith( + merger: (oldVal: unknown, newVal: unknown, key: keyof TProps) => unknown, + ...collections: Array | Iterable<[string, unknown]>> + ): this; + mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + ...collections: Array | Iterable<[string, unknown]>> + ): this; + + /** + * Returns a new instance of this Record type with the value for the + * specific key set to its default value. + * + * @alias remove + */ + delete(key: K): this; + remove(key: K): this; + + /** + * Returns a new instance of this Record type with all values set + * to their default values. + */ + clear(): this; + + // Deep persistent changes + + setIn(keyPath: Iterable, value: unknown): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + mergeIn(keyPath: Iterable, ...collections: Array): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + /** + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + // Conversion to JavaScript types + + /** + * Deeply converts this Record to equivalent native JavaScript Object. + * + * Note: This method may not be overridden. Objects with custom + * serialization to plain JS may override toJSON() instead. + */ + toJS(): { [K in keyof TProps]: unknown }; + + /** + * Shallowly converts this Record to equivalent native JavaScript Object. + */ + toJSON(): TProps; + + /** + * Shallowly converts this Record to equivalent JavaScript Object. + */ + toObject(): TProps; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set` may be used mutatively. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + toSeq(): Seq.Keyed; + + [Symbol.iterator](): IterableIterator<[keyof TProps, TProps[keyof TProps]]>; + } + + /** + * RecordOf is used in TypeScript to define interfaces expecting an + * instance of record with type T. + * + * This is equivalent to an instance of a record created by a Record Factory. + */ + type RecordOf = Record & Readonly; + + /** + * `Seq` describes a lazy operation, allowing them to efficiently chain + * use of all the higher-order collection methods (such as `map` and `filter`) + * by not creating intermediate collections. + * + * **Seq is immutable** — Once a Seq is created, it cannot be + * changed, appended to, rearranged or otherwise modified. Instead, any + * mutative method called on a `Seq` will return a new `Seq`. + * + * **Seq is lazy** — `Seq` does as little work as necessary to respond to any + * method call. Values are often created during iteration, including implicit + * iteration when reducing or converting to a concrete data structure such as + * a `List` or JavaScript `Array`. + * + * For example, the following performs no work, because the resulting + * `Seq`'s values are never iterated: + * + * ```js + * const { Seq } = require('immutable') + * const oddSquares = Seq([ 1, 2, 3, 4, 5, 6, 7, 8 ]) + * .filter(x => x % 2 !== 0) + * .map(x => x * x) + * ``` + * + * Once the `Seq` is used, it performs only the work necessary. In this + * example, no intermediate arrays are ever created, filter is called three + * times, and map is only called once: + * + * ```js + * oddSquares.get(1); // 9 + * ``` + * + * Any collection can be converted to a lazy Seq with `Seq()`. + * + * + * ```js + * const { Map } = require('immutable') + * const map = Map({ a: 1, b: 2, c: 3 }) + * const lazySeq = Seq(map) + * ``` + * + * `Seq` allows for the efficient chaining of operations, allowing for the + * expression of logic that can otherwise be very tedious: + * + * ```js + * lazySeq + * .flip() + * .map(key => key.toUpperCase()) + * .flip() + * // Seq { A: 1, B: 1, C: 1 } + * ``` + * + * As well as expressing logic that would otherwise seem memory or time + * limited, for example `Range` is a special kind of Lazy sequence. + * + * + * ```js + * const { Range } = require('immutable') + * Range(1, Infinity) + * .skip(1000) + * .map(n => -n) + * .filter(n => n % 2 === 0) + * .take(2) + * .reduce((r, n) => r * n, 1) + * // 1006008 + * ``` + * + * Seq is often used to provide a rich collection API to JavaScript Object. + * + * ```js + * Seq({ x: 0, y: 1, z: 2 }).map(v => v * 2).toObject(); + * // { x: 0, y: 2, z: 4 } + * ``` + */ + + namespace Seq { + /** + * True if `maybeSeq` is a Seq, it is not backed by a concrete + * structure such as Map, List, or Set. + */ + function isSeq( + maybeSeq: unknown + ): maybeSeq is + | Seq.Indexed + | Seq.Keyed + | Seq.Set; + + /** + * `Seq` which represents key-value pairs. + */ + namespace Keyed {} + + /** + * Always returns a Seq.Keyed, if input is not keyed, expects an + * collection of [K, V] tuples. + * + * Note: `Seq.Keyed` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Keyed(collection?: Iterable<[K, V]>): Seq.Keyed; + function Keyed(obj: { [key: string]: V }): Seq.Keyed; + + interface Keyed extends Seq, Collection.Keyed { + /** + * Deeply converts this Keyed Seq to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJS(): { [key: string]: unknown }; + + /** + * Shallowly converts this Keyed Seq to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJSON(): { [key: string]: V }; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array<[K, V]>; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + * + * All entries will be present in the resulting Seq, even if they + * have the same key. + */ + concat( + ...collections: Array> + ): Seq.Keyed; + concat( + ...collections: Array<{ [key: string]: C }> + ): Seq.Keyed; + + /** + * Returns a new Seq.Keyed with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq.Keyed({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq.Keyed; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Seq.Keyed; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Seq.Keyed; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Seq.Keyed; + + /** + * Returns a new Seq with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Seq.Keyed; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * @see Collection.Keyed.flip + */ + flip(): Seq.Keyed; + + [Symbol.iterator](): IterableIterator<[K, V]>; + } + + /** + * `Seq` which represents an ordered indexed list of values. + */ + namespace Indexed { + /** + * Provides an Seq.Indexed of the values provided. + */ + function of(...values: Array): Seq.Indexed; + } + + /** + * Always returns Seq.Indexed, discarding associated keys and + * supplying incrementing indices. + * + * Note: `Seq.Indexed` is a conversion function and not a class, and does + * not use the `new` keyword during construction. + */ + function Indexed( + collection?: Iterable | ArrayLike + ): Seq.Indexed; + + interface Indexed extends Seq, Collection.Indexed { + /** + * Deeply converts this Indexed Seq to equivalent native JavaScript Array. + */ + toJS(): Array; + + /** + * Shallowly converts this Indexed Seq to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + */ + concat( + ...valuesOrCollections: Array | C> + ): Seq.Indexed; + + /** + * Returns a new Seq.Indexed with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq.Indexed([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Seq.Indexed; + + /** + * Flat-maps the Seq, returning a a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Seq.Indexed; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Seq.Indexed; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a Seq "zipped" with the provided collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = Seq([ 1, 2, 3 ]); + * const b = Seq([ 4, 5, 6 ]); + * const c = a.zip(b); // Seq [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Seq.Indexed<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Seq.Indexed<[T, U, V]>; + zip( + ...collections: Array> + ): Seq.Indexed; + + /** + * Returns a Seq "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = Seq([ 1, 2 ]); + * const b = Seq([ 3, 4, 5 ]); + * const c = a.zipAll(b); // Seq [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + */ + zipAll(other: Collection): Seq.Indexed<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Seq.Indexed<[T, U, V]>; + zipAll( + ...collections: Array> + ): Seq.Indexed; + + /** + * Returns a Seq "zipped" with the provided collections by using a + * custom `zipper` function. + * + * ```js + * const a = Seq([ 1, 2, 3 ]); + * const b = Seq([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // Seq [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Seq.Indexed; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Seq.Indexed; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Seq.Indexed; + + [Symbol.iterator](): IterableIterator; + } + + /** + * `Seq` which represents a set of values. + * + * Because `Seq` are often lazy, `Seq.Set` does not provide the same guarantee + * of value uniqueness as the concrete `Set`. + */ + namespace Set { + /** + * Returns a Seq.Set of the provided values + */ + function of(...values: Array): Seq.Set; + } + + /** + * Always returns a Seq.Set, discarding associated indices or keys. + * + * Note: `Seq.Set` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Seq.Set; + + interface Set extends Seq, Collection.Set { + /** + * Deeply converts this Set Seq to equivalent native JavaScript Array. + */ + toJS(): Array; + + /** + * Shallowly converts this Set Seq to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + * + * All entries will be present in the resulting Seq, even if they + * are duplicates. + */ + concat(...collections: Array>): Seq.Set; + + /** + * Returns a new Seq.Set with values passed through a + * `mapper` function. + * + * ```js + * Seq.Set([ 1, 2 ]).map(x => 10 * x) + * // Seq { 10, 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Seq.Set; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Seq.Set; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Seq.Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + [Symbol.iterator](): IterableIterator; + } + } + + /** + * Creates a Seq. + * + * Returns a particular kind of `Seq` based on the input. + * + * * If a `Seq`, that same `Seq`. + * * If an `Collection`, a `Seq` of the same kind (Keyed, Indexed, or Set). + * * If an Array-like, an `Seq.Indexed`. + * * If an Iterable Object, an `Seq.Indexed`. + * * If an Object, a `Seq.Keyed`. + * + * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, + * which is usually not what you want. You should turn your Iterator Object into + * an iterable object by defining a Symbol.iterator (or @@iterator) method which + * returns `this`. + * + * Note: `Seq` is a conversion function and not a class, and does not use the + * `new` keyword during construction. + */ + function Seq>(seq: S): S; + function Seq(collection: Collection.Keyed): Seq.Keyed; + function Seq(collection: Collection.Set): Seq.Set; + function Seq( + collection: Collection.Indexed | Iterable | ArrayLike + ): Seq.Indexed; + function Seq(obj: { [key: string]: V }): Seq.Keyed; + function Seq(): Seq; + + interface Seq extends Collection { + /** + * Some Seqs can describe their size lazily. When this is the case, + * size will be an integer. Otherwise it will be undefined. + * + * For example, Seqs returned from `map()` or `reverse()` + * preserve the size of the original `Seq` while `filter()` does not. + * + * Note: `Range`, `Repeat` and `Seq`s made from `Array`s and `Object`s will + * always have a size. + */ + readonly size: number | undefined; + + // Force evaluation + + /** + * Because Sequences are lazy and designed to be chained together, they do + * not cache their results. For example, this map function is called a total + * of 6 times, as each `join` iterates the Seq of three values. + * + * var squares = Seq([ 1, 2, 3 ]).map(x => x * x) + * squares.join() + squares.join() + * + * If you know a `Seq` will be used multiple times, it may be more + * efficient to first cache it in memory. Here, the map function is called + * only 3 times. + * + * var squares = Seq([ 1, 2, 3 ]).map(x => x * x).cacheResult() + * squares.join() + squares.join() + * + * Use this method judiciously, as it must fully evaluate a Seq which can be + * a burden on memory and possibly performance. + * + * Note: after calling `cacheResult`, a Seq will always have a `size`. + */ + cacheResult(): this; + + // Sequence algorithms + + /** + * Returns a new Seq with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq; + + /** + * Returns a new Seq with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + * Note: used only for sets. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Seq; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + * Note: Used only for sets. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Seq; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Seq; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + } + + /** + * The `Collection` is a set of (key, value) entries which can be iterated, and + * is the base class for all collections in `immutable`, allowing them to + * make use of all the Collection methods (such as `map` and `filter`). + * + * Note: A collection is always iterated in the same order, however that order + * may not always be well defined, as is the case for the `Map` and `Set`. + * + * Collection is the abstract base class for concrete data structures. It + * cannot be constructed directly. + * + * Implementations should extend one of the subclasses, `Collection.Keyed`, + * `Collection.Indexed`, or `Collection.Set`. + */ + namespace Collection { + /** + * @deprecated use `const { isKeyed } = require('immutable')` + */ + function isKeyed( + maybeKeyed: unknown + ): maybeKeyed is Collection.Keyed; + + /** + * @deprecated use `const { isIndexed } = require('immutable')` + */ + function isIndexed( + maybeIndexed: unknown + ): maybeIndexed is Collection.Indexed; + + /** + * @deprecated use `const { isAssociative } = require('immutable')` + */ + function isAssociative( + maybeAssociative: unknown + ): maybeAssociative is + | Collection.Keyed + | Collection.Indexed; + + /** + * @deprecated use `const { isOrdered } = require('immutable')` + */ + function isOrdered(maybeOrdered: unknown): boolean; + + /** + * Keyed Collections have discrete keys tied to each value. + * + * When iterating `Collection.Keyed`, each iteration will yield a `[K, V]` + * tuple, in other words, `Collection#entries` is the default iterator for + * Keyed Collections. + */ + namespace Keyed {} + + /** + * Creates a Collection.Keyed + * + * Similar to `Collection()`, however it expects collection-likes of [K, V] + * tuples if not constructed from a Collection.Keyed or JS Object. + * + * Note: `Collection.Keyed` is a conversion function and not a class, and + * does not use the `new` keyword during construction. + */ + function Keyed(collection?: Iterable<[K, V]>): Collection.Keyed; + function Keyed(obj: { [key: string]: V }): Collection.Keyed; + + interface Keyed extends Collection { + /** + * Deeply converts this Keyed collection to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJS(): { [key: string]: unknown }; + + /** + * Shallowly converts this Keyed collection to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJSON(): { [key: string]: V }; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array<[K, V]>; + + /** + * Returns Seq.Keyed. + * @override + */ + toSeq(): Seq.Keyed; + + // Sequence functions + + /** + * Returns a new Collection.Keyed of the same type where the keys and values + * have been flipped. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 'z', b: 'y' }).flip() + * // Map { "z": "a", "y": "b" } + * ``` + */ + flip(): Collection.Keyed; + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat( + ...collections: Array> + ): Collection.Keyed; + concat( + ...collections: Array<{ [key: string]: C }> + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed with values passed through a + * `mapper` function. + * + * ```js + * const { Collection } = require('immutable') + * Collection.Keyed({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed of the same type with keys passed through + * a `mapper` function. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2 }).mapKeys(x => x.toUpperCase()) + * // Map { "A": 1, "B": 2 } + * ``` + * + * Note: `mapKeys()` always returns a new instance, even if it produced + * the same key at every step. + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed of the same type with entries + * ([key, value] tuples) passed through a `mapper` function. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2 }) + * .mapEntries(([ k, v ]) => [ k.toUpperCase(), v * 2 ]) + * // Map { "A": 2, "B": 4 } + * ``` + * + * Note: `mapEntries()` always returns a new instance, even if it produced + * the same entry at every step. + * + * If the mapper function returns `undefined`, then the entry will be filtered + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Collection.Keyed; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Collection.Keyed; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + [Symbol.iterator](): IterableIterator<[K, V]>; + } + + /** + * Indexed Collections have incrementing numeric keys. They exhibit + * slightly different behavior than `Collection.Keyed` for some methods in order + * to better mirror the behavior of JavaScript's `Array`, and add methods + * which do not make sense on non-indexed Collections such as `indexOf`. + * + * Unlike JavaScript arrays, `Collection.Indexed`s are always dense. "Unset" + * indices and `undefined` indices are indistinguishable, and all indices from + * 0 to `size` are visited when iterated. + * + * All Collection.Indexed methods return re-indexed Collections. In other words, + * indices always start at 0 and increment until size. If you wish to + * preserve indices, using them as keys, convert to a Collection.Keyed by + * calling `toKeyedSeq`. + */ + namespace Indexed {} + + /** + * Creates a new Collection.Indexed. + * + * Note: `Collection.Indexed` is a conversion function and not a class, and + * does not use the `new` keyword during construction. + */ + function Indexed( + collection?: Iterable | ArrayLike + ): Collection.Indexed; + + interface Indexed extends Collection { + /** + * Deeply converts this Indexed collection to equivalent native JavaScript Array. + */ + toJS(): Array; + + /** + * Shallowly converts this Indexed collection to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + // Reading values + + /** + * Returns the value associated with the provided index, or notSetValue if + * the index is beyond the bounds of the Collection. + * + * `index` may be a negative number, which indexes back from the end of the + * Collection. `s.get(-1)` gets the last item in the Collection. + */ + get(index: number, notSetValue: NSV): T | NSV; + get(index: number): T | undefined; + + // Conversion to Seq + + /** + * Returns Seq.Indexed. + * @override + */ + toSeq(): Seq.Indexed; + + /** + * If this is a collection of [key, value] entry tuples, it will return a + * Seq.Keyed of those entries. + */ + fromEntrySeq(): Seq.Keyed; + + // Combination + + /** + * Returns a Collection of the same type with `separator` between each item + * in this Collection. + */ + interpose(separator: T): this; + + /** + * Returns a Collection of the same type with the provided `collections` + * interleaved into this collection. + * + * The resulting Collection includes the first item from each, then the + * second from each, etc. + * + * + * ```js + * const { List } = require('immutable') + * List([ 1, 2, 3 ]).interleave(List([ 'A', 'B', 'C' ])) + * // List [ 1, "A", 2, "B", 3, "C" ] + * ``` + * + * The shortest Collection stops interleave. + * + * + * ```js + * List([ 1, 2, 3 ]).interleave( + * List([ 'A', 'B' ]), + * List([ 'X', 'Y', 'Z' ]) + * ) + * // List [ 1, "A", "X", 2, "B", "Y" ] + * ``` + * + * Since `interleave()` re-indexes values, it produces a complete copy, + * which has `O(N)` complexity. + * + * Note: `interleave` *cannot* be used in `withMutations`. + */ + interleave(...collections: Array>): this; + + /** + * Splice returns a new indexed Collection by replacing a region of this + * Collection with new values. If values are not provided, it only skips the + * region to be removed. + * + * `index` may be a negative number, which indexes back from the end of the + * Collection. `s.splice(-2)` splices after the second to last item. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'a', 'b', 'c', 'd' ]).splice(1, 2, 'q', 'r', 's') + * // List [ "a", "q", "r", "s", "d" ] + * ``` + * + * Since `splice()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `splice` *cannot* be used in `withMutations`. + */ + splice(index: number, removeNum: number, ...values: Array): this; + + /** + * Returns a Collection of the same type "zipped" with the provided + * collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Collection.Indexed<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Collection.Indexed<[T, U, V]>; + zip( + ...collections: Array> + ): Collection.Indexed; + + /** + * Returns a Collection "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = List([ 1, 2 ]); + * const b = List([ 3, 4, 5 ]); + * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + */ + zipAll(other: Collection): Collection.Indexed<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Collection.Indexed<[T, U, V]>; + zipAll( + ...collections: Array> + ): Collection.Indexed; + + /** + * Returns a Collection of the same type "zipped" with the provided + * collections by using a custom `zipper` function. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // List [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Collection.Indexed; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Collection.Indexed; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Collection.Indexed; + + // Search for value + + /** + * Returns the first index at which a given value can be found in the + * Collection, or -1 if it is not present. + */ + indexOf(searchValue: T): number; + + /** + * Returns the last index at which a given value can be found in the + * Collection, or -1 if it is not present. + */ + lastIndexOf(searchValue: T): number; + + /** + * Returns the first index in the Collection where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findIndex( + predicate: (value: T, index: number, iter: this) => boolean, + context?: unknown + ): number; + + /** + * Returns the last index in the Collection where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findLastIndex( + predicate: (value: T, index: number, iter: this) => boolean, + context?: unknown + ): number; + + // Sequence algorithms + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat( + ...valuesOrCollections: Array | C> + ): Collection.Indexed; + + /** + * Returns a new Collection.Indexed with values passed through a + * `mapper` function. + * + * ```js + * const { Collection } = require('immutable') + * Collection.Indexed([1,2]).map(x => 10 * x) + * // Seq [ 1, 2 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Collection.Indexed; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Collection.Indexed; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Collection.Indexed; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + [Symbol.iterator](): IterableIterator; + } + + /** + * Set Collections only represent values. They have no associated keys or + * indices. Duplicate values are possible in the lazy `Seq.Set`s, however + * the concrete `Set` Collection does not allow duplicate values. + * + * Collection methods on Collection.Set such as `map` and `forEach` will provide + * the value as both the first and second arguments to the provided function. + * + * ```js + * const { Collection } = require('immutable') + * const seq = Collection.Set([ 'A', 'B', 'C' ]) + * // Seq { "A", "B", "C" } + * seq.forEach((v, k) => + * assert.equal(v, k) + * ) + * ``` + */ + namespace Set {} + + /** + * Similar to `Collection()`, but always returns a Collection.Set. + * + * Note: `Collection.Set` is a factory function and not a class, and does + * not use the `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Collection.Set; + + interface Set extends Collection { + /** + * Deeply converts this Set collection to equivalent native JavaScript Array. + */ + toJS(): Array; + + /** + * Shallowly converts this Set collection to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns Seq.Set. + * @override + */ + toSeq(): Seq.Set; + + // Sequence algorithms + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat(...collections: Array>): Collection.Set; + + /** + * Returns a new Collection.Set with values passed through a + * `mapper` function. + * + * ``` + * Collection.Set([ 1, 2 ]).map(x => 10 * x) + * // Seq { 1, 2 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Collection.Set; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Collection.Set; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Collection.Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + [Symbol.iterator](): IterableIterator; + } + } + + /** + * Creates a Collection. + * + * The type of Collection created is based on the input. + * + * * If an `Collection`, that same `Collection`. + * * If an Array-like, an `Collection.Indexed`. + * * If an Object with an Iterator defined, an `Collection.Indexed`. + * * If an Object, an `Collection.Keyed`. + * + * This methods forces the conversion of Objects and Strings to Collections. + * If you want to ensure that a Collection of one item is returned, use + * `Seq.of`. + * + * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, + * which is usually not what you want. You should turn your Iterator Object into + * an iterable object by defining a Symbol.iterator (or @@iterator) method which + * returns `this`. + * + * Note: `Collection` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Collection>(collection: I): I; + function Collection( + collection: Iterable | ArrayLike + ): Collection.Indexed; + function Collection(obj: { + [key: string]: V; + }): Collection.Keyed; + function Collection(): Collection; + + interface Collection extends ValueObject { + // Value equality + + /** + * True if this and the other Collection have value equality, as defined + * by `Immutable.is()`. + * + * Note: This is equivalent to `Immutable.is(this, other)`, but provided to + * allow for chained expressions. + */ + equals(other: unknown): boolean; + + /** + * Computes and returns the hashed identity for this Collection. + * + * The `hashCode` of a Collection is used to determine potential equality, + * and is used when adding this to a `Set` or as a key in a `Map`, enabling + * lookup via a different instance. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 1, 2, 3 ]); + * assert.notStrictEqual(a, b); // different instances + * const set = Set([ a ]); + * assert.equal(set.has(b), true); + * ``` + * + * If two values have the same `hashCode`, they are [not guaranteed + * to be equal][Hash Collision]. If two values have different `hashCode`s, + * they must not be equal. + * + * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) + */ + hashCode(): number; + + // Reading values + + /** + * Returns the value associated with the provided key, or notSetValue if + * the Collection does not contain this key. + * + * Note: it is possible a key may be associated with an `undefined` value, + * so if `notSetValue` is not provided and this method returns `undefined`, + * that does not guarantee the key was not found. + */ + get(key: K, notSetValue: NSV): V | NSV; + get(key: K): V | undefined; + + /** + * True if a key exists within this `Collection`, using `Immutable.is` + * to determine equality + */ + has(key: K): boolean; + + /** + * True if a value exists within this `Collection`, using `Immutable.is` + * to determine equality + * @alias contains + */ + includes(value: V): boolean; + contains(value: V): boolean; + + /** + * In case the `Collection` is not empty returns the first element of the + * `Collection`. + * In case the `Collection` is empty returns the optional default + * value if provided, if no default value is provided returns undefined. + */ + first(notSetValue?: NSV): V | NSV; + + /** + * In case the `Collection` is not empty returns the last element of the + * `Collection`. + * In case the `Collection` is empty returns the optional default + * value if provided, if no default value is provided returns undefined. + */ + last(notSetValue?: NSV): V | NSV; + + // Reading deep values + + /** + * Returns the value found by following a path of keys or indices through + * nested Collections. + * + * + * ```js + * const { Map, List } = require('immutable') + * const deepData = Map({ x: List([ Map({ y: 123 }) ]) }); + * deepData.getIn(['x', 0, 'y']) // 123 + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and getIn() can access those values as well: + * + * + * ```js + * const { Map, List } = require('immutable') + * const deepData = Map({ x: [ { y: 123 } ] }); + * deepData.getIn(['x', 0, 'y']) // 123 + * ``` + */ + getIn(searchKeyPath: Iterable, notSetValue?: unknown): unknown; + + /** + * True if the result of following a path of keys or indices through nested + * Collections results in a set value. + */ + hasIn(searchKeyPath: Iterable): boolean; + + // Persistent changes + + /** + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum a Seq after mapping and filtering: + * + * + * ```js + * const { Seq } = require('immutable') + * + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * Seq([ 1, 2, 3 ]) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + */ + update(updater: (value: this) => R): R; + + // Conversion to JavaScript types + + /** + * Deeply converts this Collection to equivalent native JavaScript Array or Object. + * + * `Collection.Indexed`, and `Collection.Set` become `Array`, while + * `Collection.Keyed` become `Object`, converting keys to Strings. + */ + toJS(): Array | { [key: string]: unknown }; + + /** + * Shallowly converts this Collection to equivalent native JavaScript Array or Object. + * + * `Collection.Indexed`, and `Collection.Set` become `Array`, while + * `Collection.Keyed` become `Object`, converting keys to Strings. + */ + toJSON(): Array | { [key: string]: V }; + + /** + * Shallowly converts this collection to an Array. + * + * `Collection.Indexed`, and `Collection.Set` produce an Array of values. + * `Collection.Keyed` produce an Array of [key, value] tuples. + */ + toArray(): Array | Array<[K, V]>; + + /** + * Shallowly converts this Collection to an Object. + * + * Converts keys to Strings. + */ + toObject(): { [key: string]: V }; + + // Conversion to Collections + + /** + * Converts this Collection to a Map, Throws if keys are not hashable. + * + * Note: This is equivalent to `Map(this.toKeyedSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toMap(): Map; + + /** + * Converts this Collection to a Map, maintaining the order of iteration. + * + * Note: This is equivalent to `OrderedMap(this.toKeyedSeq())`, but + * provided for convenience and to allow for chained expressions. + */ + toOrderedMap(): OrderedMap; + + /** + * Converts this Collection to a Set, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Set(this)`, but provided to allow for + * chained expressions. + */ + toSet(): Set; + + /** + * Converts this Collection to a Set, maintaining the order of iteration and + * discarding keys. + * + * Note: This is equivalent to `OrderedSet(this.valueSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toOrderedSet(): OrderedSet; + + /** + * Converts this Collection to a List, discarding keys. + * + * This is similar to `List(collection)`, but provided to allow for chained + * expressions. However, when called on `Map` or other keyed collections, + * `collection.toList()` discards the keys and creates a list of only the + * values, whereas `List(collection)` creates a list of entry tuples. + * + * + * ```js + * const { Map, List } = require('immutable') + * var myMap = Map({ a: 'Apple', b: 'Banana' }) + * List(myMap) // List [ [ "a", "Apple" ], [ "b", "Banana" ] ] + * myMap.toList() // List [ "Apple", "Banana" ] + * ``` + */ + toList(): List; + + /** + * Converts this Collection to a Stack, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Stack(this)`, but provided to allow for + * chained expressions. + */ + toStack(): Stack; + + // Conversion to Seq + + /** + * Converts this Collection to a Seq of the same kind (indexed, + * keyed, or set). + */ + toSeq(): Seq; + + /** + * Returns a Seq.Keyed from this Collection where indices are treated as keys. + * + * This is useful if you want to operate on an + * Collection.Indexed and preserve the [index, value] pairs. + * + * The returned Seq will have identical iteration order as + * this Collection. + * + * + * ```js + * const { Seq } = require('immutable') + * const indexedSeq = Seq([ 'A', 'B', 'C' ]) + * // Seq [ "A", "B", "C" ] + * indexedSeq.filter(v => v === 'B') + * // Seq [ "B" ] + * const keyedSeq = indexedSeq.toKeyedSeq() + * // Seq { 0: "A", 1: "B", 2: "C" } + * keyedSeq.filter(v => v === 'B') + * // Seq { 1: "B" } + * ``` + */ + toKeyedSeq(): Seq.Keyed; + + /** + * Returns an Seq.Indexed of the values of this Collection, discarding keys. + */ + toIndexedSeq(): Seq.Indexed; + + /** + * Returns a Seq.Set of the values of this Collection, discarding keys. + */ + toSetSeq(): Seq.Set; + + // Iterators + + /** + * An iterator of this `Collection`'s keys. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `keySeq` instead, if this is + * what you want. + */ + keys(): IterableIterator; + + /** + * An iterator of this `Collection`'s values. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `valueSeq` instead, if this is + * what you want. + */ + values(): IterableIterator; + + /** + * An iterator of this `Collection`'s entries as `[ key, value ]` tuples. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `entrySeq` instead, if this is + * what you want. + */ + entries(): IterableIterator<[K, V]>; + + [Symbol.iterator](): IterableIterator; + + // Collections (Seq) + + /** + * Returns a new Seq.Indexed of the keys of this Collection, + * discarding values. + */ + keySeq(): Seq.Indexed; + + /** + * Returns an Seq.Indexed of the values of this Collection, discarding keys. + */ + valueSeq(): Seq.Indexed; + + /** + * Returns a new Seq.Indexed of [key, value] tuples. + */ + entrySeq(): Seq.Indexed<[K, V]>; + + // Sequence algorithms + + /** + * Returns a new Collection of the same type with values passed through a + * `mapper` function. + * + * + * ```js + * const { Collection } = require('immutable') + * Collection({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Collection; + + /** + * Note: used only for sets, which return Collection but are otherwise + * identical to normal `map()`. + * + * @ignore + */ + map(...args: Array): unknown; + + /** + * Returns a new Collection of the same type with only the entries for which + * the `predicate` function returns true. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2, c: 3, d: 4}).filter(x => x % 2 === 0) + * // Map { "b": 2, "d": 4 } + * ``` + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Collection; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type with only the entries for which + * the `predicate` function returns false. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2, c: 3, d: 4}).filterNot(x => x % 2 === 0) + * // Map { "a": 1, "c": 3 } + * ``` + * + * Note: `filterNot()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filterNot( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type in reverse order. + */ + reverse(): this; + + /** + * Returns a new Collection of the same type which includes the same entries, + * stably sorted by using a `comparator`. + * + * If a `comparator` is not provided, a default comparator uses `<` and `>`. + * + * `comparator(valueA, valueB)`: + * + * * Returns `0` if the elements should not be swapped. + * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` + * * Returns `1` (or any positive number) if `valueA` comes after `valueB` + * * Is pure, i.e. it must always return the same value for the same pair + * of values. + * + * When sorting collections which have no defined order, their ordered + * equivalents will be returned. e.g. `map.sort()` returns OrderedMap. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ "c": 3, "a": 1, "b": 2 }).sort((a, b) => { + * if (a < b) { return -1; } + * if (a > b) { return 1; } + * if (a === b) { return 0; } + * }); + * // OrderedMap { "a": 1, "b": 2, "c": 3 } + * ``` + * + * Note: `sort()` Always returns a new instance, even if the original was + * already sorted. + * + * Note: This is always an eager operation. + */ + sort(comparator?: (valueA: V, valueB: V) => number): this; + + /** + * Like `sort`, but also accepts a `comparatorValueMapper` which allows for + * sorting by more sophisticated means: + * + * + * ```js + * const { Map } = require('immutable') + * const beattles = Map({ + * John: { name: "Lennon" }, + * Paul: { name: "McCartney" }, + * George: { name: "Harrison" }, + * Ringo: { name: "Starr" }, + * }); + * beattles.sortBy(member => member.name); + * ``` + * + * Note: `sortBy()` Always returns a new instance, even if the original was + * already sorted. + * + * Note: This is always an eager operation. + */ + sortBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): this; + + /** + * Returns a `Collection.Keyed` of `Collection.Keyeds`, grouped by the return + * value of the `grouper` function. + * + * Note: This is always an eager operation. + * + * + * ```js + * const { List, Map } = require('immutable') + * const listOfMaps = List([ + * Map({ v: 0 }), + * Map({ v: 1 }), + * Map({ v: 1 }), + * Map({ v: 0 }), + * Map({ v: 2 }) + * ]) + * const groupsOfMaps = listOfMaps.groupBy(x => x.get('v')) + * // Map { + * // 0: List [ Map{ "v": 0 }, Map { "v": 0 } ], + * // 1: List [ Map{ "v": 1 }, Map { "v": 1 } ], + * // 2: List [ Map{ "v": 2 } ], + * // } + * ``` + */ + groupBy( + grouper: (value: V, key: K, iter: this) => G, + context?: unknown + ): /*Map*/ Seq.Keyed>; + + // Side effects + + /** + * The `sideEffect` is executed for every entry in the Collection. + * + * Unlike `Array#forEach`, if any call of `sideEffect` returns + * `false`, the iteration will stop. Returns the number of entries iterated + * (including the last iteration which returned false). + */ + forEach( + sideEffect: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): number; + + // Creating subsets + + /** + * Returns a new Collection of the same type representing a portion of this + * Collection from start up to but not including end. + * + * If begin is negative, it is offset from the end of the Collection. e.g. + * `slice(-2)` returns a Collection of the last two entries. If it is not + * provided the new Collection will begin at the beginning of this Collection. + * + * If end is negative, it is offset from the end of the Collection. e.g. + * `slice(0, -1)` returns a Collection of everything but the last entry. If + * it is not provided, the new Collection will continue through the end of + * this Collection. + * + * If the requested slice is equivalent to the current Collection, then it + * will return itself. + */ + slice(begin?: number, end?: number): this; + + /** + * Returns a new Collection of the same type containing all entries except + * the first. + */ + rest(): this; + + /** + * Returns a new Collection of the same type containing all entries except + * the last. + */ + butLast(): this; + + /** + * Returns a new Collection of the same type which excludes the first `amount` + * entries from this Collection. + */ + skip(amount: number): this; + + /** + * Returns a new Collection of the same type which excludes the last `amount` + * entries from this Collection. + */ + skipLast(amount: number): this; + + /** + * Returns a new Collection of the same type which includes entries starting + * from when `predicate` first returns false. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .skipWhile(x => x.match(/g/)) + * // List [ "cat", "hat", "god" ] + * ``` + */ + skipWhile( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes entries starting + * from when `predicate` first returns true. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .skipUntil(x => x.match(/hat/)) + * // List [ "hat", "god" ] + * ``` + */ + skipUntil( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes the first `amount` + * entries from this Collection. + */ + take(amount: number): this; + + /** + * Returns a new Collection of the same type which includes the last `amount` + * entries from this Collection. + */ + takeLast(amount: number): this; + + /** + * Returns a new Collection of the same type which includes entries from this + * Collection as long as the `predicate` returns true. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .takeWhile(x => x.match(/o/)) + * // List [ "dog", "frog" ] + * ``` + */ + takeWhile( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes entries from this + * Collection as long as the `predicate` returns false. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .takeUntil(x => x.match(/at/)) + * // List [ "dog", "frog" ] + * ``` + */ + takeUntil( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + // Combination + + /** + * Returns a new Collection of the same type with other values and + * collection-like concatenated to this one. + * + * For Seqs, all entries will be present in the resulting Seq, even if they + * have the same key. + */ + concat( + ...valuesOrCollections: Array + ): Collection; + + /** + * Flattens nested Collections. + * + * Will deeply flatten the Collection by default, returning a Collection of the + * same type, but a `depth` can be provided in the form of a number or + * boolean (where true means to shallowly flatten one level). A depth of 0 + * (or shallow: false) will deeply flatten. + * + * Flattens only others Collection, not Arrays or Objects. + * + * Note: `flatten(true)` operates on Collection> and + * returns Collection + */ + flatten(depth?: number): Collection; + // tslint:disable-next-line unified-signatures + flatten(shallow?: boolean): Collection; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Collection; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + * Used for Dictionaries only. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Collection; + + // Reducing a value + + /** + * Reduces the Collection to a value by calling the `reducer` for every entry + * in the Collection and passing along the reduced value. + * + * If `initialReduction` is not provided, the first item in the + * Collection will be used. + * + * @see `Array#reduce`. + */ + reduce( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: unknown + ): R; + reduce( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + /** + * Reduces the Collection in reverse (from the right side). + * + * Note: Similar to this.reverse().reduce(), and provided for parity + * with `Array#reduceRight`. + */ + reduceRight( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: unknown + ): R; + reduceRight( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + /** + * True if `predicate` returns true for all entries in the Collection. + */ + every( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): boolean; + + /** + * True if `predicate` returns true for any entry in the Collection. + */ + some( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): boolean; + + /** + * Joins values together as a string, inserting a separator between each. + * The default separator is `","`. + */ + join(separator?: string): string; + + /** + * Returns true if this Collection includes no values. + * + * For some lazy `Seq`, `isEmpty` might need to iterate to determine + * emptiness. At most one iteration will occur. + */ + isEmpty(): boolean; + + /** + * Returns the size of this Collection. + * + * Regardless of if this Collection can describe its size lazily (some Seqs + * cannot), this method will always return the correct size. E.g. it + * evaluates a lazy `Seq` if necessary. + * + * If `predicate` is provided, then this returns the count of entries in the + * Collection for which the `predicate` returns true. + */ + count(): number; + count( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): number; + + /** + * Returns a `Seq.Keyed` of counts, grouped by the return value of + * the `grouper` function. + * + * Note: This is not a lazy operation. + */ + countBy( + grouper: (value: V, key: K, iter: this) => G, + context?: unknown + ): Map; + + // Search for value + + /** + * Returns the first value for which the `predicate` returns true. + */ + find( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): V | undefined; + + /** + * Returns the last value for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLast( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): V | undefined; + + /** + * Returns the first [key, value] entry for which the `predicate` returns true. + */ + findEntry( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): [K, V] | undefined; + + /** + * Returns the last [key, value] entry for which the `predicate` + * returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastEntry( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): [K, V] | undefined; + + /** + * Returns the key for which the `predicate` returns true. + */ + findKey( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): K | undefined; + + /** + * Returns the last key for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastKey( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): K | undefined; + + /** + * Returns the key associated with the search value, or undefined. + */ + keyOf(searchValue: V): K | undefined; + + /** + * Returns the last key associated with the search value, or undefined. + */ + lastKeyOf(searchValue: V): K | undefined; + + /** + * Returns the maximum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Collection#sort`. If it is not + * provided, the default comparator is `>`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `max` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `>` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + max(comparator?: (valueA: V, valueB: V) => number): V | undefined; + + /** + * Like `max`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * + * ```js + * const { List, } = require('immutable'); + * const l = List([ + * { name: 'Bob', avgHit: 1 }, + * { name: 'Max', avgHit: 3 }, + * { name: 'Lili', avgHit: 2 } , + * ]); + * l.maxBy(i => i.avgHit); // will output { name: 'Max', avgHit: 3 } + * ``` + */ + maxBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V | undefined; + + /** + * Returns the minimum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Collection#sort`. If it is not + * provided, the default comparator is `<`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `min` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `<` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + min(comparator?: (valueA: V, valueB: V) => number): V | undefined; + + /** + * Like `min`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * + * ```js + * const { List, } = require('immutable'); + * const l = List([ + * { name: 'Bob', avgHit: 1 }, + * { name: 'Max', avgHit: 3 }, + * { name: 'Lili', avgHit: 2 } , + * ]); + * l.minBy(i => i.avgHit); // will output { name: 'Bob', avgHit: 1 } + * ``` + */ + minBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V | undefined; + + // Comparison + + /** + * True if `iter` includes every value in this Collection. + */ + isSubset(iter: Iterable): boolean; + + /** + * True if this Collection includes every value in `iter`. + */ + isSuperset(iter: Iterable): boolean; + } + + /** + * The interface to fulfill to qualify as a Value Object. + */ + interface ValueObject { + /** + * True if this and the other Collection have value equality, as defined + * by `Immutable.is()`. + * + * Note: This is equivalent to `Immutable.is(this, other)`, but provided to + * allow for chained expressions. + */ + equals(other: unknown): boolean; + + /** + * Computes and returns the hashed identity for this Collection. + * + * The `hashCode` of a Collection is used to determine potential equality, + * and is used when adding this to a `Set` or as a key in a `Map`, enabling + * lookup via a different instance. + * + * + * ```js + * const { List, Set } = require('immutable'); + * const a = List([ 1, 2, 3 ]); + * const b = List([ 1, 2, 3 ]); + * assert.notStrictEqual(a, b); // different instances + * const set = Set([ a ]); + * assert.equal(set.has(b), true); + * ``` + * + * Note: hashCode() MUST return a Uint32 number. The easiest way to + * guarantee this is to return `myHash | 0` from a custom implementation. + * + * If two values have the same `hashCode`, they are [not guaranteed + * to be equal][Hash Collision]. If two values have different `hashCode`s, + * they must not be equal. + * + * Note: `hashCode()` is not guaranteed to always be called before + * `equals()`. Most but not all Immutable.js collections use hash codes to + * organize their internal data structures, while all Immutable.js + * collections use equality during lookups. + * + * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) + */ + hashCode(): number; + } + + /** + * Deeply converts plain JS objects and arrays to Immutable Maps and Lists. + * + * `fromJS` will convert Arrays and [array-like objects][2] to a List, and + * plain objects (without a custom prototype) to a Map. [Iterable objects][3] + * may be converted to List, Map, or Set. + * + * If a `reviver` is optionally provided, it will be called with every + * collection as a Seq (beginning with the most nested collections + * and proceeding to the top-level collection itself), along with the key + * referring to each collection and the parent JS object provided as `this`. + * For the top level, object, the key will be `""`. This `reviver` is expected + * to return a new Immutable Collection, allowing for custom conversions from + * deep JS objects. Finally, a `path` is provided which is the sequence of + * keys to this value from the starting value. + * + * `reviver` acts similarly to the [same parameter in `JSON.parse`][1]. + * + * If `reviver` is not provided, the default behavior will convert Objects + * into Maps and Arrays into Lists like so: + * + * + * ```js + * const { fromJS, isKeyed } = require('immutable') + * function (key, value) { + * return isKeyed(value) ? value.toMap() : value.toList() + * } + * ``` + * + * Accordingly, this example converts native JS data to OrderedMap and List: + * + * + * ```js + * const { fromJS, isKeyed } = require('immutable') + * fromJS({ a: {b: [10, 20, 30]}, c: 40}, function (key, value, path) { + * console.log(key, value, path) + * return isKeyed(value) ? value.toOrderedMap() : value.toList() + * }) + * + * > "b", [ 10, 20, 30 ], [ "a", "b" ] + * > "a", {b: [10, 20, 30]}, [ "a" ] + * > "", {a: {b: [10, 20, 30]}, c: 40}, [] + * ``` + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * + * ```js + * const { Map } = require('immutable') + * let obj = { 1: "one" }; + * Object.keys(obj); // [ "1" ] + * assert.equal(obj["1"], obj[1]); // "one" === "one" + * + * let map = Map(obj); + * assert.notEqual(map.get("1"), map.get(1)); // "one" !== undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + * + * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter + * "Using the reviver parameter" + * [2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects + * "Working with array-like objects" + * [3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol + * "The iterable protocol" + */ + function fromJS( + jsValue: unknown, + reviver?: ( + key: string | number, + sequence: Collection.Keyed | Collection.Indexed, + path?: Array + ) => unknown + ): Collection; + + /** + * Value equality check with semantics similar to `Object.is`, but treats + * Immutable `Collection`s as values, equal if the second `Collection` includes + * equivalent values. + * + * It's used throughout Immutable when checking for equality, including `Map` + * key equality and `Set` membership. + * + * + * ```js + * const { Map, is } = require('immutable') + * const map1 = Map({ a: 1, b: 1, c: 1 }) + * const map2 = Map({ a: 1, b: 1, c: 1 }) + * assert.equal(map1 !== map2, true) + * assert.equal(Object.is(map1, map2), false) + * assert.equal(is(map1, map2), true) + * ``` + * + * `is()` compares primitive types like strings and numbers, Immutable.js + * collections like `Map` and `List`, but also any custom object which + * implements `ValueObject` by providing `equals()` and `hashCode()` methods. + * + * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same + * value, matching the behavior of ES6 Map key equality. + */ + function is(first: unknown, second: unknown): boolean; + + /** + * The `hash()` function is an important part of how Immutable determines if + * two values are equivalent and is used to determine how to store those + * values. Provided with any value, `hash()` will return a 31-bit integer. + * + * When designing Objects which may be equal, it's important that when a + * `.equals()` method returns true, that both values `.hashCode()` method + * return the same value. `hash()` may be used to produce those values. + * + * For non-Immutable Objects that do not provide a `.hashCode()` functions + * (including plain Objects, plain Arrays, Date objects, etc), a unique hash + * value will be created for each *instance*. That is, the create hash + * represents referential equality, and not value equality for Objects. This + * ensures that if that Object is mutated over time that its hash code will + * remain consistent, allowing Objects to be used as keys and values in + * Immutable.js collections. + * + * Note that `hash()` attempts to balance between speed and avoiding + * collisions, however it makes no attempt to produce secure hashes. + * + * *New in Version 4.0* + */ + function hash(value: unknown): number; + + /** + * True if `maybeImmutable` is an Immutable Collection or Record. + * + * Note: Still returns true even if the collections is within a `withMutations()`. + * + * + * ```js + * const { isImmutable, Map, List, Stack } = require('immutable'); + * isImmutable([]); // false + * isImmutable({}); // false + * isImmutable(Map()); // true + * isImmutable(List()); // true + * isImmutable(Stack()); // true + * isImmutable(Map().asMutable()); // true + * ``` + */ + function isImmutable( + maybeImmutable: unknown + ): maybeImmutable is Collection; + + /** + * True if `maybeCollection` is a Collection, or any of its subclasses. + * + * + * ```js + * const { isCollection, Map, List, Stack } = require('immutable'); + * isCollection([]); // false + * isCollection({}); // false + * isCollection(Map()); // true + * isCollection(List()); // true + * isCollection(Stack()); // true + * ``` + */ + function isCollection( + maybeCollection: unknown + ): maybeCollection is Collection; + + /** + * True if `maybeKeyed` is a Collection.Keyed, or any of its subclasses. + * + * + * ```js + * const { isKeyed, Map, List, Stack } = require('immutable'); + * isKeyed([]); // false + * isKeyed({}); // false + * isKeyed(Map()); // true + * isKeyed(List()); // false + * isKeyed(Stack()); // false + * ``` + */ + function isKeyed( + maybeKeyed: unknown + ): maybeKeyed is Collection.Keyed; + + /** + * True if `maybeIndexed` is a Collection.Indexed, or any of its subclasses. + * + * + * ```js + * const { isIndexed, Map, List, Stack, Set } = require('immutable'); + * isIndexed([]); // false + * isIndexed({}); // false + * isIndexed(Map()); // false + * isIndexed(List()); // true + * isIndexed(Stack()); // true + * isIndexed(Set()); // false + * ``` + */ + function isIndexed( + maybeIndexed: unknown + ): maybeIndexed is Collection.Indexed; + + /** + * True if `maybeAssociative` is either a Keyed or Indexed Collection. + * + * + * ```js + * const { isAssociative, Map, List, Stack, Set } = require('immutable'); + * isAssociative([]); // false + * isAssociative({}); // false + * isAssociative(Map()); // true + * isAssociative(List()); // true + * isAssociative(Stack()); // true + * isAssociative(Set()); // false + * ``` + */ + function isAssociative( + maybeAssociative: unknown + ): maybeAssociative is + | Collection.Keyed + | Collection.Indexed; + + /** + * True if `maybeOrdered` is a Collection where iteration order is well + * defined. True for Collection.Indexed as well as OrderedMap and OrderedSet. + * + * + * ```js + * const { isOrdered, Map, OrderedMap, List, Set } = require('immutable'); + * isOrdered([]); // false + * isOrdered({}); // false + * isOrdered(Map()); // false + * isOrdered(OrderedMap()); // true + * isOrdered(List()); // true + * isOrdered(Set()); // false + * ``` + */ + function isOrdered(maybeOrdered: unknown): boolean; + + /** + * True if `maybeValue` is a JavaScript Object which has *both* `equals()` + * and `hashCode()` methods. + * + * Any two instances of *value objects* can be compared for value equality with + * `Immutable.is()` and can be used as keys in a `Map` or members in a `Set`. + */ + function isValueObject(maybeValue: unknown): maybeValue is ValueObject; + + /** + * True if `maybeSeq` is a Seq. + */ + function isSeq( + maybeSeq: unknown + ): maybeSeq is + | Seq.Indexed + | Seq.Keyed + | Seq.Set; + + /** + * True if `maybeList` is a List. + */ + function isList(maybeList: unknown): maybeList is List; + + /** + * True if `maybeMap` is a Map. + * + * Also true for OrderedMaps. + */ + function isMap(maybeMap: unknown): maybeMap is Map; + + /** + * True if `maybeOrderedMap` is an OrderedMap. + */ + function isOrderedMap( + maybeOrderedMap: unknown + ): maybeOrderedMap is OrderedMap; + + /** + * True if `maybeStack` is a Stack. + */ + function isStack(maybeStack: unknown): maybeStack is Stack; + + /** + * True if `maybeSet` is a Set. + * + * Also true for OrderedSets. + */ + function isSet(maybeSet: unknown): maybeSet is Set; + + /** + * True if `maybeOrderedSet` is an OrderedSet. + */ + function isOrderedSet( + maybeOrderedSet: unknown + ): maybeOrderedSet is OrderedSet; + + /** + * True if `maybeRecord` is a Record. + */ + function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; + + /** + * Returns the value within the provided collection associated with the + * provided key, or notSetValue if the key is not defined in the collection. + * + * A functional alternative to `collection.get(key)` which will also work on + * plain Objects and Arrays as an alternative for `collection[key]`. + * + * + * ```js + * const { get } = require('immutable') + * get([ 'dog', 'frog', 'cat' ], 2) // 'frog' + * get({ x: 123, y: 456 }, 'x') // 123 + * get({ x: 123, y: 456 }, 'z', 'ifNotSet') // 'ifNotSet' + * ``` + */ + function get(collection: Collection, key: K): V | undefined; + function get( + collection: Collection, + key: K, + notSetValue: NSV + ): V | NSV; + function get( + record: Record, + key: K, + notSetValue: unknown + ): TProps[K]; + function get(collection: Array, key: number): V | undefined; + function get( + collection: Array, + key: number, + notSetValue: NSV + ): V | NSV; + function get( + object: C, + key: K, + notSetValue: unknown + ): C[K]; + function get(collection: { [key: string]: V }, key: string): V | undefined; + function get( + collection: { [key: string]: V }, + key: string, + notSetValue: NSV + ): V | NSV; + + /** + * Returns true if the key is defined in the provided collection. + * + * A functional alternative to `collection.has(key)` which will also work with + * plain Objects and Arrays as an alternative for + * `collection.hasOwnProperty(key)`. + * + * + * ```js + * const { has } = require('immutable') + * has([ 'dog', 'frog', 'cat' ], 2) // true + * has([ 'dog', 'frog', 'cat' ], 5) // false + * has({ x: 123, y: 456 }, 'x') // true + * has({ x: 123, y: 456 }, 'z') // false + * ``` + */ + function has(collection: object, key: unknown): boolean; + + /** + * Returns a copy of the collection with the value at key removed. + * + * A functional alternative to `collection.remove(key)` which will also work + * with plain Objects and Arrays as an alternative for + * `delete collectionCopy[key]`. + * + * + * ```js + * const { remove } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * remove(originalArray, 1) // [ 'dog', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * remove(originalObject, 'x') // { y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function remove>( + collection: C, + key: K + ): C; + function remove< + TProps extends object, + C extends Record, + K extends keyof TProps + >(collection: C, key: K): C; + function remove>(collection: C, key: number): C; + function remove(collection: C, key: K): C; + function remove( + collection: C, + key: K + ): C; + + /** + * Returns a copy of the collection with the value at key set to the provided + * value. + * + * A functional alternative to `collection.set(key, value)` which will also + * work with plain Objects and Arrays as an alternative for + * `collectionCopy[key] = value`. + * + * + * ```js + * const { set } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * set(originalArray, 1, 'cow') // [ 'dog', 'cow', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * set(originalObject, 'x', 789) // { x: 789, y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function set>( + collection: C, + key: K, + value: V + ): C; + function set< + TProps extends object, + C extends Record, + K extends keyof TProps + >(record: C, key: K, value: TProps[K]): C; + function set>(collection: C, key: number, value: V): C; + function set(object: C, key: K, value: C[K]): C; + function set( + collection: C, + key: string, + value: V + ): C; + + /** + * Returns a copy of the collection with the value at key set to the result of + * providing the existing value to the updating function. + * + * A functional alternative to `collection.update(key, fn)` which will also + * work with plain Objects and Arrays as an alternative for + * `collectionCopy[key] = fn(collection[key])`. + * + * + * ```js + * const { update } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * update(originalArray, 1, val => val.toUpperCase()) // [ 'dog', 'FROG', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * update(originalObject, 'x', val => val * 6) // { x: 738, y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function update>( + collection: C, + key: K, + updater: (value: V | undefined) => V + ): C; + function update, NSV>( + collection: C, + key: K, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): C; + function update< + TProps extends object, + C extends Record, + K extends keyof TProps + >(record: C, key: K, updater: (value: TProps[K]) => TProps[K]): C; + function update< + TProps extends object, + C extends Record, + K extends keyof TProps, + NSV + >( + record: C, + key: K, + notSetValue: NSV, + updater: (value: TProps[K] | NSV) => TProps[K] + ): C; + function update( + collection: Array, + key: number, + updater: (value: V) => V + ): Array; + function update( + collection: Array, + key: number, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): Array; + function update( + object: C, + key: K, + updater: (value: C[K]) => C[K] + ): C; + function update( + object: C, + key: K, + notSetValue: NSV, + updater: (value: C[K] | NSV) => C[K] + ): C; + function update( + collection: C, + key: K, + updater: (value: V) => V + ): { [key: string]: V }; + function update( + collection: C, + key: K, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): { [key: string]: V }; + + /** + * Returns the value at the provided key path starting at the provided + * collection, or notSetValue if the key path is not defined. + * + * A functional alternative to `collection.getIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { getIn } = require('immutable') + * getIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // 123 + * getIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p'], 'ifNotSet') // 'ifNotSet' + * ``` + */ + function getIn( + collection: unknown, + keyPath: Iterable, + notSetValue?: unknown + ): unknown; + + /** + * Returns true if the key path is defined in the provided collection. + * + * A functional alternative to `collection.hasIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { hasIn } = require('immutable') + * hasIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // true + * hasIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p']) // false + * ``` + */ + function hasIn(collection: unknown, keyPath: Iterable): boolean; + + /** + * Returns a copy of the collection with the value at the key path removed. + * + * A functional alternative to `collection.removeIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { removeIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function removeIn(collection: C, keyPath: Iterable): C; + + /** + * Returns a copy of the collection with the value at the key path set to the + * provided value. + * + * A functional alternative to `collection.setIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { setIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * setIn(original, ['x', 'y', 'z'], 456) // { x: { y: { z: 456 }}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function setIn( + collection: C, + keyPath: Iterable, + value: unknown + ): C; + + /** + * Returns a copy of the collection with the value at key path set to the + * result of providing the existing value to the updating function. + * + * A functional alternative to `collection.updateIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { updateIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * updateIn(original, ['x', 'y', 'z'], val => val * 6) // { x: { y: { z: 738 }}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function updateIn( + collection: C, + keyPath: Iterable, + updater: (value: unknown) => unknown + ): C; + function updateIn( + collection: C, + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): C; + + /** + * Returns a copy of the collection with the remaining collections merged in. + * + * A functional alternative to `collection.merge()` which will also work with + * plain Objects and Arrays. + * + * + * ```js + * const { merge } = require('immutable') + * const original = { x: 123, y: 456 } + * merge(original, { y: 789, z: 'abc' }) // { x: 123, y: 789, z: 'abc' } + * console.log(original) // { x: 123, y: 456 } + * ``` + */ + function merge( + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Returns a copy of the collection with the remaining collections merged in, + * calling the `merger` function whenever an existing value is encountered. + * + * A functional alternative to `collection.mergeWith()` which will also work + * with plain Objects and Arrays. + * + * + * ```js + * const { mergeWith } = require('immutable') + * const original = { x: 123, y: 456 } + * mergeWith( + * (oldVal, newVal) => oldVal + newVal, + * original, + * { y: 789, z: 'abc' } + * ) // { x: 123, y: 1245, z: 'abc' } + * console.log(original) // { x: 123, y: 456 } + * ``` + */ + function mergeWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Like `merge()`, but when two compatible collections are encountered with + * the same key, it merges them as well, recursing deeply through the nested + * data. Two collections are considered to be compatible (and thus will be + * merged together) if they both fall into one of three categories: keyed + * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and + * arrays), or set-like (e.g., `Set`s). If they fall into separate + * categories, `mergeDeep` will replace the existing collection with the + * collection being merged in. This behavior can be customized by using + * `mergeDeepWith()`. + * + * Note: Indexed and set-like collections are merged using + * `concat()`/`union()` and therefore do not recurse. + * + * A functional alternative to `collection.mergeDeep()` which will also work + * with plain Objects and Arrays. + * + * + * ```js + * const { mergeDeep } = require('immutable') + * const original = { x: { y: 123 }} + * mergeDeep(original, { x: { z: 456 }}) // { x: { y: 123, z: 456 }} + * console.log(original) // { x: { y: 123 }} + * ``` + */ + function mergeDeep( + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Like `mergeDeep()`, but when two non-collections or incompatible + * collections are encountered at the same key, it uses the `merger` function + * to determine the resulting value. Collections are considered incompatible + * if they fall into separate categories between keyed, indexed, and set-like. + * + * A functional alternative to `collection.mergeDeepWith()` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { mergeDeepWith } = require('immutable') + * const original = { x: { y: 123 }} + * mergeDeepWith( + * (oldVal, newVal) => oldVal + newVal, + * original, + * { x: { y: 456 }} + * ) // { x: { y: 579 }} + * console.log(original) // { x: { y: 123 }} + * ``` + */ + function mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; +} + +/** + * Defines the main export of the immutable module to be the Immutable namespace + * This supports many common module import patterns: + * + * const Immutable = require("immutable"); + * const { List } = require("immutable"); + * import Immutable from "immutable"; + * import * as Immutable from "immutable"; + * import { List } from "immutable"; + * + */ +export = Immutable; + +/** + * A global "Immutable" namespace used by UMD modules which allows the use of + * the full Immutable API. + * + * If using Immutable as an imported module, prefer using: + * + * import Immutable from 'immutable' + * + */ +export as namespace Immutable; diff --git a/node_modules/immutable/dist/immutable.es.js b/node_modules/immutable/dist/immutable.es.js new file mode 100644 index 0000000..7281c0c --- /dev/null +++ b/node_modules/immutable/dist/immutable.es.js @@ -0,0 +1,5931 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron 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. + */ +var DELETE = 'delete'; + +// Constants describing the size of trie nodes. +var SHIFT = 5; // Resulted in best performance after ______? +var SIZE = 1 << SHIFT; +var MASK = SIZE - 1; + +// A consistent shared value representing "not set" which equals nothing other +// than itself, and nothing that could be provided externally. +var NOT_SET = {}; + +// Boolean references, Rough equivalent of `bool &`. +function MakeRef() { + return { value: false }; +} + +function SetRef(ref) { + if (ref) { + ref.value = true; + } +} + +// A function which returns a value representing an "owner" for transient writes +// to tries. The return value will only ever equal itself, and will not equal +// the return of any subsequent call of this function. +function OwnerID() {} + +function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; +} + +function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; +} + +function returnTrue() { + return true; +} + +function wholeSlice(begin, end, size) { + return ( + ((begin === 0 && !isNeg(begin)) || + (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); +} + +function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); +} + +function resolveEnd(end, size) { + return resolveIndex(end, size, size); +} + +function resolveIndex(index, size, defaultIndex) { + // Sanitize indices using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + return index === undefined + ? defaultIndex + : isNeg(index) + ? size === Infinity + ? size + : Math.max(0, size + index) | 0 + : size === undefined || size === index + ? index + : Math.min(size, index) | 0; +} + +function isNeg(value) { + // Account for -0 which is negative, but not less than 0. + return value < 0 || (value === 0 && 1 / value === -Infinity); +} + +var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; + +function isCollection(maybeCollection) { + return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); +} + +var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; + +function isKeyed(maybeKeyed) { + return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); +} + +var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; + +function isIndexed(maybeIndexed) { + return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); +} + +function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); +} + +var Collection = function Collection(value) { + return isCollection(value) ? value : Seq(value); +}; + +var KeyedCollection = /*@__PURE__*/(function (Collection) { + function KeyedCollection(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + if ( Collection ) KeyedCollection.__proto__ = Collection; + KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); + KeyedCollection.prototype.constructor = KeyedCollection; + + return KeyedCollection; +}(Collection)); + +var IndexedCollection = /*@__PURE__*/(function (Collection) { + function IndexedCollection(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + if ( Collection ) IndexedCollection.__proto__ = Collection; + IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); + IndexedCollection.prototype.constructor = IndexedCollection; + + return IndexedCollection; +}(Collection)); + +var SetCollection = /*@__PURE__*/(function (Collection) { + function SetCollection(value) { + return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); + } + + if ( Collection ) SetCollection.__proto__ = Collection; + SetCollection.prototype = Object.create( Collection && Collection.prototype ); + SetCollection.prototype.constructor = SetCollection; + + return SetCollection; +}(Collection)); + +Collection.Keyed = KeyedCollection; +Collection.Indexed = IndexedCollection; +Collection.Set = SetCollection; + +var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; + +function isSeq(maybeSeq) { + return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); +} + +var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; + +function isRecord(maybeRecord) { + return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); +} + +function isImmutable(maybeImmutable) { + return isCollection(maybeImmutable) || isRecord(maybeImmutable); +} + +var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; + +function isOrdered(maybeOrdered) { + return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); +} + +var ITERATE_KEYS = 0; +var ITERATE_VALUES = 1; +var ITERATE_ENTRIES = 2; + +var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; + +var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + +var Iterator = function Iterator(next) { + this.next = next; +}; + +Iterator.prototype.toString = function toString () { + return '[Iterator]'; +}; + +Iterator.KEYS = ITERATE_KEYS; +Iterator.VALUES = ITERATE_VALUES; +Iterator.ENTRIES = ITERATE_ENTRIES; + +Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); +}; +Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; +}; + +function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; +} + +function iteratorDone() { + return { value: undefined, done: true }; +} + +function hasIterator(maybeIterable) { + if (Array.isArray(maybeIterable)) { + // IE11 trick as it does not support `Symbol.iterator` + return true; + } + + return !!getIteratorFn(maybeIterable); +} + +function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; +} + +function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); +} + +function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +function isEntriesIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.entries; +} + +function isKeysIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.keys; +} + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function isArrayLike(value) { + if (Array.isArray(value) || typeof value === 'string') { + return true; + } + + return ( + value && + typeof value === 'object' && + Number.isInteger(value.length) && + value.length >= 0 && + (value.length === 0 + ? // Only {length: 0} is considered Array-like. + Object.keys(value).length === 1 + : // An object is only Array-like if it has a property where the last value + // in the array-like may be found (which could be undefined). + value.hasOwnProperty(value.length - 1)) + ); +} + +var Seq = /*@__PURE__*/(function (Collection) { + function Seq(value) { + return value === undefined || value === null + ? emptySequence() + : isImmutable(value) + ? value.toSeq() + : seqFromValue(value); + } + + if ( Collection ) Seq.__proto__ = Collection; + Seq.prototype = Object.create( Collection && Collection.prototype ); + Seq.prototype.constructor = Seq; + + Seq.prototype.toSeq = function toSeq () { + return this; + }; + + Seq.prototype.toString = function toString () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function cacheResult () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function __iterate (fn, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + while (i !== size) { + var entry = cache[reverse ? size - ++i : i++]; + if (fn(entry[1], entry[0], this) === false) { + break; + } + } + return i; + } + return this.__iterateUncached(fn, reverse); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function __iterator (type, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var entry = cache[reverse ? size - ++i : i++]; + return iteratorValue(type, entry[0], entry[1]); + }); + } + return this.__iteratorUncached(type, reverse); + }; + + return Seq; +}(Collection)); + +var KeyedSeq = /*@__PURE__*/(function (Seq) { + function KeyedSeq(value) { + return value === undefined || value === null + ? emptySequence().toKeyedSeq() + : isCollection(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : isRecord(value) + ? value.toSeq() + : keyedSeqFromValue(value); + } + + if ( Seq ) KeyedSeq.__proto__ = Seq; + KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); + KeyedSeq.prototype.constructor = KeyedSeq; + + KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { + return this; + }; + + return KeyedSeq; +}(Seq)); + +var IndexedSeq = /*@__PURE__*/(function (Seq) { + function IndexedSeq(value) { + return value === undefined || value === null + ? emptySequence() + : isCollection(value) + ? isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq() + : isRecord(value) + ? value.toSeq().entrySeq() + : indexedSeqFromValue(value); + } + + if ( Seq ) IndexedSeq.__proto__ = Seq; + IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); + IndexedSeq.prototype.constructor = IndexedSeq; + + IndexedSeq.of = function of (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { + return this; + }; + + IndexedSeq.prototype.toString = function toString () { + return this.__toString('Seq [', ']'); + }; + + return IndexedSeq; +}(Seq)); + +var SetSeq = /*@__PURE__*/(function (Seq) { + function SetSeq(value) { + return ( + isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) + ).toSetSeq(); + } + + if ( Seq ) SetSeq.__proto__ = Seq; + SetSeq.prototype = Object.create( Seq && Seq.prototype ); + SetSeq.prototype.constructor = SetSeq; + + SetSeq.of = function of (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function toSetSeq () { + return this; + }; + + return SetSeq; +}(Seq)); + +Seq.isSeq = isSeq; +Seq.Keyed = KeyedSeq; +Seq.Set = SetSeq; +Seq.Indexed = IndexedSeq; + +Seq.prototype[IS_SEQ_SYMBOL] = true; + +// #pragma Root Sequences + +var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; + ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ArraySeq.prototype.constructor = ArraySeq; + + ArraySeq.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + while (i !== size) { + var ii = reverse ? size - ++i : i++; + if (fn(array[ii], ii, this) === false) { + break; + } + } + return i; + }; + + ArraySeq.prototype.__iterator = function __iterator (type, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var ii = reverse ? size - ++i : i++; + return iteratorValue(type, ii, array[ii]); + }); + }; + + return ArraySeq; +}(IndexedSeq)); + +var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { + function ObjectSeq(object) { + var keys = Object.keys(object).concat( + Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] + ); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; + ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ObjectSeq.prototype.constructor = ObjectSeq; + + ObjectSeq.prototype.get = function get (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function has (key) { + return hasOwnProperty.call(this._object, key); + }; + + ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + while (i !== size) { + var key = keys[reverse ? size - ++i : i++]; + if (fn(object[key], key, this) === false) { + break; + } + } + return i; + }; + + ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var key = keys[reverse ? size - ++i : i++]; + return iteratorValue(type, key, object[key]); + }); + }; + + return ObjectSeq; +}(KeyedSeq)); +ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; + +var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { + function CollectionSeq(collection) { + this._collection = collection; + this.size = collection.length || collection.size; + } + + if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; + CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + CollectionSeq.prototype.constructor = CollectionSeq; + + CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + return CollectionSeq; +}(IndexedSeq)); + +// # pragma Helper functions + +var EMPTY_SEQ; + +function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); +} + +function keyedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq.fromEntrySeq(); + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of [k, v] entries, or keyed object: ' + + value + ); +} + +function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq; + } + throw new TypeError( + 'Expected Array or collection object of values: ' + value + ); +} + +function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return isEntriesIterable(value) + ? seq.fromEntrySeq() + : isKeysIterable(value) + ? seq.toSetSeq() + : seq; + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of values, or keyed object: ' + value + ); +} + +function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : hasIterator(value) + ? new CollectionSeq(value) + : undefined; +} + +var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; + +function isMap(maybeMap) { + return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); +} + +function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); +} + +function isValueObject(maybeValue) { + return Boolean( + maybeValue && + typeof maybeValue.equals === 'function' && + typeof maybeValue.hashCode === 'function' + ); +} + +/** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections are Value Objects: they implement `equals()` + * and `hashCode()`. + */ +function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if ( + typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function' + ) { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + return !!( + isValueObject(valueA) && + isValueObject(valueB) && + valueA.equals(valueB) + ); +} + +var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a |= 0; // int + b |= 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + +// v8 has an optimization for storing 31-bit signed numbers. +// Values which have either 00 or 11 as the high order bits qualify. +// This function drops the highest order bit in a signed number, maintaining +// the sign bit. +function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); +} + +var defaultValueOf = Object.prototype.valueOf; + +function hash(o) { + if (o == null) { + return hashNullish(o); + } + + if (typeof o.hashCode === 'function') { + // Drop any high bits from accidentally long hash codes. + return smi(o.hashCode(o)); + } + + var v = valueOf(o); + + if (v == null) { + return hashNullish(v); + } + + switch (typeof v) { + case 'boolean': + // The hash values for built-in constants are a 1 value for each 5-byte + // shift region expect for the first, which encodes the value. This + // reduces the odds of a hash collision for these common values. + return v ? 0x42108421 : 0x42108420; + case 'number': + return hashNumber(v); + case 'string': + return v.length > STRING_HASH_CACHE_MIN_STRLEN + ? cachedHashString(v) + : hashString(v); + case 'object': + case 'function': + return hashJSObj(v); + case 'symbol': + return hashSymbol(v); + default: + if (typeof v.toString === 'function') { + return hashString(v.toString()); + } + throw new Error('Value type ' + typeof v + ' cannot be hashed.'); + } +} + +function hashNullish(nullish) { + return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; +} + +// Compress arbitrarily large numbers into smi hashes. +function hashNumber(n) { + if (n !== n || n === Infinity) { + return 0; + } + var hash = n | 0; + if (hash !== n) { + hash ^= n * 0xffffffff; + } + while (n > 0xffffffff) { + n /= 0xffffffff; + hash ^= n; + } + return smi(hash); +} + +function cachedHashString(string) { + var hashed = stringHashCache[string]; + if (hashed === undefined) { + hashed = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hashed; + } + return hashed; +} + +// http://jsperf.com/hashing-strings +function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hashed = 0; + for (var ii = 0; ii < string.length; ii++) { + hashed = (31 * hashed + string.charCodeAt(ii)) | 0; + } + return smi(hashed); +} + +function hashSymbol(sym) { + var hashed = symbolMap[sym]; + if (hashed !== undefined) { + return hashed; + } + + hashed = nextHash(); + + symbolMap[sym] = hashed; + + return hashed; +} + +function hashJSObj(obj) { + var hashed; + if (usingWeakMap) { + hashed = weakMap.get(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = obj[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + if (!canDefineProperty) { + hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + hashed = getIENodeHash(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = nextHash(); + + if (usingWeakMap) { + weakMap.set(obj, hashed); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hashed, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply( + this, + arguments + ); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hashed; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hashed; +} + +// Get references to ES5 object methods. +var isExtensible = Object.isExtensible; + +// True if Object.defineProperty works as expected. IE8 fails this test. +var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } +})(); + +// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it +// and avoid memory leaks from the IE cloneNode bug. +function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } +} + +function valueOf(obj) { + return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' + ? obj.valueOf(obj) + : obj; +} + +function nextHash() { + var nextHash = ++_objHashUID; + if (_objHashUID & 0x40000000) { + _objHashUID = 0; + } + return nextHash; +} + +// If possible, use a WeakMap. +var usingWeakMap = typeof WeakMap === 'function'; +var weakMap; +if (usingWeakMap) { + weakMap = new WeakMap(); +} + +var symbolMap = Object.create(null); + +var _objHashUID = 0; + +var UID_HASH_KEY = '__immutablehash__'; +if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); +} + +var STRING_HASH_CACHE_MIN_STRLEN = 16; +var STRING_HASH_CACHE_MAX_SIZE = 255; +var STRING_HASH_CACHE_SIZE = 0; +var stringHashCache = {}; + +var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; + ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ToKeyedSequence.prototype.constructor = ToKeyedSequence; + + ToKeyedSequence.prototype.get = function get (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function has (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function valueSeq () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function reverse () { + var this$1$1 = this; + + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); + }; + + ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { + return this._iter.__iterator(type, reverse); + }; + + return ToKeyedSequence; +}(KeyedSeq)); +ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; + +var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; + ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ToIndexedSequence.prototype.constructor = ToIndexedSequence; + + ToIndexedSequence.prototype.includes = function includes (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(this); + return this._iter.__iterate( + function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, + reverse + ); + }; + + ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var i = 0; + reverse && ensureSize(this); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue( + type, + reverse ? this$1$1.size - ++i : i++, + step.value, + step + ); + }); + }; + + return ToIndexedSequence; +}(IndexedSeq)); + +var ToSetSequence = /*@__PURE__*/(function (SetSeq) { + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; + ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); + ToSetSequence.prototype.constructor = ToSetSequence; + + ToSetSequence.prototype.has = function has (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); + }; + + ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue(type, step.value, step.value, step); + }); + }; + + return ToSetSequence; +}(SetSeq)); + +var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; + FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + FromEntriesSequence.prototype.constructor = FromEntriesSequence; + + FromEntriesSequence.prototype.entrySeq = function entrySeq () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return fn( + indexedCollection ? entry.get(1) : entry[1], + indexedCollection ? entry.get(0) : entry[0], + this$1$1 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return iteratorValue( + type, + indexedCollection ? entry.get(0) : entry[0], + indexedCollection ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + return FromEntriesSequence; +}(KeyedSeq)); + +ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + +function flipFactory(collection) { + var flipSequence = makeSequence(collection); + flipSequence._iter = collection; + flipSequence.size = collection.size; + flipSequence.flip = function () { return collection; }; + flipSequence.reverse = function () { + var reversedSequence = collection.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { return collection.reverse(); }; + return reversedSequence; + }; + flipSequence.has = function (key) { return collection.includes(key); }; + flipSequence.includes = function (key) { return collection.has(key); }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = collection.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return collection.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + }; + return flipSequence; +} + +function mapFactory(collection, mapper, context) { + var mappedSequence = makeSequence(collection); + mappedSequence.size = collection.size; + mappedSequence.has = function (key) { return collection.has(key); }; + mappedSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v === NOT_SET + ? notSetValue + : mapper.call(context, v, key, collection); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate( + function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, + reverse + ); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, collection), + step + ); + }); + }; + return mappedSequence; +} + +function reverseFactory(collection, useKeys) { + var this$1$1 = this; + + var reversedSequence = makeSequence(collection); + reversedSequence._iter = collection; + reversedSequence.size = collection.size; + reversedSequence.reverse = function () { return collection; }; + if (collection.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(collection); + flipSequence.reverse = function () { return collection.flip(); }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; + reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; + reversedSequence.includes = function (value) { return collection.includes(value); }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(collection); + return collection.__iterate( + function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, + !reverse + ); + }; + reversedSequence.__iterator = function (type, reverse) { + var i = 0; + reverse && ensureSize(collection); + var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + return iteratorValue( + type, + useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, + entry[1], + step + ); + }); + }; + return reversedSequence; +} + +function filterFactory(collection, predicate, context, useKeys) { + var filterSequence = makeSequence(collection); + if (useKeys) { + filterSequence.has = function (key) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, collection); + }; + filterSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, collection) + ? v + : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, collection)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; +} + +function countByFactory(collection, grouper, context) { + var groups = Map().asMutable(); + collection.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); + }); + return groups.asImmutable(); +} + +function groupByFactory(collection, grouper, context) { + var isKeyedIter = isKeyed(collection); + var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); + collection.__iterate(function (v, k) { + groups.update( + grouper.call(context, v, k, collection), + function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); +} + +function sliceFactory(collection, begin, end, useKeys) { + var originalSize = collection.size; + + if (wholeSlice(begin, end, originalSize)) { + return collection; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this collection's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(collection); + + // If collection.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = + sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; + + if (!useKeys && isSeq(collection) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? collection.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return ( + fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && + iterations !== sliceSize + ); + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + if (sliceSize === 0) { + return new Iterator(iteratorDone); + } + var iterator = collection.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES || step.done) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } + return iteratorValue(type, iterations - 1, step.value[1], step); + }); + }; + + return sliceSeq; +} + +function takeWhileFactory(collection, predicate, context) { + var takeSequence = makeSequence(collection); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + collection.__iterate( + function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } + ); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$1$1)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; +} + +function skipWhileFactory(collection, predicate, context, useKeys) { + var skipSequence = makeSequence(collection); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step; + var k; + var v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } + return iteratorValue(type, iterations++, step.value[1], step); + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$1$1)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; +} + +function concatFactory(collection, values) { + var isKeyedCollection = isKeyed(collection); + var iters = [collection] + .concat(values) + .map(function (v) { + if (!isCollection(v)) { + v = isKeyedCollection + ? keyedSeqFromValue(v) + : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedCollection) { + v = KeyedCollection(v); + } + return v; + }) + .filter(function (v) { return v.size !== 0; }); + + if (iters.length === 0) { + return collection; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === collection || + (isKeyedCollection && isKeyed(singleton)) || + (isIndexed(collection) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedCollection) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(collection)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; +} + +function flattenFactory(collection, depth, useKeys) { + var flatSequence = makeSequence(collection); + flatSequence.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isCollection(v)) { + flatDeep(v, currentDepth + 1); + } else { + iterations++; + if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { + stopped = true; + } + } + return !stopped; + }, reverse); + } + flatDeep(collection, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isCollection(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; +} + +function flatMapFactory(collection, mapper, context) { + var coerce = collectionClass(collection); + return collection + .toSeq() + .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) + .flatten(true); +} + +function interposeFactory(collection, separator) { + var interposedSequence = makeSequence(collection); + interposedSequence.size = collection.size && collection.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate( + function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && + fn(v, iterations++, this$1$1) !== false; }, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; +} + +function sortFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedCollection = isKeyed(collection); + var index = 0; + var entries = collection + .toSeq() + .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) + .valueSeq() + .toArray(); + entries + .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) + .forEach( + isKeyedCollection + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + } + ); + return isKeyedCollection + ? KeyedSeq(entries) + : isIndexed(collection) + ? IndexedSeq(entries) + : SetSeq(entries); +} + +function maxFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = collection + .toSeq() + .map(function (v, k) { return [v, mapper(v, k, collection)]; }) + .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); + return entry && entry[0]; + } + return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); +} + +function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return ( + (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || + comp > 0 + ); +} + +function zipWithFactory(keyIter, zipper, iters, zipAll) { + var zipSequence = makeSequence(keyIter); + var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); + zipSequence.size = zipAll ? sizes.max() : sizes.min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map( + function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } + ); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { return i.next(); }); + isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { return s.value; }) + ) + ); + }); + }; + return zipSequence; +} + +// #pragma Helper Functions + +function reify(iter, seq) { + return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); +} + +function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } +} + +function collectionClass(collection) { + return isKeyed(collection) + ? KeyedCollection + : isIndexed(collection) + ? IndexedCollection + : SetCollection; +} + +function makeSequence(collection) { + return Object.create( + (isKeyed(collection) + ? KeyedSeq + : isIndexed(collection) + ? IndexedSeq + : SetSeq + ).prototype + ); +} + +function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } + return Seq.prototype.cacheResult.call(this); +} + +function defaultComparator(a, b) { + if (a === undefined && b === undefined) { + return 0; + } + + if (a === undefined) { + return 1; + } + + if (b === undefined) { + return -1; + } + + return a > b ? 1 : a < b ? -1 : 0; +} + +function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; +} + +function invariant(condition, error) { + if (!condition) { throw new Error(error); } +} + +function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); +} + +function coerceKeyPath(keyPath) { + if (isArrayLike(keyPath) && typeof keyPath !== 'string') { + return keyPath; + } + if (isOrdered(keyPath)) { + return keyPath.toArray(); + } + throw new TypeError( + 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath + ); +} + +var toString = Object.prototype.toString; + +function isPlainObject(value) { + // The base prototype's toString deals with Argument objects and native namespaces like Math + if ( + !value || + typeof value !== 'object' || + toString.call(value) !== '[object Object]' + ) { + return false; + } + + var proto = Object.getPrototypeOf(value); + if (proto === null) { + return true; + } + + // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) + var parentProto = proto; + var nextProto = Object.getPrototypeOf(proto); + while (nextProto !== null) { + parentProto = nextProto; + nextProto = Object.getPrototypeOf(parentProto); + } + return parentProto === proto; +} + +/** + * Returns true if the value is a potentially-persistent data structure, either + * provided by Immutable.js or a plain Array or Object. + */ +function isDataStructure(value) { + return ( + typeof value === 'object' && + (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) + ); +} + +function quoteString(value) { + try { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } catch (_ignoreError) { + return JSON.stringify(value); + } +} + +function has(collection, key) { + return isImmutable(collection) + ? collection.has(key) + : isDataStructure(collection) && hasOwnProperty.call(collection, key); +} + +function get(collection, key, notSetValue) { + return isImmutable(collection) + ? collection.get(key, notSetValue) + : !has(collection, key) + ? notSetValue + : typeof collection.get === 'function' + ? collection.get(key) + : collection[key]; +} + +function shallowCopy(from) { + if (Array.isArray(from)) { + return arrCopy(from); + } + var to = {}; + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + return to; +} + +function remove(collection, key) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.remove) { + throw new TypeError( + 'Cannot update immutable value without .remove() method: ' + collection + ); + } + return collection.remove(key); + } + if (!hasOwnProperty.call(collection, key)) { + return collection; + } + var collectionCopy = shallowCopy(collection); + if (Array.isArray(collectionCopy)) { + collectionCopy.splice(key, 1); + } else { + delete collectionCopy[key]; + } + return collectionCopy; +} + +function set(collection, key, value) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.set) { + throw new TypeError( + 'Cannot update immutable value without .set() method: ' + collection + ); + } + return collection.set(key, value); + } + if (hasOwnProperty.call(collection, key) && value === collection[key]) { + return collection; + } + var collectionCopy = shallowCopy(collection); + collectionCopy[key] = value; + return collectionCopy; +} + +function updateIn$1(collection, keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeeply( + isImmutable(collection), + collection, + coerceKeyPath(keyPath), + 0, + notSetValue, + updater + ); + return updatedValue === NOT_SET ? notSetValue : updatedValue; +} + +function updateInDeeply( + inImmutable, + existing, + keyPath, + i, + notSetValue, + updater +) { + var wasNotSet = existing === NOT_SET; + if (i === keyPath.length) { + var existingValue = wasNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + if (!wasNotSet && !isDataStructure(existing)) { + throw new TypeError( + 'Cannot update within non-data-structure value in path [' + + keyPath.slice(0, i).map(quoteString) + + ']: ' + + existing + ); + } + var key = keyPath[i]; + var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); + var nextUpdated = updateInDeeply( + nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), + nextExisting, + keyPath, + i + 1, + notSetValue, + updater + ); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? remove(existing, key) + : set( + wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, + key, + nextUpdated + ); +} + +function setIn$1(collection, keyPath, value) { + return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); +} + +function setIn(keyPath, v) { + return setIn$1(this, keyPath, v); +} + +function removeIn(collection, keyPath) { + return updateIn$1(collection, keyPath, function () { return NOT_SET; }); +} + +function deleteIn(keyPath) { + return removeIn(this, keyPath); +} + +function update$1(collection, key, notSetValue, updater) { + return updateIn$1(collection, [key], notSetValue, updater); +} + +function update(key, notSetValue, updater) { + return arguments.length === 1 + ? key(this) + : update$1(this, key, notSetValue, updater); +} + +function updateIn(keyPath, notSetValue, updater) { + return updateIn$1(this, keyPath, notSetValue, updater); +} + +function merge$1() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeIntoKeyedWith(this, iters); +} + +function mergeWith$1(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + if (typeof merger !== 'function') { + throw new TypeError('Invalid merger function: ' + merger); + } + return mergeIntoKeyedWith(this, iters, merger); +} + +function mergeIntoKeyedWith(collection, collections, merger) { + var iters = []; + for (var ii = 0; ii < collections.length; ii++) { + var collection$1 = KeyedCollection(collections[ii]); + if (collection$1.size !== 0) { + iters.push(collection$1); + } + } + if (iters.length === 0) { + return collection; + } + if ( + collection.toSeq().size === 0 && + !collection.__ownerID && + iters.length === 1 + ) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoCollection = merger + ? function (value, key) { + update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } + ); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoCollection); + } + }); +} + +function merge(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeWithSources(collection, sources); +} + +function mergeWith(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeWithSources(collection, sources, merger); +} + +function mergeDeep$1(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(collection, sources); +} + +function mergeDeepWith$1(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeDeepWithSources(collection, sources, merger); +} + +function mergeDeepWithSources(collection, sources, merger) { + return mergeWithSources(collection, sources, deepMergerWith(merger)); +} + +function mergeWithSources(collection, sources, merger) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot merge into non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + return typeof merger === 'function' && collection.mergeWith + ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) + : collection.merge + ? collection.merge.apply(collection, sources) + : collection.concat.apply(collection, sources); + } + var isArray = Array.isArray(collection); + var merged = collection; + var Collection = isArray ? IndexedCollection : KeyedCollection; + var mergeItem = isArray + ? function (value) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged.push(value); + } + : function (value, key) { + var hasVal = hasOwnProperty.call(merged, key); + var nextVal = + hasVal && merger ? merger(merged[key], value, key) : value; + if (!hasVal || nextVal !== merged[key]) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged[key] = nextVal; + } + }; + for (var i = 0; i < sources.length; i++) { + Collection(sources[i]).forEach(mergeItem); + } + return merged; +} + +function deepMergerWith(merger) { + function deepMerger(oldValue, newValue, key) { + return isDataStructure(oldValue) && + isDataStructure(newValue) && + areMergeable(oldValue, newValue) + ? mergeWithSources(oldValue, [newValue], deepMerger) + : merger + ? merger(oldValue, newValue, key) + : newValue; + } + return deepMerger; +} + +/** + * It's unclear what the desired behavior is for merging two collections that + * fall into separate categories between keyed, indexed, or set-like, so we only + * consider them mergeable if they fall into the same category. + */ +function areMergeable(oldDataStructure, newDataStructure) { + var oldSeq = Seq(oldDataStructure); + var newSeq = Seq(newDataStructure); + // This logic assumes that a sequence can only fall into one of the three + // categories mentioned above (since there's no `isSetLike()` method). + return ( + isIndexed(oldSeq) === isIndexed(newSeq) && + isKeyed(oldSeq) === isKeyed(newSeq) + ); +} + +function mergeDeep() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeDeepWithSources(this, iters); +} + +function mergeDeepWith(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(this, iters, merger); +} + +function mergeIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); +} + +function mergeDeepIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } + ); +} + +function withMutations(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; +} + +function asMutable() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); +} + +function asImmutable() { + return this.__ensureOwner(); +} + +function wasAltered() { + return this.__altered; +} + +var Map = /*@__PURE__*/(function (KeyedCollection) { + function Map(value) { + return value === undefined || value === null + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( KeyedCollection ) Map.__proto__ = KeyedCollection; + Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); + Map.prototype.constructor = Map; + + Map.of = function of () { + var keyValues = [], len = arguments.length; + while ( len-- ) keyValues[ len ] = arguments[ len ]; + + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function toString () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function get (k, notSetValue) { + return this._root + ? this._root.get(0, undefined, k, notSetValue) + : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function set (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.remove = function remove (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteAll = function deleteAll (keys) { + var collection = Collection(keys); + + if (collection.size === 0) { + return this; + } + + return this.withMutations(function (map) { + collection.forEach(function (key) { return map.remove(key); }); + }); + }; + + Map.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.sort = function sort (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + Map.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (map) { + map.forEach(function (value, key) { + map.set(key, mapper.call(context, value, key, this$1$1)); + }); + }); + }; + + // @pragma Mutability + + Map.prototype.__iterator = function __iterator (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$1$1); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + return Map; +}(KeyedCollection)); + +Map.isMap = isMap; + +var MapPrototype = Map.prototype; +MapPrototype[IS_MAP_SYMBOL] = true; +MapPrototype[DELETE] = MapPrototype.remove; +MapPrototype.removeAll = MapPrototype.deleteAll; +MapPrototype.setIn = setIn; +MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; +MapPrototype.update = update; +MapPrototype.updateIn = updateIn; +MapPrototype.merge = MapPrototype.concat = merge$1; +MapPrototype.mergeWith = mergeWith$1; +MapPrototype.mergeDeep = mergeDeep; +MapPrototype.mergeDeepWith = mergeDeepWith; +MapPrototype.mergeIn = mergeIn; +MapPrototype.mergeDeepIn = mergeDeepIn; +MapPrototype.withMutations = withMutations; +MapPrototype.wasAltered = wasAltered; +MapPrototype.asImmutable = asImmutable; +MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; +MapPrototype['@@transducer/step'] = function (result, arr) { + return result.set(arr[0], arr[1]); +}; +MapPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +// #pragma Trie Nodes + +var ArrayMapNode = function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; +}; + +ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; +}; + +ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); +}; + +var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; +}; + +BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get( + shift + SHIFT, + keyHash, + key, + notSetValue + ); +}; + +BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if ( + exists && + !newNode && + nodes.length === 2 && + isLeafNode(nodes[idx ^ 1]) + ) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setAt(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); +}; + +var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; +}; + +HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node + ? node.get(shift + SHIFT, keyHash, key, notSetValue) + : notSetValue; +}; + +HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setAt(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); +}; + +var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; +}; + +HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; +}; + +HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); +}; + +var ValueNode = function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; +}; + +ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; +}; + +ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); +}; + +// #pragma Iterators + +ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = + function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + +BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = + function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + +// eslint-disable-next-line no-unused-vars +ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); +}; + +var MapIterator = /*@__PURE__*/(function (Iterator) { + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + if ( Iterator ) MapIterator.__proto__ = Iterator; + MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); + MapIterator.prototype.constructor = MapIterator; + + MapIterator.prototype.next = function next () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex = (void 0); + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue( + type, + node.entries[this._reverse ? maxIndex - index : index] + ); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + return MapIterator; +}(Iterator)); + +function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); +} + +function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; +} + +function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; +} + +var EMPTY_MAP; +function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); +} + +function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(); + var didAlter = MakeRef(); + newRoot = updateNode( + map._root, + map.__ownerID, + 0, + undefined, + k, + v, + didChangeSize, + didAlter + ); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); +} + +function updateNode( + node, + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter +) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ); +} + +function isLeafNode(node) { + return ( + node.constructor === ValueNode || node.constructor === HashCollisionNode + ); +} + +function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); +} + +function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; +} + +function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); +} + +function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); +} + +function popCount(x) { + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x += x >> 8; + x += x >> 16; + return x & 0x7f; +} + +function setAt(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; +} + +function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; +} + +function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; +} + +var MAX_ARRAY_MAP_SIZE = SIZE / 4; +var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; +var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + +var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; + +function isList(maybeList) { + return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); +} + +var List = /*@__PURE__*/(function (IndexedCollection) { + function List(value) { + var empty = emptyList(); + if (value === undefined || value === null) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedCollection(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { return list.set(i, v); }); + }); + } + + if ( IndexedCollection ) List.__proto__ = IndexedCollection; + List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + List.prototype.constructor = List; + + List.of = function of (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function toString () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function get (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function set (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function remove (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function insert (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function push (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function pop () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function unshift (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function shift () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.concat = function concat (/*...collections*/) { + var arguments$1 = arguments; + + var seqs = []; + for (var i = 0; i < arguments.length; i++) { + var argument = arguments$1[i]; + var seq = IndexedCollection( + typeof argument !== 'string' && hasIterator(argument) + ? argument + : [argument] + ); + if (seq.size !== 0) { + seqs.push(seq); + } + } + if (seqs.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && seqs.length === 1) { + return this.constructor(seqs[0]); + } + return this.withMutations(function (list) { + seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); + }); + }; + + List.prototype.setSize = function setSize (size) { + return setListBounds(this, 0, size); + }; + + List.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (list) { + for (var i = 0; i < this$1$1.size; i++) { + list.set(i, mapper.call(context, list.get(i), i, this$1$1)); + } + }); + }; + + // @pragma Iteration + + List.prototype.slice = function slice (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function __iterator (type, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE + ? iteratorDone() + : iteratorValue(type, reverse ? --index : index++, value); + }); + }; + + List.prototype.__iterate = function __iterate (fn, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, reverse ? --index : index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyList(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash + ); + }; + + return List; +}(IndexedCollection)); + +List.isList = isList; + +var ListPrototype = List.prototype; +ListPrototype[IS_LIST_SYMBOL] = true; +ListPrototype[DELETE] = ListPrototype.remove; +ListPrototype.merge = ListPrototype.concat; +ListPrototype.setIn = setIn; +ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; +ListPrototype.update = update; +ListPrototype.updateIn = updateIn; +ListPrototype.mergeIn = mergeIn; +ListPrototype.mergeDeepIn = mergeDeepIn; +ListPrototype.withMutations = withMutations; +ListPrototype.wasAltered = wasAltered; +ListPrototype.asImmutable = asImmutable; +ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; +ListPrototype['@@transducer/step'] = function (result, arr) { + return result.push(arr); +}; +ListPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +var VNode = function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; +}; + +// TODO: seems like these methods are very similar + +VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { + if (index === level ? 1 << level : this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = + oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; +}; + +VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = + oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; +}; + +var DONE = {}; + +function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 + ? iterateLeaf(node, offset) + : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + while (true) { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], + level - SHIFT, + offset + (idx << level) + ); + } + }; + } +} + +function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; +} + +var EMPTY_LIST; +function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); +} + +function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode( + newRoot, + list.__ownerID, + list._level, + index, + value, + didAlter + ); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); +} + +function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode( + lowerNode, + ownerID, + level - SHIFT, + index, + value, + didAlter + ); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + if (didAlter) { + SetRef(didAlter); + } + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; +} + +function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); +} + +function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } +} + +function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin |= 0; + } + if (end !== undefined) { + end |= 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = + end === undefined + ? oldCapacity + : end < 0 + ? oldCapacity + end + : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [undefined, newRoot] : [], + owner + ); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [newRoot] : [], + owner + ); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if ( + oldTail && + newTailOffset > oldTailOffset && + newOrigin < oldCapacity && + oldTail.array.length + ) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter( + owner, + newLevel, + newTailOffset - offsetShift + ); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); +} + +function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; +} + +var OrderedMap = /*@__PURE__*/(function (Map) { + function OrderedMap(value) { + return value === undefined || value === null + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( Map ) OrderedMap.__proto__ = Map; + OrderedMap.prototype = Object.create( Map && Map.prototype ); + OrderedMap.prototype.constructor = OrderedMap; + + OrderedMap.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function toString () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function get (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + this.__altered = true; + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function set (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function remove (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._list.__iterate( + function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function __iterator (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return emptyOrderedMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + return OrderedMap; +}(Map)); + +OrderedMap.isOrderedMap = isOrderedMap; + +OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; +OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + +function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + omap.__altered = false; + return omap; +} + +var EMPTY_ORDERED_MAP; +function emptyOrderedMap() { + return ( + EMPTY_ORDERED_MAP || + (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) + ); +} + +function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { return entry[0]; }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + omap.__altered = true; + return omap; + } + return makeOrderedMap(newMap, newList); +} + +var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; + +function isStack(maybeStack) { + return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); +} + +var Stack = /*@__PURE__*/(function (IndexedCollection) { + function Stack(value) { + return value === undefined || value === null + ? emptyStack() + : isStack(value) + ? value + : emptyStack().pushAll(value); + } + + if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; + Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + Stack.prototype.constructor = Stack; + + Stack.of = function of (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function toString () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function get (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function peek () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function push (/*...values*/) { + var arguments$1 = arguments; + + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments$1[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function pushAll (iter) { + iter = IndexedCollection(iter); + if (iter.size === 0) { + return this; + } + if (this.size === 0 && isStack(iter)) { + return iter; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.__iterate(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }, /* reverse */ true); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function pop () { + return this.slice(1); + }; + + Stack.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyStack(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return new ArraySeq(this.toArray()).__iterate( + function (v, k) { return fn(v, k, this$1$1); }, + reverse + ); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function __iterator (type, reverse) { + if (reverse) { + return new ArraySeq(this.toArray()).__iterator(type, reverse); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + return Stack; +}(IndexedCollection)); + +Stack.isStack = isStack; + +var StackPrototype = Stack.prototype; +StackPrototype[IS_STACK_SYMBOL] = true; +StackPrototype.shift = StackPrototype.pop; +StackPrototype.unshift = StackPrototype.push; +StackPrototype.unshiftAll = StackPrototype.pushAll; +StackPrototype.withMutations = withMutations; +StackPrototype.wasAltered = wasAltered; +StackPrototype.asImmutable = asImmutable; +StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; +StackPrototype['@@transducer/step'] = function (result, arr) { + return result.unshift(arr); +}; +StackPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; +} + +var EMPTY_STACK; +function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); +} + +var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; + +function isSet(maybeSet) { + return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); +} + +function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); +} + +function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isCollection(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && + b.__hash !== undefined && + a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative + ? !a.has(v) + : flipped + ? !is(v, a.get(k, NOT_SET)) + : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; +} + +function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; +} + +function toJS(value) { + if (!value || typeof value !== 'object') { + return value; + } + if (!isCollection(value)) { + if (!isDataStructure(value)) { + return value; + } + value = Seq(value); + } + if (isKeyed(value)) { + var result$1 = {}; + value.__iterate(function (v, k) { + result$1[k] = toJS(v); + }); + return result$1; + } + var result = []; + value.__iterate(function (v) { + result.push(toJS(v)); + }); + return result; +} + +var Set = /*@__PURE__*/(function (SetCollection) { + function Set(value) { + return value === undefined || value === null + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( SetCollection ) Set.__proto__ = SetCollection; + Set.prototype = Object.create( SetCollection && SetCollection.prototype ); + Set.prototype.constructor = Set; + + Set.of = function of (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + Set.intersect = function intersect (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.intersect.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.union = function union (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.union.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.prototype.toString = function toString () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function has (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function add (value) { + return updateSet(this, this._map.set(value, value)); + }; + + Set.prototype.remove = function remove (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function clear () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + // keep track if the set is altered by the map function + var didChanges = false; + + var newMap = updateSet( + this, + this._map.mapEntries(function (ref) { + var v = ref[1]; + + var mapped = mapper.call(context, v, v, this$1$1); + + if (mapped !== v) { + didChanges = true; + } + + return [mapped, mapped]; + }, context) + ); + + return didChanges ? newMap : this; + }; + + Set.prototype.union = function union () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + iters = iters.filter(function (x) { return x.size !== 0; }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); + } + }); + }; + + Set.prototype.intersect = function intersect () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (!iters.every(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.subtract = function subtract () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (iters.some(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.sort = function sort (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function wasAltered () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); + }; + + Set.prototype.__iterator = function __iterator (type, reverse) { + return this._map.__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return this.__empty(); + } + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + return Set; +}(SetCollection)); + +Set.isSet = isSet; + +var SetPrototype = Set.prototype; +SetPrototype[IS_SET_SYMBOL] = true; +SetPrototype[DELETE] = SetPrototype.remove; +SetPrototype.merge = SetPrototype.concat = SetPrototype.union; +SetPrototype.withMutations = withMutations; +SetPrototype.asImmutable = asImmutable; +SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; +SetPrototype['@@transducer/step'] = function (result, arr) { + return result.add(arr); +}; +SetPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +SetPrototype.__empty = emptySet; +SetPrototype.__make = makeSet; + +function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map + ? set + : newMap.size === 0 + ? set.__empty() + : set.__make(newMap); +} + +function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; +} + +var EMPTY_SET; +function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); +} + +/** + * Returns a lazy seq of nums from start (inclusive) to end + * (exclusive), by step, where start defaults to 0, step to 1, and end to + * infinity. When start is equal to end, returns empty list. + */ +var Range = /*@__PURE__*/(function (IndexedSeq) { + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + if ( IndexedSeq ) Range.__proto__ = IndexedSeq; + Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Range.prototype.constructor = Range; + + Range.prototype.toString = function toString () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function get (index, notSetValue) { + return this.has(index) + ? this._start + wrapIndex(this, index) * this._step + : notSetValue; + }; + + Range.prototype.includes = function includes (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range( + this.get(begin, this._end), + this.get(end, this._end), + this._step + ); + }; + + Range.prototype.indexOf = function indexOf (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + while (i !== size) { + if (fn(value, reverse ? size - ++i : i++, this) === false) { + break; + } + value += reverse ? -step : step; + } + return i; + }; + + Range.prototype.__iterator = function __iterator (type, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var v = value; + value += reverse ? -step : step; + return iteratorValue(type, reverse ? size - ++i : i++, v); + }); + }; + + Range.prototype.equals = function equals (other) { + return other instanceof Range + ? this._start === other._start && + this._end === other._end && + this._step === other._step + : deepEqual(this, other); + }; + + return Range; +}(IndexedSeq)); + +var EMPTY_RANGE; + +function getIn$1(collection, searchKeyPath, notSetValue) { + var keyPath = coerceKeyPath(searchKeyPath); + var i = 0; + while (i !== keyPath.length) { + collection = get(collection, keyPath[i++], NOT_SET); + if (collection === NOT_SET) { + return notSetValue; + } + } + return collection; +} + +function getIn(searchKeyPath, notSetValue) { + return getIn$1(this, searchKeyPath, notSetValue); +} + +function hasIn$1(collection, keyPath) { + return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; +} + +function hasIn(searchKeyPath) { + return hasIn$1(this, searchKeyPath); +} + +function toObject() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; +} + +// Note: all of these methods are deprecated. +Collection.isIterable = isCollection; +Collection.isKeyed = isKeyed; +Collection.isIndexed = isIndexed; +Collection.isAssociative = isAssociative; +Collection.isOrdered = isOrdered; + +Collection.Iterator = Iterator; + +mixin(Collection, { + // ### Conversion to other types + + toArray: function toArray() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + var useTuples = isKeyed(this); + var i = 0; + this.__iterate(function (v, k) { + // Keyed collections produce an array of tuples. + array[i++] = useTuples ? [k, v] : v; + }); + return array; + }, + + toIndexedSeq: function toIndexedSeq() { + return new ToIndexedSequence(this); + }, + + toJS: function toJS$1() { + return toJS(this); + }, + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, true); + }, + + toMap: function toMap() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: toObject, + + toOrderedMap: function toOrderedMap() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function toOrderedSet() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function toSet() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function toSetSeq() { + return new ToSetSequence(this); + }, + + toSeq: function toSeq() { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function toStack() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function toList() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function toString() { + return '[Collection]'; + }, + + __toString: function __toString(head, tail) { + if (this.size === 0) { + return head + tail; + } + return ( + head + + ' ' + + this.toSeq().map(this.__toStringMapper).join(', ') + + ' ' + + tail + ); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function concat() { + var values = [], len = arguments.length; + while ( len-- ) values[ len ] = arguments[ len ]; + + return reify(this, concatFactory(this, values)); + }, + + includes: function includes(searchValue) { + return this.some(function (value) { return is(value, searchValue); }); + }, + + entries: function entries() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function every(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function find(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function forEach(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function join(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function keys() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function map(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function reduce$1(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + false + ); + }, + + reduceRight: function reduceRight(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + true + ); + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function some(predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function sort(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function values() { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function butLast() { + return this.slice(0, -1); + }, + + isEmpty: function isEmpty() { + return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); + }, + + count: function count(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function countBy(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function equals(other) { + return deepEqual(this, other); + }, + + entrySeq: function entrySeq() { + var collection = this; + if (collection._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(collection._cache); + } + var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; + return entriesSequence; + }, + + filterNot: function filterNot(predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function findEntry(predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function findKey(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function findLast(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function findLastEntry(predicate, context, notSetValue) { + return this.toKeyedSeq() + .reverse() + .findEntry(predicate, context, notSetValue); + }, + + findLastKey: function findLastKey(predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function first(notSetValue) { + return this.find(returnTrue, null, notSetValue); + }, + + flatMap: function flatMap(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function fromEntrySeq() { + return new FromEntriesSequence(this); + }, + + get: function get(searchKey, notSetValue) { + return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); + }, + + getIn: getIn, + + groupBy: function groupBy(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function has(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: hasIn, + + isSubset: function isSubset(iter) { + iter = typeof iter.includes === 'function' ? iter : Collection(iter); + return this.every(function (value) { return iter.includes(value); }); + }, + + isSuperset: function isSuperset(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); + return iter.isSubset(this); + }, + + keyOf: function keyOf(searchValue) { + return this.findKey(function (value) { return is(value, searchValue); }); + }, + + keySeq: function keySeq() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function last(notSetValue) { + return this.toSeq().reverse().first(notSetValue); + }, + + lastKeyOf: function lastKeyOf(searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function max(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function maxBy(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function min(comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator + ); + }, + + minBy: function minBy(mapper, comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator, + mapper + ); + }, + + rest: function rest() { + return this.slice(1); + }, + + skip: function skip(amount) { + return amount === 0 ? this : this.slice(Math.max(0, amount)); + }, + + skipLast: function skipLast(amount) { + return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function skipUntil(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function sortBy(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function take(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function takeLast(amount) { + return this.slice(-Math.max(0, amount)); + }, + + takeWhile: function takeWhile(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function takeUntil(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + update: function update(fn) { + return fn(this); + }, + + valueSeq: function valueSeq() { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function hashCode() { + return this.__hash || (this.__hash = hashCollection(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) +}); + +var CollectionPrototype = Collection.prototype; +CollectionPrototype[IS_COLLECTION_SYMBOL] = true; +CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; +CollectionPrototype.toJSON = CollectionPrototype.toArray; +CollectionPrototype.__toStringMapper = quoteString; +CollectionPrototype.inspect = CollectionPrototype.toSource = function () { + return this.toString(); +}; +CollectionPrototype.chain = CollectionPrototype.flatMap; +CollectionPrototype.contains = CollectionPrototype.includes; + +mixin(KeyedCollection, { + // ### More sequential methods + + flip: function flip() { + return reify(this, flipFactory(this)); + }, + + mapEntries: function mapEntries(mapper, context) { + var this$1$1 = this; + + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) + .fromEntrySeq() + ); + }, + + mapKeys: function mapKeys(mapper, context) { + var this$1$1 = this; + + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) + .flip() + ); + }, +}); + +var KeyedCollectionPrototype = KeyedCollection.prototype; +KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; +KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; +KeyedCollectionPrototype.toJSON = toObject; +KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; + +mixin(IndexedCollection, { + // ### Conversion to other types + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function findIndex(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function indexOf(searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function lastIndexOf(searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function splice(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum || 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 + ? spliced + : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + // ### More collection methods + + findLastIndex: function findLastIndex(predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function first(notSetValue) { + return this.get(0, notSetValue); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function get(index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || + this.size === Infinity || + (this.size !== undefined && index > this.size) + ? notSetValue + : this.find(function (_, key) { return key === index; }, undefined, notSetValue); + }, + + has: function has(index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function interpose(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function interleave(/*...collections*/) { + var collections = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * collections.length; + } + return reify(this, interleaved); + }, + + keySeq: function keySeq() { + return Range(0, this.size); + }, + + last: function last(notSetValue) { + return this.get(-1, notSetValue); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function zip(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections)); + }, + + zipAll: function zipAll(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections, true)); + }, + + zipWith: function zipWith(zipper /*, ...collections */) { + var collections = arrCopy(arguments); + collections[0] = this; + return reify(this, zipWithFactory(this, zipper, collections)); + }, +}); + +var IndexedCollectionPrototype = IndexedCollection.prototype; +IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; +IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; + +mixin(SetCollection, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function get(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function includes(value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function keySeq() { + return this.valueSeq(); + }, +}); + +var SetCollectionPrototype = SetCollection.prototype; +SetCollectionPrototype.has = CollectionPrototype.includes; +SetCollectionPrototype.contains = SetCollectionPrototype.includes; +SetCollectionPrototype.keys = SetCollectionPrototype.values; + +// Mixin subclasses + +mixin(KeyedSeq, KeyedCollectionPrototype); +mixin(IndexedSeq, IndexedCollectionPrototype); +mixin(SetSeq, SetCollectionPrototype); + +// #pragma Helper functions + +function reduce(collection, reducer, reduction, context, useFirst, reverse) { + assertNotInfinite(collection.size); + collection.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }, reverse); + return reduction; +} + +function keyMapper(v, k) { + return k; +} + +function entryMapper(v, k) { + return [k, v]; +} + +function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; +} + +function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; +} + +function defaultZipper() { + return arrCopy(arguments); +} + +function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; +} + +function hashCollection(collection) { + if (collection.size === Infinity) { + return 0; + } + var ordered = isOrdered(collection); + var keyed = isKeyed(collection); + var h = ordered ? 1 : 0; + var size = collection.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + } + ); + return murmurHashOfSize(size, h); +} + +function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; +} + +function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int +} + +var OrderedSet = /*@__PURE__*/(function (Set) { + function OrderedSet(value) { + return value === undefined || value === null + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( Set ) OrderedSet.__proto__ = Set; + OrderedSet.prototype = Object.create( Set && Set.prototype ); + OrderedSet.prototype.constructor = OrderedSet; + + OrderedSet.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + OrderedSet.prototype.toString = function toString () { + return this.__toString('OrderedSet {', '}'); + }; + + return OrderedSet; +}(Set)); + +OrderedSet.isOrderedSet = isOrderedSet; + +var OrderedSetPrototype = OrderedSet.prototype; +OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; +OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; +OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; +OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; + +OrderedSetPrototype.__empty = emptyOrderedSet; +OrderedSetPrototype.__make = makeOrderedSet; + +function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; +} + +var EMPTY_ORDERED_SET; +function emptyOrderedSet() { + return ( + EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) + ); +} + +function throwOnInvalidDefaultValues(defaultValues) { + if (isRecord(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' + ); + } + + if (isImmutable(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' + ); + } + + if (defaultValues === null || typeof defaultValues !== 'object') { + throw new Error( + 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' + ); + } +} + +var Record = function Record(defaultValues, name) { + var hasInitialized; + + throwOnInvalidDefaultValues(defaultValues); + + var RecordType = function Record(values) { + var this$1$1 = this; + + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + var indices = (RecordTypePrototype._indices = {}); + // Deprecated: left to attempt not to break any external code which + // relies on a ._name property existing on record instances. + // Use Record.getDescriptiveName() instead + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + for (var i = 0; i < keys.length; i++) { + var propName = keys[i]; + indices[propName] = i; + if (RecordTypePrototype[propName]) { + /* eslint-disable no-console */ + typeof console === 'object' && + console.warn && + console.warn( + 'Cannot define ' + + recordName(this) + + ' with property "' + + propName + + '" since that property name is part of the Record API.' + ); + /* eslint-enable no-console */ + } else { + setProp(RecordTypePrototype, propName); + } + } + } + this.__ownerID = undefined; + this._values = List().withMutations(function (l) { + l.setSize(this$1$1._keys.length); + KeyedCollection(values).forEach(function (v, k) { + l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); + }); + }); + return this; + }; + + var RecordTypePrototype = (RecordType.prototype = + Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + if (name) { + RecordType.displayName = name; + } + + return RecordType; +}; + +Record.prototype.toString = function toString () { + var str = recordName(this) + ' { '; + var keys = this._keys; + var k; + for (var i = 0, l = keys.length; i !== l; i++) { + k = keys[i]; + str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); + } + return str + ' }'; +}; + +Record.prototype.equals = function equals (other) { + return ( + this === other || + (isRecord(other) && recordSeq(this).equals(recordSeq(other))) + ); +}; + +Record.prototype.hashCode = function hashCode () { + return recordSeq(this).hashCode(); +}; + +// @pragma Access + +Record.prototype.has = function has (k) { + return this._indices.hasOwnProperty(k); +}; + +Record.prototype.get = function get (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var index = this._indices[k]; + var value = this._values.get(index); + return value === undefined ? this._defaultValues[k] : value; +}; + +// @pragma Modification + +Record.prototype.set = function set (k, v) { + if (this.has(k)) { + var newValues = this._values.set( + this._indices[k], + v === this._defaultValues[k] ? undefined : v + ); + if (newValues !== this._values && !this.__ownerID) { + return makeRecord(this, newValues); + } + } + return this; +}; + +Record.prototype.remove = function remove (k) { + return this.set(k); +}; + +Record.prototype.clear = function clear () { + var newValues = this._values.clear().setSize(this._keys.length); + + return this.__ownerID ? this : makeRecord(this, newValues); +}; + +Record.prototype.wasAltered = function wasAltered () { + return this._values.wasAltered(); +}; + +Record.prototype.toSeq = function toSeq () { + return recordSeq(this); +}; + +Record.prototype.toJS = function toJS$1 () { + return toJS(this); +}; + +Record.prototype.entries = function entries () { + return this.__iterator(ITERATE_ENTRIES); +}; + +Record.prototype.__iterator = function __iterator (type, reverse) { + return recordSeq(this).__iterator(type, reverse); +}; + +Record.prototype.__iterate = function __iterate (fn, reverse) { + return recordSeq(this).__iterate(fn, reverse); +}; + +Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newValues = this._values.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._values = newValues; + return this; + } + return makeRecord(this, newValues, ownerID); +}; + +Record.isRecord = isRecord; +Record.getDescriptiveName = recordName; +var RecordPrototype = Record.prototype; +RecordPrototype[IS_RECORD_SYMBOL] = true; +RecordPrototype[DELETE] = RecordPrototype.remove; +RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; +RecordPrototype.getIn = getIn; +RecordPrototype.hasIn = CollectionPrototype.hasIn; +RecordPrototype.merge = merge$1; +RecordPrototype.mergeWith = mergeWith$1; +RecordPrototype.mergeIn = mergeIn; +RecordPrototype.mergeDeep = mergeDeep; +RecordPrototype.mergeDeepWith = mergeDeepWith; +RecordPrototype.mergeDeepIn = mergeDeepIn; +RecordPrototype.setIn = setIn; +RecordPrototype.update = update; +RecordPrototype.updateIn = updateIn; +RecordPrototype.withMutations = withMutations; +RecordPrototype.asMutable = asMutable; +RecordPrototype.asImmutable = asImmutable; +RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; +RecordPrototype.toJSON = RecordPrototype.toObject = + CollectionPrototype.toObject; +RecordPrototype.inspect = RecordPrototype.toSource = function () { + return this.toString(); +}; + +function makeRecord(likeRecord, values, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._values = values; + record.__ownerID = ownerID; + return record; +} + +function recordName(record) { + return record.constructor.displayName || record.constructor.name || 'Record'; +} + +function recordSeq(record) { + return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); +} + +function setProp(prototype, name) { + try { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } +} + +/** + * Returns a lazy Seq of `value` repeated `times` times. When `times` is + * undefined, returns an infinite sequence of `value`. + */ +var Repeat = /*@__PURE__*/(function (IndexedSeq) { + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; + Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Repeat.prototype.constructor = Repeat; + + Repeat.prototype.toString = function toString () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function includes (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function slice (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat( + this._value, + resolveEnd(end, size) - resolveBegin(begin, size) + ); + }; + + Repeat.prototype.reverse = function reverse () { + return this; + }; + + Repeat.prototype.indexOf = function indexOf (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var i = 0; + while (i !== size) { + if (fn(this._value, reverse ? size - ++i : i++, this) === false) { + break; + } + } + return i; + }; + + Repeat.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var size = this.size; + var i = 0; + return new Iterator(function () { return i === size + ? iteratorDone() + : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } + ); + }; + + Repeat.prototype.equals = function equals (other) { + return other instanceof Repeat + ? is(this._value, other._value) + : deepEqual(other); + }; + + return Repeat; +}(IndexedSeq)); + +var EMPTY_REPEAT; + +function fromJS(value, converter) { + return fromJSWith( + [], + converter || defaultConverter, + value, + '', + converter && converter.length > 2 ? [] : undefined, + { '': value } + ); +} + +function fromJSWith(stack, converter, value, key, keyPath, parentValue) { + if ( + typeof value !== 'string' && + !isImmutable(value) && + (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) + ) { + if (~stack.indexOf(value)) { + throw new TypeError('Cannot convert circular structure to Immutable'); + } + stack.push(value); + keyPath && key !== '' && keyPath.push(key); + var converted = converter.call( + parentValue, + key, + Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } + ), + keyPath && keyPath.slice() + ); + stack.pop(); + keyPath && keyPath.pop(); + return converted; + } + return value; +} + +function defaultConverter(k, v) { + // Effectively the opposite of "Collection.toSeq()" + return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); +} + +var version = "4.1.0"; + +var Immutable = { + version: version, + + Collection: Collection, + // Note: Iterable is deprecated + Iterable: Collection, + + Seq: Seq, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + hash: hash, + + isImmutable: isImmutable, + isCollection: isCollection, + isKeyed: isKeyed, + isIndexed: isIndexed, + isAssociative: isAssociative, + isOrdered: isOrdered, + isValueObject: isValueObject, + isPlainObject: isPlainObject, + isSeq: isSeq, + isList: isList, + isMap: isMap, + isOrderedMap: isOrderedMap, + isStack: isStack, + isSet: isSet, + isOrderedSet: isOrderedSet, + isRecord: isRecord, + + get: get, + getIn: getIn$1, + has: has, + hasIn: hasIn$1, + merge: merge, + mergeDeep: mergeDeep$1, + mergeWith: mergeWith, + mergeDeepWith: mergeDeepWith$1, + remove: remove, + removeIn: removeIn, + set: set, + setIn: setIn$1, + update: update$1, + updateIn: updateIn$1, +}; + +// Note: Iterable is deprecated +var Iterable = Collection; + +export default Immutable; +export { Collection, Iterable, List, Map, OrderedMap, OrderedSet, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version }; diff --git a/node_modules/immutable/dist/immutable.js b/node_modules/immutable/dist/immutable.js new file mode 100644 index 0000000..3d76374 --- /dev/null +++ b/node_modules/immutable/dist/immutable.js @@ -0,0 +1,5986 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron 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. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Immutable = {})); +}(this, (function (exports) { 'use strict'; + + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + function MakeRef() { + return { value: false }; + } + + function SetRef(ref) { + if (ref) { + ref.value = true; + } + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return ( + ((begin === 0 && !isNeg(begin)) || + (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + // Sanitize indices using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + return index === undefined + ? defaultIndex + : isNeg(index) + ? size === Infinity + ? size + : Math.max(0, size + index) | 0 + : size === undefined || size === index + ? index + : Math.min(size, index) | 0; + } + + function isNeg(value) { + // Account for -0 which is negative, but not less than 0. + return value < 0 || (value === 0 && 1 / value === -Infinity); + } + + var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; + + function isCollection(maybeCollection) { + return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); + } + + var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; + + function isKeyed(maybeKeyed) { + return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); + } + + var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; + + function isIndexed(maybeIndexed) { + return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + var Collection = function Collection(value) { + return isCollection(value) ? value : Seq(value); + }; + + var KeyedCollection = /*@__PURE__*/(function (Collection) { + function KeyedCollection(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + if ( Collection ) KeyedCollection.__proto__ = Collection; + KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); + KeyedCollection.prototype.constructor = KeyedCollection; + + return KeyedCollection; + }(Collection)); + + var IndexedCollection = /*@__PURE__*/(function (Collection) { + function IndexedCollection(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + if ( Collection ) IndexedCollection.__proto__ = Collection; + IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); + IndexedCollection.prototype.constructor = IndexedCollection; + + return IndexedCollection; + }(Collection)); + + var SetCollection = /*@__PURE__*/(function (Collection) { + function SetCollection(value) { + return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); + } + + if ( Collection ) SetCollection.__proto__ = Collection; + SetCollection.prototype = Object.create( Collection && Collection.prototype ); + SetCollection.prototype.constructor = SetCollection; + + return SetCollection; + }(Collection)); + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; + + function isSeq(maybeSeq) { + return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); + } + + var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; + + function isRecord(maybeRecord) { + return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); + } + + function isImmutable(maybeImmutable) { + return isCollection(maybeImmutable) || isRecord(maybeImmutable); + } + + var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; + + function isOrdered(maybeOrdered) { + return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); + } + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + var Iterator = function Iterator(next) { + this.next = next; + }; + + Iterator.prototype.toString = function toString () { + return '[Iterator]'; + }; + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); + }; + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + if (Array.isArray(maybeIterable)) { + // IE11 trick as it does not support `Symbol.iterator` + return true; + } + + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isEntriesIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.entries; + } + + function isKeysIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.keys; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + function isArrayLike(value) { + if (Array.isArray(value) || typeof value === 'string') { + return true; + } + + return ( + value && + typeof value === 'object' && + Number.isInteger(value.length) && + value.length >= 0 && + (value.length === 0 + ? // Only {length: 0} is considered Array-like. + Object.keys(value).length === 1 + : // An object is only Array-like if it has a property where the last value + // in the array-like may be found (which could be undefined). + value.hasOwnProperty(value.length - 1)) + ); + } + + var Seq = /*@__PURE__*/(function (Collection) { + function Seq(value) { + return value === undefined || value === null + ? emptySequence() + : isImmutable(value) + ? value.toSeq() + : seqFromValue(value); + } + + if ( Collection ) Seq.__proto__ = Collection; + Seq.prototype = Object.create( Collection && Collection.prototype ); + Seq.prototype.constructor = Seq; + + Seq.prototype.toSeq = function toSeq () { + return this; + }; + + Seq.prototype.toString = function toString () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function cacheResult () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function __iterate (fn, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + while (i !== size) { + var entry = cache[reverse ? size - ++i : i++]; + if (fn(entry[1], entry[0], this) === false) { + break; + } + } + return i; + } + return this.__iterateUncached(fn, reverse); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function __iterator (type, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var entry = cache[reverse ? size - ++i : i++]; + return iteratorValue(type, entry[0], entry[1]); + }); + } + return this.__iteratorUncached(type, reverse); + }; + + return Seq; + }(Collection)); + + var KeyedSeq = /*@__PURE__*/(function (Seq) { + function KeyedSeq(value) { + return value === undefined || value === null + ? emptySequence().toKeyedSeq() + : isCollection(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : isRecord(value) + ? value.toSeq() + : keyedSeqFromValue(value); + } + + if ( Seq ) KeyedSeq.__proto__ = Seq; + KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); + KeyedSeq.prototype.constructor = KeyedSeq; + + KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { + return this; + }; + + return KeyedSeq; + }(Seq)); + + var IndexedSeq = /*@__PURE__*/(function (Seq) { + function IndexedSeq(value) { + return value === undefined || value === null + ? emptySequence() + : isCollection(value) + ? isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq() + : isRecord(value) + ? value.toSeq().entrySeq() + : indexedSeqFromValue(value); + } + + if ( Seq ) IndexedSeq.__proto__ = Seq; + IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); + IndexedSeq.prototype.constructor = IndexedSeq; + + IndexedSeq.of = function of (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { + return this; + }; + + IndexedSeq.prototype.toString = function toString () { + return this.__toString('Seq [', ']'); + }; + + return IndexedSeq; + }(Seq)); + + var SetSeq = /*@__PURE__*/(function (Seq) { + function SetSeq(value) { + return ( + isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) + ).toSetSeq(); + } + + if ( Seq ) SetSeq.__proto__ = Seq; + SetSeq.prototype = Object.create( Seq && Seq.prototype ); + SetSeq.prototype.constructor = SetSeq; + + SetSeq.of = function of (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function toSetSeq () { + return this; + }; + + return SetSeq; + }(Seq)); + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + Seq.prototype[IS_SEQ_SYMBOL] = true; + + // #pragma Root Sequences + + var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; + ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ArraySeq.prototype.constructor = ArraySeq; + + ArraySeq.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + while (i !== size) { + var ii = reverse ? size - ++i : i++; + if (fn(array[ii], ii, this) === false) { + break; + } + } + return i; + }; + + ArraySeq.prototype.__iterator = function __iterator (type, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var ii = reverse ? size - ++i : i++; + return iteratorValue(type, ii, array[ii]); + }); + }; + + return ArraySeq; + }(IndexedSeq)); + + var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { + function ObjectSeq(object) { + var keys = Object.keys(object).concat( + Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] + ); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; + ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ObjectSeq.prototype.constructor = ObjectSeq; + + ObjectSeq.prototype.get = function get (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function has (key) { + return hasOwnProperty.call(this._object, key); + }; + + ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + while (i !== size) { + var key = keys[reverse ? size - ++i : i++]; + if (fn(object[key], key, this) === false) { + break; + } + } + return i; + }; + + ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var key = keys[reverse ? size - ++i : i++]; + return iteratorValue(type, key, object[key]); + }); + }; + + return ObjectSeq; + }(KeyedSeq)); + ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; + + var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { + function CollectionSeq(collection) { + this._collection = collection; + this.size = collection.length || collection.size; + } + + if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; + CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + CollectionSeq.prototype.constructor = CollectionSeq; + + CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + return CollectionSeq; + }(IndexedSeq)); + + // # pragma Helper functions + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq.fromEntrySeq(); + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of [k, v] entries, or keyed object: ' + + value + ); + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq; + } + throw new TypeError( + 'Expected Array or collection object of values: ' + value + ); + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return isEntriesIterable(value) + ? seq.fromEntrySeq() + : isKeysIterable(value) + ? seq.toSetSeq() + : seq; + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of values, or keyed object: ' + value + ); + } + + function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : hasIterator(value) + ? new CollectionSeq(value) + : undefined; + } + + var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; + + function isMap(maybeMap) { + return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); + } + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + function isValueObject(maybeValue) { + return Boolean( + maybeValue && + typeof maybeValue.equals === 'function' && + typeof maybeValue.hashCode === 'function' + ); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections are Value Objects: they implement `equals()` + * and `hashCode()`. + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if ( + typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function' + ) { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + return !!( + isValueObject(valueA) && + isValueObject(valueB) && + valueA.equals(valueB) + ); + } + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a |= 0; // int + b |= 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); + } + + var defaultValueOf = Object.prototype.valueOf; + + function hash(o) { + if (o == null) { + return hashNullish(o); + } + + if (typeof o.hashCode === 'function') { + // Drop any high bits from accidentally long hash codes. + return smi(o.hashCode(o)); + } + + var v = valueOf(o); + + if (v == null) { + return hashNullish(v); + } + + switch (typeof v) { + case 'boolean': + // The hash values for built-in constants are a 1 value for each 5-byte + // shift region expect for the first, which encodes the value. This + // reduces the odds of a hash collision for these common values. + return v ? 0x42108421 : 0x42108420; + case 'number': + return hashNumber(v); + case 'string': + return v.length > STRING_HASH_CACHE_MIN_STRLEN + ? cachedHashString(v) + : hashString(v); + case 'object': + case 'function': + return hashJSObj(v); + case 'symbol': + return hashSymbol(v); + default: + if (typeof v.toString === 'function') { + return hashString(v.toString()); + } + throw new Error('Value type ' + typeof v + ' cannot be hashed.'); + } + } + + function hashNullish(nullish) { + return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; + } + + // Compress arbitrarily large numbers into smi hashes. + function hashNumber(n) { + if (n !== n || n === Infinity) { + return 0; + } + var hash = n | 0; + if (hash !== n) { + hash ^= n * 0xffffffff; + } + while (n > 0xffffffff) { + n /= 0xffffffff; + hash ^= n; + } + return smi(hash); + } + + function cachedHashString(string) { + var hashed = stringHashCache[string]; + if (hashed === undefined) { + hashed = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hashed; + } + return hashed; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hashed = 0; + for (var ii = 0; ii < string.length; ii++) { + hashed = (31 * hashed + string.charCodeAt(ii)) | 0; + } + return smi(hashed); + } + + function hashSymbol(sym) { + var hashed = symbolMap[sym]; + if (hashed !== undefined) { + return hashed; + } + + hashed = nextHash(); + + symbolMap[sym] = hashed; + + return hashed; + } + + function hashJSObj(obj) { + var hashed; + if (usingWeakMap) { + hashed = weakMap.get(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = obj[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + if (!canDefineProperty) { + hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + hashed = getIENodeHash(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = nextHash(); + + if (usingWeakMap) { + weakMap.set(obj, hashed); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hashed, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply( + this, + arguments + ); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hashed; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hashed; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + })(); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + function valueOf(obj) { + return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' + ? obj.valueOf(obj) + : obj; + } + + function nextHash() { + var nextHash = ++_objHashUID; + if (_objHashUID & 0x40000000) { + _objHashUID = 0; + } + return nextHash; + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var symbolMap = Object.create(null); + + var _objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; + ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ToKeyedSequence.prototype.constructor = ToKeyedSequence; + + ToKeyedSequence.prototype.get = function get (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function has (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function valueSeq () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function reverse () { + var this$1$1 = this; + + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); + }; + + ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { + return this._iter.__iterator(type, reverse); + }; + + return ToKeyedSequence; + }(KeyedSeq)); + ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; + + var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; + ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ToIndexedSequence.prototype.constructor = ToIndexedSequence; + + ToIndexedSequence.prototype.includes = function includes (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(this); + return this._iter.__iterate( + function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, + reverse + ); + }; + + ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var i = 0; + reverse && ensureSize(this); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue( + type, + reverse ? this$1$1.size - ++i : i++, + step.value, + step + ); + }); + }; + + return ToIndexedSequence; + }(IndexedSeq)); + + var ToSetSequence = /*@__PURE__*/(function (SetSeq) { + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; + ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); + ToSetSequence.prototype.constructor = ToSetSequence; + + ToSetSequence.prototype.has = function has (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); + }; + + ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue(type, step.value, step.value, step); + }); + }; + + return ToSetSequence; + }(SetSeq)); + + var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; + FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + FromEntriesSequence.prototype.constructor = FromEntriesSequence; + + FromEntriesSequence.prototype.entrySeq = function entrySeq () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return fn( + indexedCollection ? entry.get(1) : entry[1], + indexedCollection ? entry.get(0) : entry[0], + this$1$1 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return iteratorValue( + type, + indexedCollection ? entry.get(0) : entry[0], + indexedCollection ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + return FromEntriesSequence; + }(KeyedSeq)); + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + function flipFactory(collection) { + var flipSequence = makeSequence(collection); + flipSequence._iter = collection; + flipSequence.size = collection.size; + flipSequence.flip = function () { return collection; }; + flipSequence.reverse = function () { + var reversedSequence = collection.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { return collection.reverse(); }; + return reversedSequence; + }; + flipSequence.has = function (key) { return collection.includes(key); }; + flipSequence.includes = function (key) { return collection.has(key); }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = collection.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return collection.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + }; + return flipSequence; + } + + function mapFactory(collection, mapper, context) { + var mappedSequence = makeSequence(collection); + mappedSequence.size = collection.size; + mappedSequence.has = function (key) { return collection.has(key); }; + mappedSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v === NOT_SET + ? notSetValue + : mapper.call(context, v, key, collection); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate( + function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, + reverse + ); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, collection), + step + ); + }); + }; + return mappedSequence; + } + + function reverseFactory(collection, useKeys) { + var this$1$1 = this; + + var reversedSequence = makeSequence(collection); + reversedSequence._iter = collection; + reversedSequence.size = collection.size; + reversedSequence.reverse = function () { return collection; }; + if (collection.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(collection); + flipSequence.reverse = function () { return collection.flip(); }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; + reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; + reversedSequence.includes = function (value) { return collection.includes(value); }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(collection); + return collection.__iterate( + function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, + !reverse + ); + }; + reversedSequence.__iterator = function (type, reverse) { + var i = 0; + reverse && ensureSize(collection); + var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + return iteratorValue( + type, + useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, + entry[1], + step + ); + }); + }; + return reversedSequence; + } + + function filterFactory(collection, predicate, context, useKeys) { + var filterSequence = makeSequence(collection); + if (useKeys) { + filterSequence.has = function (key) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, collection); + }; + filterSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, collection) + ? v + : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, collection)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; + } + + function countByFactory(collection, grouper, context) { + var groups = Map().asMutable(); + collection.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); + }); + return groups.asImmutable(); + } + + function groupByFactory(collection, grouper, context) { + var isKeyedIter = isKeyed(collection); + var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); + collection.__iterate(function (v, k) { + groups.update( + grouper.call(context, v, k, collection), + function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); + } + + function sliceFactory(collection, begin, end, useKeys) { + var originalSize = collection.size; + + if (wholeSlice(begin, end, originalSize)) { + return collection; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this collection's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(collection); + + // If collection.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = + sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; + + if (!useKeys && isSeq(collection) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? collection.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return ( + fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && + iterations !== sliceSize + ); + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + if (sliceSize === 0) { + return new Iterator(iteratorDone); + } + var iterator = collection.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES || step.done) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } + return iteratorValue(type, iterations - 1, step.value[1], step); + }); + }; + + return sliceSeq; + } + + function takeWhileFactory(collection, predicate, context) { + var takeSequence = makeSequence(collection); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + collection.__iterate( + function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } + ); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$1$1)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + function skipWhileFactory(collection, predicate, context, useKeys) { + var skipSequence = makeSequence(collection); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step; + var k; + var v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } + return iteratorValue(type, iterations++, step.value[1], step); + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$1$1)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + function concatFactory(collection, values) { + var isKeyedCollection = isKeyed(collection); + var iters = [collection] + .concat(values) + .map(function (v) { + if (!isCollection(v)) { + v = isKeyedCollection + ? keyedSeqFromValue(v) + : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedCollection) { + v = KeyedCollection(v); + } + return v; + }) + .filter(function (v) { return v.size !== 0; }); + + if (iters.length === 0) { + return collection; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === collection || + (isKeyedCollection && isKeyed(singleton)) || + (isIndexed(collection) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedCollection) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(collection)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; + } + + function flattenFactory(collection, depth, useKeys) { + var flatSequence = makeSequence(collection); + flatSequence.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isCollection(v)) { + flatDeep(v, currentDepth + 1); + } else { + iterations++; + if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { + stopped = true; + } + } + return !stopped; + }, reverse); + } + flatDeep(collection, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isCollection(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; + } + + function flatMapFactory(collection, mapper, context) { + var coerce = collectionClass(collection); + return collection + .toSeq() + .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) + .flatten(true); + } + + function interposeFactory(collection, separator) { + var interposedSequence = makeSequence(collection); + interposedSequence.size = collection.size && collection.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate( + function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && + fn(v, iterations++, this$1$1) !== false; }, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + function sortFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedCollection = isKeyed(collection); + var index = 0; + var entries = collection + .toSeq() + .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) + .valueSeq() + .toArray(); + entries + .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) + .forEach( + isKeyedCollection + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + } + ); + return isKeyedCollection + ? KeyedSeq(entries) + : isIndexed(collection) + ? IndexedSeq(entries) + : SetSeq(entries); + } + + function maxFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = collection + .toSeq() + .map(function (v, k) { return [v, mapper(v, k, collection)]; }) + .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); + return entry && entry[0]; + } + return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return ( + (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || + comp > 0 + ); + } + + function zipWithFactory(keyIter, zipper, iters, zipAll) { + var zipSequence = makeSequence(keyIter); + var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); + zipSequence.size = zipAll ? sizes.max() : sizes.min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map( + function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } + ); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { return i.next(); }); + isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { return s.value; }) + ) + ); + }); + }; + return zipSequence; + } + + // #pragma Helper Functions + + function reify(iter, seq) { + return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function collectionClass(collection) { + return isKeyed(collection) + ? KeyedCollection + : isIndexed(collection) + ? IndexedCollection + : SetCollection; + } + + function makeSequence(collection) { + return Object.create( + (isKeyed(collection) + ? KeyedSeq + : isIndexed(collection) + ? IndexedSeq + : SetSeq + ).prototype + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } + return Seq.prototype.cacheResult.call(this); + } + + function defaultComparator(a, b) { + if (a === undefined && b === undefined) { + return 0; + } + + if (a === undefined) { + return 1; + } + + if (b === undefined) { + return -1; + } + + return a > b ? 1 : a < b ? -1 : 0; + } + + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function invariant(condition, error) { + if (!condition) { throw new Error(error); } + } + + function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); + } + + function coerceKeyPath(keyPath) { + if (isArrayLike(keyPath) && typeof keyPath !== 'string') { + return keyPath; + } + if (isOrdered(keyPath)) { + return keyPath.toArray(); + } + throw new TypeError( + 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath + ); + } + + var toString = Object.prototype.toString; + + function isPlainObject(value) { + // The base prototype's toString deals with Argument objects and native namespaces like Math + if ( + !value || + typeof value !== 'object' || + toString.call(value) !== '[object Object]' + ) { + return false; + } + + var proto = Object.getPrototypeOf(value); + if (proto === null) { + return true; + } + + // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) + var parentProto = proto; + var nextProto = Object.getPrototypeOf(proto); + while (nextProto !== null) { + parentProto = nextProto; + nextProto = Object.getPrototypeOf(parentProto); + } + return parentProto === proto; + } + + /** + * Returns true if the value is a potentially-persistent data structure, either + * provided by Immutable.js or a plain Array or Object. + */ + function isDataStructure(value) { + return ( + typeof value === 'object' && + (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) + ); + } + + function quoteString(value) { + try { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } catch (_ignoreError) { + return JSON.stringify(value); + } + } + + function has(collection, key) { + return isImmutable(collection) + ? collection.has(key) + : isDataStructure(collection) && hasOwnProperty.call(collection, key); + } + + function get(collection, key, notSetValue) { + return isImmutable(collection) + ? collection.get(key, notSetValue) + : !has(collection, key) + ? notSetValue + : typeof collection.get === 'function' + ? collection.get(key) + : collection[key]; + } + + function shallowCopy(from) { + if (Array.isArray(from)) { + return arrCopy(from); + } + var to = {}; + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + return to; + } + + function remove(collection, key) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.remove) { + throw new TypeError( + 'Cannot update immutable value without .remove() method: ' + collection + ); + } + return collection.remove(key); + } + if (!hasOwnProperty.call(collection, key)) { + return collection; + } + var collectionCopy = shallowCopy(collection); + if (Array.isArray(collectionCopy)) { + collectionCopy.splice(key, 1); + } else { + delete collectionCopy[key]; + } + return collectionCopy; + } + + function set(collection, key, value) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.set) { + throw new TypeError( + 'Cannot update immutable value without .set() method: ' + collection + ); + } + return collection.set(key, value); + } + if (hasOwnProperty.call(collection, key) && value === collection[key]) { + return collection; + } + var collectionCopy = shallowCopy(collection); + collectionCopy[key] = value; + return collectionCopy; + } + + function updateIn$1(collection, keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeeply( + isImmutable(collection), + collection, + coerceKeyPath(keyPath), + 0, + notSetValue, + updater + ); + return updatedValue === NOT_SET ? notSetValue : updatedValue; + } + + function updateInDeeply( + inImmutable, + existing, + keyPath, + i, + notSetValue, + updater + ) { + var wasNotSet = existing === NOT_SET; + if (i === keyPath.length) { + var existingValue = wasNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + if (!wasNotSet && !isDataStructure(existing)) { + throw new TypeError( + 'Cannot update within non-data-structure value in path [' + + keyPath.slice(0, i).map(quoteString) + + ']: ' + + existing + ); + } + var key = keyPath[i]; + var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); + var nextUpdated = updateInDeeply( + nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), + nextExisting, + keyPath, + i + 1, + notSetValue, + updater + ); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? remove(existing, key) + : set( + wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, + key, + nextUpdated + ); + } + + function setIn$1(collection, keyPath, value) { + return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); + } + + function setIn(keyPath, v) { + return setIn$1(this, keyPath, v); + } + + function removeIn(collection, keyPath) { + return updateIn$1(collection, keyPath, function () { return NOT_SET; }); + } + + function deleteIn(keyPath) { + return removeIn(this, keyPath); + } + + function update$1(collection, key, notSetValue, updater) { + return updateIn$1(collection, [key], notSetValue, updater); + } + + function update(key, notSetValue, updater) { + return arguments.length === 1 + ? key(this) + : update$1(this, key, notSetValue, updater); + } + + function updateIn(keyPath, notSetValue, updater) { + return updateIn$1(this, keyPath, notSetValue, updater); + } + + function merge$1() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeIntoKeyedWith(this, iters); + } + + function mergeWith$1(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + if (typeof merger !== 'function') { + throw new TypeError('Invalid merger function: ' + merger); + } + return mergeIntoKeyedWith(this, iters, merger); + } + + function mergeIntoKeyedWith(collection, collections, merger) { + var iters = []; + for (var ii = 0; ii < collections.length; ii++) { + var collection$1 = KeyedCollection(collections[ii]); + if (collection$1.size !== 0) { + iters.push(collection$1); + } + } + if (iters.length === 0) { + return collection; + } + if ( + collection.toSeq().size === 0 && + !collection.__ownerID && + iters.length === 1 + ) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoCollection = merger + ? function (value, key) { + update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } + ); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoCollection); + } + }); + } + + function merge(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeWithSources(collection, sources); + } + + function mergeWith(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeWithSources(collection, sources, merger); + } + + function mergeDeep$1(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(collection, sources); + } + + function mergeDeepWith$1(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeDeepWithSources(collection, sources, merger); + } + + function mergeDeepWithSources(collection, sources, merger) { + return mergeWithSources(collection, sources, deepMergerWith(merger)); + } + + function mergeWithSources(collection, sources, merger) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot merge into non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + return typeof merger === 'function' && collection.mergeWith + ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) + : collection.merge + ? collection.merge.apply(collection, sources) + : collection.concat.apply(collection, sources); + } + var isArray = Array.isArray(collection); + var merged = collection; + var Collection = isArray ? IndexedCollection : KeyedCollection; + var mergeItem = isArray + ? function (value) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged.push(value); + } + : function (value, key) { + var hasVal = hasOwnProperty.call(merged, key); + var nextVal = + hasVal && merger ? merger(merged[key], value, key) : value; + if (!hasVal || nextVal !== merged[key]) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged[key] = nextVal; + } + }; + for (var i = 0; i < sources.length; i++) { + Collection(sources[i]).forEach(mergeItem); + } + return merged; + } + + function deepMergerWith(merger) { + function deepMerger(oldValue, newValue, key) { + return isDataStructure(oldValue) && + isDataStructure(newValue) && + areMergeable(oldValue, newValue) + ? mergeWithSources(oldValue, [newValue], deepMerger) + : merger + ? merger(oldValue, newValue, key) + : newValue; + } + return deepMerger; + } + + /** + * It's unclear what the desired behavior is for merging two collections that + * fall into separate categories between keyed, indexed, or set-like, so we only + * consider them mergeable if they fall into the same category. + */ + function areMergeable(oldDataStructure, newDataStructure) { + var oldSeq = Seq(oldDataStructure); + var newSeq = Seq(newDataStructure); + // This logic assumes that a sequence can only fall into one of the three + // categories mentioned above (since there's no `isSetLike()` method). + return ( + isIndexed(oldSeq) === isIndexed(newSeq) && + isKeyed(oldSeq) === isKeyed(newSeq) + ); + } + + function mergeDeep() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeDeepWithSources(this, iters); + } + + function mergeDeepWith(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(this, iters, merger); + } + + function mergeIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); + } + + function mergeDeepIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } + ); + } + + function withMutations(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + } + + function asMutable() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + } + + function asImmutable() { + return this.__ensureOwner(); + } + + function wasAltered() { + return this.__altered; + } + + var Map = /*@__PURE__*/(function (KeyedCollection) { + function Map(value) { + return value === undefined || value === null + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( KeyedCollection ) Map.__proto__ = KeyedCollection; + Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); + Map.prototype.constructor = Map; + + Map.of = function of () { + var keyValues = [], len = arguments.length; + while ( len-- ) keyValues[ len ] = arguments[ len ]; + + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function toString () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function get (k, notSetValue) { + return this._root + ? this._root.get(0, undefined, k, notSetValue) + : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function set (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.remove = function remove (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteAll = function deleteAll (keys) { + var collection = Collection(keys); + + if (collection.size === 0) { + return this; + } + + return this.withMutations(function (map) { + collection.forEach(function (key) { return map.remove(key); }); + }); + }; + + Map.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.sort = function sort (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + Map.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (map) { + map.forEach(function (value, key) { + map.set(key, mapper.call(context, value, key, this$1$1)); + }); + }); + }; + + // @pragma Mutability + + Map.prototype.__iterator = function __iterator (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$1$1); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + return Map; + }(KeyedCollection)); + + Map.isMap = isMap; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SYMBOL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeAll = MapPrototype.deleteAll; + MapPrototype.setIn = setIn; + MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; + MapPrototype.update = update; + MapPrototype.updateIn = updateIn; + MapPrototype.merge = MapPrototype.concat = merge$1; + MapPrototype.mergeWith = mergeWith$1; + MapPrototype.mergeDeep = mergeDeep; + MapPrototype.mergeDeepWith = mergeDeepWith; + MapPrototype.mergeIn = mergeIn; + MapPrototype.mergeDeepIn = mergeDeepIn; + MapPrototype.withMutations = withMutations; + MapPrototype.wasAltered = wasAltered; + MapPrototype.asImmutable = asImmutable; + MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; + MapPrototype['@@transducer/step'] = function (result, arr) { + return result.set(arr[0], arr[1]); + }; + MapPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + // #pragma Trie Nodes + + var ArrayMapNode = function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + }; + + ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + }; + + BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get( + shift + SHIFT, + keyHash, + key, + notSetValue + ); + }; + + BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if ( + exists && + !newNode && + nodes.length === 2 && + isLeafNode(nodes[idx ^ 1]) + ) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setAt(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + }; + + HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node + ? node.get(shift + SHIFT, keyHash, key, notSetValue) + : notSetValue; + }; + + HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setAt(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + }; + + HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + var ValueNode = function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + }; + + ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = + function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + + BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = + function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + + // eslint-disable-next-line no-unused-vars + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + }; + + var MapIterator = /*@__PURE__*/(function (Iterator) { + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + if ( Iterator ) MapIterator.__proto__ = Iterator; + MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); + MapIterator.prototype.constructor = MapIterator; + + MapIterator.prototype.next = function next () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex = (void 0); + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue( + type, + node.entries[this._reverse ? maxIndex - index : index] + ); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + return MapIterator; + }(Iterator)); + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(); + var didAlter = MakeRef(); + newRoot = updateNode( + map._root, + map.__ownerID, + 0, + undefined, + k, + v, + didChangeSize, + didAlter + ); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode( + node, + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + } + + function isLeafNode(node) { + return ( + node.constructor === ValueNode || node.constructor === HashCollisionNode + ); + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function popCount(x) { + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x += x >> 8; + x += x >> 16; + return x & 0x7f; + } + + function setAt(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; + + function isList(maybeList) { + return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); + } + + var List = /*@__PURE__*/(function (IndexedCollection) { + function List(value) { + var empty = emptyList(); + if (value === undefined || value === null) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedCollection(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { return list.set(i, v); }); + }); + } + + if ( IndexedCollection ) List.__proto__ = IndexedCollection; + List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + List.prototype.constructor = List; + + List.of = function of (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function toString () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function get (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function set (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function remove (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function insert (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function push (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function pop () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function unshift (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function shift () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.concat = function concat (/*...collections*/) { + var arguments$1 = arguments; + + var seqs = []; + for (var i = 0; i < arguments.length; i++) { + var argument = arguments$1[i]; + var seq = IndexedCollection( + typeof argument !== 'string' && hasIterator(argument) + ? argument + : [argument] + ); + if (seq.size !== 0) { + seqs.push(seq); + } + } + if (seqs.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && seqs.length === 1) { + return this.constructor(seqs[0]); + } + return this.withMutations(function (list) { + seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); + }); + }; + + List.prototype.setSize = function setSize (size) { + return setListBounds(this, 0, size); + }; + + List.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (list) { + for (var i = 0; i < this$1$1.size; i++) { + list.set(i, mapper.call(context, list.get(i), i, this$1$1)); + } + }); + }; + + // @pragma Iteration + + List.prototype.slice = function slice (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function __iterator (type, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE + ? iteratorDone() + : iteratorValue(type, reverse ? --index : index++, value); + }); + }; + + List.prototype.__iterate = function __iterate (fn, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, reverse ? --index : index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyList(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash + ); + }; + + return List; + }(IndexedCollection)); + + List.isList = isList; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SYMBOL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.merge = ListPrototype.concat; + ListPrototype.setIn = setIn; + ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; + ListPrototype.update = update; + ListPrototype.updateIn = updateIn; + ListPrototype.mergeIn = mergeIn; + ListPrototype.mergeDeepIn = mergeDeepIn; + ListPrototype.withMutations = withMutations; + ListPrototype.wasAltered = wasAltered; + ListPrototype.asImmutable = asImmutable; + ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; + ListPrototype['@@transducer/step'] = function (result, arr) { + return result.push(arr); + }; + ListPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + var VNode = function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + }; + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { + if (index === level ? 1 << level : this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = + oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = + oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 + ? iterateLeaf(node, offset) + : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + while (true) { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], + level - SHIFT, + offset + (idx << level) + ); + } + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode( + newRoot, + list.__ownerID, + list._level, + index, + value, + didAlter + ); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode( + lowerNode, + ownerID, + level - SHIFT, + index, + value, + didAlter + ); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + if (didAlter) { + SetRef(didAlter); + } + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin |= 0; + } + if (end !== undefined) { + end |= 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = + end === undefined + ? oldCapacity + : end < 0 + ? oldCapacity + end + : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [undefined, newRoot] : [], + owner + ); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [newRoot] : [], + owner + ); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if ( + oldTail && + newTailOffset > oldTailOffset && + newOrigin < oldCapacity && + oldTail.array.length + ) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter( + owner, + newLevel, + newTailOffset - offsetShift + ); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; + } + + var OrderedMap = /*@__PURE__*/(function (Map) { + function OrderedMap(value) { + return value === undefined || value === null + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( Map ) OrderedMap.__proto__ = Map; + OrderedMap.prototype = Object.create( Map && Map.prototype ); + OrderedMap.prototype.constructor = OrderedMap; + + OrderedMap.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function toString () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function get (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + this.__altered = true; + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function set (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function remove (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._list.__iterate( + function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function __iterator (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return emptyOrderedMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + return OrderedMap; + }(Map)); + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + omap.__altered = false; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return ( + EMPTY_ORDERED_MAP || + (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) + ); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { return entry[0]; }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + omap.__altered = true; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; + + function isStack(maybeStack) { + return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); + } + + var Stack = /*@__PURE__*/(function (IndexedCollection) { + function Stack(value) { + return value === undefined || value === null + ? emptyStack() + : isStack(value) + ? value + : emptyStack().pushAll(value); + } + + if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; + Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + Stack.prototype.constructor = Stack; + + Stack.of = function of (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function toString () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function get (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function peek () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function push (/*...values*/) { + var arguments$1 = arguments; + + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments$1[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function pushAll (iter) { + iter = IndexedCollection(iter); + if (iter.size === 0) { + return this; + } + if (this.size === 0 && isStack(iter)) { + return iter; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.__iterate(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }, /* reverse */ true); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function pop () { + return this.slice(1); + }; + + Stack.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyStack(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return new ArraySeq(this.toArray()).__iterate( + function (v, k) { return fn(v, k, this$1$1); }, + reverse + ); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function __iterator (type, reverse) { + if (reverse) { + return new ArraySeq(this.toArray()).__iterator(type, reverse); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + return Stack; + }(IndexedCollection)); + + Stack.isStack = isStack; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SYMBOL] = true; + StackPrototype.shift = StackPrototype.pop; + StackPrototype.unshift = StackPrototype.push; + StackPrototype.unshiftAll = StackPrototype.pushAll; + StackPrototype.withMutations = withMutations; + StackPrototype.wasAltered = wasAltered; + StackPrototype.asImmutable = asImmutable; + StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; + StackPrototype['@@transducer/step'] = function (result, arr) { + return result.unshift(arr); + }; + StackPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; + + function isSet(maybeSet) { + return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); + } + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isCollection(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && + b.__hash !== undefined && + a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative + ? !a.has(v) + : flipped + ? !is(v, a.get(k, NOT_SET)) + : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + function toJS(value) { + if (!value || typeof value !== 'object') { + return value; + } + if (!isCollection(value)) { + if (!isDataStructure(value)) { + return value; + } + value = Seq(value); + } + if (isKeyed(value)) { + var result$1 = {}; + value.__iterate(function (v, k) { + result$1[k] = toJS(v); + }); + return result$1; + } + var result = []; + value.__iterate(function (v) { + result.push(toJS(v)); + }); + return result; + } + + var Set = /*@__PURE__*/(function (SetCollection) { + function Set(value) { + return value === undefined || value === null + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( SetCollection ) Set.__proto__ = SetCollection; + Set.prototype = Object.create( SetCollection && SetCollection.prototype ); + Set.prototype.constructor = Set; + + Set.of = function of (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + Set.intersect = function intersect (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.intersect.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.union = function union (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.union.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.prototype.toString = function toString () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function has (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function add (value) { + return updateSet(this, this._map.set(value, value)); + }; + + Set.prototype.remove = function remove (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function clear () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + // keep track if the set is altered by the map function + var didChanges = false; + + var newMap = updateSet( + this, + this._map.mapEntries(function (ref) { + var v = ref[1]; + + var mapped = mapper.call(context, v, v, this$1$1); + + if (mapped !== v) { + didChanges = true; + } + + return [mapped, mapped]; + }, context) + ); + + return didChanges ? newMap : this; + }; + + Set.prototype.union = function union () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + iters = iters.filter(function (x) { return x.size !== 0; }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); + } + }); + }; + + Set.prototype.intersect = function intersect () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (!iters.every(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.subtract = function subtract () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (iters.some(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.sort = function sort (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function wasAltered () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); + }; + + Set.prototype.__iterator = function __iterator (type, reverse) { + return this._map.__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return this.__empty(); + } + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + return Set; + }(SetCollection)); + + Set.isSet = isSet; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SYMBOL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.merge = SetPrototype.concat = SetPrototype.union; + SetPrototype.withMutations = withMutations; + SetPrototype.asImmutable = asImmutable; + SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; + SetPrototype['@@transducer/step'] = function (result, arr) { + return result.add(arr); + }; + SetPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map + ? set + : newMap.size === 0 + ? set.__empty() + : set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + /** + * Returns a lazy seq of nums from start (inclusive) to end + * (exclusive), by step, where start defaults to 0, step to 1, and end to + * infinity. When start is equal to end, returns empty list. + */ + var Range = /*@__PURE__*/(function (IndexedSeq) { + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + if ( IndexedSeq ) Range.__proto__ = IndexedSeq; + Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Range.prototype.constructor = Range; + + Range.prototype.toString = function toString () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function get (index, notSetValue) { + return this.has(index) + ? this._start + wrapIndex(this, index) * this._step + : notSetValue; + }; + + Range.prototype.includes = function includes (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range( + this.get(begin, this._end), + this.get(end, this._end), + this._step + ); + }; + + Range.prototype.indexOf = function indexOf (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + while (i !== size) { + if (fn(value, reverse ? size - ++i : i++, this) === false) { + break; + } + value += reverse ? -step : step; + } + return i; + }; + + Range.prototype.__iterator = function __iterator (type, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var v = value; + value += reverse ? -step : step; + return iteratorValue(type, reverse ? size - ++i : i++, v); + }); + }; + + Range.prototype.equals = function equals (other) { + return other instanceof Range + ? this._start === other._start && + this._end === other._end && + this._step === other._step + : deepEqual(this, other); + }; + + return Range; + }(IndexedSeq)); + + var EMPTY_RANGE; + + function getIn$1(collection, searchKeyPath, notSetValue) { + var keyPath = coerceKeyPath(searchKeyPath); + var i = 0; + while (i !== keyPath.length) { + collection = get(collection, keyPath[i++], NOT_SET); + if (collection === NOT_SET) { + return notSetValue; + } + } + return collection; + } + + function getIn(searchKeyPath, notSetValue) { + return getIn$1(this, searchKeyPath, notSetValue); + } + + function hasIn$1(collection, keyPath) { + return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; + } + + function hasIn(searchKeyPath) { + return hasIn$1(this, searchKeyPath); + } + + function toObject() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; + } + + // Note: all of these methods are deprecated. + Collection.isIterable = isCollection; + Collection.isKeyed = isKeyed; + Collection.isIndexed = isIndexed; + Collection.isAssociative = isAssociative; + Collection.isOrdered = isOrdered; + + Collection.Iterator = Iterator; + + mixin(Collection, { + // ### Conversion to other types + + toArray: function toArray() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + var useTuples = isKeyed(this); + var i = 0; + this.__iterate(function (v, k) { + // Keyed collections produce an array of tuples. + array[i++] = useTuples ? [k, v] : v; + }); + return array; + }, + + toIndexedSeq: function toIndexedSeq() { + return new ToIndexedSequence(this); + }, + + toJS: function toJS$1() { + return toJS(this); + }, + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, true); + }, + + toMap: function toMap() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: toObject, + + toOrderedMap: function toOrderedMap() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function toOrderedSet() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function toSet() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function toSetSeq() { + return new ToSetSequence(this); + }, + + toSeq: function toSeq() { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function toStack() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function toList() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function toString() { + return '[Collection]'; + }, + + __toString: function __toString(head, tail) { + if (this.size === 0) { + return head + tail; + } + return ( + head + + ' ' + + this.toSeq().map(this.__toStringMapper).join(', ') + + ' ' + + tail + ); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function concat() { + var values = [], len = arguments.length; + while ( len-- ) values[ len ] = arguments[ len ]; + + return reify(this, concatFactory(this, values)); + }, + + includes: function includes(searchValue) { + return this.some(function (value) { return is(value, searchValue); }); + }, + + entries: function entries() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function every(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function find(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function forEach(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function join(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function keys() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function map(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function reduce$1(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + false + ); + }, + + reduceRight: function reduceRight(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + true + ); + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function some(predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function sort(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function values() { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function butLast() { + return this.slice(0, -1); + }, + + isEmpty: function isEmpty() { + return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); + }, + + count: function count(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function countBy(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function equals(other) { + return deepEqual(this, other); + }, + + entrySeq: function entrySeq() { + var collection = this; + if (collection._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(collection._cache); + } + var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; + return entriesSequence; + }, + + filterNot: function filterNot(predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function findEntry(predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function findKey(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function findLast(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function findLastEntry(predicate, context, notSetValue) { + return this.toKeyedSeq() + .reverse() + .findEntry(predicate, context, notSetValue); + }, + + findLastKey: function findLastKey(predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function first(notSetValue) { + return this.find(returnTrue, null, notSetValue); + }, + + flatMap: function flatMap(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function fromEntrySeq() { + return new FromEntriesSequence(this); + }, + + get: function get(searchKey, notSetValue) { + return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); + }, + + getIn: getIn, + + groupBy: function groupBy(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function has(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: hasIn, + + isSubset: function isSubset(iter) { + iter = typeof iter.includes === 'function' ? iter : Collection(iter); + return this.every(function (value) { return iter.includes(value); }); + }, + + isSuperset: function isSuperset(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); + return iter.isSubset(this); + }, + + keyOf: function keyOf(searchValue) { + return this.findKey(function (value) { return is(value, searchValue); }); + }, + + keySeq: function keySeq() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function last(notSetValue) { + return this.toSeq().reverse().first(notSetValue); + }, + + lastKeyOf: function lastKeyOf(searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function max(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function maxBy(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function min(comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator + ); + }, + + minBy: function minBy(mapper, comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator, + mapper + ); + }, + + rest: function rest() { + return this.slice(1); + }, + + skip: function skip(amount) { + return amount === 0 ? this : this.slice(Math.max(0, amount)); + }, + + skipLast: function skipLast(amount) { + return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function skipUntil(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function sortBy(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function take(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function takeLast(amount) { + return this.slice(-Math.max(0, amount)); + }, + + takeWhile: function takeWhile(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function takeUntil(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + update: function update(fn) { + return fn(this); + }, + + valueSeq: function valueSeq() { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function hashCode() { + return this.__hash || (this.__hash = hashCollection(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + var CollectionPrototype = Collection.prototype; + CollectionPrototype[IS_COLLECTION_SYMBOL] = true; + CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; + CollectionPrototype.toJSON = CollectionPrototype.toArray; + CollectionPrototype.__toStringMapper = quoteString; + CollectionPrototype.inspect = CollectionPrototype.toSource = function () { + return this.toString(); + }; + CollectionPrototype.chain = CollectionPrototype.flatMap; + CollectionPrototype.contains = CollectionPrototype.includes; + + mixin(KeyedCollection, { + // ### More sequential methods + + flip: function flip() { + return reify(this, flipFactory(this)); + }, + + mapEntries: function mapEntries(mapper, context) { + var this$1$1 = this; + + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) + .fromEntrySeq() + ); + }, + + mapKeys: function mapKeys(mapper, context) { + var this$1$1 = this; + + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) + .flip() + ); + }, + }); + + var KeyedCollectionPrototype = KeyedCollection.prototype; + KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; + KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; + KeyedCollectionPrototype.toJSON = toObject; + KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; + + mixin(IndexedCollection, { + // ### Conversion to other types + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function findIndex(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function indexOf(searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function lastIndexOf(searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function splice(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum || 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 + ? spliced + : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + // ### More collection methods + + findLastIndex: function findLastIndex(predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function first(notSetValue) { + return this.get(0, notSetValue); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function get(index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || + this.size === Infinity || + (this.size !== undefined && index > this.size) + ? notSetValue + : this.find(function (_, key) { return key === index; }, undefined, notSetValue); + }, + + has: function has(index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function interpose(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function interleave(/*...collections*/) { + var collections = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * collections.length; + } + return reify(this, interleaved); + }, + + keySeq: function keySeq() { + return Range(0, this.size); + }, + + last: function last(notSetValue) { + return this.get(-1, notSetValue); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function zip(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections)); + }, + + zipAll: function zipAll(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections, true)); + }, + + zipWith: function zipWith(zipper /*, ...collections */) { + var collections = arrCopy(arguments); + collections[0] = this; + return reify(this, zipWithFactory(this, zipper, collections)); + }, + }); + + var IndexedCollectionPrototype = IndexedCollection.prototype; + IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; + IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; + + mixin(SetCollection, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function get(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function includes(value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function keySeq() { + return this.valueSeq(); + }, + }); + + var SetCollectionPrototype = SetCollection.prototype; + SetCollectionPrototype.has = CollectionPrototype.includes; + SetCollectionPrototype.contains = SetCollectionPrototype.includes; + SetCollectionPrototype.keys = SetCollectionPrototype.values; + + // Mixin subclasses + + mixin(KeyedSeq, KeyedCollectionPrototype); + mixin(IndexedSeq, IndexedCollectionPrototype); + mixin(SetSeq, SetCollectionPrototype); + + // #pragma Helper functions + + function reduce(collection, reducer, reduction, context, useFirst, reverse) { + assertNotInfinite(collection.size); + collection.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }, reverse); + return reduction; + } + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; + } + + function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashCollection(collection) { + if (collection.size === Infinity) { + return 0; + } + var ordered = isOrdered(collection); + var keyed = isKeyed(collection); + var h = ordered ? 1 : 0; + var size = collection.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + } + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; + } + + function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int + } + + var OrderedSet = /*@__PURE__*/(function (Set) { + function OrderedSet(value) { + return value === undefined || value === null + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( Set ) OrderedSet.__proto__ = Set; + OrderedSet.prototype = Object.create( Set && Set.prototype ); + OrderedSet.prototype.constructor = OrderedSet; + + OrderedSet.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + OrderedSet.prototype.toString = function toString () { + return this.__toString('OrderedSet {', '}'); + }; + + return OrderedSet; + }(Set)); + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; + OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; + OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; + OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return ( + EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) + ); + } + + function throwOnInvalidDefaultValues(defaultValues) { + if (isRecord(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' + ); + } + + if (isImmutable(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' + ); + } + + if (defaultValues === null || typeof defaultValues !== 'object') { + throw new Error( + 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' + ); + } + } + + var Record = function Record(defaultValues, name) { + var hasInitialized; + + throwOnInvalidDefaultValues(defaultValues); + + var RecordType = function Record(values) { + var this$1$1 = this; + + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + var indices = (RecordTypePrototype._indices = {}); + // Deprecated: left to attempt not to break any external code which + // relies on a ._name property existing on record instances. + // Use Record.getDescriptiveName() instead + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + for (var i = 0; i < keys.length; i++) { + var propName = keys[i]; + indices[propName] = i; + if (RecordTypePrototype[propName]) { + /* eslint-disable no-console */ + typeof console === 'object' && + console.warn && + console.warn( + 'Cannot define ' + + recordName(this) + + ' with property "' + + propName + + '" since that property name is part of the Record API.' + ); + /* eslint-enable no-console */ + } else { + setProp(RecordTypePrototype, propName); + } + } + } + this.__ownerID = undefined; + this._values = List().withMutations(function (l) { + l.setSize(this$1$1._keys.length); + KeyedCollection(values).forEach(function (v, k) { + l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); + }); + }); + return this; + }; + + var RecordTypePrototype = (RecordType.prototype = + Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + if (name) { + RecordType.displayName = name; + } + + return RecordType; + }; + + Record.prototype.toString = function toString () { + var str = recordName(this) + ' { '; + var keys = this._keys; + var k; + for (var i = 0, l = keys.length; i !== l; i++) { + k = keys[i]; + str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); + } + return str + ' }'; + }; + + Record.prototype.equals = function equals (other) { + return ( + this === other || + (isRecord(other) && recordSeq(this).equals(recordSeq(other))) + ); + }; + + Record.prototype.hashCode = function hashCode () { + return recordSeq(this).hashCode(); + }; + + // @pragma Access + + Record.prototype.has = function has (k) { + return this._indices.hasOwnProperty(k); + }; + + Record.prototype.get = function get (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var index = this._indices[k]; + var value = this._values.get(index); + return value === undefined ? this._defaultValues[k] : value; + }; + + // @pragma Modification + + Record.prototype.set = function set (k, v) { + if (this.has(k)) { + var newValues = this._values.set( + this._indices[k], + v === this._defaultValues[k] ? undefined : v + ); + if (newValues !== this._values && !this.__ownerID) { + return makeRecord(this, newValues); + } + } + return this; + }; + + Record.prototype.remove = function remove (k) { + return this.set(k); + }; + + Record.prototype.clear = function clear () { + var newValues = this._values.clear().setSize(this._keys.length); + + return this.__ownerID ? this : makeRecord(this, newValues); + }; + + Record.prototype.wasAltered = function wasAltered () { + return this._values.wasAltered(); + }; + + Record.prototype.toSeq = function toSeq () { + return recordSeq(this); + }; + + Record.prototype.toJS = function toJS$1 () { + return toJS(this); + }; + + Record.prototype.entries = function entries () { + return this.__iterator(ITERATE_ENTRIES); + }; + + Record.prototype.__iterator = function __iterator (type, reverse) { + return recordSeq(this).__iterator(type, reverse); + }; + + Record.prototype.__iterate = function __iterate (fn, reverse) { + return recordSeq(this).__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newValues = this._values.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._values = newValues; + return this; + } + return makeRecord(this, newValues, ownerID); + }; + + Record.isRecord = isRecord; + Record.getDescriptiveName = recordName; + var RecordPrototype = Record.prototype; + RecordPrototype[IS_RECORD_SYMBOL] = true; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; + RecordPrototype.getIn = getIn; + RecordPrototype.hasIn = CollectionPrototype.hasIn; + RecordPrototype.merge = merge$1; + RecordPrototype.mergeWith = mergeWith$1; + RecordPrototype.mergeIn = mergeIn; + RecordPrototype.mergeDeep = mergeDeep; + RecordPrototype.mergeDeepWith = mergeDeepWith; + RecordPrototype.mergeDeepIn = mergeDeepIn; + RecordPrototype.setIn = setIn; + RecordPrototype.update = update; + RecordPrototype.updateIn = updateIn; + RecordPrototype.withMutations = withMutations; + RecordPrototype.asMutable = asMutable; + RecordPrototype.asImmutable = asImmutable; + RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; + RecordPrototype.toJSON = RecordPrototype.toObject = + CollectionPrototype.toObject; + RecordPrototype.inspect = RecordPrototype.toSource = function () { + return this.toString(); + }; + + function makeRecord(likeRecord, values, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._values = values; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record.constructor.displayName || record.constructor.name || 'Record'; + } + + function recordSeq(record) { + return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); + } + + function setProp(prototype, name) { + try { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + /** + * Returns a lazy Seq of `value` repeated `times` times. When `times` is + * undefined, returns an infinite sequence of `value`. + */ + var Repeat = /*@__PURE__*/(function (IndexedSeq) { + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; + Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Repeat.prototype.constructor = Repeat; + + Repeat.prototype.toString = function toString () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function includes (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function slice (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat( + this._value, + resolveEnd(end, size) - resolveBegin(begin, size) + ); + }; + + Repeat.prototype.reverse = function reverse () { + return this; + }; + + Repeat.prototype.indexOf = function indexOf (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var i = 0; + while (i !== size) { + if (fn(this._value, reverse ? size - ++i : i++, this) === false) { + break; + } + } + return i; + }; + + Repeat.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var size = this.size; + var i = 0; + return new Iterator(function () { return i === size + ? iteratorDone() + : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } + ); + }; + + Repeat.prototype.equals = function equals (other) { + return other instanceof Repeat + ? is(this._value, other._value) + : deepEqual(other); + }; + + return Repeat; + }(IndexedSeq)); + + var EMPTY_REPEAT; + + function fromJS(value, converter) { + return fromJSWith( + [], + converter || defaultConverter, + value, + '', + converter && converter.length > 2 ? [] : undefined, + { '': value } + ); + } + + function fromJSWith(stack, converter, value, key, keyPath, parentValue) { + if ( + typeof value !== 'string' && + !isImmutable(value) && + (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) + ) { + if (~stack.indexOf(value)) { + throw new TypeError('Cannot convert circular structure to Immutable'); + } + stack.push(value); + keyPath && key !== '' && keyPath.push(key); + var converted = converter.call( + parentValue, + key, + Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } + ), + keyPath && keyPath.slice() + ); + stack.pop(); + keyPath && keyPath.pop(); + return converted; + } + return value; + } + + function defaultConverter(k, v) { + // Effectively the opposite of "Collection.toSeq()" + return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); + } + + var version = "4.1.0"; + + var Immutable = { + version: version, + + Collection: Collection, + // Note: Iterable is deprecated + Iterable: Collection, + + Seq: Seq, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + hash: hash, + + isImmutable: isImmutable, + isCollection: isCollection, + isKeyed: isKeyed, + isIndexed: isIndexed, + isAssociative: isAssociative, + isOrdered: isOrdered, + isValueObject: isValueObject, + isPlainObject: isPlainObject, + isSeq: isSeq, + isList: isList, + isMap: isMap, + isOrderedMap: isOrderedMap, + isStack: isStack, + isSet: isSet, + isOrderedSet: isOrderedSet, + isRecord: isRecord, + + get: get, + getIn: getIn$1, + has: has, + hasIn: hasIn$1, + merge: merge, + mergeDeep: mergeDeep$1, + mergeWith: mergeWith, + mergeDeepWith: mergeDeepWith$1, + remove: remove, + removeIn: removeIn, + set: set, + setIn: setIn$1, + update: update$1, + updateIn: updateIn$1, + }; + + // Note: Iterable is deprecated + var Iterable = Collection; + + exports.Collection = Collection; + exports.Iterable = Iterable; + exports.List = List; + exports.Map = Map; + exports.OrderedMap = OrderedMap; + exports.OrderedSet = OrderedSet; + exports.Range = Range; + exports.Record = Record; + exports.Repeat = Repeat; + exports.Seq = Seq; + exports.Set = Set; + exports.Stack = Stack; + exports.default = Immutable; + exports.fromJS = fromJS; + exports.get = get; + exports.getIn = getIn$1; + exports.has = has; + exports.hasIn = hasIn$1; + exports.hash = hash; + exports.is = is; + exports.isAssociative = isAssociative; + exports.isCollection = isCollection; + exports.isImmutable = isImmutable; + exports.isIndexed = isIndexed; + exports.isKeyed = isKeyed; + exports.isList = isList; + exports.isMap = isMap; + exports.isOrdered = isOrdered; + exports.isOrderedMap = isOrderedMap; + exports.isOrderedSet = isOrderedSet; + exports.isPlainObject = isPlainObject; + exports.isRecord = isRecord; + exports.isSeq = isSeq; + exports.isSet = isSet; + exports.isStack = isStack; + exports.isValueObject = isValueObject; + exports.merge = merge; + exports.mergeDeep = mergeDeep$1; + exports.mergeDeepWith = mergeDeepWith$1; + exports.mergeWith = mergeWith; + exports.remove = remove; + exports.removeIn = removeIn; + exports.set = set; + exports.setIn = setIn$1; + exports.update = update$1; + exports.updateIn = updateIn$1; + exports.version = version; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/node_modules/immutable/dist/immutable.js.flow b/node_modules/immutable/dist/immutable.js.flow new file mode 100644 index 0000000..251fcb1 --- /dev/null +++ b/node_modules/immutable/dist/immutable.js.flow @@ -0,0 +1,2347 @@ +/** + * This file provides type definitions for use with the Flow type checker. + * + * An important caveat when using these definitions is that the types for + * `Collection.Keyed`, `Collection.Indexed`, `Seq.Keyed`, and so on are stubs. + * When referring to those types, you can get the proper definitions by + * importing the types `KeyedCollection`, `IndexedCollection`, `KeyedSeq`, etc. + * For example, + * + * import { Seq } from 'immutable' + * import type { IndexedCollection, IndexedSeq } from 'immutable' + * + * const someSeq: IndexedSeq = Seq.Indexed.of(1, 2, 3) + * + * function takesASeq>(iter: TS): TS { + * return iter.butLast() + * } + * + * takesASeq(someSeq) + * + * @flow strict + */ + +// Helper type that represents plain objects allowed as arguments to +// some constructors and functions. +type PlainObjInput = { +[key: K]: V, __proto__: null }; + +type K = $Keys; + +// Helper types to extract the "keys" and "values" use by the *In() methods. +type $KeyOf = $Call< + ((?_Collection) => K) & + ((?$ReadOnlyArray) => number) & + ((?RecordInstance | T) => $Keys) & + ((T) => $Keys), + C +>; + +type $ValOf> = $Call< + ((?_Collection) => V) & + ((?$ReadOnlyArray) => T) & + (>(?RecordInstance | T, K) => $ElementType) & + ((T) => $Values), + C, + K +>; + +type $IterableOf = $Call< + ( | IndexedCollection | SetCollection>( + V + ) => Iterable<$ValOf>) & + (< + V: + | KeyedCollection + | RecordInstance + | PlainObjInput + >( + V + ) => Iterable<[$KeyOf, $ValOf]>), + C +>; + +declare class _Collection implements ValueObject { + equals(other: mixed): boolean; + hashCode(): number; + get(key: K, ..._: []): V | void; + get(key: K, notSetValue: NSV): V | NSV; + has(key: K): boolean; + includes(value: V): boolean; + contains(value: V): boolean; + first(notSetValue?: NSV): V | NSV; + last(notSetValue?: NSV): V | NSV; + + hasIn(keyPath: Iterable): boolean; + + getIn(keyPath: [], notSetValue?: mixed): this; + getIn(keyPath: [K], notSetValue: NSV): V | NSV; + getIn>( + keyPath: [K, K2], + notSetValue: NSV + ): $ValOf | NSV; + getIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3], + notSetValue: NSV + ): $ValOf<$ValOf, K3> | NSV; + getIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf, K3>, K4> | NSV; + getIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV; + + update(updater: (value: this) => U): U; + + toJS(): Array | { [key: string]: mixed }; + toJSON(): Array | { [key: string]: V }; + toArray(): Array | Array<[K, V]>; + toObject(): { [key: string]: V }; + toMap(): Map; + toOrderedMap(): OrderedMap; + toSet(): Set; + toOrderedSet(): OrderedSet; + toList(): List; + toStack(): Stack; + toSeq(): Seq; + toKeyedSeq(): KeyedSeq; + toIndexedSeq(): IndexedSeq; + toSetSeq(): SetSeq; + + keys(): Iterator; + values(): Iterator; + entries(): Iterator<[K, V]>; + + keySeq(): IndexedSeq; + valueSeq(): IndexedSeq; + entrySeq(): IndexedSeq<[K, V]>; + + reverse(): this; + sort(comparator?: (valueA: V, valueB: V) => number): this; + + sortBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): this; + + groupBy( + grouper: (value: V, key: K, iter: this) => G, + context?: mixed + ): KeyedSeq; + + forEach( + sideEffect: (value: V, key: K, iter: this) => any, + context?: mixed + ): number; + + slice(begin?: number, end?: number): this; + rest(): this; + butLast(): this; + skip(amount: number): this; + skipLast(amount: number): this; + skipWhile( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + skipUntil( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + take(amount: number): this; + takeLast(amount: number): this; + takeWhile( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + takeUntil( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + + filterNot( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + + reduce( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: mixed + ): R; + reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; + + reduceRight( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: mixed + ): R; + reduceRight( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + every( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): boolean; + some( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): boolean; + join(separator?: string): string; + isEmpty(): boolean; + count( + predicate?: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): number; + countBy( + grouper: (value: V, key: K, iter: this) => G, + context?: mixed + ): Map; + + find( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed, + notSetValue?: NSV + ): V | NSV; + findLast( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed, + notSetValue?: NSV + ): V | NSV; + + findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void; + findLastEntry( + predicate: (value: V, key: K, iter: this) => mixed + ): [K, V] | void; + + findKey( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): K | void; + findLastKey( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): K | void; + + keyOf(searchValue: V): K | void; + lastKeyOf(searchValue: V): K | void; + + max(comparator?: (valueA: V, valueB: V) => number): V; + maxBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V; + min(comparator?: (valueA: V, valueB: V) => number): V; + minBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V; + + isSubset(iter: Iterable): boolean; + isSuperset(iter: Iterable): boolean; +} + +declare function isImmutable( + maybeImmutable: mixed +): boolean %checks(maybeImmutable instanceof Collection); +declare function isCollection( + maybeCollection: mixed +): boolean %checks(maybeCollection instanceof Collection); +declare function isKeyed( + maybeKeyed: mixed +): boolean %checks(maybeKeyed instanceof KeyedCollection); +declare function isIndexed( + maybeIndexed: mixed +): boolean %checks(maybeIndexed instanceof IndexedCollection); +declare function isAssociative( + maybeAssociative: mixed +): boolean %checks(maybeAssociative instanceof KeyedCollection || + maybeAssociative instanceof IndexedCollection); +declare function isOrdered( + maybeOrdered: mixed +): boolean %checks(maybeOrdered instanceof IndexedCollection || + maybeOrdered instanceof OrderedMap || + maybeOrdered instanceof OrderedSet); +declare function isValueObject(maybeValue: mixed): boolean; + +declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq); +declare function isList(maybeList: any): boolean %checks(maybeList instanceof + List); +declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map); +declare function isOrderedMap( + maybeOrderedMap: any +): boolean %checks(maybeOrderedMap instanceof OrderedMap); +declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof + Stack); +declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set); +declare function isOrderedSet( + maybeOrderedSet: any +): boolean %checks(maybeOrderedSet instanceof OrderedSet); +declare function isRecord( + maybeRecord: any +): boolean %checks(maybeRecord instanceof Record); + +declare interface ValueObject { + equals(other: mixed): boolean; + hashCode(): number; +} + +declare class Collection extends _Collection { + static Keyed: typeof KeyedCollection; + static Indexed: typeof IndexedCollection; + static Set: typeof SetCollection; + + static isCollection: typeof isCollection; + static isKeyed: typeof isKeyed; + static isIndexed: typeof isIndexed; + static isAssociative: typeof isAssociative; + static isOrdered: typeof isOrdered; +} + +declare class KeyedCollection extends Collection { + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): KeyedCollection; + + toJS(): { [key: string]: mixed }; + toJSON(): { [key: string]: V }; + toArray(): Array<[K, V]>; + @@iterator(): Iterator<[K, V]>; + toSeq(): KeyedSeq; + flip(): KeyedCollection; + + concat( + ...iters: Array | PlainObjInput> + ): KeyedCollection; + + filter(predicate: typeof Boolean): KeyedCollection>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): KeyedCollection; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): KeyedCollection; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): KeyedCollection; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): KeyedCollection; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): KeyedCollection; + + flatten(depth?: number): KeyedCollection; + flatten(shallow?: boolean): KeyedCollection; +} + +Collection.Keyed = KeyedCollection; + +declare class IndexedCollection<+T> extends Collection { + static (iter?: Iterable): IndexedCollection; + + toJS(): Array; + toJSON(): Array; + toArray(): Array; + @@iterator(): Iterator; + toSeq(): IndexedSeq; + fromEntrySeq(): KeyedSeq; + interpose(separator: T): this; + interleave(...collections: Iterable[]): this; + splice(index: number, removeNum: number, ...values: T[]): this; + + zip(a: Iterable, ..._: []): IndexedCollection<[T, A]>; + zip( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): IndexedCollection<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection< + [T | void, A | void, B | void, C | void, D | void, E | void] + >; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection; + + indexOf(searchValue: T): number; + lastIndexOf(searchValue: T): number; + findIndex( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): number; + findLastIndex( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): number; + + concat(...iters: Array | C>): IndexedCollection; + + filter(predicate: typeof Boolean): IndexedCollection<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): IndexedCollection; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): IndexedCollection; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): IndexedCollection; + + flatten(depth?: number): IndexedCollection; + flatten(shallow?: boolean): IndexedCollection; +} + +declare class SetCollection<+T> extends Collection { + static (iter?: Iterable): SetCollection; + + toJS(): Array; + toJSON(): Array; + toArray(): Array; + @@iterator(): Iterator; + toSeq(): SetSeq; + + concat(...collections: Iterable[]): SetCollection; + + // `filter`, `map` and `flatMap` cannot be defined further up the hierarchy, + // because the implementation for `KeyedCollection` allows the value type to + // change without constraining the key type. That does not work for + // `SetCollection` - the value and key types *must* match. + filter(predicate: typeof Boolean): SetCollection<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): SetCollection; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): SetCollection; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): SetCollection; + + flatten(depth?: number): SetCollection; + flatten(shallow?: boolean): SetCollection; +} + +declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof + Seq); +declare class Seq extends _Collection { + static Keyed: typeof KeyedSeq; + static Indexed: typeof IndexedSeq; + static Set: typeof SetSeq; + + static (values: KeyedSeq): KeyedSeq; + static (values: SetSeq): SetSeq; + static (values: Iterable): IndexedSeq; + static (values?: PlainObjInput): KeyedSeq; + + static isSeq: typeof isSeq; + + size: number | void; + cacheResult(): this; + toSeq(): this; +} + +declare class KeyedSeq extends Seq mixins KeyedCollection { + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): KeyedSeq; + + // Override specialized return types + flip(): KeyedSeq; + + concat( + ...iters: Array | PlainObjInput> + ): KeyedSeq; + + filter(predicate: typeof Boolean): KeyedSeq>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): KeyedSeq; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): KeyedSeq; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): KeyedSeq; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): KeyedSeq; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): KeyedSeq; + + flatten(depth?: number): KeyedSeq; + flatten(shallow?: boolean): KeyedSeq; +} + +declare class IndexedSeq<+T> + extends Seq + mixins IndexedCollection +{ + static (values?: Iterable): IndexedSeq; + + static of(...values: T[]): IndexedSeq; + + // Override specialized return types + + concat(...iters: Array | C>): IndexedSeq; + + filter(predicate: typeof Boolean): IndexedSeq<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): IndexedSeq; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): IndexedSeq; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): IndexedSeq; + + flatten(depth?: number): IndexedSeq; + flatten(shallow?: boolean): IndexedSeq; + + zip(a: Iterable, ..._: []): IndexedSeq<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): IndexedSeq<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): IndexedSeq<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq; +} + +declare class SetSeq<+T> extends Seq mixins SetCollection { + static (values?: Iterable): SetSeq; + + static of(...values: T[]): SetSeq; + + // Override specialized return types + + concat(...collections: Iterable[]): SetSeq; + + filter(predicate: typeof Boolean): SetSeq<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): SetSeq; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): SetSeq; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): SetSeq; + + flatten(depth?: number): SetSeq; + flatten(shallow?: boolean): SetSeq; +} + +declare class UpdatableInCollection { + setIn(keyPath: [], value: S): S; + setIn(keyPath: [K], value: V): this; + setIn, S: $ValOf>(keyPath: [K, K2], value: S): this; + setIn, K3: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K3>>( + keyPath: [K, K2, K3], + value: S + ): this; + setIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + value: S + ): this; + setIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + value: S + ): this; + + deleteIn(keyPath: []): void; + deleteIn(keyPath: [K]): this; + deleteIn>(keyPath: [K, K2]): this; + deleteIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3] + ): this; + deleteIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this; + deleteIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this; + + removeIn(keyPath: []): void; + removeIn(keyPath: [K]): this; + removeIn>(keyPath: [K, K2]): this; + removeIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3] + ): this; + removeIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this; + removeIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this; + + updateIn(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U; + updateIn(keyPath: [], updater: (value: this) => U): U; + updateIn(keyPath: [K], notSetValue: NSV, updater: (value: V) => V): this; + updateIn(keyPath: [K], updater: (value: V) => V): this; + updateIn, S: $ValOf>( + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf | NSV) => S + ): this; + updateIn, S: $ValOf>( + keyPath: [K, K2], + updater: (value: $ValOf) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K3> + >( + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K3> | NSV) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K3> + >( + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf, K3>) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4> | NSV) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4>) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV + ) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5>) => S + ): this; +} + +declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof + List); +declare class List<+T> + extends IndexedCollection + mixins UpdatableInCollection +{ + static (collection?: Iterable): List; + + static of(...values: T[]): List; + + static isList: typeof isList; + + size: number; + + set(index: number, value: U): List; + delete(index: number): this; + remove(index: number): this; + insert(index: number, value: U): List; + clear(): this; + push(...values: U[]): List; + pop(): this; + unshift(...values: U[]): List; + shift(): this; + + update(updater: (value: this) => U): U; + update(index: number, updater: (value: T) => U): List; + update( + index: number, + notSetValue: U, + updater: (value: T) => U + ): List; + + merge(...collections: Iterable[]): List; + + setSize(size: number): this; + + mergeIn(keyPath: Iterable, ...collections: Iterable[]): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: Iterable[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + concat(...iters: Array | C>): List; + + filter(predicate: typeof Boolean): List<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): List; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): List; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): List; + + flatten(depth?: number): List; + flatten(shallow?: boolean): List; + + zip(a: Iterable, ..._: []): List<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): List<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): List<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List; +} + +declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof + Map); +declare class Map + extends KeyedCollection + mixins UpdatableInCollection +{ + static (values?: Iterable<[K, V]> | PlainObjInput): Map; + + static isMap: typeof isMap; + + size: number; + + set(key: K_, value: V_): Map; + delete(key: K): this; + remove(key: K): this; + clear(): this; + + deleteAll(keys: Iterable): Map; + removeAll(keys: Iterable): Map; + + update(updater: (value: this) => U): U; + update(key: K, updater: (value: V) => V_): Map; + update( + key: K, + notSetValue: V_, + updater: (value: V) => V_ + ): Map; + + merge( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + concat( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeWith( + merger: (oldVal: V, newVal: W, key: K) => X, + ...collections: (Iterable<[K_, W]> | PlainObjInput)[] + ): Map; + + mergeDeep( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + flip(): Map; + + filter(predicate: typeof Boolean): Map>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): Map; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): Map; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): Map; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): Map; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): Map; + + flatten(depth?: number): Map; + flatten(shallow?: boolean): Map; +} + +declare function isOrderedMap( + maybeOrderedMap: mixed +): boolean %checks(maybeOrderedMap instanceof OrderedMap); +declare class OrderedMap + extends Map + mixins UpdatableInCollection +{ + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): OrderedMap; + + static isOrderedMap: typeof isOrderedMap; + + size: number; + + set(key: K_, value: V_): OrderedMap; + delete(key: K): this; + remove(key: K): this; + clear(): this; + + update(updater: (value: this) => U): U; + update(key: K, updater: (value: V) => V_): OrderedMap; + update( + key: K, + notSetValue: V_, + updater: (value: V) => V_ + ): OrderedMap; + + merge( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + concat( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeWith( + merger: (oldVal: V, newVal: W, key: K) => X, + ...collections: (Iterable<[K_, W]> | PlainObjInput)[] + ): OrderedMap; + + mergeDeep( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + flip(): OrderedMap; + + filter(predicate: typeof Boolean): OrderedMap>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): OrderedMap; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): OrderedMap; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): OrderedMap; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): OrderedMap; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): OrderedMap; + + flatten(depth?: number): OrderedMap; + flatten(shallow?: boolean): OrderedMap; +} + +declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof + Set); +declare class Set<+T> extends SetCollection { + static (values?: Iterable): Set; + + static of(...values: T[]): Set; + static fromKeys( + values: Iterable<[T, mixed]> | PlainObjInput + ): Set; + + static intersect(sets: Iterable>): Set; + static union(sets: Iterable>): Set; + + static isSet: typeof isSet; + + size: number; + + add(value: U): Set; + delete(value: T): this; + remove(value: T): this; + clear(): this; + union(...collections: Iterable[]): Set; + merge(...collections: Iterable[]): Set; + concat(...collections: Iterable[]): Set; + intersect(...collections: Iterable[]): Set; + subtract(...collections: Iterable[]): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + filter(predicate: typeof Boolean): Set<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): Set; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): Set; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): Set; + + flatten(depth?: number): Set; + flatten(shallow?: boolean): Set; +} + +// Overrides except for `isOrderedSet` are for specialized return types +declare function isOrderedSet( + maybeOrderedSet: mixed +): boolean %checks(maybeOrderedSet instanceof OrderedSet); +declare class OrderedSet<+T> extends Set { + static (values?: Iterable): OrderedSet; + + static of(...values: T[]): OrderedSet; + static fromKeys( + values: Iterable<[T, mixed]> | PlainObjInput + ): OrderedSet; + + static isOrderedSet: typeof isOrderedSet; + + size: number; + + add(value: U): OrderedSet; + union(...collections: Iterable[]): OrderedSet; + merge(...collections: Iterable[]): OrderedSet; + concat(...collections: Iterable[]): OrderedSet; + intersect(...collections: Iterable[]): OrderedSet; + + filter(predicate: typeof Boolean): OrderedSet<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): OrderedSet; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): OrderedSet; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): OrderedSet; + + flatten(depth?: number): OrderedSet; + flatten(shallow?: boolean): OrderedSet; + + zip(a: Iterable, ..._: []): OrderedSet<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): OrderedSet<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): OrderedSet<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet; +} + +declare function isStack( + maybeStack: mixed +): boolean %checks(maybeStack instanceof Stack); +declare class Stack<+T> extends IndexedCollection { + static (collection?: Iterable): Stack; + + static isStack(maybeStack: mixed): boolean; + static of(...values: T[]): Stack; + + static isStack: typeof isStack; + + size: number; + + peek(): T; + clear(): this; + unshift(...values: U[]): Stack; + unshiftAll(iter: Iterable): Stack; + shift(): this; + push(...values: U[]): Stack; + pushAll(iter: Iterable): Stack; + pop(): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + concat(...iters: Array | C>): Stack; + + filter(predicate: typeof Boolean): Stack<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): Stack; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): Stack; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): Stack; + + flatten(depth?: number): Stack; + flatten(shallow?: boolean): Stack; + + zip(a: Iterable, ..._: []): Stack<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): Stack<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): Stack<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack; +} + +declare function Range( + start?: number, + end?: number, + step?: number +): IndexedSeq; +declare function Repeat(value: T, times?: number): IndexedSeq; + +// The type of a Record factory function. +type RecordFactory = Class>; + +// The type of runtime Record instances. +type RecordOf = RecordInstance & $ReadOnly; + +// The values of a Record instance. +type _RecordValues | T> = R; +type RecordValues = _RecordValues<*, R>; + +declare function isRecord( + maybeRecord: any +): boolean %checks(maybeRecord instanceof RecordInstance); +declare class Record { + static (spec: Values, name?: string): typeof RecordInstance; + constructor( + spec: Values, + name?: string + ): typeof RecordInstance; + + static isRecord: typeof isRecord; + + static getDescriptiveName(record: RecordInstance): string; +} + +declare class RecordInstance { + static (values?: Iterable<[$Keys, $ValOf]> | $Shape): RecordOf; + // Note: a constructor can only create an instance of RecordInstance, + // it's encouraged to not use `new` when creating Records. + constructor(values?: Iterable<[$Keys, $ValOf]> | $Shape): void; + + size: number; + + has(key: string): boolean; + + get>(key: K, ..._: []): $ElementType; + get, NSV>(key: K, notSetValue: NSV): $ElementType | NSV; + + hasIn(keyPath: Iterable): boolean; + + getIn(keyPath: [], notSetValue?: mixed): this & $ReadOnly; + getIn>(keyPath: [K], notSetValue?: mixed): $ElementType; + getIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2], + notSetValue: NSV + ): $ValOf<$ValOf, K2> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; + + equals(other: any): boolean; + hashCode(): number; + + set>(key: K, value: $ElementType): this & $ReadOnly; + update>( + key: K, + updater: (value: $ElementType) => $ElementType + ): this & $ReadOnly; + merge( + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + mergeDeep( + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + + mergeWith( + merger: (oldVal: $ValOf, newVal: $ValOf, key: $Keys) => $ValOf, + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => any, + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + + delete>(key: K): this & $ReadOnly; + remove>(key: K): this & $ReadOnly; + clear(): this & $ReadOnly; + + setIn(keyPath: [], value: S): S; + setIn, S: $ValOf>( + keyPath: [K], + value: S + ): this & $ReadOnly; + setIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( + keyPath: [K, K2], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + value: S + ): this & $ReadOnly; + + deleteIn(keyPath: []): void; + deleteIn>(keyPath: [K]): this & $ReadOnly; + deleteIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this & $ReadOnly; + + removeIn(keyPath: []): void; + removeIn>(keyPath: [K]): this & $ReadOnly; + removeIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this & $ReadOnly; + + updateIn( + keyPath: [], + notSetValue: mixed, + updater: (value: this & T) => U + ): U; + updateIn(keyPath: [], updater: (value: this & T) => U): U; + updateIn, S: $ValOf>( + keyPath: [K], + notSetValue: NSV, + updater: (value: $ValOf) => S + ): this & $ReadOnly; + updateIn, S: $ValOf>( + keyPath: [K], + updater: (value: $ValOf) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> + >( + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K2> | NSV) => S + ): this & $ReadOnly; + updateIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( + keyPath: [K, K2], + updater: (value: $ValOf<$ValOf, K2>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV + ) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV + ) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + ) => S + ): this & $ReadOnly; + + mergeIn( + keyPath: Iterable, + ...collections: Array + ): this & $ReadOnly; + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this & $ReadOnly; + + toSeq(): KeyedSeq<$Keys, any>; + + toJS(): { [key: $Keys]: mixed }; + toJSON(): T; + toObject(): T; + + withMutations(mutator: (mutable: this & T) => mixed): this & $ReadOnly; + asMutable(): this & $ReadOnly; + wasAltered(): boolean; + asImmutable(): this & $ReadOnly; + + @@iterator(): Iterator<[$Keys, $ValOf]>; +} + +declare function fromJS( + jsValue: mixed, + reviver?: ( + key: string | number, + sequence: KeyedCollection | IndexedCollection, + path?: Array + ) => mixed +): Collection; + +declare function is(first: mixed, second: mixed): boolean; +declare function hash(value: mixed): number; + +declare function get>( + collection: C, + key: K, + notSetValue: mixed +): $ValOf; +declare function get, NSV>( + collection: C, + key: K, + notSetValue: NSV +): $ValOf | NSV; + +declare function has(collection: Object, key: mixed): boolean; +declare function remove(collection: C, key: $KeyOf): C; +declare function set, V: $ValOf>( + collection: C, + key: K, + value: V +): C; +declare function update, V: $ValOf, NSV>( + collection: C, + key: K, + notSetValue: NSV, + updater: ($ValOf | NSV) => V +): C; +declare function update, V: $ValOf>( + collection: C, + key: K, + updater: ($ValOf) => V +): C; + +declare function getIn(collection: C, keyPath: [], notSetValue?: mixed): C; +declare function getIn, NSV>( + collection: C, + keyPath: [K], + notSetValue: NSV +): $ValOf | NSV; +declare function getIn, K2: $KeyOf<$ValOf>, NSV>( + collection: C, + keyPath: [K, K2], + notSetValue: NSV +): $ValOf<$ValOf, K2> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; + +declare function hasIn(collection: Object, keyPath: Iterable): boolean; + +declare function removeIn(collection: C, keyPath: []): void; +declare function removeIn>(collection: C, keyPath: [K]): C; +declare function removeIn, K2: $KeyOf<$ValOf>>( + collection: C, + keyPath: [K, K2] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> +>( + collection: C, + keyPath: [K, K2, K3] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> +>( + collection: C, + keyPath: [K, K2, K3, K4] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5] +): C; + +declare function setIn(collection: Object, keyPath: [], value: S): S; +declare function setIn, S: $ValOf>( + collection: C, + keyPath: [K], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> +>( + collection: C, + keyPath: [K, K2], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> +>( + collection: C, + keyPath: [K, K2, K3], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> +>( + collection: C, + keyPath: [K, K2, K3, K4], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + value: S +): C; + +declare function updateIn( + collection: C, + keyPath: [], + notSetValue: mixed, + updater: (value: C) => S +): S; +declare function updateIn( + collection: C, + keyPath: [], + updater: (value: C) => S +): S; +declare function updateIn, S: $ValOf, NSV>( + collection: C, + keyPath: [K], + notSetValue: NSV, + updater: (value: $ValOf | NSV) => S +): C; +declare function updateIn, S: $ValOf>( + collection: C, + keyPath: [K], + updater: (value: $ValOf) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2>, + NSV +>( + collection: C, + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K2> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> +>( + collection: C, + keyPath: [K, K2], + updater: (value: $ValOf<$ValOf, K2>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3>, + NSV +>( + collection: C, + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> +>( + collection: C, + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> +>( + collection: C, + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV + ) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + ) => S +): C; + +declare function merge( + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeWith( + merger: (oldVal: $ValOf, newVal: $ValOf, key: $KeyOf) => $ValOf, + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeDeep( + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; + +export { + Collection, + Seq, + List, + Map, + OrderedMap, + OrderedSet, + Range, + Repeat, + Record, + Set, + Stack, + fromJS, + is, + hash, + isImmutable, + isCollection, + isKeyed, + isIndexed, + isAssociative, + isOrdered, + isRecord, + isValueObject, + get, + has, + remove, + set, + update, + getIn, + hasIn, + removeIn, + setIn, + updateIn, + merge, + mergeWith, + mergeDeep, + mergeDeepWith, +}; + +export default { + Collection, + Seq, + + List, + Map, + OrderedMap, + OrderedSet, + Range, + Repeat, + Record, + Set, + Stack, + + fromJS, + is, + hash, + + isImmutable, + isCollection, + isKeyed, + isIndexed, + isAssociative, + isOrdered, + isRecord, + isValueObject, + + get, + has, + remove, + set, + update, + getIn, + hasIn, + removeIn, + setIn, + updateIn, + merge, + mergeWith, + mergeDeep, + mergeDeepWith, +}; + +export type { + KeyedCollection, + IndexedCollection, + SetCollection, + KeyedSeq, + IndexedSeq, + SetSeq, + RecordFactory, + RecordOf, + RecordInstance, + ValueObject, + $KeyOf, + $ValOf, +}; diff --git a/node_modules/immutable/dist/immutable.min.js b/node_modules/immutable/dist/immutable.min.js new file mode 100644 index 0000000..293771b --- /dev/null +++ b/node_modules/immutable/dist/immutable.min.js @@ -0,0 +1,55 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron 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. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Immutable={})}(this,function(t){"use strict";var e="delete",d=5,l=1<>>0;if(""+r!==e||4294967295==r)return NaN;e=r}return e<0?c(t)+e:e}function r(){return!0}function p(t,e,r){return(0===t&&!i(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&r<=e)}function y(t,e){return n(t,e,0)}function w(t,e){return n(t,e,e)}function n(t,e,r){return void 0===t?r:i(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function i(t){return t<0||0===t&&1/t==-1/0}var o="@@__IMMUTABLE_ITERABLE__@@";function f(t){return!(!t||!t[o])}var s="@@__IMMUTABLE_KEYED__@@";function a(t){return!(!t||!t[s])}var S="@@__IMMUTABLE_INDEXED__@@";function z(t){return!(!t||!t[S])}function b(t){return a(t)||z(t)}function I(t){return f(t)?t:F(t)}var O=function(t){function e(t){return a(t)?t:G(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),E=function(t){function e(t){return z(t)?t:Z(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),j=function(t){function e(t){return f(t)&&!b(t)?t:$(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I);I.Keyed=O,I.Indexed=E,I.Set=j;var q="@@__IMMUTABLE_SEQ__@@";function M(t){return!(!t||!t[q])}var D="@@__IMMUTABLE_RECORD__@@";function x(t){return!(!t||!t[D])}function A(t){return f(t)||x(t)}var k="@@__IMMUTABLE_ORDERED__@@";function R(t){return!(!t||!t[k])}var U=0,K=1,T=2,C="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=C||L,P=function(t){this.next=t};function W(t,e,r,n){r=0===t?e:1===t?r:[e,r];return n?n.value=r:n={value:r,done:!1},n}function N(){return{value:void 0,done:!0}}function H(t){return Array.isArray(t +)||Y(t)}function J(t){return t&&"function"==typeof t.next}function V(t){var e=Y(t);return e&&e.call(t)}function Y(t){t=t&&(C&&t[C]||t[L]);if("function"==typeof t)return t}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=U,P.VALUES=K,P.ENTRIES=T,P.prototype.inspect=P.prototype.toSource=function(){return""+this},P.prototype[B]=function(){return this};var Q=Object.prototype.hasOwnProperty;function X(t){return Array.isArray(t)||"string"==typeof t||t&&"object"==typeof t&&Number.isInteger(t.length)&&0<=t.length&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var F=function(t){function e(t){return null==t?it():A(t)?t.toSeq():function(t){var e=st(t);if(e)return function(t){var e=Y(t);return e&&e===t.entries}(t)?e.fromEntrySeq():function(t){var e=Y(t);return e&&e===t.keys}(t)?e.toSetSeq():e;if("object"!=typeof t)throw new TypeError("Expected Array or collection object of values, or keyed object: "+t);return new et(t)}(t)}return e.__proto__=t,((e.prototype=Object.create(t.prototype)).constructor=e).prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(e,r){var n=this._cache;if(n){var i=n.length,o=0;return new P(function(){if(o===i)return N();var t=n[r?i-++o:o++];return W(e,t[0],t[1])})}return this.__iteratorUncached(e,r)},e}(I),G=function(t){function e(t){return null==t?it().toKeyedSeq():f(t)?a(t)?t.toSeq():t.fromEntrySeq():x(t)?t.toSeq():ot(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.toKeyedSeq=function(){return this},e}(F),Z=function(t){function e(t){return null==t?it():f(t)?a(t)?t.entrySeq():t.toIndexedSeq():x(t +)?t.toSeq().entrySeq():ut(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(F),$=function(t){function e(t){return(f(t)&&!b(t)?t:Z(t)).toSetSeq()}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(F);F.isSeq=M,F.Keyed=G,F.Set=$,F.Indexed=Z,F.prototype[q]=!0;var tt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return this.has(t)?this._array[h(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(e,r){var n=this._array,i=n.length,o=0;return new P(function(){if(o===i)return N();var t=r?i-++o:o++;return W(e,t,n[t])})},e}(Z),et=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return Q.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(!1===t(r[u],u,this))break}return o},e.prototype.__iterator=function(e,r){var n=this._object,i=this._keys,o=i.length,u=0;return new P(function(){if(u===o)return N();var t=i[r?o-++u:u++];return W(e,t,n[t])})},e}(G);et.prototype[k]=!0;var rt,nt=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__iterateUncached=function(t,e){ +if(e)return this.cacheResult().__iterate(t,e);var r,n=V(this._collection),i=0;if(J(n))for(;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},e.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=V(this._collection);if(!J(r))return new P(N);var n=0;return new P(function(){var t=r.next();return t.done?t:W(e,n++,t.value)})},e}(Z);function it(){return rt=rt||new tt([])}function ot(t){var e=st(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new et(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function ut(t){var e=st(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function st(t){return X(t)?new tt(t):H(t)?new nt(t):void 0}var at="@@__IMMUTABLE_MAP__@@";function ct(t){return!(!t||!t[at])}function ft(t){return ct(t)&&R(t)}function ht(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function _t(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(ht(t)&&ht(e)&&t.equals(e))}var pt="function"==typeof Math.imul&&-2==Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function lt(t){return t>>>1&1073741824|3221225471&t}var vt=Object.prototype.valueOf;function yt(t){if(null==t)return dt(t);if("function"==typeof t.hashCode)return lt(t.hashCode(t));var e,r=(e=t).valueOf!==vt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return dt(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;4294967295f)return N();var t=r.next();return a||e===K||t.done?t:W(e,i-1,e===U?void 0:t.value[1],t)})},r}function Bt(e,c,f,h){var t=Xt(e);return t.__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=!0,u=0;return e.__iterate(function(t,e,r){if(!(o=o&&c.call(f,t,e,r)))return u++,n(t,h?e:u-1,i)}),u},t.__iteratorUncached=function(i,t){var o=this;if(t)return this.cacheResult().__iterator(i,t);var u=e.__iterator(T,t),s=!0,a=0;return new P(function(){var t;do{if((t=u.next()).done)return h||i===K?t:W(i,a++,i===U?void 0:t.value[1],t);var e=t.value,r=e[0],n=e[1];s=s&&c.call(f,n,r,o)}while(s);return i===T?t:W(i,r,n,t)})},t}function Pt(t,s,a){var c=Xt(t);return c.__iterateUncached=function(i,e){if(e)return this.cacheResult().__iterate(i,e);var o=0,u=!1;return function r(t,n){t.__iterate(function(t,e){return(!s||n>>t)&g),o=this.bitmap;return 0==(o&i)?n:this.nodes[$e(o&i-1)].get(t+d,e,r,n)},Le.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=1<>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Be(t,o+1,u)}(t,_,c,s,u);if(f&&!u&&2===_.length&&Ge(_[1^h]))return _[1^h];if(f&&u&&1===_.length&&Ge(u))return u;s=t&&t===this.ownerID,a=f?u?c:c^a:c|a,u=f?u?tr(_,h,u,s):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u>>t)&g];return i?i.get(t+d,e,r,n):n},Be.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=this.nodes,c=a[s];if(i===v&&!c)return this;o=Fe(c,t,e+d,r,n,i,o,u);if(o===c)return this;u=this.count;if(c){if(!o&&--u>>r)&g,u=(0===r?n:n>>>r)&g,t=o==u?[Ze(t,e,r+d,n,i)]:(i=new We(e,n,i),o>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function tr(t,e,r,n){t=n?t:Zt(t);return t[e]=r,t}var er=l/4,rr=l/2,nr=l/4,ir="@@__IMMUTABLE_LIST__@@";function or(t){return!(!t||!t[ir])}var ur=function(o){function t(t){var e=pr();if(null==t)return e;if(or(t))return t;var n=o(t),i=n.size;return 0===i?e:(te(i),0=gr(t._capacity)?n=lr(n,t.__ownerID,0,e,r,o):i=lr(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return _r(t._origin,t._capacity,t._level,i,n)}(this,t,e)},t.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},t.prototype.insert=function(t,e){return this.splice(t,0,e)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=d,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):pr()},t.prototype.push=function(){var r=arguments,n=this.size;return this.withMutations(function(t){dr(t,0,n+r.length);for(var e=0;e>>e&g;if(this.array.length<=n)return new ar([],t);var i=0==n;if(0>>e&g;if(this.array.length<=n)return this;if(0>e,u=1+(c-r>>e);l>>r&g,a=t&&s=gr(t._capacity))return t._tail;if(e<1<>>n&g],n-=d;return r}}function dr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new m,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:r<0?o+r:i+r;if(u===i&&s===o)return t;if(s<=u)return t.clear();for(var a=t._level,c=t._root,f=0;u+f<0;)c=new ar(c&&c.array.length?[void 0,c]:[],n),f+=1<<(a+=d);f&&(u+=f,i+=f,s+=f,o+=f);for(var h=gr(o),_=gr(s);1<>>l&g,p=p.array[v]=vr(p.array[v],n);p.array[h>>>d&g]=e}if(s>>a&g;if(y!=_>>>a&g)break;y&&(f+=(1<>>d<>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=lt((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+sn(yt(t),yt(e))|0}:function(t,e){n=n+sn(yt(t),yt(e))|0}:e?function(t){n=31*n+yt(t)|0}:function(t){n=n+yt(t)|0}),n)}(this))}});var Xr=I.prototype;Xr[o]=!0,Xr[B]=Xr.values,Xr.toJSON=Xr.toArray,Xr.__toStringMapper=oe,Xr.inspect=Xr.toSource=function(){return""+this},Xr.chain=Xr.flatMap,Xr.contains=Xr.includes,Ur(O,{flip:function(){return Vt(this,Ut(this))},mapEntries:function(r,n){var i=this,o=0;return Vt(this,this.toSeq().map(function(t,e){return r.call(n,[e,t],o++,i)}).fromEntrySeq())},mapKeys:function(r,n){var i=this;return Vt(this,this.toSeq().flip().map(function(t,e){return r.call(n,t,e,i)}).flip())}});var Fr=O.prototype;Fr[s]=!0,Fr[B]=Xr.entries,Fr.toJSON=Qr,Fr.__toStringMapper=function(t,e){return oe(e)+": "+oe(t)},Ur(E,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(t,e){return Vt(this,Ct(this,t,e,!1))},findIndex:function(t,e){e=this.findEntry(t,e);return e?e[0]:-1},indexOf:function(t){t=this.keyOf(t);return void 0===t?-1:t},lastIndexOf:function(t){t=this.lastKeyOf(t);return void 0===t?-1:t},reverse:function(){return Vt(this,Tt(this,!1))},slice:function(t,e){return Vt(this,Lt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=y(t,t<0?this.count():this.size);var n=this.slice(0,t);return Vt(this,1===r?n:n.concat(Zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){e=this.findLastEntry(t,e);return e?e[0]:-1},first:function(t){ +return this.get(0,t)},flatten:function(t){return Vt(this,Pt(this,t,!1))},get:function(r,t){return(r=h(this,r))<0||this.size===1/0||void 0!==this.size&&this.size>2)|0}Zr.has=Xr.includes,Zr.contains=Zr.includes,Zr.keys=Zr.values,Ur(G,Fr),Ur(Z,Gr),Ur($,Zr);var an=function(t){function e(r){return null==r?_n():kr(r)?r:_n().withMutations(function(e){var t=j( +r);te(t.size),t.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Tr);an.isOrderedSet=kr;var cn,fn=an.prototype;function hn(t,e){var r=Object.create(fn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function _n(){return cn=cn||hn(zr())}fn[k]=!0,fn.zip=Gr.zip,fn.zipWith=Gr.zipWith,fn.zipAll=Gr.zipAll,fn.__empty=_n,fn.__make=hn;Gr=function(u,s){var a;!function(t){if(x(t))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(u);var c=function(t){var n=this;if(t instanceof c)return t;if(!(this instanceof c))return new c(t);if(!a){a=!0;var e=Object.keys(u),r=f._indices={};f._name=s,f._keys=e,f._defaultValues=u;for(var i=0;i len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json new file mode 100644 index 0000000..6084d35 --- /dev/null +++ b/node_modules/inflight/package.json @@ -0,0 +1,29 @@ +{ + "name": "inflight", + "version": "1.0.6", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "files": [ + "inflight.js" + ], + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^7.1.2" + }, + "scripts": { + "test": "tap test.js --100" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/inflight.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC" +} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js new file mode 100644 index 0000000..f71f2d9 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1,9 @@ +try { + var util = require('util'); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = require('./inherits_browser.js'); +} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..86bbb3d --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,27 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000..37b4366 --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,29 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.4", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "tap" + }, + "devDependencies": { + "tap": "^14.2.4" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ] +} diff --git a/node_modules/ini/LICENSE b/node_modules/ini/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/ini/LICENSE @@ -0,0 +1,15 @@ +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. diff --git a/node_modules/ini/README.md b/node_modules/ini/README.md new file mode 100644 index 0000000..33df258 --- /dev/null +++ b/node_modules/ini/README.md @@ -0,0 +1,102 @@ +An ini format parser and serializer for node. + +Sections are treated as nested objects. Items before the first +heading are saved on the object directly. + +## Usage + +Consider an ini-file `config.ini` that looks like this: + + ; this comment is being ignored + scope = global + + [database] + user = dbuser + password = dbpassword + database = use_this_database + + [paths.default] + datadir = /var/lib/data + array[] = first value + array[] = second value + array[] = third value + +You can read, manipulate and write the ini-file like so: + + var fs = require('fs') + , ini = require('ini') + + var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) + + config.scope = 'local' + config.database.database = 'use_another_database' + config.paths.default.tmpdir = '/tmp' + delete config.paths.default.datadir + config.paths.default.array.push('fourth value') + + fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) + +This will result in a file called `config_modified.ini` being written +to the filesystem with the following content: + + [section] + scope=local + [section.database] + user=dbuser + password=dbpassword + database=use_another_database + [section.paths.default] + tmpdir=/tmp + array[]=first value + array[]=second value + array[]=third value + array[]=fourth value + + +## API + +### decode(inistring) + +Decode the ini-style formatted `inistring` into a nested object. + +### parse(inistring) + +Alias for `decode(inistring)` + +### encode(object, [options]) + +Encode the object `object` into an ini-style formatted string. If the +optional parameter `section` is given, then all top-level properties +of the object are put into this section and the `section`-string is +prepended to all sub-sections, see the usage example above. + +The `options` object may contain the following: + +* `section` A string which will be the first `section` in the encoded + ini data. Defaults to none. +* `whitespace` Boolean to specify whether to put whitespace around the + `=` character. By default, whitespace is omitted, to be friendly to + some persnickety old parsers that don't tolerate it well. But some + find that it's more human-readable and pretty with the whitespace. + +For backwards compatibility reasons, if a `string` options is passed +in, then it is assumed to be the `section` value. + +### stringify(object, [options]) + +Alias for `encode(object, [options])` + +### safe(val) + +Escapes the string `val` such that it is safe to be used as a key or +value in an ini-file. Basically escapes quotes. For example + + ini.safe('"unsafe string"') + +would result in + + "\"unsafe string\"" + +### unsafe(val) + +Unescapes the string `val` diff --git a/node_modules/ini/ini.js b/node_modules/ini/ini.js new file mode 100644 index 0000000..b576f08 --- /dev/null +++ b/node_modules/ini/ini.js @@ -0,0 +1,206 @@ +exports.parse = exports.decode = decode + +exports.stringify = exports.encode = encode + +exports.safe = safe +exports.unsafe = unsafe + +var eol = typeof process !== 'undefined' && + process.platform === 'win32' ? '\r\n' : '\n' + +function encode (obj, opt) { + var children = [] + var out = '' + + if (typeof opt === 'string') { + opt = { + section: opt, + whitespace: false, + } + } else { + opt = opt || {} + opt.whitespace = opt.whitespace === true + } + + var separator = opt.whitespace ? ' = ' : '=' + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k] + if (val && Array.isArray(val)) { + val.forEach(function (item) { + out += safe(k + '[]') + separator + safe(item) + '\n' + }) + } else if (val && typeof val === 'object') + children.push(k) + else + out += safe(k) + separator + safe(val) + eol + }) + + if (opt.section && out.length) + out = '[' + safe(opt.section) + ']' + eol + out + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.') + var section = (opt.section ? opt.section + '.' : '') + nk + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace, + }) + if (out.length && child.length) + out += eol + + out += child + }) + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {} + var p = out + var section = null + // section |key = value + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + var lines = str.split(/[\r\n]+/g) + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) + return + var match = line.match(re) + if (!match) + return + if (match[1] !== undefined) { + section = unsafe(match[1]) + if (section === '__proto__') { + // not allowed + // keep parsing the section, but don't attach it. + p = {} + return + } + p = out[section] = out[section] || {} + return + } + var key = unsafe(match[2]) + if (key === '__proto__') + return + var value = match[3] ? unsafe(match[4]) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === '[]') { + key = key.substring(0, key.length - 2) + if (key === '__proto__') + return + if (!p[key]) + p[key] = [] + else if (!Array.isArray(p[key])) + p[key] = [p[key]] + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) + p[key].push(value) + else + p[key] = value + }) + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || + typeof out[k] !== 'object' || + Array.isArray(out[k])) + return false + + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k) + var p = out + var l = parts.pop() + var nl = l.replace(/\\\./g, '.') + parts.forEach(function (part, _, __) { + if (part === '__proto__') + return + if (!p[part] || typeof p[part] !== 'object') + p[part] = {} + p = p[part] + }) + if (p === out && nl === l) + return false + + p[nl] = out[k] + return true + }).forEach(function (del, _, __) { + delete out[del] + }) + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === '"' && val.slice(-1) === '"') || + (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return (typeof val !== 'string' || + val.match(/[=\r\n]/) || + val.match(/^\[/) || + (val.length > 1 && + isQuoted(val)) || + val !== val.trim()) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, '\\#') +} + +function unsafe (val, doUnesc) { + val = (val || '').trim() + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") + val = val.substr(1, val.length - 2) + + try { + val = JSON.parse(val) + } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false + var unesc = '' + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i) + if (esc) { + if ('\\;#'.indexOf(c) !== -1) + unesc += c + else + unesc += '\\' + c + + esc = false + } else if (';#'.indexOf(c) !== -1) + break + else if (c === '\\') + esc = true + else + unesc += c + } + if (esc) + unesc += '\\' + + return unesc.trim() + } + return val +} diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json new file mode 100644 index 0000000..c830a35 --- /dev/null +++ b/node_modules/ini/package.json @@ -0,0 +1,33 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "ini", + "description": "An ini encoder/decoder for node", + "version": "1.3.8", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "main": "ini.js", + "scripts": { + "eslint": "eslint", + "lint": "npm run eslint -- ini.js test/*.js", + "lintfix": "npm run lint -- --fix", + "test": "tap", + "posttest": "npm run lint", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "devDependencies": { + "eslint": "^7.9.0", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", + "tap": "14" + }, + "license": "ISC", + "files": [ + "ini.js" + ] +} diff --git a/node_modules/interpret/CHANGELOG b/node_modules/interpret/CHANGELOG new file mode 100644 index 0000000..cbc8a8a --- /dev/null +++ b/node_modules/interpret/CHANGELOG @@ -0,0 +1,115 @@ +v1.0.3: + date: 2017-04-18 + changes: + - fix buble support +v1.0.2: + date: 2017-03-29 + changes: + - add support for coffeescript (now with no hyphen) +v1.0.1: + date: 2016-05-01 + changes: + - add support for buble +v1.0.0: + date: 2015-11-18 + changes: + - add support for babel-register + - go stable! +v0.6.6: + date: 2015-09-21 + changes: + - add support for ts-node (formerly typescript-node) +v0.6.5: + date: 2015-07-22 + changes: + - add support for typescript 1.5 via typescript-node +v0.6.4: + date: 2015-07-07 + changes: + - add support for earlgrey +v0.6.3: + date: 2015-07-03 + changes: + - prefer babel/core to babel +v0.6.2: + date: 2015-05-20 + changes: + - update module list for iced coffee-script +v0.6.1: + date: 2015-05-20 + changes: + - Fix toml loader. +v0.6.0: + date: 2015-05-19 + changes: + - Combine fallbacks and loaders into `extensions`. + - Provide implementation guidance. +v0.5.1: + date: 2015-03-01 + changes: + - Add support for CirruScript. +v0.5.0: + date: 2015-02-27 + changes: + - Refactor es6 support via Babel (formerly 6to5) +v0.4.3: + date: 2015-02-09 + changes: + - Switch support from typescript-require to typescript-register. +v0.4.2: + date: 2015-01-16 + changes: + - Add support for wisp. +v0.4.1: + date: 2015-01-10 + changes: + - Add support for 6to5 (es6) +v0.4.0: + date: 2014-01-09 + changes: + - Add support for fallback (legacy) modules + - Add support for module configurations +v0.3.10: + date: 2014-12-17 + changes: + - Add support for json5. +v0.3.9: + date: 2014-12-08 + changes: + - Add support for literate iced coffee. +v0.3.8: + date: 2014-11-20 + changes: + - Add support for [cjsx](https://github.com/jsdf/coffee-react). +v0.3.7: + date: 2014-09-08 + changes: + - Add support for [TypeScript](http://www.typescriptlang.org/). +v0.3.6: + date: 2014-08-25 + changes: + - Add support for coffee.md. +v0.3.5: + date: 2014-07-03 + changes: + - Add support for jsx. +v0.3.4: + date: 2014-06-27 + changes: + - Make .js first jsVariant entry. +v0.3.3: + date: 2014-06-02 + changes: + - Fix casing on livescript dependency. +v0.3.0: + date: 2014-04-20 + changes: + - Simplify loading of coffee-script and iced-coffee-script. +v0.2.0: + date: 2014-04-20 + changes: + - Move module loading into rechoir. +v0.1.0: + date: 2014-04-20 + changes: + - Initial public release. diff --git a/node_modules/interpret/LICENSE b/node_modules/interpret/LICENSE new file mode 100644 index 0000000..7d7525d --- /dev/null +++ b/node_modules/interpret/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014-2018 Tyler Kellen , Blaine Bublitz , and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/interpret/README.md b/node_modules/interpret/README.md new file mode 100644 index 0000000..4dffc99 --- /dev/null +++ b/node_modules/interpret/README.md @@ -0,0 +1,187 @@ + + +# interpret + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +A dictionary of file extensions and associated module loaders. + +## What is it +This is used by [Liftoff](http://github.com/tkellen/node-liftoff) to automatically require dependencies for configuration files, and by [rechoir](http://github.com/tkellen/node-rechoir) for registering module loaders. + +## API + +### extensions +Map file types to modules which provide a [require.extensions] loader. + +```js +{ + '.babel.js': [ + { + module: '@babel/register', + register: function(hook) { + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel-register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel-core/register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel/register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + ], + '.babel.ts': [ + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.ts' }); + }, + }, + ], + '.buble.js': 'buble/register', + '.cirru': 'cirru-script/lib/register', + '.cjsx': 'node-cjsx/register', + '.co': 'coco', + '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.csv': 'require-csv', + '.eg': 'earlgrey/register', + '.esm.js': { + module: 'esm', + register: function(hook) { + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + var esmLoader = hook(module); + require.extensions['.js'] = esmLoader('module')._extensions['.js']; + }, + }, + '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], + '.iced.md': 'iced-coffee-script/register', + '.ini': 'require-ini', + '.js': null, + '.json': null, + '.json5': 'json5/lib/require', + '.jsx': [ + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel-register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel-core/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'node-jsx', + register: function(hook) { + hook.install({ extension: '.jsx', harmony: true }); + }, + }, + ], + '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.liticed': 'iced-coffee-script/register', + '.ls': ['livescript', 'LiveScript'], + '.mjs': '/absolute/path/to/interpret/mjs-stub.js', + '.node': null, + '.toml': { + module: 'toml-require', + register: function(hook) { + hook.install(); + }, + }, + '.ts': [ + 'ts-node/register', + 'typescript-node/register', + 'typescript-register', + 'typescript-require', + 'sucrase/register/ts', + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.ts' }); + }, + }, + ], + '.tsx': [ + 'ts-node/register', + 'typescript-node/register', + 'sucrase/register', + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.tsx' }); + }, + }, + ], + '.wisp': 'wisp/engine/node', + '.xml': 'require-xml', + '.yaml': 'require-yaml', + '.yml': 'require-yaml', +} +``` + +### jsVariants +Same as above, but only include the extensions which are javascript variants. + +## How to use it + +Consumers should use the exported `extensions` or `jsVariants` object to determine which module should be loaded for a given extension. If a matching extension is found, consumers should do the following: + +1. If the value is null, do nothing. + +2. If the value is a string, try to require it. + +3. If the value is an object, try to require the `module` property. If successful, the `register` property (a function) should be called with the module passed as the first argument. + +4. If the value is an array, iterate over it, attempting step #2 or #3 until one of the attempts does not throw. + +[require.extensions]: http://nodejs.org/api/globals.html#globals_require_extensions + +[downloads-image]: http://img.shields.io/npm/dm/interpret.svg +[npm-url]: https://www.npmjs.com/package/interpret +[npm-image]: http://img.shields.io/npm/v/interpret.svg + +[travis-url]: https://travis-ci.org/gulpjs/interpret +[travis-image]: http://img.shields.io/travis/gulpjs/interpret.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/interpret +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/interpret.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/interpret +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/interpret/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/interpret/index.js b/node_modules/interpret/index.js new file mode 100644 index 0000000..a5c04f7 --- /dev/null +++ b/node_modules/interpret/index.js @@ -0,0 +1,168 @@ +var path = require('path'); + +var mjsStub = path.join(__dirname, 'mjs-stub'); + +var extensions = { + '.babel.js': [ + { + module: '@babel/register', + register: function(hook) { + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel-register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel-core/register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + { + module: 'babel/register', + register: function(hook) { + hook({ extensions: '.js' }); + }, + }, + ], + '.babel.ts': [ + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.ts' }); + }, + }, + ], + '.buble.js': 'buble/register', + '.cirru': 'cirru-script/lib/register', + '.cjsx': 'node-cjsx/register', + '.co': 'coco', + '.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.csv': 'require-csv', + '.eg': 'earlgrey/register', + '.esm.js': { + module: 'esm', + register: function(hook) { + // register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353 + // which only captures the final extension (.babel.js -> .js) + var esmLoader = hook(module); + require.extensions['.js'] = esmLoader('module')._extensions['.js']; + }, + }, + '.iced': ['iced-coffee-script/register', 'iced-coffee-script'], + '.iced.md': 'iced-coffee-script/register', + '.ini': 'require-ini', + '.js': null, + '.json': null, + '.json5': 'json5/lib/require', + '.jsx': [ + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel-register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel-core/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'babel/register', + register: function(hook) { + hook({ extensions: '.jsx' }); + }, + }, + { + module: 'node-jsx', + register: function(hook) { + hook.install({ extension: '.jsx', harmony: true }); + }, + }, + ], + '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'], + '.liticed': 'iced-coffee-script/register', + '.ls': ['livescript', 'LiveScript'], + '.mjs': mjsStub, + '.node': null, + '.toml': { + module: 'toml-require', + register: function(hook) { + hook.install(); + }, + }, + '.ts': [ + 'ts-node/register', + 'typescript-node/register', + 'typescript-register', + 'typescript-require', + 'sucrase/register/ts', + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.ts' }); + }, + }, + ], + '.tsx': [ + 'ts-node/register', + 'typescript-node/register', + 'sucrase/register', + { + module: '@babel/register', + register: function(hook) { + hook({ extensions: '.tsx' }); + }, + }, + ], + '.wisp': 'wisp/engine/node', + '.xml': 'require-xml', + '.yaml': 'require-yaml', + '.yml': 'require-yaml', +}; + +var jsVariantExtensions = [ + '.js', + '.babel.js', + '.babel.ts', + '.buble.js', + '.cirru', + '.cjsx', + '.co', + '.coffee', + '.coffee.md', + '.eg', + '.esm.js', + '.iced', + '.iced.md', + '.jsx', + '.litcoffee', + '.liticed', + '.ls', + '.mjs', + '.ts', + '.tsx', + '.wisp', +]; + +module.exports = { + extensions: extensions, + jsVariants: jsVariantExtensions.reduce(function(result, ext) { + result[ext] = extensions[ext]; + return result; + }, {}), +}; diff --git a/node_modules/interpret/mjs-stub.js b/node_modules/interpret/mjs-stub.js new file mode 100644 index 0000000..6a1af95 --- /dev/null +++ b/node_modules/interpret/mjs-stub.js @@ -0,0 +1 @@ +require.extensions['.mjs'] = null; diff --git a/node_modules/interpret/package.json b/node_modules/interpret/package.json new file mode 100644 index 0000000..0653516 --- /dev/null +++ b/node_modules/interpret/package.json @@ -0,0 +1,75 @@ +{ + "name": "interpret", + "version": "1.4.0", + "description": "A dictionary of file extensions and associated module loaders.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz ", + "Tyler Kellen (http://goingslowly.com/)" + ], + "repository": "gulpjs/interpret", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js", + "mjs-stub.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "rm -rf tmp/ && npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3", + "parse-node-version": "^1.0.0", + "rechoir": "^0.6.2", + "shelljs": "0.7.5", + "trash-cli": "^3.0.0" + }, + "keywords": [ + "cirru-script", + "cjsx", + "co", + "coco", + "coffee", + "coffee-script", + "coffee.md", + "coffeescript", + "csv", + "earlgrey", + "es", + "es6", + "iced", + "iced.md", + "iced-coffee-script", + "ini", + "js", + "json", + "json5", + "jsx", + "react", + "litcoffee", + "liticed", + "ls", + "livescript", + "toml", + "ts", + "typescript", + "wisp", + "xml", + "yaml", + "yml" + ] +} diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js new file mode 100644 index 0000000..61e2196 --- /dev/null +++ b/node_modules/invert-kv/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (obj) { + if (typeof obj !== 'object') { + throw new TypeError('Expected an object'); + } + + var ret = {}; + + for (var key in obj) { + var val = obj[key]; + ret[val] = key; + } + + return ret; +}; diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json new file mode 100644 index 0000000..1e85d9b --- /dev/null +++ b/node_modules/invert-kv/package.json @@ -0,0 +1,33 @@ +{ + "name": "invert-kv", + "version": "1.0.0", + "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}", + "license": "MIT", + "repository": "sindresorhus/invert-kv", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "obj", + "key", + "value", + "val", + "kv", + "invert" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md new file mode 100644 index 0000000..039fc7c --- /dev/null +++ b/node_modules/invert-kv/readme.md @@ -0,0 +1,25 @@ +# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv) + +> Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}` + + +## Install + +```sh +$ npm install --save invert-kv +``` + + +## Usage + +```js +var invertKv = require('invert-kv'); + +invertKv({foo: 'bar', unicorn: 'rainbow'}); +//=> {bar: 'foo', rainbow: 'unicorn'} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-absolute/LICENSE b/node_modules/is-absolute/LICENSE new file mode 100644 index 0000000..44cf43b --- /dev/null +++ b/node_modules/is-absolute/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. +Copyright (c) 2009-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/node_modules/is-absolute/README.md b/node_modules/is-absolute/README.md new file mode 100644 index 0000000..edc1ceb --- /dev/null +++ b/node_modules/is-absolute/README.md @@ -0,0 +1,114 @@ +# is-absolute [![NPM version](https://img.shields.io/npm/v/is-absolute.svg?style=flat)](https://www.npmjs.com/package/is-absolute) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-absolute.svg?style=flat)](https://npmjs.org/package/is-absolute) [![NPM total downloads](https://img.shields.io/npm/dt/is-absolute.svg?style=flat)](https://npmjs.org/package/is-absolute) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-absolute.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-absolute) + +> Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-absolute +``` + +Originally based on the `isAbsolute` utility method in [express](https://github.com/visionmedia/express). + +## Usage + +```js +var isAbsolute = require('is-absolute'); + +isAbsolute('a/b/c.js'); +//=> 'false' +isAbsolute('/a/b/c.js'); +//=> 'true' +``` + +**Explicitly test windows paths** + +```js +isAbsolute.posix('/foo/bar'); +isAbsolute.posix('/user/docs/Letter.txt'); +//=> true + +isAbsolute.posix('foo/bar'); +//=> false +``` + +**Explicitly test windows paths** + +```js +var isAbsolute = require('is-absolute'); + +isAbsolute.win32('c:\\'); +isAbsolute.win32('//C://user\\docs\\Letter.txt'); +isAbsolute.win32('\\\\unc\\share'); +isAbsolute.win32('\\\\unc\\share\\foo'); +isAbsolute.win32('\\\\unc\\share\\foo\\'); +isAbsolute.win32('\\\\unc\\share\\foo\\bar'); +isAbsolute.win32('\\\\unc\\share\\foo\\bar\\'); +isAbsolute.win32('\\\\unc\\share\\foo\\bar\\baz'); +//=> true + +isAbsolute.win32('a:foo/a/b/c/d'); +isAbsolute.win32(':\\'); +isAbsolute.win32('foo\\bar\\baz'); +isAbsolute.win32('foo\\bar\\baz\\'); +//=> false +``` + +## About + +### Related projects + +* [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.") +* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob "Return true if a value is a valid glob pattern or patterns.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 35 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [es128](https://github.com/es128) | +| 1 | [shinnn](https://github.com/shinnn) | +| 1 | [Sobak](https://github.com/Sobak) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-absolute/index.js b/node_modules/is-absolute/index.js new file mode 100644 index 0000000..06d6731 --- /dev/null +++ b/node_modules/is-absolute/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var isRelative = require('is-relative'); +var isWindows = require('is-windows'); + +/** + * Expose `isAbsolute` + */ + +module.exports = isAbsolute; + +/** + * Returns true if a file path is absolute. + * + * @param {String} `fp` + * @return {Boolean} + */ + +function isAbsolute(fp) { + if (typeof fp !== 'string') { + throw new TypeError('isAbsolute expects a string.'); + } + return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp); +} + +/** + * Test posix paths. + */ + +isAbsolute.posix = function posixPath(fp) { + return fp.charAt(0) === '/'; +}; + +/** + * Test windows paths. + */ + +isAbsolute.win32 = function win32(fp) { + if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') { + return true; + } + // Microsoft Azure absolute filepath + if (fp.slice(0, 2) === '\\\\') { + return true; + } + return !isRelative(fp); +}; diff --git a/node_modules/is-absolute/package.json b/node_modules/is-absolute/package.json new file mode 100644 index 0000000..d0cb992 --- /dev/null +++ b/node_modules/is-absolute/package.json @@ -0,0 +1,91 @@ +{ + "name": "is-absolute", + "description": "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-absolute", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Shinnosuke Watanabe (https://shinnn.github.io)", + "(http://sobak.pl)" + ], + "repository": "jonschlinkert/is-absolute", + "bugs": { + "url": "https://github.com/jonschlinkert/is-absolute/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "absolute", + "built", + "built-in", + "check", + "core", + "detect", + "dir", + "file", + "filepath", + "is", + "is-absolute", + "isabsolute", + "normalize", + "path", + "path-absolute", + "path-is-absolute", + "paths", + "polyfill", + "relative", + "resolve", + "shim", + "slash", + "slashes", + "uri", + "url", + "util", + "utils" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-dotfile", + "is-glob", + "is-relative", + "is-unc-path", + "is-valid-glob" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-accessor-descriptor/LICENSE b/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/is-accessor-descriptor/README.md b/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..d198e1f --- /dev/null +++ b/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,144 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-accessor-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-accessor-descriptor +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 22 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/is-accessor-descriptor/index.js b/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..d2e6fe8 --- /dev/null +++ b/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/is-accessor-descriptor/node_modules/kind-of/CHANGELOG.md b/node_modules/is-accessor-descriptor/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/is-accessor-descriptor/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE b/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md b/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js b/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json b/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/is-accessor-descriptor/package.json b/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..47b97ac --- /dev/null +++ b/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,73 @@ +{ + "name": "is-accessor-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-accessor-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^6.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "is-plain-object", + "isobject" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig new file mode 100644 index 0000000..4c017f8 --- /dev/null +++ b/node_modules/is-arrayish/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.coffee] +indent_style = space + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml new file mode 100644 index 0000000..19fbec3 --- /dev/null +++ b/node_modules/is-arrayish/.istanbul.yml @@ -0,0 +1,4 @@ +instrumentation: + excludes: + - test.js + - test/**/* diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore new file mode 100644 index 0000000..8d5eacb --- /dev/null +++ b/node_modules/is-arrayish/.npmignore @@ -0,0 +1,5 @@ +/coverage/ +/test.js +/test/ +*.sw[a-p] +/node_modules/ diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml new file mode 100644 index 0000000..5a04243 --- /dev/null +++ b/node_modules/is-arrayish/.travis.yml @@ -0,0 +1,17 @@ +language: node_js + +script: + - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register + - cat coverage/lcov.info | node_modules/.bin/coveralls +node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" +os: + - linux + - osx + +notifications: + slack: + secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4= diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 0000000..7d36072 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 0000000..5b97186 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 0000000..8b2d1c3 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,34 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.2.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.6.1" + } +} diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..6c8c7e7 --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,12 @@ +'use strict'; +var path = require('path'); +var binaryExtensions = require('binary-extensions'); +var exts = Object.create(null); + +binaryExtensions.forEach(function (el) { + exts[el] = true; +}); + +module.exports = function (filepath) { + return path.extname(filepath).slice(1).toLowerCase() in exts; +}; diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-binary-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..cd21d88 --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,39 @@ +{ + "name": "is-binary-path", + "version": "1.0.1", + "description": "Check if a filepath is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..a17d6a2 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a filepath is a binary file + + +## Install + +``` +$ npm install --save is-binary-path +``` + + +## Usage + +```js +var isBinaryPath = require('is-binary-path'); + +isBinaryPath('src/unicorn.png'); +//=> true + +isBinaryPath('src/unicorn.txt'); +//=> false +``` + + +## Related + +- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +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/node_modules/is-buffer/README.md b/node_modules/is-buffer/README.md new file mode 100644 index 0000000..cce0a8c --- /dev/null +++ b/node_modules/is-buffer/README.md @@ -0,0 +1,53 @@ +# is-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/is-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg +[downloads-url]: https://npmjs.org/package/is-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js new file mode 100644 index 0000000..9cce396 --- /dev/null +++ b/node_modules/is-buffer/index.js @@ -0,0 +1,21 @@ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json new file mode 100644 index 0000000..ea12137 --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-buffer", + "description": "Determine if an object is a Buffer", + "version": "1.1.6", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + } +} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000..be4f8e4 --- /dev/null +++ b/node_modules/is-buffer/test/basic.js @@ -0,0 +1,24 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') + t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') + + t.equal(isBuffer(undefined), false, 'undefined') + t.equal(isBuffer(null), false, 'null') + t.equal(isBuffer(''), false, 'empty string') + t.equal(isBuffer(true), false, 'true') + t.equal(isBuffer(false), false, 'false') + t.equal(isBuffer(0), false, '0') + t.equal(isBuffer(1), false, '1') + t.equal(isBuffer(1.0), false, '1.0') + t.equal(isBuffer('string'), false, 'string') + t.equal(isBuffer({}), false, '{}') + t.equal(isBuffer([]), false, '[]') + t.equal(isBuffer(function foo () {}), false, 'function foo () {}') + t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') + t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') + + t.end() +}) diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000..f2e0726 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000..a2ff254 --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,151 @@ +# 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). + +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000..2e50287 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000..062d906 --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000..d73579c --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,155 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000..f9637e0 --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var has = require('has'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return has(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000..5c1a871 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,72 @@ +{ + "name": "is-core-module", + "version": "2.11.0", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "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/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "has": "^1.0.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000..912808b --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,133 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-data-descriptor/LICENSE b/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/is-data-descriptor/README.md b/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..42b0714 --- /dev/null +++ b/node_modules/is-data-descriptor/README.md @@ -0,0 +1,161 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-data-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-data-descriptor +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 21 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/is-data-descriptor/index.js b/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..cfeae36 --- /dev/null +++ b/node_modules/is-data-descriptor/index.js @@ -0,0 +1,49 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isDataDescriptor(obj, prop) { + // data descriptor properties + var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' + }; + + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +}; diff --git a/node_modules/is-data-descriptor/node_modules/kind-of/CHANGELOG.md b/node_modules/is-data-descriptor/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/is-data-descriptor/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE b/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-data-descriptor/node_modules/kind-of/README.md b/node_modules/is-data-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/is-data-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/is-data-descriptor/node_modules/kind-of/index.js b/node_modules/is-data-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/is-data-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/is-data-descriptor/node_modules/kind-of/package.json b/node_modules/is-data-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/is-data-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/is-data-descriptor/package.json b/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..0b09383 --- /dev/null +++ b/node_modules/is-data-descriptor/package.json @@ -0,0 +1,72 @@ +{ + "name": "is-data-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-data-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^6.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-descriptor/LICENSE b/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/is-descriptor/README.md b/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/is-descriptor/index.js b/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/is-descriptor/node_modules/kind-of/CHANGELOG.md b/node_modules/is-descriptor/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/is-descriptor/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/is-descriptor/node_modules/kind-of/LICENSE b/node_modules/is-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-descriptor/node_modules/kind-of/README.md b/node_modules/is-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/is-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/is-descriptor/node_modules/kind-of/index.js b/node_modules/is-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/is-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/is-descriptor/node_modules/kind-of/package.json b/node_modules/is-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/is-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/is-descriptor/package.json b/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..87b2975 --- /dev/null +++ b/node_modules/is-descriptor/package.json @@ -0,0 +1,75 @@ +{ + "name": "is-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-extendable/LICENSE b/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/is-extendable/README.md b/node_modules/is-extendable/README.md new file mode 100644 index 0000000..e4cfaeb --- /dev/null +++ b/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/node_modules/is-extendable/index.js b/node_modules/is-extendable/index.js new file mode 100644 index 0000000..4ee71a4 --- /dev/null +++ b/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/node_modules/is-extendable/package.json b/node_modules/is-extendable/package.json new file mode 100644 index 0000000..5dd006e --- /dev/null +++ b/node_modules/is-extendable/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + } +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..7a90836 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-fullwidth-code-point/index.js b/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..a7d3e38 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +var numberIsNan = require('number-is-nan'); + +module.exports = function (x) { + if (numberIsNan(x)) { + return false; + } + + // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369 + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if (x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + 0x2329 === x || // LEFT-POINTING ANGLE BRACKET + 0x232a === x || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || + // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || + // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || + // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || + // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || + // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || + // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || + // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || + 0xffe0 <= x && x <= 0xffe6 || + // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || + // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; +} diff --git a/node_modules/is-fullwidth-code-point/license b/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..b678d40 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,45 @@ +{ + "name": "is-fullwidth-code-point", + "version": "1.0.0", + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "license": "MIT", + "repository": "sindresorhus/is-fullwidth-code-point", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "devDependencies": { + "ava": "0.0.4", + "code-point-at": "^1.0.0" + } +} diff --git a/node_modules/is-fullwidth-code-point/readme.md b/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..4936464 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +var isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..740724b --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,206 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [doowb](https://github.com/doowb) | +| 1 | [phated](https://github.com/phated) | +| 1 | [danhper](https://github.com/danhper) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..620f563 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,150 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var check = strictCheck; + + // optionally relax check + if (options && options.strict === false) { + check = relaxedCheck; + } + + return check(str); +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..858af03 --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/is-glob", + "bugs": { + "url": "https://github.com/micromatch/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/is-negated-glob/LICENSE b/node_modules/is-negated-glob/LICENSE new file mode 100644 index 0000000..66ae69c --- /dev/null +++ b/node_modules/is-negated-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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. diff --git a/node_modules/is-negated-glob/README.md b/node_modules/is-negated-glob/README.md new file mode 100644 index 0000000..c909408 --- /dev/null +++ b/node_modules/is-negated-glob/README.md @@ -0,0 +1,73 @@ +# is-negated-glob [![NPM version](https://img.shields.io/npm/v/is-negated-glob.svg?style=flat)](https://www.npmjs.com/package/is-negated-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-negated-glob.svg?style=flat)](https://npmjs.org/package/is-negated-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-negated-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-negated-glob) + +> Returns an object with a `negated` boolean and the `!` stripped from negation patterns. Also respects extglobs. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-negated-glob +``` + +## Usage + +```js +var isNegatedGlob = require('is-negated-glob'); + +console.log(isNegatedGlob('foo')); +// { pattern: 'foo', negated: false } + +console.log(isNegatedGlob('!foo')); +// { pattern: 'foo', negated: true } + +console.log(isNegatedGlob('!(foo)')); +// extglob patterns are ignored +// { pattern: '!(foo)', negated: false } +``` + +## About + +### Related projects + +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [to-absolute-glob](https://www.npmjs.com/package/to-absolute-glob): Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are… [more](https://github.com/jonschlinkert/to-absolute-glob) | [homepage](https://github.com/jonschlinkert/to-absolute-glob "Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-negated-glob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 08, 2016._ \ No newline at end of file diff --git a/node_modules/is-negated-glob/index.js b/node_modules/is-negated-glob/index.js new file mode 100644 index 0000000..d1c060d --- /dev/null +++ b/node_modules/is-negated-glob/index.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function(pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var glob = { negated: false, pattern: pattern, original: pattern }; + if (pattern.charAt(0) === '!' && pattern.charAt(1) !== '(') { + glob.negated = true; + glob.pattern = pattern.slice(1); + } + + return glob; +}; diff --git a/node_modules/is-negated-glob/package.json b/node_modules/is-negated-glob/package.json new file mode 100644 index 0000000..f3c569f --- /dev/null +++ b/node_modules/is-negated-glob/package.json @@ -0,0 +1,68 @@ +{ + "name": "is-negated-glob", + "description": "Returns an object with a `negated` boolean and the `!` stripped from negation patterns. Also respects extglobs.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-negated-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-negated-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-negated-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "extglob", + "glob", + "inverse", + "inverted", + "is", + "is-glob", + "match", + "micromatch", + "negate", + "negated", + "negation", + "negative", + "pattern", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-extglob", + "is-glob", + "to-absolute-glob" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..281165d --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,115 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +### Related projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-number/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 10, 2016._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..7a2a45b --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,22 @@ +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + + if (type === 'string') { + if (!num.trim()) return false; + } else if (type !== 'number') { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/is-number/node_modules/kind-of/LICENSE b/node_modules/is-number/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-number/node_modules/kind-of/README.md b/node_modules/is-number/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/is-number/node_modules/kind-of/index.js b/node_modules/is-number/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/is-number/node_modules/kind-of/package.json b/node_modules/is-number/node_modules/kind-of/package.json new file mode 100644 index 0000000..5de879e --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..8c1f9ab --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,83 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Charlike Mike Reagent (http://www.tunnckocore.tk)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} \ No newline at end of file diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-plain-object/README.md b/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..5c074ab --- /dev/null +++ b/node_modules/is-plain-object/README.md @@ -0,0 +1,125 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor, or Object.create(null). + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +with es modules +```js +import { isPlainObject } from 'is-plain-object'; +``` + +or with commonjs +```js +const { isPlainObject } = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor, or Object.create(null). + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +isPlainObject(null); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [TrySound](https://github.com/TrySound) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ diff --git a/node_modules/is-plain-object/dist/is-plain-object.js b/node_modules/is-plain-object/dist/is-plain-object.js new file mode 100644 index 0000000..d134e4f --- /dev/null +++ b/node_modules/is-plain-object/dist/is-plain-object.js @@ -0,0 +1,38 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +exports.isPlainObject = isPlainObject; diff --git a/node_modules/is-plain-object/dist/is-plain-object.mjs b/node_modules/is-plain-object/dist/is-plain-object.mjs new file mode 100644 index 0000000..c2d9f35 --- /dev/null +++ b/node_modules/is-plain-object/dist/is-plain-object.mjs @@ -0,0 +1,34 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +export { isPlainObject }; diff --git a/node_modules/is-plain-object/is-plain-object.d.ts b/node_modules/is-plain-object/is-plain-object.d.ts new file mode 100644 index 0000000..a359940 --- /dev/null +++ b/node_modules/is-plain-object/is-plain-object.d.ts @@ -0,0 +1 @@ +export function isPlainObject(o: any): boolean; diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..3ea169a --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,85 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", + "version": "5.0.0", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)", + "Bogdan Chadkin (https://github.com/TrySound)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "main": "dist/is-plain-object.js", + "module": "dist/is-plain-object.mjs", + "types": "is-plain-object.d.ts", + "files": [ + "is-plain-object.d.ts", + "dist" + ], + "exports": { + ".": { + "import": "./dist/is-plain-object.mjs", + "require": "./dist/is-plain-object.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "build": "rollup -c", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm", + "test": "npm run test_node && npm run build && npm run test_browser", + "prepare": "rollup -c" + }, + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^3.1.0", + "rollup": "^2.22.1" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-relative/LICENSE b/node_modules/is-relative/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-relative/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-relative/README.md b/node_modules/is-relative/README.md new file mode 100644 index 0000000..eff8c74 --- /dev/null +++ b/node_modules/is-relative/README.md @@ -0,0 +1,77 @@ +# is-relative [![NPM version](https://img.shields.io/npm/v/is-relative.svg?style=flat)](https://www.npmjs.com/package/is-relative) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![NPM total downloads](https://img.shields.io/npm/dt/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-relative.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-relative) + +> Returns `true` if the path appears to be relative. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-relative +``` + +## Usage + +```js +var isRelative = require('is-relative'); +console.log(isRelative('README.md')); +//=> true + +console.log(isRelative('/User/dev/foo/README.md')); +//=> false +``` + +## About + +### Related projects + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") +* [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 13 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [shinnn](https://github.com/shinnn) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-relative/index.js b/node_modules/is-relative/index.js new file mode 100644 index 0000000..3756357 --- /dev/null +++ b/node_modules/is-relative/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var isUncPath = require('is-unc-path'); + +module.exports = function isRelative(filepath) { + if (typeof filepath !== 'string') { + throw new TypeError('expected filepath to be a string'); + } + + // Windows UNC paths are always considered to be absolute. + return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath); +}; diff --git a/node_modules/is-relative/package.json b/node_modules/is-relative/package.json new file mode 100644 index 0000000..260b95d --- /dev/null +++ b/node_modules/is-relative/package.json @@ -0,0 +1,71 @@ +{ + "name": "is-relative", + "description": "Returns `true` if the path appears to be relative.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-relative", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Shinnosuke Watanabe (https://shinnn.github.io)" + ], + "repository": "jonschlinkert/is-relative", + "bugs": { + "url": "https://github.com/jonschlinkert/is-relative/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "absolute", + "check", + "file", + "filepath", + "is", + "normalize", + "path", + "path.relative", + "relative", + "resolve", + "slash", + "slashes", + "uri", + "url" + ], + "verb": { + "related": { + "list": [ + "is-absolute", + "is-dotfile", + "is-glob", + "is-relative", + "is-unc-path" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-unc-path/LICENSE b/node_modules/is-unc-path/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/is-unc-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/is-unc-path/README.md b/node_modules/is-unc-path/README.md new file mode 100644 index 0000000..ba95910 --- /dev/null +++ b/node_modules/is-unc-path/README.md @@ -0,0 +1,115 @@ +# is-unc-path [![NPM version](https://img.shields.io/npm/v/is-unc-path.svg?style=flat)](https://www.npmjs.com/package/is-unc-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![NPM total downloads](https://img.shields.io/npm/dt/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-unc-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-unc-path) + +> Returns true if a filepath is a windows UNC file path. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-unc-path +``` + +## Usage + +```js +var isUncPath = require('is-unc-path'); +``` + +**true** + +Returns true for windows UNC paths: + +```js +isUncPath('\\/foo/bar'); +isUncPath('\\\\foo/bar'); +isUncPath('\\\\foo\\admin$'); +isUncPath('\\\\foo\\admin$\\system32'); +isUncPath('\\\\foo\\temp'); +isUncPath('\\\\/foo/bar'); +isUncPath('\\\\\\/foo/bar'); +``` + +**false** + +Returns false for non-UNC paths: + +```js +isUncPath('/foo/bar'); +isUncPath('/'); +isUncPath('/foo'); +isUncPath('/foo/'); +isUncPath('c:'); +isUncPath('c:.'); +isUncPath('c:./'); +isUncPath('c:./file'); +isUncPath('c:/'); +isUncPath('c:/file'); +``` + +**Customization** + +Use `.source` to use the regex as a component of another regex: + +```js +var myRegex = new RegExp(isUncPath.source + 'foo'); +``` + +**[Rules for UNC paths](http://resources.esri.com/help/9.3/ArcGISDesktop/com/Gp_ToolRef/sharing_tools_and_toolboxes/pathnames_explained_colon_absolute_relative_unc_and_url.htm)** + +* The computer name is always preceded by a double backward-slash (`\\`). +* UNC paths cannot contain a drive letter (such as `D:`) + +## Release history + +### v1.0.0 - 2017-07-12 + +**Changes** + +* now throws a `TypeError` if value is not a string + +## About + +### Related projects + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-unc-path/index.js b/node_modules/is-unc-path/index.js new file mode 100644 index 0000000..a9b839e --- /dev/null +++ b/node_modules/is-unc-path/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var regex = require('unc-path-regex')(); + +module.exports = function(filepath) { + if (typeof filepath !== 'string') { + throw new TypeError('expected a string'); + } + return regex.test(filepath); +}; diff --git a/node_modules/is-unc-path/package.json b/node_modules/is-unc-path/package.json new file mode 100644 index 0000000..b4bacdd --- /dev/null +++ b/node_modules/is-unc-path/package.json @@ -0,0 +1,65 @@ +{ + "name": "is-unc-path", + "description": "Returns true if a filepath is a windows UNC file path.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-unc-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-unc-path", + "bugs": { + "url": "https://github.com/jonschlinkert/is-unc-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "absolute", + "expression", + "file", + "filepath", + "is", + "match", + "matching", + "path", + "regex", + "regexp", + "regular", + "unc", + "win", + "windows" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-relative", + "is-absolute", + "is-glob" + ] + } + } +} diff --git a/node_modules/is-utf8/LICENSE b/node_modules/is-utf8/LICENSE new file mode 100644 index 0000000..2c8d4b9 --- /dev/null +++ b/node_modules/is-utf8/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (C) 2014 Wei Fanzhe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +   +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-utf8/README.md b/node_modules/is-utf8/README.md new file mode 100644 index 0000000..b62ddde --- /dev/null +++ b/node_modules/is-utf8/README.md @@ -0,0 +1,16 @@ +#utf8 detector + +Detect if a Buffer is utf8 encoded. +It need The minimum amount of bytes is 4. + + +```javascript + var fs = require('fs'); + var isUtf8 = require('is-utf8'); + var ansi = fs.readFileSync('ansi.txt'); + var utf8 = fs.readFileSync('utf8.txt'); + + console.log('ansi.txt is utf8: '+isUtf8(ansi)); //false + console.log('utf8.txt is utf8: '+isUtf8(utf8)); //true +``` + diff --git a/node_modules/is-utf8/is-utf8.js b/node_modules/is-utf8/is-utf8.js new file mode 100644 index 0000000..8a5f15d --- /dev/null +++ b/node_modules/is-utf8/is-utf8.js @@ -0,0 +1,76 @@ + +exports = module.exports = function(bytes) +{ + var i = 0; + while(i < bytes.length) + { + if( (// ASCII + bytes[i] == 0x09 || + bytes[i] == 0x0A || + bytes[i] == 0x0D || + (0x20 <= bytes[i] && bytes[i] <= 0x7E) + ) + ) { + i += 1; + continue; + } + + if( (// non-overlong 2-byte + (0xC2 <= bytes[i] && bytes[i] <= 0xDF) && + (0x80 <= bytes[i+1] && bytes[i+1] <= 0xBF) + ) + ) { + i += 2; + continue; + } + + if( (// excluding overlongs + bytes[i] == 0xE0 && + (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) + ) || + (// straight 3-byte + ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) || + bytes[i] == 0xEE || + bytes[i] == 0xEF) && + (0x80 <= bytes[i + 1] && bytes[i+1] <= 0xBF) && + (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) + ) || + (// excluding surrogates + bytes[i] == 0xED && + (0x80 <= bytes[i+1] && bytes[i+1] <= 0x9F) && + (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) + ) + ) { + i += 3; + continue; + } + + if( (// planes 1-3 + bytes[i] == 0xF0 && + (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) || + (// planes 4-15 + (0xF1 <= bytes[i] && bytes[i] <= 0xF3) && + (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) || + (// plane 16 + bytes[i] == 0xF4 && + (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) + ) { + i += 4; + continue; + } + + return false; + } + + return true; +} diff --git a/node_modules/is-utf8/package.json b/node_modules/is-utf8/package.json new file mode 100644 index 0000000..dab1234 --- /dev/null +++ b/node_modules/is-utf8/package.json @@ -0,0 +1,19 @@ +{ + "name": "is-utf8", + "version": "0.2.1", + "description": "Detect if a buffer is utf8 encoded.", + "main": "is-utf8.js", + "scripts": { + "test": "node test.js" + }, + "repository": "https://github.com/wayfind/is-utf8.git", + "keywords": [ + "utf8", + "charset" + ], + "files": [ + "is-utf8.js" + ], + "author": "wayfind", + "license": "MIT" +} diff --git a/node_modules/is-valid-glob/LICENSE b/node_modules/is-valid-glob/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/is-valid-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/is-valid-glob/README.md b/node_modules/is-valid-glob/README.md new file mode 100644 index 0000000..80100a6 --- /dev/null +++ b/node_modules/is-valid-glob/README.md @@ -0,0 +1,103 @@ +# is-valid-glob [![NPM version](https://img.shields.io/npm/v/is-valid-glob.svg?style=flat)](https://www.npmjs.com/package/is-valid-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-valid-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-valid-glob) + +> Return true if a value is a valid glob pattern or patterns. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-valid-glob +``` + +## Usage + +This really just checks to make sure that a pattern is either a string or array, and if it's an array it's either empty or consists of only strings. + +```js +var isValidGlob = require('is-valid-glob'); + +isValidGlob('foo/*.js'); +//=> true +``` + +**Valid patterns** + +```js +isValidGlob('a'); +isValidGlob('a.js'); +isValidGlob('*.js'); +isValidGlob(['a', 'b']); +//=> all true +``` + +**Invalid patterns** + +```js +isValidGlob(); +isValidGlob(''); +isValidGlob(null); +isValidGlob(undefined); +isValidGlob(new Buffer('foo')); +isValidGlob(['foo', [[]]]); +isValidGlob(['foo', [['bar']]]); +isValidGlob(['foo', {}]); +isValidGlob({}); +isValidGlob([]); +isValidGlob(['']); +//=> all false +``` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [vinyl-fs](https://www.npmjs.com/package/vinyl-fs): Vinyl adapter for the file system | [homepage](http://github.com/wearefractal/vinyl-fs "Vinyl adapter for the file system") +* [vinyl](https://www.npmjs.com/package/vinyl): Virtual file format. | [homepage](https://github.com/gulpjs/vinyl#readme "Virtual file format.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 9 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [contra](https://github.com/contra) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._ \ No newline at end of file diff --git a/node_modules/is-valid-glob/index.js b/node_modules/is-valid-glob/index.js new file mode 100644 index 0000000..6b1899f --- /dev/null +++ b/node_modules/is-valid-glob/index.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = function isValidGlob(glob) { + if (typeof glob === 'string' && glob.length > 0) { + return true; + } + if (Array.isArray(glob)) { + return glob.length !== 0 && every(glob); + } + return false; +}; + +function every(arr) { + var len = arr.length; + while (len--) { + if (typeof arr[len] !== 'string' || arr[len].length <= 0) { + return false; + } + } + return true; +} diff --git a/node_modules/is-valid-glob/package.json b/node_modules/is-valid-glob/package.json new file mode 100644 index 0000000..e356d04 --- /dev/null +++ b/node_modules/is-valid-glob/package.json @@ -0,0 +1,64 @@ +{ + "name": "is-valid-glob", + "description": "Return true if a value is a valid glob pattern or patterns.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-valid-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "contra (http://contra.io)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-valid-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-valid-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "check", + "glob", + "is", + "match", + "pattern", + "patterns", + "read", + "test", + "valid", + "validate" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "micromatch", + "vinyl-fs", + "vinyl" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-windows/LICENSE b/node_modules/is-windows/LICENSE new file mode 100644 index 0000000..f8de063 --- /dev/null +++ b/node_modules/is-windows/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/is-windows/README.md b/node_modules/is-windows/README.md new file mode 100644 index 0000000..485bfde --- /dev/null +++ b/node_modules/is-windows/README.md @@ -0,0 +1,95 @@ +# is-windows [![NPM version](https://img.shields.io/npm/v/is-windows.svg?style=flat)](https://www.npmjs.com/package/is-windows) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![NPM total downloads](https://img.shields.io/npm/dt/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-windows.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-windows) + +> Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-windows +``` + +## Heads up! + +As of `v0.2.0` this module always returns a function. + +## Node.js usage + +```js +var isWindows = require('is-windows'); + +console.log(isWindows()); +//=> returns true if the platform is windows +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [window-size](https://www.npmjs.com/package/window-size): Reliable way to get the height and width of terminal/console, since it's not calculated or… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 11 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [SimenB](https://github.com/SimenB) | +| 1 | [gucong3000](https://github.com/gucong3000) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._ \ No newline at end of file diff --git a/node_modules/is-windows/index.js b/node_modules/is-windows/index.js new file mode 100644 index 0000000..55d43e0 --- /dev/null +++ b/node_modules/is-windows/index.js @@ -0,0 +1,27 @@ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +(function(factory) { + if (exports && typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof window !== 'undefined') { + window.isWindows = factory(); + } else if (typeof global !== 'undefined') { + global.isWindows = factory(); + } else if (typeof self !== 'undefined') { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } +})(function() { + 'use strict'; + return function isWindows() { + return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; +}); diff --git a/node_modules/is-windows/package.json b/node_modules/is-windows/package.json new file mode 100644 index 0000000..fca09f9 --- /dev/null +++ b/node_modules/is-windows/package.json @@ -0,0 +1,71 @@ +{ + "name": "is-windows", + "description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/is-windows", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Simen Bekkhus (https://github.com/SimenB)", + "刘祺 (gucong.co.cc)" + ], + "repository": "jonschlinkert/is-windows", + "bugs": { + "url": "https://github.com/jonschlinkert/is-windows/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "check", + "cywin", + "is", + "is-windows", + "nix", + "operating system", + "os", + "platform", + "process", + "unix", + "win", + "win32", + "windows" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-absolute", + "is-glob", + "is-relative", + "isobject", + "window-size" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/isarray/.npmignore b/node_modules/isarray/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/isarray/.travis.yml b/node_modules/isarray/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/isarray/Makefile b/node_modules/isarray/Makefile new file mode 100644 index 0000000..787d56e --- /dev/null +++ b/node_modules/isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md new file mode 100644 index 0000000..16d2c59 --- /dev/null +++ b/node_modules/isarray/README.md @@ -0,0 +1,60 @@ + +# isarray + +`Array#isArray` for older browsers. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/isarray/component.json b/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/isarray/index.js b/node_modules/isarray/index.js new file mode 100644 index 0000000..a57f634 --- /dev/null +++ b/node_modules/isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json new file mode 100644 index 0000000..1a4317a --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,45 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "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" + ] + }, + "scripts": { + "test": "tape test.js" + } +} diff --git a/node_modules/isarray/test.js b/node_modules/isarray/test.js new file mode 100644 index 0000000..e0c3444 --- /dev/null +++ b/node_modules/isarray/test.js @@ -0,0 +1,20 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); + diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 0000000..c1cb757 --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +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. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 0000000..35769e8 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 0000000..553fb32 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 0000000..1995ea4 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 0000000..e452689 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,31 @@ +{ + "name": "isexe", + "version": "2.0.0", + "description": "Minimal module to check if a file is executable.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "keywords": [], + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "homepage": "https://github.com/isaacs/isexe#readme" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000..d926df6 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 0000000..3499673 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/isobject/LICENSE b/node_modules/isobject/LICENSE new file mode 100644 index 0000000..943e71d --- /dev/null +++ b/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +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. \ No newline at end of file diff --git a/node_modules/isobject/README.md b/node_modules/isobject/README.md new file mode 100644 index 0000000..d01feaa --- /dev/null +++ b/node_modules/isobject/README.md @@ -0,0 +1,122 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` +Install with [bower](https://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +### Related projects + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 29 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [magnudae](https://github.com/magnudae) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._ \ No newline at end of file diff --git a/node_modules/isobject/index.d.ts b/node_modules/isobject/index.d.ts new file mode 100644 index 0000000..55f81c2 --- /dev/null +++ b/node_modules/isobject/index.d.ts @@ -0,0 +1,5 @@ +export = isObject; + +declare function isObject(val: any): boolean; + +declare namespace isObject {} diff --git a/node_modules/isobject/index.js b/node_modules/isobject/index.js new file mode 100644 index 0000000..2d59958 --- /dev/null +++ b/node_modules/isobject/index.js @@ -0,0 +1,12 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 0000000..62aa8c1 --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/json-stable-stringify-without-jsonify/.npmignore b/node_modules/json-stable-stringify-without-jsonify/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/json-stable-stringify-without-jsonify/.travis.yml b/node_modules/json-stable-stringify-without-jsonify/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/json-stable-stringify-without-jsonify/LICENSE b/node_modules/json-stable-stringify-without-jsonify/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js new file mode 100644 index 0000000..d5f6675 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/nested.js b/node_modules/json-stable-stringify-without-jsonify/example/nested.js new file mode 100644 index 0000000..9a672fc --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/nested.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/str.js b/node_modules/json-stable-stringify-without-jsonify/example/str.js new file mode 100644 index 0000000..9b4b3cd --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/str.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 6, b: [4,5], a: 3 }; +console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js new file mode 100644 index 0000000..09f1c5f --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/index.js b/node_modules/json-stable-stringify-without-jsonify/index.js new file mode 100644 index 0000000..a6f40c7 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/index.js @@ -0,0 +1,82 @@ +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return JSON.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || JSON.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = JSON.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; diff --git a/node_modules/json-stable-stringify-without-jsonify/package.json b/node_modules/json-stable-stringify-without-jsonify/package.json new file mode 100644 index 0000000..c59c87e --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/package.json @@ -0,0 +1,43 @@ +{ + "name": "json-stable-stringify-without-jsonify", + "version": "1.0.1", + "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies", + "main": "index.js", + "dependencies": { + }, + "devDependencies": { + "tape": "~1.0.4" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "ff/5", "ff/latest", + "chrome/15", "chrome/latest", + "safari/latest", + "opera/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/samn/json-stable-stringify.git" + }, + "homepage": "https://github.com/samn/json-stable-stringify", + "keywords": [ + "json", + "stringify", + "deterministic", + "hash", + "sort", + "stable" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/json-stable-stringify-without-jsonify/readme.markdown b/node_modules/json-stable-stringify-without-jsonify/readme.markdown new file mode 100644 index 0000000..e95b468 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/readme.markdown @@ -0,0 +1,132 @@ +# json-stable-stringify + +This is the same as https://github.com/substack/json-stable-stringify but it doesn't depend on libraries without licenses (jsonify). + +deterministic version of `JSON.stringify()` so you can get a consistent hash +from stringified results + +You can also pass in a custom comparison function. + +[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) + +[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) + +# example + +``` js +var stringify = require('json-stable-stringify'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); +``` + +output: + +``` +{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + +# methods + +``` js +var stringify = require('json-stable-stringify') +``` + +## var str = stringify(obj, opts) + +Return a deterministic stringified string `str` from the object `obj`. + +## options + +### cmp + +If `opts` is given, you can supply an `opts.cmp` to have a custom comparison +function for object keys. Your function `opts.cmp` is called with these +parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +var stringify = require('json-stable-stringify'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); +``` + +which results in the output string: + +``` +{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +``` +var stringify = require('json-stable-stringify'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); +``` + +which outputs: + +``` +{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +### space + +If you specify `opts.space`, it will indent the output for pretty-printing. +Valid values are strings (e.g. `{space: \t}`) or a number of spaces +(`{space: 3}`). + +For example: + +```js +var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } }; +var s = stringify(obj, { space: ' ' }); +console.log(s); +``` + +which outputs: + +``` +{ + "a": { + "and": [ + 1, + 2, + 3 + ], + "foo": "bar" + }, + "b": 1 +} +``` + +### replacer + +The replacer parameter is a function `opts.replacer(key, value)` that behaves +the same as the replacer +[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install json-stable-stringify +``` + +# license + +MIT diff --git a/node_modules/json-stable-stringify-without-jsonify/test/cmp.js b/node_modules/json-stable-stringify-without-jsonify/test/cmp.js new file mode 100644 index 0000000..2dbb393 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/cmp.js @@ -0,0 +1,11 @@ +var test = require('tape'); +var stringify = require('../'); + +test('custom comparison function', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; + }); + t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/nested.js b/node_modules/json-stable-stringify-without-jsonify/test/nested.js new file mode 100644 index 0000000..052c7d6 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/nested.js @@ -0,0 +1,42 @@ +var test = require('tape'); +var stringify = require('../'); + +test('nested', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); +}); + +test('cyclic (default)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + try { + stringify(one); + } catch (ex) { + t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); + } +}); + +test('cyclic (specifically allowed)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); +}); + +test('repeated non-cyclic value', function(t) { + t.plan(1); + var one = { x: 1 }; + var two = { a: one, b: one }; + t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); +}); + +test('acyclic but with reused obj-property pointers', function (t) { + t.plan(1); + var x = { a: 1 } + var y = { b: x, c: x } + t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/replacer.js b/node_modules/json-stable-stringify-without-jsonify/test/replacer.js new file mode 100644 index 0000000..98802a7 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/replacer.js @@ -0,0 +1,74 @@ +var test = require('tape'); +var stringify = require('../'); + +test('replace root', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { return 'one'; }; + + t.equal(stringify(obj, { replacer: replacer }), '"one"'); +}); + +test('replace numbers', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(value === 1) return 'one'; + if(value === 2) return 'two'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}'); +}); + +test('replace with object', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(key === 'b') return { d: 1 }; + if(value === 1) return 'one'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}'); +}); + +test('replace with undefined', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(value === false) return; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}'); +}); + +test('replace with array', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(key === 'b') return ['one', 'two']; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}'); +}); + +test('replace array item', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: [1,2] }; + var replacer = function(key, value) { + if(value === 1) return 'one'; + if(value === 2) return 'two'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/space.js b/node_modules/json-stable-stringify-without-jsonify/test/space.js new file mode 100644 index 0000000..2621122 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/space.js @@ -0,0 +1,59 @@ +var test = require('tape'); +var stringify = require('../'); + +test('space parameter', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: ' '}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": 2\n' + + '}' + ); +}); + +test('space parameter (with tabs)', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: '\t'}), '' + + '{\n' + + '\t"one": 1,\n' + + '\t"two": 2\n' + + '}' + ); +}); + +test('space parameter (with a number)', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: 3}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": 2\n' + + '}' + ); +}); + +test('space parameter (nested objects)', function (t) { + t.plan(1); + var obj = { one: 1, two: { b: 4, a: [2,3] } }; + t.equal(stringify(obj, {space: ' '}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": {\n' + + ' "a": [\n' + + ' 2,\n' + + ' 3\n' + + ' ],\n' + + ' "b": 4\n' + + ' }\n' + + '}' + ); +}); + +test('space parameter (same as native)', function (t) { + t.plan(1); + // for this test, properties need to be in alphabetical order + var obj = { one: 1, two: { a: [2,3], b: 4 } }; + t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' ')); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/str.js b/node_modules/json-stable-stringify-without-jsonify/test/str.js new file mode 100644 index 0000000..67426b9 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/str.js @@ -0,0 +1,32 @@ +var test = require('tape'); +var stringify = require('../'); + +test('simple object', function (t) { + t.plan(1); + var obj = { c: 6, b: [4,5], a: 3, z: null }; + t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); +}); + +test('object with undefined', function (t) { + t.plan(1); + var obj = { a: 3, z: undefined }; + t.equal(stringify(obj), '{"a":3}'); +}); + +test('array with undefined', function (t) { + t.plan(1); + var obj = [4, undefined, 6]; + t.equal(stringify(obj), '[4,null,6]'); +}); + +test('object with empty string', function (t) { + t.plan(1); + var obj = { a: 3, z: '' }; + t.equal(stringify(obj), '{"a":3,"z":""}'); +}); + +test('array with empty string', function (t) { + t.plan(1); + var obj = [4, '', 6]; + t.equal(stringify(obj), '[4,"",6]'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/to-json.js b/node_modules/json-stable-stringify-without-jsonify/test/to-json.js new file mode 100644 index 0000000..ef9a980 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/to-json.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var stringify = require('../'); + +test('toJSON function', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; + t.equal(stringify(obj), '{"one":1}' ); +}); + +test('toJSON returns string', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; + t.equal(stringify(obj), '"one"'); +}); + +test('toJSON returns array', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; + t.equal(stringify(obj), '["one"]'); +}); diff --git a/node_modules/just-debounce/.eslintrc b/node_modules/just-debounce/.eslintrc new file mode 100644 index 0000000..11b3647 --- /dev/null +++ b/node_modules/just-debounce/.eslintrc @@ -0,0 +1,6 @@ +{ + "plugins": ["prettier"], + "rules": { + "prettier/prettier": "error" + } +} diff --git a/node_modules/just-debounce/.travis.yml b/node_modules/just-debounce/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/node_modules/just-debounce/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/node_modules/just-debounce/LICENSE b/node_modules/just-debounce/LICENSE new file mode 100644 index 0000000..00c53d8 --- /dev/null +++ b/node_modules/just-debounce/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Michael Hayes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/just-debounce/README.md b/node_modules/just-debounce/README.md new file mode 100644 index 0000000..b4cce28 --- /dev/null +++ b/node_modules/just-debounce/README.md @@ -0,0 +1,75 @@ +# just-debounce + +just a basic debounce function + +# changes + +- `1.1.0`: added typescript definitions + +# Why? + +I searched npm and the first 3 pages of results for "debounce" did not have a small correctly +implemented version of debounce + +# Usage + +### arguments + +- `fn`: the function to debounce +- `delay`: debounce delay in ms +- `atStart:` if true, the function will be called at the beginning of the delay rather than the end +- `guarantee`: additional calls to debounced function will not reset they `delay`. This guarantees + that if the function is called frequently, it will fire once every `delay` rather than waiting for + a break in calls. + +```javascript +var db = require('just-debounce'); + +var debounced = db(function (v) { + console.log(v); +}, 100); + +debounced('hi'); +debounced('hi'); +// logs 'hi' once after 100ms +``` + +```javascript +var db = require('just-debounce'); + +var debounced = db( + function (v) { + console.log(v); + }, + 100, + true +); + +debounced('hi'); +debounced('hi'); +// logs 'hi' once right away, but not a second time. calling after 100ms will log again +``` + +```javascript +var db = require('just-debounce'); + +var debounced = db( + function (v) { + console.log(v); + }, + 100, + false, + true +); + +debounced('hi'); +setTimeout(function () { + debounced('hi2'); +}, 80); + +// logs 'hi2' once 100ms after the first call to debounced +``` + +# license + +MIT diff --git a/node_modules/just-debounce/index.d.ts b/node_modules/just-debounce/index.d.ts new file mode 100644 index 0000000..4d132c6 --- /dev/null +++ b/node_modules/just-debounce/index.d.ts @@ -0,0 +1,8 @@ +declare function debounce void>( + fn: T, + delay: number, + atStart?: boolean, + guarantee?: boolean +): (...args: Parameters) => void; + +export default debounce; diff --git a/node_modules/just-debounce/index.js b/node_modules/just-debounce/index.js new file mode 100644 index 0000000..fb6ba61 --- /dev/null +++ b/node_modules/just-debounce/index.js @@ -0,0 +1,34 @@ +module.exports = debounce; + +function debounce(fn, delay, atStart, guarantee) { + var timeout; + var args; + var self; + + return function debounced() { + self = this; + args = Array.prototype.slice.call(arguments); + + if (timeout && (atStart || guarantee)) { + return; + } else if (!atStart) { + clear(); + + timeout = setTimeout(run, delay); + return timeout; + } + + timeout = setTimeout(clear, delay); + fn.apply(self, args); + + function run() { + clear(); + fn.apply(self, args); + } + + function clear() { + clearTimeout(timeout); + timeout = null; + } + }; +} diff --git a/node_modules/just-debounce/package.json b/node_modules/just-debounce/package.json new file mode 100644 index 0000000..2ce789c --- /dev/null +++ b/node_modules/just-debounce/package.json @@ -0,0 +1,29 @@ +{ + "name": "just-debounce", + "version": "1.1.0", + "description": "a simple debounce with no dependencies or crazy defaults", + "main": "index.js", + "scripts": { + "test": "node test.js && npm run lint", + "lint": "eslint ." + }, + "repository": { + "type": "git", + "url": "git://github.com/hayes/just-debounce.git" + }, + "keywords": [ + "debounce" + ], + "author": "Michael Hayes", + "license": "MIT", + "bugs": { + "url": "https://github.com/hayes/just-debounce/issues" + }, + "homepage": "https://github.com/hayes/just-debounce", + "devDependencies": { + "eslint": "^7.20.0", + "eslint-plugin-prettier": "^3.3.1", + "prettier": "^2.2.1", + "tape": "^5.1.1" + } +} diff --git a/node_modules/just-debounce/prettier.config.js b/node_modules/just-debounce/prettier.config.js new file mode 100644 index 0000000..31ed03c --- /dev/null +++ b/node_modules/just-debounce/prettier.config.js @@ -0,0 +1,13 @@ +module.exports = { + arrowParens: 'always', + bracketSpacing: true, + endOfLine: 'lf', + jsxBracketSameLine: false, + printWidth: 100, + proseWrap: 'always', + semi: true, + singleQuote: true, + tabWidth: 2, + trailingComma: 'none', + useTabs: false +}; diff --git a/node_modules/just-debounce/test.js b/node_modules/just-debounce/test.js new file mode 100644 index 0000000..0e6261e --- /dev/null +++ b/node_modules/just-debounce/test.js @@ -0,0 +1,130 @@ +var debounce = require('./index.js'); +var test = require('tape'); + +test('debauce', function (t) { + t.plan(3); + + var fn = debounce(function (a, b) { + t.deepEqual(this, { call: 3 }, 'context should be preserved'); + t.equal(a, 30, 'should preserve args'); + t.equal(b, 300, 'should preserve args'); + }, 10); + + fn.call({ call: 1 }, 10, 100); + fn.call({ call: 2 }, 20, 200); + + setTimeout(function () { + fn.call({ call: 3 }, 30, 300); + }, 3); +}); + +test('multiple calls should extend delay', function (t) { + t.plan(4); + + var wasDelayed = false; + + var fn = debounce(function (a, b) { + t.deepEqual(this, { call: 3 }, 'context should be preserved'); + t.equal(a, 30, 'should preserve args'); + t.equal(b, 300, 'should preserve args'); + t.ok(wasDelayed, 'should have waited longer than debounce period'); + }, 6); + + setTimeout(function longer() { + wasDelayed = true; + }, 9); + + fn.call({ call: 1 }, 10, 100); + + setTimeout(function () { + fn.call({ call: 2 }, 20, 200); + + setTimeout(function () { + fn.call({ call: 3 }, 30, 300); + }, 5); + }, 3); +}); + +test('multiple calls should not extend delay when guarantee is true', function (t) { + t.plan(8); + + var first = true; + var wasDelayed = false; + + var fn = debounce( + function (a, b) { + if (first) { + t.deepEqual(this, { call: 2 }, '1st context should be preserved'); + t.equal(a, 20, '1st should preserve 1st args'); + t.equal(b, 200, '1st should preserve 2nd args'); + t.notOk(wasDelayed, 'should not have waited longer than debounce period'); + first = false; + } else { + t.deepEqual(this, { call: 3 }, 'context should be preserved'); + t.equal(a, 30, 'should preserve args'); + t.equal(b, 300, 'should preserve args'); + t.ok(wasDelayed, 'should have waited longer than debounce period'); + } + }, + 6, + false, + true + ); + + setTimeout(function longer() { + wasDelayed = true; + }, 7); + + fn.call({ call: 1 }, 10, 100); + + setTimeout(function () { + fn.call({ call: 2 }, 20, 200); + + setTimeout(function () { + fn.call({ call: 3 }, 30, 300); + }, 5); + }, 3); +}); + +test('at start', function (t) { + t.plan(9); + + var callCount = 0; + + var fn = debounce( + function (a, b) { + if (callCount === 0) { + t.deepEqual(this, { call: 1 }, '1st context should be preserved'); + t.equal(a, 10, '1st should preserve 1st args'); + t.equal(b, 100, '1st should preserve 2nd args'); + } else if (callCount === 1) { + t.deepEqual(this, { call: 3 }, 'context should be preserved'); + t.equal(a, 30, 'should preserve args'); + t.equal(b, 300, 'should preserve args'); + } else { + t.deepEqual(this, { call: 4 }, 'context should be preserved'); + t.equal(a, 40, 'should preserve 1st args'); + t.equal(b, 400, 'should preserve 2nd args'); + } + + callCount += 1; + }, + 6, + true + ); + + fn.call({ call: 1 }, 10, 100); + fn.call({ call: 2 }, 20, 200); + + setTimeout(function () { + fn.call({ call: 3 }, 30, 300); + + setTimeout(function () { + fn.call({ call: 4 }, 40, 400); + }, 10); + + setTimeout(function () { + fn.call({ call: 5 }, 50, 500); + }, 3); + }, 10); +}); diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md new file mode 100644 index 0000000..170bf30 --- /dev/null +++ b/node_modules/kind-of/README.md @@ -0,0 +1,342 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +### v5.0.0 + +**Added** + +* `Set Iterator` and `Map Iterator` support + +**Fixed** + +* Now returns `generatorfunction` for generator functions + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of is more correct than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly tests instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 13, 2017._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000..fc5cde9 --- /dev/null +++ b/node_modules/kind-of/index.js @@ -0,0 +1,147 @@ +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000..334235f --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,91 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "5.1.0", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.4.0", + "gulp-format-md": "^0.1.12", + "matched": "^0.4.4", + "mocha": "^3.4.2", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/last-run/LICENSE b/node_modules/last-run/LICENSE new file mode 100644 index 0000000..9aedc0d --- /dev/null +++ b/node_modules/last-run/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall 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/node_modules/last-run/README.md b/node_modules/last-run/README.md new file mode 100644 index 0000000..7b3c339 --- /dev/null +++ b/node_modules/last-run/README.md @@ -0,0 +1,81 @@ +

+ + + +

+ +# last-run + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Capture and retrieve the last time a function was run. + +## Usage + +```js +var lastRun = require('last-run'); + +function myFunc(){} + +myFunc(); +// capture the run after (or before) calling the function +lastRun.capture(myFunc); + +// retrieve the last run time +lastRun(myFunc); +//-> outputs the Date.now() when capture was called +``` + +## API + +__Note: this module uses a WeakMap shim, and throws on non-extensible functions on platforms that +don't have a native WeakMap implementation__ + +### lastRun(fn, [timeResolution]) => [Timestamp] + +Takes a function (`fn`) and returns a timestamp of the last time the function was captured. + +Returns undefined if the function has not been captured. + +The timestamp is always given in millisecond but the time resolution can be reduced (rounded down). +The use case is to be able to compare a build time to a file time attribute. +On node v0.10 or with file system like HFS or FAT, `fs.stat` time attributes like `mtime` precision is one second. + +Assuming `lastRun(fn)` returns 1426000001111, `lastRun(fn, 1000)` returns 1426000001000. + +The default time resolution is 1000 on node v0.10, 0 on node 0.11+ and iojs. +More information at [`default-resolution`][default-resolution] and +[undertaker PR #17][undertaker-17]. + +### lastRun.capture(fn, [timestamp]) + +Takes a function (`fn`) and captures the current timestamp with `Date.now()`. +If passed the optional timestamp, captures that time instead of `Date.now()`. +The captured timestamp can then be retrieved using the `lastRun` function. + +### lastRun.release(fn) + +Takes a function (`fn`) and removes the last run timestamp for it. + +## License + +MIT + +[default-resolution]: https://github.com/gulpjs/default-resolution +[undertaker-17]: https://github.com/gulpjs/undertaker/pull/17#issuecomment-82374512 + +[downloads-image]: http://img.shields.io/npm/dm/last-run.svg +[npm-url]: https://www.npmjs.com/package/last-run +[npm-image]: http://img.shields.io/npm/v/last-run.svg + +[travis-url]: https://travis-ci.org/gulpjs/last-run +[travis-image]: http://img.shields.io/travis/gulpjs/last-run.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/last-run +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/last-run.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/last-run +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/last-run/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/last-run/index.js b/node_modules/last-run/index.js new file mode 100644 index 0000000..2157c5b --- /dev/null +++ b/node_modules/last-run/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var assert = require('assert'); + +var WM = require('es6-weak-map'); +var hasNativeWeakMap = require('es6-weak-map/is-native-implemented'); +var defaultResolution = require('default-resolution'); + +var runtimes = new WM(); + +function isFunction(fn) { + return (typeof fn === 'function'); +} + +function isExtensible(fn) { + if (hasNativeWeakMap) { + // Native weakmap doesn't care about extensible + return true; + } + + return Object.isExtensible(fn); +} + +function lastRun(fn, timeResolution) { + assert(isFunction(fn), 'Only functions can check lastRun'); + assert(isExtensible(fn), 'Only extensible functions can check lastRun'); + + var time = runtimes.get(fn); + + if (time == null) { + return; + } + + var resolution = defaultResolution(timeResolution); + + return time - (time % resolution); +} + +function capture(fn, timestamp) { + assert(isFunction(fn), 'Only functions can be captured'); + assert(isExtensible(fn), 'Only extensible functions can be captured'); + + timestamp = timestamp || Date.now(); + + runtimes.set(fn, timestamp); +} + +function release(fn) { + assert(isFunction(fn), 'Only functions can be captured'); + assert(isExtensible(fn), 'Only extensible functions can be captured'); + + runtimes.delete(fn); +} + +lastRun.capture = capture; +lastRun.release = release; + +module.exports = lastRun; diff --git a/node_modules/last-run/package.json b/node_modules/last-run/package.json new file mode 100644 index 0000000..e36cd9f --- /dev/null +++ b/node_modules/last-run/package.json @@ -0,0 +1,46 @@ +{ + "name": "last-run", + "version": "1.1.1", + "description": "Capture and retrieve the last time a function was run", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/last-run", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + }, + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "execution", + "function", + "last run", + "timing" + ] +} diff --git a/node_modules/lazystream/LICENSE b/node_modules/lazystream/LICENSE new file mode 100644 index 0000000..982db13 --- /dev/null +++ b/node_modules/lazystream/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/lazystream/README.md b/node_modules/lazystream/README.md new file mode 100644 index 0000000..847f821 --- /dev/null +++ b/node_modules/lazystream/README.md @@ -0,0 +1,114 @@ +# Lazy Streams + +> *Create streams lazily when they are read from or written to.* +> `lazystream: 1.0.1` + +## Why? + +Sometimes you feel the itch to open *all the files* at once. You want to pass a bunch of streams around, so the consumer does not need to worry where the data comes from. +From a software design point-of-view this sounds entirely reasonable. Then there is that neat little function `fs.createReadStream()` that opens a file and gives you a nice `fs.ReadStream` to pass around, so you use what the mighty creator deities of node bestowed upon you. + +> `Error: EMFILE, too many open files` +> ─ *node* + +This package provides two classes based on the node's Streams3 API (courtesy of `readable-stream` to ensure a stable version). + +## Class: lazystream.Readable + +A wrapper for readable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough). + +### new lazystream.Readable(fn [, options]) + +* `fn` *{Function}* + The function that the lazy stream will call to obtain the stream to actually read from. +* `options` *{Object}* + Options for the underlying `PassThrough` stream, accessible by `fn`. + +Creates a new readable stream. Once the stream is accessed (for example when you call its `read()` method, or attach a `data`-event listener) the `fn` function is called with the outer `lazystream.Readable` instance bound to `this`. + +If you pass an `options` object to the constuctor, you can access it in your `fn` function. + +```javascript +new lazystream.Readable(function (options) { + return fs.createReadStream('/dev/urandom'); +}); +``` + +## Class: lazystream.Writable + +A wrapper for writable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough). + +### new lazystream.Writable(fn [, options]) + +* `fn` *{Function}* + The function that the lazy stream will call to obtain the stream to actually write to. +* `options` *{Object}* + Options for the underlying `PassThrough` stream, accessible by `fn`. + +Creates a new writable stream. Just like the one above but for writable streams. + +```javascript +new lazystream.Writable(function () { + return fs.createWriteStream('/dev/null'); +}); +``` + +## Install + +```console +$ npm install lazystream --save +lazystream@1.0.1 node_modules/lazystream +└── readable-stream@2.0.5 +``` + +## Changelog + +### v1.0.1 + +- [#3](https://github.com/jpommerening/node-lazystream/issues/3): (finally) fixed a long-standing publishing error + +### v1.0.0 + +- [#2](https://github.com/jpommerening/node-lazystream/issues/2): [unconditionally](https://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html) use `readable-stream` _2.x_. + +### v0.2.0 + +- [#1](https://github.com/jpommerening/node-lazystream/pull/1): error events are now propagated + +### v0.1.0 + +- _(this was the first release)_ + +## Contributing + +Fork it, branch it, send me a pull request. We'll work out the rest together. + +## Credits + +[Chris Talkington](https://github.com/ctalkington) and his [node-archiver](https://github.com/ctalkington/node-archiver) for providing a use-case. + +## [License](LICENSE) + +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/lazystream/lib/lazystream.js b/node_modules/lazystream/lib/lazystream.js new file mode 100644 index 0000000..d9f6170 --- /dev/null +++ b/node_modules/lazystream/lib/lazystream.js @@ -0,0 +1,54 @@ +var util = require('util'); +var PassThrough = require('readable-stream/passthrough'); + +module.exports = { + Readable: Readable, + Writable: Writable +}; + +util.inherits(Readable, PassThrough); +util.inherits(Writable, PassThrough); + +// Patch the given method of instance so that the callback +// is executed once, before the actual method is called the +// first time. +function beforeFirstCall(instance, method, callback) { + instance[method] = function() { + delete instance[method]; + callback.apply(this, arguments); + return this[method].apply(this, arguments); + }; +} + +function Readable(fn, options) { + if (!(this instanceof Readable)) + return new Readable(fn, options); + + PassThrough.call(this, options); + + beforeFirstCall(this, '_read', function() { + var source = fn.call(this, options); + var emit = this.emit.bind(this, 'error'); + source.on('error', emit); + source.pipe(this); + }); + + this.emit('readable'); +} + +function Writable(fn, options) { + if (!(this instanceof Writable)) + return new Writable(fn, options); + + PassThrough.call(this, options); + + beforeFirstCall(this, '_write', function() { + var destination = fn.call(this, options); + var emit = this.emit.bind(this, 'error'); + destination.on('error', emit); + this.pipe(destination); + }); + + this.emit('writable'); +} + diff --git a/node_modules/lazystream/package.json b/node_modules/lazystream/package.json new file mode 100644 index 0000000..94565e4 --- /dev/null +++ b/node_modules/lazystream/package.json @@ -0,0 +1,46 @@ +{ + "name": "lazystream", + "version": "1.0.1", + "description": "Open Node Streams on demand.", + "homepage": "https://github.com/jpommerening/node-lazystream", + "author": { + "name": "Jonas Pommerening", + "email": "jonas.pommerening@gmail.com", + "url": "https://npmjs.org/~jpommerening" + }, + "contributors": [ + "Mario Casciaro " + ], + "repository": { + "type": "git", + "url": "https://github.com/jpommerening/node-lazystream.git" + }, + "bugs": { + "url": "https://github.com/jpommerening/node-lazystream/issues" + }, + "license": "MIT", + "main": "lib/lazystream.js", + "engines": { + "node": ">= 0.6.3" + }, + "scripts": { + "test": "nodeunit test/readable_test.js test/writable_test.js test/pipe_test.js test/fs_test.js" + }, + "files": [ + "lib/lazystream.js", + "test/*.js", + "test/*.md" + ], + "dependencies": { + "readable-stream": "^2.0.5" + }, + "devDependencies": { + "nodeunit": "^0.9.1" + }, + "keywords": [ + "emfile", + "lazy", + "streams", + "stream" + ] +} diff --git a/node_modules/lazystream/test/data.md b/node_modules/lazystream/test/data.md new file mode 100644 index 0000000..fc48222 --- /dev/null +++ b/node_modules/lazystream/test/data.md @@ -0,0 +1,13 @@ +> Never mind, hey, this is really exciting, so much to find out about, so much to +> look forward to, I'm quite dizzy with anticipation . . . Or is it the wind? +> +> There really is a lot of that now, isn't there? And wow! Hey! What's this thing +> suddenly coming toward me very fast? Very, very fast. So big and flat and round, +> it needs a big wide-sounding name like . . . ow . . . ound . . . round . . . +> ground! That's it! That's a good name- ground! +> +> I wonder if it will be friends with me? +> +> Hello Ground! + +And the rest, after a sudden wet thud, was silence. diff --git a/node_modules/lazystream/test/fs_test.js b/node_modules/lazystream/test/fs_test.js new file mode 100644 index 0000000..149b1c4 --- /dev/null +++ b/node_modules/lazystream/test/fs_test.js @@ -0,0 +1,69 @@ + +var stream = require('../lib/lazystream'); +var fs = require('fs'); +var tmpDir = 'test/tmp/'; +var readFile = 'test/data.md'; +var writeFile = tmpDir + 'data.md'; + +exports.fs = { + readwrite: function(test) { + var readfd, writefd; + + var readable = new stream.Readable(function() { + return fs.createReadStream(readFile) + .on('open', function(fd) { + readfd = fd; + }) + .on('close', function() { + readfd = undefined; + step(); + }); + }); + + var writable = new stream.Writable(function() { + return fs.createWriteStream(writeFile) + .on('open', function(fd) { + writefd = fd; + }) + .on('close', function() { + writefd = undefined; + step(); + }); + }); + + test.expect(3); + + test.equal(readfd, undefined, 'Input file should not be opened until read'); + test.equal(writefd, undefined, 'Output file should not be opened until write'); + + if (!fs.existsSync(tmpDir)) { + fs.mkdirSync(tmpDir); + } + if (fs.existsSync(writeFile)) { + fs.unlinkSync(writeFile); + } + + readable.on('end', function() { step(); }); + writable.on('end', function() { step(); }); + + var steps = 0; + function step() { + steps += 1; + if (steps == 4) { + var input = fs.readFileSync(readFile); + var output = fs.readFileSync(writeFile); + + test.ok(input >= output && input <= output, 'Should be equal'); + + fs.unlinkSync(writeFile); + fs.rmdirSync(tmpDir); + + test.done(); + } + }; + + readable.pipe(writable); + } +}; + + diff --git a/node_modules/lazystream/test/helper.js b/node_modules/lazystream/test/helper.js new file mode 100644 index 0000000..9d41191 --- /dev/null +++ b/node_modules/lazystream/test/helper.js @@ -0,0 +1,39 @@ + +var _Readable = require('readable-stream/readable'); +var _Writable = require('readable-stream/writable'); +var util = require('util'); + +module.exports = { + DummyReadable: DummyReadable, + DummyWritable: DummyWritable +}; + +function DummyReadable(strings) { + _Readable.call(this); + this.strings = strings; + this.emit('readable'); +} + +util.inherits(DummyReadable, _Readable); + +DummyReadable.prototype._read = function _read(n) { + if (this.strings.length) { + this.push(new Buffer(this.strings.shift())); + } else { + this.push(null); + } +}; + +function DummyWritable(strings) { + _Writable.call(this); + this.strings = strings; + this.emit('writable'); +} + +util.inherits(DummyWritable, _Writable); + +DummyWritable.prototype._write = function _write(chunk, encoding, callback) { + this.strings.push(chunk.toString()); + if (callback) callback(); +}; + diff --git a/node_modules/lazystream/test/pipe_test.js b/node_modules/lazystream/test/pipe_test.js new file mode 100644 index 0000000..7129e35 --- /dev/null +++ b/node_modules/lazystream/test/pipe_test.js @@ -0,0 +1,36 @@ + +var stream = require('../lib/lazystream'); +var helper = require('./helper'); + +exports.pipe = { + readwrite: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + var readableInstantiated = false; + var writableInstantiated = false; + + test.expect(3); + + var readable = new stream.Readable(function() { + readableInstantiated = true; + return new helper.DummyReadable([].concat(expected)); + }); + + var writable = new stream.Writable(function() { + writableInstantiated = true; + return new helper.DummyWritable(actual); + }); + + test.equal(readableInstantiated, false, 'DummyReadable should only be instantiated when it is needed'); + test.equal(writableInstantiated, false, 'DummyWritable should only be instantiated when it is needed'); + + writable.on('end', function() { + test.equal(actual.join(''), expected.join(''), 'Piping on demand streams should keep data intact'); + test.done(); + }); + + readable.pipe(writable); + } +}; + + diff --git a/node_modules/lazystream/test/readable_test.js b/node_modules/lazystream/test/readable_test.js new file mode 100644 index 0000000..9ae0636 --- /dev/null +++ b/node_modules/lazystream/test/readable_test.js @@ -0,0 +1,90 @@ + +var Readable = require('../lib/lazystream').Readable; +var DummyReadable = require('./helper').DummyReadable; + +exports.readable = { + dummy: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + + test.expect(1); + + new DummyReadable([].concat(expected)) + .on('data', function(chunk) { + actual.push(chunk.toString()); + }) + .on('end', function() { + test.equal(actual.join(''), expected.join(''), 'DummyReadable should produce the data it was created with'); + test.done(); + }); + }, + options: function(test) { + test.expect(3); + + var readable = new Readable(function(options) { + test.ok(this instanceof Readable, "Readable should bind itself to callback's this"); + test.equal(options.encoding, "utf-8", "Readable should make options accessible to callback"); + this.ok = true; + return new DummyReadable(["test"]); + }, {encoding: "utf-8"}); + + readable.read(4); + + test.ok(readable.ok); + + test.done(); + }, + streams2: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + var instantiated = false; + + test.expect(2); + + var readable = new Readable(function() { + instantiated = true; + return new DummyReadable([].concat(expected)); + }); + + test.equal(instantiated, false, 'DummyReadable should only be instantiated when it is needed'); + + readable.on('readable', function() { + var chunk; + while ((chunk = readable.read())) { + actual.push(chunk.toString()); + } + }); + readable.on('end', function() { + test.equal(actual.join(''), expected.join(''), 'Readable should not change the data of the underlying stream'); + test.done(); + }); + + readable.read(0); + }, + resume: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + var instantiated = false; + + test.expect(2); + + var readable = new Readable(function() { + instantiated = true; + return new DummyReadable([].concat(expected)); + }); + + readable.pause(); + + readable.on('data', function(chunk) { + actual.push(chunk.toString()); + }); + readable.on('end', function() { + test.equal(actual.join(''), expected.join(''), 'Readable should not change the data of the underlying stream'); + test.done(); + }); + + test.equal(instantiated, false, 'DummyReadable should only be instantiated when it is needed'); + + readable.resume(); + } +}; diff --git a/node_modules/lazystream/test/writable_test.js b/node_modules/lazystream/test/writable_test.js new file mode 100644 index 0000000..a663845 --- /dev/null +++ b/node_modules/lazystream/test/writable_test.js @@ -0,0 +1,59 @@ + +var Writable = require('../lib/lazystream').Writable; +var DummyWritable = require('./helper').DummyWritable; + +exports.writable = { + options: function(test) { + test.expect(3); + + var writable = new Writable(function(options) { + test.ok(this instanceof Writable, "Writable should bind itself to callback's this"); + test.equal(options.encoding, "utf-8", "Writable should make options accessible to callback"); + this.ok = true; + return new DummyWritable([]); + }, {encoding: "utf-8"}); + + writable.write("test"); + + test.ok(writable.ok); + + test.done(); + }, + dummy: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + + test.expect(0); + + var dummy = new DummyWritable(actual); + + expected.forEach(function(item) { + dummy.write(new Buffer(item)); + }); + test.done(); + }, + streams2: function(test) { + var expected = [ 'line1\n', 'line2\n' ]; + var actual = []; + var instantiated = false; + + test.expect(2); + + var writable = new Writable(function() { + instantiated = true; + return new DummyWritable(actual); + }); + + test.equal(instantiated, false, 'DummyWritable should only be instantiated when it is needed'); + + writable.on('end', function() { + test.equal(actual.join(''), expected.join(''), 'Writable should not change the data of the underlying stream'); + test.done(); + }); + + expected.forEach(function(item) { + writable.write(new Buffer(item)); + }); + writable.end(); + } +}; diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js new file mode 100644 index 0000000..69bd3d2 --- /dev/null +++ b/node_modules/lcid/index.js @@ -0,0 +1,22 @@ +'use strict'; +var invertKv = require('invert-kv'); +var all = require('./lcid.json'); +var inverted = invertKv(all); + +exports.from = function (lcidCode) { + if (typeof lcidCode !== 'number') { + throw new TypeError('Expected a number'); + } + + return inverted[lcidCode]; +}; + +exports.to = function (localeId) { + if (typeof localeId !== 'string') { + throw new TypeError('Expected a string'); + } + + return all[localeId]; +}; + +exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json new file mode 100644 index 0000000..9c89f6a --- /dev/null +++ b/node_modules/lcid/lcid.json @@ -0,0 +1,203 @@ +{ + "af_ZA": 1078, + "am_ET": 1118, + "ar_AE": 14337, + "ar_BH": 15361, + "ar_DZ": 5121, + "ar_EG": 3073, + "ar_IQ": 2049, + "ar_JO": 11265, + "ar_KW": 13313, + "ar_LB": 12289, + "ar_LY": 4097, + "ar_MA": 6145, + "ar_OM": 8193, + "ar_QA": 16385, + "ar_SA": 1025, + "ar_SY": 10241, + "ar_TN": 7169, + "ar_YE": 9217, + "arn_CL": 1146, + "as_IN": 1101, + "az_AZ": 2092, + "ba_RU": 1133, + "be_BY": 1059, + "bg_BG": 1026, + "bn_IN": 1093, + "bo_BT": 2129, + "bo_CN": 1105, + "br_FR": 1150, + "bs_BA": 8218, + "ca_ES": 1027, + "co_FR": 1155, + "cs_CZ": 1029, + "cy_GB": 1106, + "da_DK": 1030, + "de_AT": 3079, + "de_CH": 2055, + "de_DE": 1031, + "de_LI": 5127, + "de_LU": 4103, + "div_MV": 1125, + "dsb_DE": 2094, + "el_GR": 1032, + "en_AU": 3081, + "en_BZ": 10249, + "en_CA": 4105, + "en_CB": 9225, + "en_GB": 2057, + "en_IE": 6153, + "en_IN": 18441, + "en_JA": 8201, + "en_MY": 17417, + "en_NZ": 5129, + "en_PH": 13321, + "en_TT": 11273, + "en_US": 1033, + "en_ZA": 7177, + "en_ZW": 12297, + "es_AR": 11274, + "es_BO": 16394, + "es_CL": 13322, + "es_CO": 9226, + "es_CR": 5130, + "es_DO": 7178, + "es_EC": 12298, + "es_ES": 3082, + "es_GT": 4106, + "es_HN": 18442, + "es_MX": 2058, + "es_NI": 19466, + "es_PA": 6154, + "es_PE": 10250, + "es_PR": 20490, + "es_PY": 15370, + "es_SV": 17418, + "es_UR": 14346, + "es_US": 21514, + "es_VE": 8202, + "et_EE": 1061, + "eu_ES": 1069, + "fa_IR": 1065, + "fi_FI": 1035, + "fil_PH": 1124, + "fo_FO": 1080, + "fr_BE": 2060, + "fr_CA": 3084, + "fr_CH": 4108, + "fr_FR": 1036, + "fr_LU": 5132, + "fr_MC": 6156, + "fy_NL": 1122, + "ga_IE": 2108, + "gbz_AF": 1164, + "gl_ES": 1110, + "gsw_FR": 1156, + "gu_IN": 1095, + "ha_NG": 1128, + "he_IL": 1037, + "hi_IN": 1081, + "hr_BA": 4122, + "hr_HR": 1050, + "hu_HU": 1038, + "hy_AM": 1067, + "id_ID": 1057, + "ii_CN": 1144, + "is_IS": 1039, + "it_CH": 2064, + "it_IT": 1040, + "iu_CA": 2141, + "ja_JP": 1041, + "ka_GE": 1079, + "kh_KH": 1107, + "kk_KZ": 1087, + "kl_GL": 1135, + "kn_IN": 1099, + "ko_KR": 1042, + "kok_IN": 1111, + "ky_KG": 1088, + "lb_LU": 1134, + "lo_LA": 1108, + "lt_LT": 1063, + "lv_LV": 1062, + "mi_NZ": 1153, + "mk_MK": 1071, + "ml_IN": 1100, + "mn_CN": 2128, + "mn_MN": 1104, + "moh_CA": 1148, + "mr_IN": 1102, + "ms_BN": 2110, + "ms_MY": 1086, + "mt_MT": 1082, + "my_MM": 1109, + "nb_NO": 1044, + "ne_NP": 1121, + "nl_BE": 2067, + "nl_NL": 1043, + "nn_NO": 2068, + "ns_ZA": 1132, + "oc_FR": 1154, + "or_IN": 1096, + "pa_IN": 1094, + "pl_PL": 1045, + "ps_AF": 1123, + "pt_BR": 1046, + "pt_PT": 2070, + "qut_GT": 1158, + "quz_BO": 1131, + "quz_EC": 2155, + "quz_PE": 3179, + "rm_CH": 1047, + "ro_RO": 1048, + "ru_RU": 1049, + "rw_RW": 1159, + "sa_IN": 1103, + "sah_RU": 1157, + "se_FI": 3131, + "se_NO": 1083, + "se_SE": 2107, + "si_LK": 1115, + "sk_SK": 1051, + "sl_SI": 1060, + "sma_NO": 6203, + "sma_SE": 7227, + "smj_NO": 4155, + "smj_SE": 5179, + "smn_FI": 9275, + "sms_FI": 8251, + "sq_AL": 1052, + "sr_BA": 7194, + "sr_SP": 3098, + "sv_FI": 2077, + "sv_SE": 1053, + "sw_KE": 1089, + "syr_SY": 1114, + "ta_IN": 1097, + "te_IN": 1098, + "tg_TJ": 1064, + "th_TH": 1054, + "tk_TM": 1090, + "tmz_DZ": 2143, + "tn_ZA": 1074, + "tr_TR": 1055, + "tt_RU": 1092, + "ug_CN": 1152, + "uk_UA": 1058, + "ur_IN": 2080, + "ur_PK": 1056, + "uz_UZ": 2115, + "vi_VN": 1066, + "wen_DE": 1070, + "wo_SN": 1160, + "xh_ZA": 1076, + "yo_NG": 1130, + "zh_CHS": 4, + "zh_CHT": 31748, + "zh_CN": 2052, + "zh_HK": 3076, + "zh_MO": 5124, + "zh_SG": 4100, + "zh_TW": 1028, + "zu_ZA": 1077 +} diff --git a/node_modules/lcid/license b/node_modules/lcid/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/lcid/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json new file mode 100644 index 0000000..0340963 --- /dev/null +++ b/node_modules/lcid/package.json @@ -0,0 +1,46 @@ +{ + "name": "lcid", + "version": "1.0.0", + "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", + "license": "MIT", + "repository": "sindresorhus/lcid", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js", + "lcid.json" + ], + "keywords": [ + "lcid", + "locale", + "string", + "str", + "id", + "identifier", + "windows", + "language", + "lang", + "map", + "mapping", + "convert", + "json", + "bcp47", + "ietf", + "tag" + ], + "dependencies": { + "invert-kv": "^1.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md new file mode 100644 index 0000000..bee4a70 --- /dev/null +++ b/node_modules/lcid/readme.md @@ -0,0 +1,35 @@ +# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) + +> Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) + +Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library. + +The mapping itself is just a [JSON file](lcid.json) and can be used wherever. + + +## Install + +``` +$ npm install --save lcid +``` + + +## Usage + +```js +var lcid = require('lcid'); + +lcid.from(1044); +//=> 'nb_NO' + +lcid.to('nb_NO'); +//=> 1044 + +lcid.all; +//=> {'af_ZA': 1078, ...} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/lead/LICENSE b/node_modules/lead/LICENSE new file mode 100644 index 0000000..b8fc743 --- /dev/null +++ b/node_modules/lead/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/lead/README.md b/node_modules/lead/README.md new file mode 100644 index 0000000..759b991 --- /dev/null +++ b/node_modules/lead/README.md @@ -0,0 +1,55 @@ +

+ + + +

+ +# lead + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Sink your streams. + +## Usage + +```js +var from = require('from2'); +var through = require('through2'); +var sink = require('lead'); + +// Might be used as a Transform or Writeable +var maybeThrough = through(function(chunk, enc, cb) { + // processing + cb(null, chunk); +}); + +from(['hello', 'world']) + // Sink it to behave like a Writeable + .pipe(sink(maybeThrough)) +``` + +## API + +### `sink(stream)` + +Takes a `stream` to sink and returns the same stream. Sets up event listeners to infer if the stream is being used as a `Transform` or `Writeable` stream and sinks it on `nextTick` if necessary. If the stream is being used as a `Transform` stream but becomes unpiped, it will be sunk. Respects `pipe`, `on('data')` and `on('readable')` handlers. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/lead.svg +[npm-url]: https://npmjs.com/package/lead +[npm-image]: http://img.shields.io/npm/v/lead.svg + +[travis-url]: https://travis-ci.org/gulpjs/lead +[travis-image]: http://img.shields.io/travis/gulpjs/lead.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/lead +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/lead.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/lead +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/lead/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/lead/index.js b/node_modules/lead/index.js new file mode 100644 index 0000000..8e3df6a --- /dev/null +++ b/node_modules/lead/index.js @@ -0,0 +1,61 @@ +'use strict'; + +var Writable = require('flush-write-stream'); + +function listenerCount(stream, evt) { + return stream.listeners(evt).length; +} + +function hasListeners(stream) { + return !!(listenerCount(stream, 'readable') || listenerCount(stream, 'data')); +} + +function sinker(file, enc, callback) { + callback(); +} + +function sink(stream) { + var sinkAdded = false; + + var sinkOptions = { + objectMode: stream._readableState.objectMode, + }; + + var sinkStream = new Writable(sinkOptions, sinker); + + function addSink() { + if (sinkAdded) { + return; + } + + if (hasListeners(stream)) { + return; + } + + sinkAdded = true; + stream.pipe(sinkStream); + } + + function removeSink(evt) { + if (evt !== 'readable' && evt !== 'data') { + return; + } + + if (hasListeners(stream)) { + sinkAdded = false; + stream.unpipe(sinkStream); + } + } + + stream.on('newListener', removeSink); + stream.on('removeListener', removeSink); + stream.on('removeListener', addSink); + + // Sink the stream to start flowing + // Do this on nextTick, it will flow at slowest speed of piped streams + process.nextTick(addSink); + + return stream; +} + +module.exports = sink; diff --git a/node_modules/lead/package.json b/node_modules/lead/package.json new file mode 100644 index 0000000..1e3b461 --- /dev/null +++ b/node_modules/lead/package.json @@ -0,0 +1,46 @@ +{ + "name": "lead", + "version": "1.0.0", + "description": "Sink your streams.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/lead", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint index.js test/ && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "devDependencies": { + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mississippi": "^1.3.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "streams", + "sink", + "through", + "writeable" + ] +} diff --git a/node_modules/liftoff/CHANGELOG b/node_modules/liftoff/CHANGELOG new file mode 100644 index 0000000..e612f4e --- /dev/null +++ b/node_modules/liftoff/CHANGELOG @@ -0,0 +1,127 @@ +v2.2.2: + date: 2016-05-20 + changes: + - Update dependencies. +v2.2.1: + date: 2016-03-23 + changes: + - Make sure that v8 flags are passed properly through the `respawn` event +v2.1.0: + date: 2015-05-20 + changes: + - Use rechoir to autoload modules. +v2.0.3: + date: 2015-03-31 + changes: + - Internal bugfix, don't wrap callback error in another error, idiot. +v2.0.2: + date: 2015-02-24 + changes: + - Support process.env.NODE_PATH when resolving module. +v2.0.1: + date: 2015-02-01 + changes: + - Find modulePath correctly when devving against yourself. +v2.0.0: + date: 2015-01-15 + changes: + - Rename `nodeFlags` to `v8Flags` and make it async. +v1.0.4: + date: 2015-01-04 + changes: + - Detect config extension using basename, not full path. +v1.0.0: + date: 2014-12-16 + changes: + - Update dependencies +v0.13.6: + date: 2014-11-07 + changes: + - Don't include artwork on npm. +v0.13.5: + date: 2014-10-10 + changes: + - Only attempt to resolve the real path of configFile if it is actually a symlink. +v0.13.4: + date: 2014-10-07 + changes: + - Set configBase to the directory of the symlink, not the directory of its real location. +v0.13.3: + date: 2014-10-06 + changes: + - Return the real location of symlinked config files. +v0.13.2: + date: 2014-09-12 + changes: + - Include flags in respawn event. I really miss `npm publish --force`. +v0.13.1: + date: 2014-09-12 + changes: + - Slight performance tweak. +v0.13.0: + date: 2014-09-12 + changes: + - Support passing flags to node with `nodeFlags` option. +v0.12.1: + date: 2014-06-27 + changes: + - Support preloading modules for compound extensions like `.coffee.md`. +v0.12.0: + date: 2014-06-27 + changes: + - Respect order of extensions when searching for config. + - Rename `configNameRegex` environment property to `configNameSearch`. +v0.11.3: + date: 2014-06-09 + changes: + - Make cwd match configBase if cwd isn't explicitly provided +v0.11.2: + date: 2014-06-04 + changes: + - Regression fix: coerce preloads into array before attempting to push more +v0.11.1: + date: 2014-06-02 + changes: + - Update dependencies. +v0.11.0: + date: 2014-05-27 + changes: + - Refactor and remove options parsing. +v0.10.0: + date: 2014-05-06 + changes: + - Remove `addExtension` in favor of `extension` option. + - Support preloading modules based on extension. +v0.9.7: + date: 2014-04-28 + changes: + - Locate local module in cwd even if config isn't present. +v0.9.6: + date: 2014-04-02 + changes: + - Fix regression where external modules are not properly required. + - Ignore configPathFlag / cwdFlag if the value isn't a string +v0.9.3: + date: 2014-02-28 + changes: + - Fix regression where developing against self doesn't correctly set cwd. +v0.9.0: + date: 2014-02-28 + changes: + - Use liftoff instance as context (`this`) for launch callback. + - Support split --cwd and --configfile locations. + - Rename `configLocationFlag` to `configPathFlag` + - Support node 0.8+ +v0.8.7: + date: 2014-02-24 + changes: + - Pass environment as first argument to `launch`. +v0.8.5: + date: 2014-02-19 + changes: + - Implement `addExtensions` option. + - Default to `index.js` if `modulePackage` has no `main` property. +v0.8.4: + date: 2014-02-05 + changes: + - Initial public release. diff --git a/node_modules/liftoff/LICENSE b/node_modules/liftoff/LICENSE new file mode 100644 index 0000000..a55f5b7 --- /dev/null +++ b/node_modules/liftoff/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014 Tyler Kellen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/liftoff/README.md b/node_modules/liftoff/README.md new file mode 100644 index 0000000..af830c4 --- /dev/null +++ b/node_modules/liftoff/README.md @@ -0,0 +1,535 @@ +

+ + + +

+ +# liftoff [![Build Status](http://img.shields.io/travis/js-cli/js-liftoff.svg?label=travis-ci)](http://travis-ci.org/js-cli/js-liftoff) [![Build status](https://img.shields.io/appveyor/ci/phated/js-liftoff.svg?label=appveyor)](https://ci.appveyor.com/project/phated/js-liftoff) + + +> Launch your command line tool with ease. + +[![NPM](https://nodei.co/npm/liftoff.png)](https://nodei.co/npm/liftoff/) + +## What is it? +[See this blog post](http://weblog.bocoup.com/building-command-line-tools-in-node-with-liftoff/), [check out this proof of concept](https://github.com/js-cli/js-hacker), or read on. + +Say you're writing a CLI tool. Let's call it [hacker](https://github.com/js-cli/js-hacker). You want to configure it using a `Hackerfile`. This is node, so you install `hacker` locally for each project you use it in. But, in order to get the `hacker` command in your PATH, you also install it globally. + +Now, when you run `hacker`, you want to configure what it does using the `Hackerfile` in your current directory, and you want it to execute using the local installation of your tool. Also, it'd be nice if the `hacker` command was smart enough to traverse up your folders until it finds a `Hackerfile`—for those times when you're not in the root directory of your project. Heck, you might even want to launch `hacker` from a folder outside of your project by manually specifying a working directory. Liftoff manages this for you. + +So, everything is working great. Now you can find your local `hacker` and `Hackerfile` with ease. Unfortunately, it turns out you've authored your `Hackerfile` in coffee-script, or some other JS variant. In order to support *that*, you have to load the compiler for it, and then register the extension for it with node. Good news, Liftoff can do that, and a whole lot more, too. + +## API + +### constructor(opts) + +Create an instance of Liftoff to invoke your application. + +An example utilizing all options: +```js +const Hacker = new Liftoff({ + name: 'hacker', + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register' + }, + v8flags: ['--harmony'] // or v8flags: require('v8flags') +}); +``` + +#### opts.name + +Sugar for setting `processTitle`, `moduleName`, `configName` automatically. + +Type: `String` +Default: `null` + +These are equivalent: +```js +const Hacker = Liftoff({ + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile' +}); +``` +```js +const Hacker = Liftoff({name:'hacker'}); +``` + +#### opts.moduleName + +Sets which module your application expects to find locally when being run. + +Type: `String` +Default: `null` + +#### opts.configName + +Sets the name of the configuration file Liftoff will attempt to find. Case-insensitive. + +Type: `String` +Default: `null` + +#### opts.extensions + +Set extensions to include when searching for a configuration file. If an external module is needed to load a given extension (e.g. `.coffee`), the module name should be specified as the value for the key. + +Type: `Object` +Default: `{".js":null,".json":null}` + +**Examples:** + +In this example Liftoff will look for `myappfile{.js,.json,.coffee}`. If a config with the extension `.coffee` is found, Liftoff will try to require `coffee-script/require` from the current working directory. +```js +const MyApp = new Liftoff({ + name: 'myapp', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register' + } +}); +``` + +In this example, Liftoff will look for `.myapp{rc}`. +```js +const MyApp = new Liftoff({ + name: 'myapp', + configName: '.myapp', + extensions: { + 'rc': null + } +}); +``` + +In this example, Liftoff will automatically attempt to load the correct module for any javascript variant supported by [interpret](https://github.com/js-cli/js-interpret) (as long as it does not require a register method). + +```js +const MyApp = new Liftoff({ + name: 'myapp', + extensions: require('interpret').jsVariants +}); +``` +#### opts.v8flags + +Any flag specified here will be applied to node, not your program. Useful for supporting invocations like `myapp --harmony command`, where `--harmony` should be passed to node, not your program. This functionality is implemented using [flagged-respawn](http://github.com/js-cli/js-flagged-respawn). To support all v8flags, see [v8flags](https://github.com/js-cli/js-v8flags). + +Type: `Array|Function` +Default: `null` + +If this method is a function, it should take a node-style callback that yields an array of flags. + +#### opts.processTitle + +Sets what the [process title](http://nodejs.org/api/process.html#process_process_title) will be. + +Type: `String` +Default: `null` + +#### opts.completions(type) + +A method to handle bash/zsh/whatever completions. + +Type: `Function` +Default: `null` + +#### opts.configFiles + +An object of configuration files to find. Each property is keyed by the default basename of the file being found, and the value is an object of [path arguments](#path-arguments) keyed by unique names. + +__Note:__ This option is useful if, for example, you want to support an `.apprc` file in addition to an `appfile.js`. If you only need a single configuration file, you probably don't need this. In addition to letting you find multiple files, this option allows more fine-grained control over how configuration files are located. + +Type: `Object` +Default: `null` + +#### Path arguments + +The [`fined`](https://github.com/js-cli/fined) module accepts a string representing the path to search or an object with the following keys: + +* `path` __(required)__ + + The path to search. Using only a string expands to this property. + + Type: `String` + Default: `null` + +* `name` + + The basename of the file to find. Extensions are appended during lookup. + + Type: `String` + Default: Top-level key in `configFiles` + +* `extensions` + + The extensions to append to `name` during lookup. See also: [`opts.extensions`](#optsextensions). + + Type: `String|Array|Object` + Default: The value of [`opts.extensions`](#optsextensions) + +* `cwd` + + The base directory of `path` (if relative). + + Type: `String` + Default: The value of [`opts.cwd`](#optscwd) + +* `findUp` + + Whether the `path` should be traversed up to find the file. + + Type: `Boolean` + Default: `false` + +**Examples:** + +In this example Liftoff will look for the `.hacker.js` file relative to the `cwd` as declared in `configFiles`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + cwd: '.' + } + } +}); +``` + +In this example, Liftoff will look for `.hackerrc` in the home directory. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '~', + extensions: { + 'rc': null + } + } + } + } +}); +``` + +In this example, Liftoff will look in the `cwd` and then lookup the tree for the `.hacker.js` file. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + up: { + path: '.', + findUp: true + } + } + } +}); +``` + +In this example, the `name` is overridden and the key is ignored so Liftoff looks for `.override.js`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + hacker: { + override: { + path: '.', + name: '.override' + } + } + } +}); +``` + +In this example, Liftoff will use the home directory as the `cwd` and looks for `~/.hacker.js`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '.', + cwd: '~' + } + } + } +}); +``` + +### prepare(opts, callback(env)) + +Prepares the environment for your application with provided options, and invokes your callback with the calculated environment as the first argument. The environment can be modified before using it as the first argument to `execute`. + +**Example Configuration w/ Options Parsing:** + +```js +const Liftoff = require('liftoff'); +const MyApp = new Liftoff({name:'myapp'}); +const argv = require('minimist')(process.argv.slice(2)); +const onExecute = function (env, argv) { + // Do post-execute things +}; +const onPrepare = function (env) { + console.log('my environment is:', env); + console.log('my liftoff config is:', this); + MyApp.execute(env, onExecute); +}; +MyApp.prepare({ + cwd: argv.cwd, + configPath: argv.myappfile, + require: argv.require, + completion: argv.completion +}, onPrepare); +``` + +**Example w/ modified environment** + +```js +const Liftoff = require('liftoff'); +const Hacker = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { path: '.', cwd: '~' } + } + } +}); +const onExecute = function (env, argv) { + // Do post-execute things +}; +const onPrepare = function (env) { + env.configProps = ['home', 'cwd'].map(function(dirname) { + return env.configFiles['.hacker'][dirname] + }).filter(function(filePath) { + return Boolean(filePath); + }).reduce(function(config, filePath) { + return mergeDeep(config, require(filePath)); + }, {}); + + if (env.configProps.hackerfile) { + env.configPath = path.resolve(env.configProps.hackerfile); + env.configBase = path.dirname(env.configPath); + } + + Hacker.execute(env, onExecute); +}; +Hacker.prepare({}, onPrepare); +``` + +#### opts.cwd + +Change the current working directory for this launch. Relative paths are calculated against `process.cwd()`. + +Type: `String` +Default: `process.cwd()` + +**Example Configuration:** +```js +const argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + cwd: argv.cwd +}, invoke); +``` + +**Matching CLI Invocation:** +``` +myapp --cwd ../ +``` + +#### opts.configPath + +Don't search for a config, use the one provided. **Note:** Liftoff will assume the current working directory is the directory containing the config file unless an alternate location is explicitly specified using `cwd`. + +Type: `String` +Default: `null` + +**Example Configuration:** +```js +var argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + configPath: argv.myappfile +}, invoke); +``` + +**Matching CLI Invocation:** +``` +myapp --myappfile /var/www/project/Myappfile.js +``` + +**Examples using `cwd` and `configPath` together:** + +These are functionally identical: +``` +myapp --myappfile /var/www/project/Myappfile.js +myapp --cwd /var/www/project +``` + +These can run myapp from a shared directory as though it were located in another project: +``` +myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project1 +myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project2 +``` + +#### opts.require + +A string or array of modules to attempt requiring from the local working directory before invoking the launch callback. + +Type: `String|Array` +Default: `null` + +**Example Configuration:** +```js +var argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + require: argv.require +}, invoke); +``` + +**Matching CLI Invocation:** +```js +myapp --require coffee-script/register +``` + +#### callback(env) + +A function called after your environment is prepared. A good place to modify the environment before calling `execute`. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys: + +- `cwd`: the current working directory +- `require`: an array of modules that liftoff tried to pre-load +- `configNameSearch`: the config files searched for +- `configPath`: the full path to your configuration file (if found) +- `configBase`: the base directory of your configuration file (if found) +- `modulePath`: the full path to the local module your project relies on (if found) +- `modulePackage`: the contents of the local module's package.json (if found) +- `configFiles`: an object of filepaths for each found config file (filepath values will be null if not found) + +### execute(env, [forcedFlags], callback(env, argv)) + +A function to start your application, based on the `env` given. Optionally takes an array of `forcedFlags`, which will force a respawn with those node or V8 flags during startup. Invokes your callback with the environment and command-line arguments (minus node & v8 flags) after the application has been executed. + +**Example:** + +```js +const Liftoff = require('liftoff'); +const MyApp = new Liftoff({name:'myapp'}); +const onExecute = function (env, argv) { + // Do post-execute things + console.log('my environment is:', env); + console.log('my cli options are:', argv); + console.log('my liftoff config is:', this); +}; +const onPrepare = function (env) { + var forcedFlags = ['--trace-deprecation']; + MyApp.execute(env, forcedFlags, onExecute); +}; +MyApp.prepare({}, onPrepare); +``` + +#### callback(env, argv) + +A function called after your application is executed. When invoked, `this` will be your instance of Liftoff, `argv` will be all command-line arguments (minus node & v8 flags), and `env` will contain the following keys: + +- `cwd`: the current working directory +- `require`: an array of modules that liftoff tried to pre-load +- `configNameSearch`: the config files searched for +- `configPath`: the full path to your configuration file (if found) +- `configBase`: the base directory of your configuration file (if found) +- `modulePath`: the full path to the local module your project relies on (if found) +- `modulePackage`: the contents of the local module's package.json (if found) +- `configFiles`: an object of filepaths for each found config file (filepath values will be null if not found) + +### launch(opts, callback(env, argv)) + +**Deprecated:** Please use `prepare` followed by `execute`. That's all this module does internally but those give you more control. + +Launches your application with provided options, builds an environment, and invokes your callback, passing the calculated environment and command-line arguments (minus node & v8 flags) as the arguments. + +Accepts any options that `prepare` allows, plus `opt.forcedFlags`. + +#### opts.forcedFlags + +**Deprecated:** If using `prepare`/`execute`, pass forcedFlags as the 2nd argument instead of using this option. + +Allows you to force node or V8 flags during the launch. This is useful if you need to make sure certain flags will always be enabled or if you need to enable flags that don't show up in `opts.v8flags` (as these flags aren't validated against `opts.v8flags`). + +If this is specified as a function, it will receive the built `env` as its only argument and must return a string or array of flags to force. + +Type: `String|Array|Function` +Default: `null` + +**Example Configuration:** +```js +MyApp.launch({ + forcedFlags: ['--trace-deprecation'] +}, invoke); +``` + +**Matching CLI Invocation:** +```js +myapp --trace-deprecation +``` + +### events + +#### require(name, module) + +Emitted when a module is pre-loaded. + +```js +var Hacker = new Liftoff({name:'hacker'}); +Hacker.on('require', function (name, module) { + console.log('Requiring external module: '+name+'...'); + // automatically register coffee-script extensions + if (name === 'coffee-script') { + module.register(); + } +}); +``` + +#### requireFail(name, err) + +Emitted when a requested module cannot be preloaded. + +```js +var Hacker = new Liftoff({name:'hacker'}); +Hacker.on('requireFail', function (name, err) { + console.log('Unable to load:', name, err); +}); +``` + +#### respawn(flags, child) + +Emitted when Liftoff re-spawns your process (when a [`v8flags`](#optsv8flags) is detected). + +```js +var Hacker = new Liftoff({ + name: 'hacker', + v8flags: ['--harmony'] +}); +Hacker.on('respawn', function (flags, child) { + console.log('Detected node flags:', flags); + console.log('Respawned to PID:', child.pid); +}); +``` + +Event will be triggered for this command: +`hacker --harmony commmand` + +## Examples + +Check out how [gulp](https://github.com/gulpjs/gulp-cli/blob/master/index.js) uses Liftoff. + +For a bare-bones example, try [the hacker project](https://github.com/js-cli/js-hacker/blob/master/bin/hacker.js). + +To try the example, do the following: + +1. Install the sample project `hacker` with `npm install -g hacker`. +2. Make a `Hackerfile.js` with some arbitrary javascript it. +3. Install hacker next to it with `npm install hacker`. +3. Run `hacker` while in the same parent folder. diff --git a/node_modules/liftoff/index.js b/node_modules/liftoff/index.js new file mode 100644 index 0000000..9330c92 --- /dev/null +++ b/node_modules/liftoff/index.js @@ -0,0 +1,231 @@ +var util = require('util'); +var path = require('path'); +var EE = require('events').EventEmitter; + +var extend = require('extend'); +var resolve = require('resolve'); +var flaggedRespawn = require('flagged-respawn'); +var isPlainObject = require('is-plain-object'); +var mapValues = require('object.map'); +var fined = require('fined'); + +var findCwd = require('./lib/find_cwd'); +var findConfig = require('./lib/find_config'); +var fileSearch = require('./lib/file_search'); +var parseOptions = require('./lib/parse_options'); +var silentRequire = require('./lib/silent_require'); +var buildConfigName = require('./lib/build_config_name'); +var registerLoader = require('./lib/register_loader'); +var getNodeFlags = require('./lib/get_node_flags'); + +function Liftoff(opts) { + EE.call(this); + extend(this, parseOptions(opts)); +} +util.inherits(Liftoff, EE); + +Liftoff.prototype.requireLocal = function(module, basedir) { + try { + var result = require(resolve.sync(module, { basedir: basedir })); + this.emit('require', module, result); + return result; + } catch (e) { + this.emit('requireFail', module, e); + } +}; + +Liftoff.prototype.buildEnvironment = function(opts) { + opts = opts || {}; + + // get modules we want to preload + var preload = opts.require || []; + + // ensure items to preload is an array + if (!Array.isArray(preload)) { + preload = [preload]; + } + + // make a copy of search paths that can be mutated for this run + var searchPaths = this.searchPaths.slice(); + + // calculate current cwd + var cwd = findCwd(opts); + + // if cwd was provided explicitly, only use it for searching config + if (opts.cwd) { + searchPaths = [cwd]; + } else { + // otherwise just search in cwd first + searchPaths.unshift(cwd); + } + + // calculate the regex to use for finding the config file + var configNameSearch = buildConfigName({ + configName: this.configName, + extensions: Object.keys(this.extensions), + }); + + // calculate configPath + var configPath = findConfig({ + configNameSearch: configNameSearch, + searchPaths: searchPaths, + configPath: opts.configPath, + }); + + // if we have a config path, save the directory it resides in. + var configBase; + if (configPath) { + configBase = path.dirname(configPath); + // if cwd wasn't provided explicitly, it should match configBase + if (!opts.cwd) { + cwd = configBase; + } + } + + // TODO: break this out into lib/ + // locate local module and package next to config or explicitly provided cwd + /* eslint one-var: 0 */ + var modulePath, modulePackage; + try { + var delim = path.delimiter; + var paths = (process.env.NODE_PATH ? process.env.NODE_PATH.split(delim) : []); + modulePath = resolve.sync(this.moduleName, { basedir: configBase || cwd, paths: paths }); + modulePackage = silentRequire(fileSearch('package.json', [modulePath])); + } catch (e) {} + + // if we have a configuration but we failed to find a local module, maybe + // we are developing against ourselves? + if (!modulePath && configPath) { + // check the package.json sibling to our config to see if its `name` + // matches the module we're looking for + var modulePackagePath = fileSearch('package.json', [configBase]); + modulePackage = silentRequire(modulePackagePath); + if (modulePackage && modulePackage.name === this.moduleName) { + // if it does, our module path is `main` inside package.json + modulePath = path.join(path.dirname(modulePackagePath), modulePackage.main || 'index.js'); + cwd = configBase; + } else { + // clear if we just required a package for some other project + modulePackage = {}; + } + } + + var exts = this.extensions; + var eventEmitter = this; + + var configFiles = {}; + if (isPlainObject(this.configFiles)) { + var notfound = { path: null }; + configFiles = mapValues(this.configFiles, function(prop, name) { + var defaultObj = { name: name, cwd: cwd, extensions: exts }; + return mapValues(prop, function(pathObj) { + var found = fined(pathObj, defaultObj) || notfound; + if (isPlainObject(found.extension)) { + registerLoader(eventEmitter, found.extension, found.path, cwd); + } + return found.path; + }); + }); + } + + return { + cwd: cwd, + require: preload, + configNameSearch: configNameSearch, + configPath: configPath, + configBase: configBase, + modulePath: modulePath, + modulePackage: modulePackage || {}, + configFiles: configFiles, + }; +}; + +Liftoff.prototype.handleFlags = function(cb) { + if (typeof this.v8flags === 'function') { + this.v8flags(function(err, flags) { + if (err) { + cb(err); + } else { + cb(null, flags); + } + }); + } else { + process.nextTick(function() { + cb(null, this.v8flags); + }.bind(this)); + } +}; + +Liftoff.prototype.prepare = function(opts, fn) { + if (typeof fn !== 'function') { + throw new Error('You must provide a callback function.'); + } + + process.title = this.processTitle; + + var completion = opts.completion; + if (completion && this.completions) { + return this.completions(completion); + } + + var env = this.buildEnvironment(opts); + + fn.call(this, env); +}; + +Liftoff.prototype.execute = function(env, forcedFlags, fn) { + if (typeof forcedFlags === 'function') { + fn = forcedFlags; + forcedFlags = undefined; + } + if (typeof fn !== 'function') { + throw new Error('You must provide a callback function.'); + } + + this.handleFlags(function(err, flags) { + if (err) { + throw err; + } + flags = flags || []; + + flaggedRespawn(flags, process.argv, forcedFlags, execute.bind(this)); + + function execute(ready, child, argv) { + if (child !== process) { + var execArgv = getNodeFlags.fromReorderedArgv(argv); + this.emit('respawn', execArgv, child); + } + if (ready) { + preloadModules(this, env); + registerLoader(this, this.extensions, env.configPath, env.cwd); + fn.call(this, env, argv); + } + } + }.bind(this)); +}; + +Liftoff.prototype.launch = function(opts, fn) { + if (typeof fn !== 'function') { + throw new Error('You must provide a callback function.'); + } + + var self = this; + + self.prepare(opts, function(env) { + var forcedFlags = getNodeFlags.arrayOrFunction(opts.forcedFlags, env); + self.execute(env, forcedFlags, fn); + }); +}; + +function preloadModules(inst, env) { + var basedir = env.cwd; + env.require.filter(toUnique).forEach(function(module) { + inst.requireLocal(module, basedir); + }); +} + +function toUnique(elem, index, array) { + return array.indexOf(elem) === index; +} + +module.exports = Liftoff; diff --git a/node_modules/liftoff/lib/build_config_name.js b/node_modules/liftoff/lib/build_config_name.js new file mode 100644 index 0000000..9005a36 --- /dev/null +++ b/node_modules/liftoff/lib/build_config_name.js @@ -0,0 +1,17 @@ +module.exports = function(opts) { + opts = opts || {}; + var configName = opts.configName; + var extensions = opts.extensions; + if (!configName) { + throw new Error('Please specify a configName.'); + } + if (configName instanceof RegExp) { + return [configName]; + } + if (!Array.isArray(extensions)) { + throw new Error('Please provide an array of valid extensions.'); + } + return extensions.map(function(ext) { + return configName + ext; + }); +}; diff --git a/node_modules/liftoff/lib/file_search.js b/node_modules/liftoff/lib/file_search.js new file mode 100644 index 0000000..d95121d --- /dev/null +++ b/node_modules/liftoff/lib/file_search.js @@ -0,0 +1,14 @@ +var findup = require('findup-sync'); + +module.exports = function(search, paths) { + var path; + var len = paths.length; + for (var i = 0; i < len; i++) { + if (path) { + break; + } else { + path = findup(search, { cwd: paths[i], nocase: true }); + } + } + return path; +}; diff --git a/node_modules/liftoff/lib/find_config.js b/node_modules/liftoff/lib/find_config.js new file mode 100644 index 0000000..c55a677 --- /dev/null +++ b/node_modules/liftoff/lib/find_config.js @@ -0,0 +1,25 @@ +var fs = require('fs'); +var path = require('path'); +var fileSearch = require('./file_search'); + +module.exports = function(opts) { + opts = opts || {}; + var configNameSearch = opts.configNameSearch; + var configPath = opts.configPath; + var searchPaths = opts.searchPaths; + // only search for a config if a path to one wasn't explicitly provided + if (!configPath) { + if (!Array.isArray(searchPaths)) { + throw new Error('Please provide an array of paths to search for config in.'); + } + if (!configNameSearch) { + throw new Error('Please provide a configNameSearch.'); + } + configPath = fileSearch(configNameSearch, searchPaths); + } + // confirm the configPath exists and return an absolute path to it + if (fs.existsSync(configPath)) { + return path.resolve(configPath); + } + return null; +}; diff --git a/node_modules/liftoff/lib/find_cwd.js b/node_modules/liftoff/lib/find_cwd.js new file mode 100644 index 0000000..89ffaba --- /dev/null +++ b/node_modules/liftoff/lib/find_cwd.js @@ -0,0 +1,18 @@ +var path = require('path'); + +module.exports = function(opts) { + if (!opts) { + opts = {}; + } + var cwd = opts.cwd; + var configPath = opts.configPath; + // if a path to the desired config was specified + // but no cwd was provided, use configPath dir + if (typeof configPath === 'string' && !cwd) { + cwd = path.dirname(path.resolve(configPath)); + } + if (typeof cwd === 'string') { + return path.resolve(cwd); + } + return process.cwd(); +}; diff --git a/node_modules/liftoff/lib/get_node_flags.js b/node_modules/liftoff/lib/get_node_flags.js new file mode 100644 index 0000000..c58165e --- /dev/null +++ b/node_modules/liftoff/lib/get_node_flags.js @@ -0,0 +1,30 @@ +function arrayOrFunction(arrayOrFunc, env) { + if (typeof arrayOrFunc === 'function') { + return arrayOrFunc.call(this, env); + } + if (Array.isArray(arrayOrFunc)) { + return arrayOrFunc; + } + if (typeof arrayOrFunc === 'string') { + return [arrayOrFunc]; + } + return []; +} + +function fromReorderedArgv(reorderedArgv) { + var nodeFlags = []; + for (var i = 1, n = reorderedArgv.length; i < n; i++) { + var arg = reorderedArgv[i]; + if (!/^-/.test(arg) || arg === '--') { + break; + } + nodeFlags.push(arg); + } + return nodeFlags; +} + +module.exports = { + arrayOrFunction: arrayOrFunction, + fromReorderedArgv: fromReorderedArgv, +}; + diff --git a/node_modules/liftoff/lib/parse_options.js b/node_modules/liftoff/lib/parse_options.js new file mode 100644 index 0000000..a478bdd --- /dev/null +++ b/node_modules/liftoff/lib/parse_options.js @@ -0,0 +1,35 @@ +var extend = require('extend'); + +module.exports = function(opts) { + var defaults = { + extensions: { + '.js': null, + '.json': null, + }, + searchPaths: [], + }; + if (!opts) { + opts = {}; + } + if (opts.name) { + if (!opts.processTitle) { + opts.processTitle = opts.name; + } + if (!opts.configName) { + opts.configName = opts.name + 'file'; + } + if (!opts.moduleName) { + opts.moduleName = opts.name; + } + } + if (!opts.processTitle) { + throw new Error('You must specify a processTitle.'); + } + if (!opts.configName) { + throw new Error('You must specify a configName.'); + } + if (!opts.moduleName) { + throw new Error('You must specify a moduleName.'); + } + return extend(defaults, opts); +}; diff --git a/node_modules/liftoff/lib/register_loader.js b/node_modules/liftoff/lib/register_loader.js new file mode 100644 index 0000000..a7dfb6e --- /dev/null +++ b/node_modules/liftoff/lib/register_loader.js @@ -0,0 +1,24 @@ +var rechoir = require('rechoir'); + +module.exports = function(eventEmitter, extensions, configPath, cwd) { + extensions = extensions || {}; + + if (typeof configPath !== 'string') { + return; + } + + var autoloads = rechoir.prepare(extensions, configPath, cwd, true); + if (autoloads instanceof Error) { // Only errors + autoloads.failures.forEach(function(failed) { + eventEmitter.emit('requireFail', failed.moduleName, failed.error); + }); + return; + } + + if (!Array.isArray(autoloads)) { // Already required or no config. + return; + } + + var succeeded = autoloads[autoloads.length - 1]; + eventEmitter.emit('require', succeeded.moduleName, succeeded.module); +}; diff --git a/node_modules/liftoff/lib/silent_require.js b/node_modules/liftoff/lib/silent_require.js new file mode 100644 index 0000000..68c4864 --- /dev/null +++ b/node_modules/liftoff/lib/silent_require.js @@ -0,0 +1,5 @@ +module.exports = function(path) { + try { + return require(path); + } catch (e) {} +}; diff --git a/node_modules/liftoff/node_modules/is-plain-object/LICENSE b/node_modules/liftoff/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/liftoff/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/liftoff/node_modules/is-plain-object/README.md b/node_modules/liftoff/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/liftoff/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/liftoff/node_modules/is-plain-object/index.d.ts b/node_modules/liftoff/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/liftoff/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/liftoff/node_modules/is-plain-object/index.js b/node_modules/liftoff/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/liftoff/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/liftoff/node_modules/is-plain-object/package.json b/node_modules/liftoff/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/liftoff/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/liftoff/package.json b/node_modules/liftoff/package.json new file mode 100644 index 0000000..2391471 --- /dev/null +++ b/node_modules/liftoff/package.json @@ -0,0 +1,46 @@ +{ + "name": "liftoff", + "version": "3.1.0", + "description": "Launch your command line tool with ease.", + "author": "Tyler Kellen (http://goingslowly.com/)", + "contributors": [], + "repository": "js-cli/js-liftoff", + "license": "MIT", + "engines": { + "node": ">= 0.8" + }, + "main": "index.js", + "files": [ + "index.js", + "lib", + "LICENSE" + ], + "scripts": { + "pretest": "eslint .", + "test": "mocha -t 5000 -b -R spec test/index && npm run legacy-test", + "legacy-test": "mocha -t 5000 -b -R spec test/launch", + "cover": "nyc --reporter=lcov --reporter=text-summary npm test" + }, + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "devDependencies": { + "chai": "^3.5.0", + "coffeescript": "^1.10.0", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "mocha": "^3.5.3", + "nyc": "^13.3.0", + "sinon": "~1.17.4" + }, + "keywords": [ + "command line" + ] +} diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js new file mode 100644 index 0000000..96d4d9f --- /dev/null +++ b/node_modules/load-json-file/index.js @@ -0,0 +1,21 @@ +'use strict'; +var path = require('path'); +var fs = require('graceful-fs'); +var stripBom = require('strip-bom'); +var parseJson = require('parse-json'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); + +function parse(x, fp) { + return parseJson(stripBom(x), path.relative(process.cwd(), fp)); +} + +module.exports = function (fp) { + return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) { + return parse(data, fp); + }); +}; + +module.exports.sync = function (fp) { + return parse(fs.readFileSync(fp, 'utf8'), fp); +}; diff --git a/node_modules/load-json-file/license b/node_modules/load-json-file/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json new file mode 100644 index 0000000..b44c8a1 --- /dev/null +++ b/node_modules/load-json-file/package.json @@ -0,0 +1,46 @@ +{ + "name": "load-json-file", + "version": "1.1.0", + "description": "Read and parse a JSON file", + "license": "MIT", + "repository": "sindresorhus/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load" + ], + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md new file mode 100644 index 0000000..fa982b5 --- /dev/null +++ b/node_modules/load-json-file/readme.md @@ -0,0 +1,45 @@ +# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) + +> Read and parse a JSON file + +[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). + + +## Install + +``` +$ npm install --save load-json-file +``` + + +## Usage + +```js +const loadJsonFile = require('load-json-file'); + +loadJsonFile('foo.json').then(json => { + console.log(json); + //=> {foo: true} +}); +``` + + +## API + +### loadJsonFile(filepath) + +Returns a promise that resolves to the parsed JSON. + +### loadJsonFile.sync(filepath) + +Returns the parsed JSON. + + +## Related + +- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/lodash.clonedeep/LICENSE b/node_modules/lodash.clonedeep/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.clonedeep/LICENSE @@ -0,0 +1,47 @@ +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. diff --git a/node_modules/lodash.clonedeep/README.md b/node_modules/lodash.clonedeep/README.md new file mode 100644 index 0000000..fee48e4 --- /dev/null +++ b/node_modules/lodash.clonedeep/README.md @@ -0,0 +1,18 @@ +# lodash.clonedeep v4.5.0 + +The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.clonedeep +``` + +In Node.js: +```js +var cloneDeep = require('lodash.clonedeep'); +``` + +See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.clonedeep) for more details. diff --git a/node_modules/lodash.clonedeep/index.js b/node_modules/lodash.clonedeep/index.js new file mode 100644 index 0000000..1b0e502 --- /dev/null +++ b/node_modules/lodash.clonedeep/index.js @@ -0,0 +1,1748 @@ +/** + * 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 the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, true, true); +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = cloneDeep; diff --git a/node_modules/lodash.clonedeep/package.json b/node_modules/lodash.clonedeep/package.json new file mode 100644 index 0000000..fb1d626 --- /dev/null +++ b/node_modules/lodash.clonedeep/package.json @@ -0,0 +1,17 @@ +{ + "name": "lodash.clonedeep", + "version": "4.5.0", + "description": "The lodash method `_.cloneDeep` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, clonedeep", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Blaine Bublitz (https://github.com/phated)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/make-iterator/LICENSE b/node_modules/make-iterator/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/make-iterator/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/make-iterator/README.md b/node_modules/make-iterator/README.md new file mode 100644 index 0000000..6eb2a5d --- /dev/null +++ b/node_modules/make-iterator/README.md @@ -0,0 +1,102 @@ +# make-iterator [![NPM version](https://img.shields.io/npm/v/make-iterator.svg?style=flat)](https://www.npmjs.com/package/make-iterator) [![NPM monthly downloads](https://img.shields.io/npm/dm/make-iterator.svg?style=flat)](https://npmjs.org/package/make-iterator) [![NPM total downloads](https://img.shields.io/npm/dt/make-iterator.svg?style=flat)](https://npmjs.org/package/make-iterator) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/make-iterator.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/make-iterator) + +> Convert an argument into a valid iterator. Based on the `.makeIterator()` implementation in mout https://github.com/mout/mout. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save make-iterator +``` + +Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) + +## Usage + +```js +var iterator = require('make-iterator'); +``` + +**Regex** + +```js +var arr = ['a', 'b', 'c', 'd', 'e', 'f']; +var fn = iterator(/[a-c]/); +console.log(arr.filter(fn)); +//=> ['a', 'b', 'c']; +``` + +**Objects** + +```js +var fn = iterator({ a: 1, b: { c: 2 } }); + +console.log(fn({ a: 1, b: { c: 2, d: 3 } })); +//=> true +console.log(fn({ a: 1, b: { c: 3 } })); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [any](https://www.npmjs.com/package/any): Returns `true` if a value exists in the given string, array or object. | [homepage](https://github.com/jonschlinkert/any "Returns `true` if a value exists in the given string, array or object.") +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [array-every](https://www.npmjs.com/package/array-every): Returns true if the callback returns truthy for all elements in the given array. | [homepage](https://github.com/jonschlinkert/array-every "Returns true if the callback returns truthy for all elements in the given array.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") +* [utils](https://www.npmjs.com/package/utils): Fast, generic JavaScript/node.js utility functions. | [homepage](https://github.com/jonschlinkert/utils "Fast, generic JavaScript/node.js utility functions.") + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 08, 2018._ \ No newline at end of file diff --git a/node_modules/make-iterator/index.js b/node_modules/make-iterator/index.js new file mode 100644 index 0000000..15a00d0 --- /dev/null +++ b/node_modules/make-iterator/index.js @@ -0,0 +1,99 @@ +/*! + * make-iterator + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function makeIterator(target, thisArg) { + switch (typeOf(target)) { + case 'undefined': + case 'null': + return noop; + case 'function': + // function is the first to improve perf (most common case) + // also avoid using `Function#call` if not needed, which boosts + // perf a lot in some cases + return (typeof thisArg !== 'undefined') ? function(val, i, arr) { + return target.call(thisArg, val, i, arr); + } : target; + case 'object': + return function(val) { + return deepMatches(val, target); + }; + case 'regexp': + return function(str) { + return target.test(str); + }; + case 'string': + case 'number': + default: { + return prop(target); + } + } +}; + +function containsMatch(array, value) { + var len = array.length; + var i = -1; + + while (++i < len) { + if (deepMatches(array[i], value)) { + return true; + } + } + return false; +} + +function matchArray(arr, value) { + var len = value.length; + var i = -1; + + while (++i < len) { + if (!containsMatch(arr, value[i])) { + return false; + } + } + return true; +} + +function matchObject(obj, value) { + for (var key in value) { + if (value.hasOwnProperty(key)) { + if (deepMatches(obj[key], value[key]) === false) { + return false; + } + } + } + return true; +} + +/** + * Recursively compare objects + */ + +function deepMatches(val, value) { + if (typeOf(val) === 'object') { + if (Array.isArray(val) && Array.isArray(value)) { + return matchArray(val, value); + } else { + return matchObject(val, value); + } + } else { + return val === value; + } +} + +function prop(name) { + return function(obj) { + return obj[name]; + }; +} + +function noop(val) { + return val; +} diff --git a/node_modules/make-iterator/node_modules/kind-of/CHANGELOG.md b/node_modules/make-iterator/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/make-iterator/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/make-iterator/node_modules/kind-of/LICENSE b/node_modules/make-iterator/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/make-iterator/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/make-iterator/node_modules/kind-of/README.md b/node_modules/make-iterator/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/make-iterator/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/make-iterator/node_modules/kind-of/index.js b/node_modules/make-iterator/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/make-iterator/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/make-iterator/node_modules/kind-of/package.json b/node_modules/make-iterator/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/make-iterator/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/make-iterator/package.json b/node_modules/make-iterator/package.json new file mode 100644 index 0000000..4afded9 --- /dev/null +++ b/node_modules/make-iterator/package.json @@ -0,0 +1,68 @@ +{ + "name": "make-iterator", + "description": "Convert an argument into a valid iterator. Based on the `.makeIterator()` implementation in mout https://github.com/mout/mout.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/make-iterator", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/make-iterator", + "bugs": { + "url": "https://github.com/jonschlinkert/make-iterator/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^6.0.2" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "arr", + "array", + "contains", + "for-own", + "forown", + "forOwn", + "function", + "iterate", + "iterator", + "make" + ], + "verb": { + "related": { + "list": [ + "any", + "arr-filter", + "arr-map", + "array-every", + "collection-map", + "utils" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-readme-generator" + ] + } +} diff --git a/node_modules/map-cache/LICENSE b/node_modules/map-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/map-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/map-cache/README.md b/node_modules/map-cache/README.md new file mode 100644 index 0000000..6260b29 --- /dev/null +++ b/node_modules/map-cache/README.md @@ -0,0 +1,145 @@ +# map-cache [![NPM version](https://img.shields.io/npm/v/map-cache.svg?style=flat)](https://www.npmjs.com/package/map-cache) [![NPM downloads](https://img.shields.io/npm/dm/map-cache.svg?style=flat)](https://npmjs.org/package/map-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-cache) + +Basic cache object for storing key-value pairs. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install map-cache --save +``` + +Based on MapCache in Lo-dash v3.0. [MIT License](https://github.com/lodash/lodash/blob/master/LICENSE.txt) + +## Usage + +```js +var MapCache = require('map-cache'); +var mapCache = new MapCache(); +``` + +## API + +### [MapCache](index.js#L28) + +Creates a cache object to store key/value pairs. + +**Example** + +```js +var cache = new MapCache(); +``` + +### [.set](index.js#L45) + +Adds `value` to `key` on the cache. + +**Params** + +* `key` **{String}**: The key of the value to cache. +* `value` **{any}**: The value to cache. +* `returns` **{Object}**: Returns the `Cache` object for chaining. + +**Example** + +```js +cache.set('foo', 'bar'); +``` + +### [.get](index.js#L65) + +Gets the cached value for `key`. + +**Params** + +* `key` **{String}**: The key of the value to get. +* `returns` **{any}**: Returns the cached value. + +**Example** + +```js +cache.get('foo'); +//=> 'bar' +``` + +### [.has](index.js#L82) + +Checks if a cached value for `key` exists. + +**Params** + +* `key` **{String}**: The key of the entry to check. +* `returns` **{Boolean}**: Returns `true` if an entry for `key` exists, else `false`. + +**Example** + +```js +cache.has('foo'); +//=> true +``` + +### [.del](index.js#L98) + +Removes `key` and its value from the cache. + +**Params** + +* `key` **{String}**: The key of the value to remove. +* `returns` **{Boolean}**: Returns `true` if the entry was removed successfully, else `false`. + +**Example** + +```js +cache.del('foo'); +``` + +## Related projects + +You might also be interested in these projects: + +* [cache-base](https://www.npmjs.com/package/cache-base): Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. | [homepage](https://github.com/jonschlinkert/cache-base) +* [config-cache](https://www.npmjs.com/package/config-cache): General purpose JavaScript object storage methods. | [homepage](https://github.com/jonschlinkert/config-cache) +* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/map-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 10, 2016._ \ No newline at end of file diff --git a/node_modules/map-cache/index.js b/node_modules/map-cache/index.js new file mode 100644 index 0000000..f86842f --- /dev/null +++ b/node_modules/map-cache/index.js @@ -0,0 +1,100 @@ +/*! + * map-cache + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; + +/** + * Expose `MapCache` + */ + +module.exports = MapCache; + +/** + * Creates a cache object to store key/value pairs. + * + * ```js + * var cache = new MapCache(); + * ``` + * + * @api public + */ + +function MapCache(data) { + this.__data__ = data || {}; +} + +/** + * Adds `value` to `key` on the cache. + * + * ```js + * cache.set('foo', 'bar'); + * ``` + * + * @param {String} `key` The key of the value to cache. + * @param {*} `value` The value to cache. + * @returns {Object} Returns the `Cache` object for chaining. + * @api public + */ + +MapCache.prototype.set = function mapSet(key, value) { + if (key !== '__proto__') { + this.__data__[key] = value; + } + return this; +}; + +/** + * Gets the cached value for `key`. + * + * ```js + * cache.get('foo'); + * //=> 'bar' + * ``` + * + * @param {String} `key` The key of the value to get. + * @returns {*} Returns the cached value. + * @api public + */ + +MapCache.prototype.get = function mapGet(key) { + return key === '__proto__' ? undefined : this.__data__[key]; +}; + +/** + * Checks if a cached value for `key` exists. + * + * ```js + * cache.has('foo'); + * //=> true + * ``` + * + * @param {String} `key` The key of the entry to check. + * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`. + * @api public + */ + +MapCache.prototype.has = function mapHas(key) { + return key !== '__proto__' && hasOwn.call(this.__data__, key); +}; + +/** + * Removes `key` and its value from the cache. + * + * ```js + * cache.del('foo'); + * ``` + * @title .del + * @param {String} `key` The key of the value to remove. + * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`. + * @api public + */ + +MapCache.prototype.del = function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +}; diff --git a/node_modules/map-cache/package.json b/node_modules/map-cache/package.json new file mode 100644 index 0000000..8bf0af2 --- /dev/null +++ b/node_modules/map-cache/package.json @@ -0,0 +1,59 @@ +{ + "name": "map-cache", + "description": "Basic cache object for storing key-value pairs.", + "version": "0.2.2", + "homepage": "https://github.com/jonschlinkert/map-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/map-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/map-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "should": "^8.3.1" + }, + "keywords": [ + "cache", + "get", + "has", + "object", + "set", + "storage", + "store" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "config-cache", + "option-cache", + "cache-base" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/map-visit/LICENSE b/node_modules/map-visit/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/map-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/map-visit/README.md b/node_modules/map-visit/README.md new file mode 100644 index 0000000..5ab02d4 --- /dev/null +++ b/node_modules/map-visit/README.md @@ -0,0 +1,155 @@ +# map-visit [![NPM version](https://img.shields.io/npm/v/map-visit.svg?style=flat)](https://www.npmjs.com/package/map-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![NPM total downloads](https://img.shields.io/npm/dt/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/map-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/map-visit) + +> Map `visit` over an array of objects. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save map-visit +``` + +## Usage + +```js +var mapVisit = require('map-visit'); +``` + +## What does this do? + +**Assign/Merge/Extend vs. Visit** + +Let's say you want to add a `set` method to your application that will: + +* set key-value pairs on a `data` object +* extend objects onto the `data` object +* extend arrays of objects onto the data object + +**Example using `extend`** + +Here is one way to accomplish this using Lo-Dash's `extend` (comparable to `Object.assign`): + +```js +var _ = require('lodash'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + _.extend.apply(_, [obj.data].concat(key)); + } else if (typeof key === 'object') { + _.extend(obj.data, key); + } else { + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }} +``` + +The above approach works fine for most use cases. However, **if you also want to emit an event** each time a property is added to the `data` object, or you want more control over what happens as the object is extended, a better approach would be to use `visit`. + +**Example using `visit`** + +In this approach: + +* when an array is passed to `set`, the `mapVisit` library calls the `set` method on each object in the array. +* when an object is passed, `visit` calls `set` on each property in the object. + +As a result, the `data` event will be emitted every time a property is added to `data` (events are just an example, you can use this approach to perform any necessary logic every time the method is called). + +```js +var mapVisit = require('map-visit'); +var visit = require('object-visit'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + mapVisit(obj, 'set', key); + } else if (typeof key === 'object') { + visit(obj, 'set', key); + } else { + // simulate an event-emitter + console.log('emit', key, value); + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); +obj.set({g: 'h', i: 'j', k: 'l'}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }, g: 'h', i: 'j', k: 'l'} + +// events would look something like: +// emit a a +// emit b b +// emit c c +// emit d { e: 'f' } +// emit g h +// emit i j +// emit k l +``` + +## About + +### Related projects + +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [object-visit](https://www.npmjs.com/package/object-visit): Call a specified method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit "Call a specified method on each value in the given object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 15 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 09, 2017._ \ No newline at end of file diff --git a/node_modules/map-visit/index.js b/node_modules/map-visit/index.js new file mode 100644 index 0000000..bc54ccc --- /dev/null +++ b/node_modules/map-visit/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var util = require('util'); +var visit = require('object-visit'); + +/** + * Map `visit` over an array of objects. + * + * @param {Object} `collection` The context in which to invoke `method` + * @param {String} `method` Name of the method to call on `collection` + * @param {Object} `arr` Array of objects. + */ + +module.exports = function mapVisit(collection, method, val) { + if (isObject(val)) { + return visit.apply(null, arguments); + } + + if (!Array.isArray(val)) { + throw new TypeError('expected an array: ' + util.inspect(val)); + } + + var args = [].slice.call(arguments, 3); + + for (var i = 0; i < val.length; i++) { + var ele = val[i]; + if (isObject(ele)) { + visit.apply(null, [collection, method, ele].concat(args)); + } else { + collection[method].apply(collection, [ele].concat(args)); + } + } +}; + +function isObject(val) { + return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object')); +} diff --git a/node_modules/map-visit/package.json b/node_modules/map-visit/package.json new file mode 100644 index 0000000..e8d0f41 --- /dev/null +++ b/node_modules/map-visit/package.json @@ -0,0 +1,74 @@ +{ + "name": "map-visit", + "description": "Map `visit` over an array of objects.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/map-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/map-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/map-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "object-visit": "^1.0.0" + }, + "devDependencies": { + "clone-deep": "^0.2.4", + "extend-shallow": "^2.0.1", + "gulp-format-md": "^0.1.12", + "lodash": "^4.17.4", + "mocha": "^3.2.0" + }, + "keywords": [ + "array", + "arrays", + "function", + "helper", + "invoke", + "key", + "map", + "method", + "object", + "objects", + "value", + "visit", + "visitor" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "collection-visit", + "object-visit" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/matchdep/.jshintrc b/node_modules/matchdep/.jshintrc new file mode 100644 index 0000000..8718952 --- /dev/null +++ b/node_modules/matchdep/.jshintrc @@ -0,0 +1,15 @@ +{ + "loopfunc": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "sub": true, + "undef": true, + "unused": true, + "boss": true, + "eqnull": true, + "node": true +} diff --git a/node_modules/matchdep/.npmignore b/node_modules/matchdep/.npmignore new file mode 100644 index 0000000..605bbb4 --- /dev/null +++ b/node_modules/matchdep/.npmignore @@ -0,0 +1,2 @@ +test +Gruntfile.js \ No newline at end of file diff --git a/node_modules/matchdep/.travis.yml b/node_modules/matchdep/.travis.yml new file mode 100644 index 0000000..6abb72e --- /dev/null +++ b/node_modules/matchdep/.travis.yml @@ -0,0 +1,10 @@ +sudo: false +language: node_js +node_js: + - "0.10" + - "0.12" + - "4" + - "6" + - "8" +before_install: + - npm install -g grunt-cli diff --git a/node_modules/matchdep/LICENSE-MIT b/node_modules/matchdep/LICENSE-MIT new file mode 100644 index 0000000..e30f600 --- /dev/null +++ b/node_modules/matchdep/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Tyler Kellen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/matchdep/README.md b/node_modules/matchdep/README.md new file mode 100644 index 0000000..03c0d75 --- /dev/null +++ b/node_modules/matchdep/README.md @@ -0,0 +1,59 @@ +# matchdep [![Build Status](https://secure.travis-ci.org/tkellen/js-matchdep.svg?branch=master)](http://travis-ci.org/tkellen/js-matchdep) +> Use [micromatch] to filter npm module dependencies by name. + +[![NPM](https://nodei.co/npm/matchdep.png)](https://nodei.co/npm/matchdep/) + +## Examples + +```js +var matchdep = require('matchdep'); + +// Filter dependencies (by autoloading nearest package.json) +matchdep.filter('mini*'); + +// Filter devDependencies (with config string indicating file to be required) +matchdep.filterDev('grunt-contrib-*', './package.json'); + +// Filter peerDependencies (with config string indicating file to be required) +matchdep.filterPeer('foo-{bar,baz}', './some-other.json'); + +// Filter all dependencies (with explicit config provided) +matchdep.filterAll('*', require('./yet-another.json')); + +// Filter all dependencies, exclude grunt (multiple matching patterns) +matchdep.filterAll(['*','!grunt']); +``` + +## Usage + +```js +filter(pattern, config) +filterDev(pattern, config) +filterPeer(pattern, config) +filterAll(pattern, config) +``` + +### pattern +Type: `String|Array` +Default: 'none' + +A [micromatch] compatible match pattern to filter dependencies. + +### config +Type: `String` or `Object` +Default: Path to nearest package.json. + +If config is a string, matchdep will attempt to require it. If it is an object, it will be used directly. + +## Release History + +* 2017-08-18 - v2.0.0 - Upgrade major versions of dependencies, Upgrade devDeps +* 2016-02-09 - v1.0.1 - switch to [micromatch], remove [globule] +* 2015-09-27 - v1.0.0 - throw when no package.json found, update dependencies, remove node 0.8 support +* 2013-10-09 - v0.3.0 - support multiple pattern matches using [globule] +* 2013-10-08 - v0.2.0 - refactor and support filtering peerDependencies +* 2012-11-27 - v0.1.0 - initial release + + +[globule]: https://github.com/cowboy/node-globule +[micromatch]: https://github.com/jonschlinkert/micromatch diff --git a/node_modules/matchdep/lib/matchdep.js b/node_modules/matchdep/lib/matchdep.js new file mode 100644 index 0000000..efbdb9a --- /dev/null +++ b/node_modules/matchdep/lib/matchdep.js @@ -0,0 +1,76 @@ +/* + * matchdep + * https://github.com/tkellen/node-matchdep + * + * Copyright (c) 2012 Tyler Kellen + * Licensed under the MIT license. + */ + +'use strict'; + +var micromatch = require('micromatch'); +var findup = require('findup-sync'); +var resolve = require('resolve').sync; +var stackTrace = require('stack-trace'); +var path = require('path'); + +// export object +var matchdep = module.exports = {}; + +// Ensure configuration has the correct properties. +function loadConfig(config, props) { + // The calling module's path. Unfortunately, because modules are cached, + // module.parent is the FIRST calling module parent, not necessarily the + // current one. + var callerPath = path.dirname(stackTrace.get(loadConfig)[1].getFileName()); + + // If no config defined, resolve to nearest package.json to the calling lib. If not found, throw an error. + if (config == null) { + config = findup('package.json', {cwd: callerPath}); + if (config == null) { + throw new Error('No package.json found.'); + } + } + // If filename was specified with no path parts, make the path absolute so + // that resolve doesn't look in node_module directories for it. + else if (typeof config === 'string' && !/[\\\/]/.test(config)) { + config = path.join(callerPath, config); + } + + // If package is a string, try to require it. + if (typeof config === 'string') { + config = require(resolve(config, {basedir: callerPath})); + } + + // If config is not an object yet, something is amiss. + if (typeof config !== 'object') { + throw new Error('Invalid configuration specified.'); + } + + // For all specified props, populate result object. + var result = {}; + props.forEach(function(prop) { + result[prop] = config[prop] ? Object.keys(config[prop]) : []; + }); + return result; +} + +// What config properties should each method search? +var methods = { + filter: ['dependencies'], + filterDev: ['devDependencies'], + filterPeer: ['peerDependencies'], + filterAll: ['dependencies', 'devDependencies', 'peerDependencies'], +}; + +// Dynamically generate methods. +Object.keys(methods).forEach(function(method) { + var props = methods[method]; + matchdep[method] = function(pattern, config) { + config = loadConfig(config, props); + var search = props.reduce(function(result, prop) { + return result.concat(config[prop]); + }, []); + return micromatch(search, pattern); + }; +}); diff --git a/node_modules/matchdep/node_modules/findup-sync/README.md b/node_modules/matchdep/node_modules/findup-sync/README.md new file mode 100644 index 0000000..58ce20e --- /dev/null +++ b/node_modules/matchdep/node_modules/findup-sync/README.md @@ -0,0 +1,69 @@ +# findup-sync [![Build Status](https://travis-ci.org/js-cli/node-findup-sync.svg)](https://travis-ci.org/js-cli/node-findup-sync) [![NPM version](https://badge.fury.io/js/findup-sync.svg)](http://badge.fury.io/js/findup-sync) + +> Find the first file matching a given pattern in the current directory or the nearest ancestor directory. + +Matching is done with [micromatch][], please report any matching related issues on that repository. + +## Install with [npm](npmjs.org) + +```bash +npm i findup-sync --save +``` + +## Usage + +```js +var findup = require('findup-sync'); +findup(patternOrPatterns [, micromatchOptions]); + +// Start looking in the CWD. +var filepath1 = findup('{a,b}*.txt'); + +// Start looking somewhere else, and ignore case (probably a good idea). +var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true}); +``` + +* `patterns` **{String|Array}**: Glob pattern(s) or file path(s) to match against. +* `options` **{Object}**: Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here. +* `returns` **{String}**: Returns the first matching file. + +## Running tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Contributing + +In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/) + +For bugs and feature requests, [please create an issue](https://github.com/cowboy/node-findup-sync/issues). + +## Release History + +2017-08-07 - v2.0.0 - Drop node 0.8 support, Bump all dependencies (including some Majors) +2017-04-18 - v1.0.0 - Major bump from stable 0.4.3 +2015-01-30 - v0.4.0 - Refactored, not also uses [micromatch][] instead of minimatch. +2015-09-14 - v0.3.0 - updated glob to ~5.0. +2014-12-17 - v0.2.1 - Updated to glob 4.3. +2014-12-16 - v0.2.0 - Removed lodash, updated to glob 4.x. +2014-03-14 - v0.1.3 - Updated dependencies. +2013-03-08 - v0.1.2 - Updated dependencies. Fixed a Node 0.9.x bug. Updated unit tests to work cross-platform. +2012-11-15 - v0.1.1 - Now works without an options object. +2012-11-01 - v0.1.0 - Initial release. + +## Authors + +**"Cowboy" Ben Alman** + ++ [github/cowboy](https://github.com/cowboy) ++ [twitter/cowboy](http://twitter.com/cowboy) + +## License + +Copyright (c) 2012-2016 "Cowboy" Ben Alman +Released under the MIT license + +[micromatch]: http://github.com/jonschlinkert/micromatch diff --git a/node_modules/matchdep/node_modules/findup-sync/index.js b/node_modules/matchdep/node_modules/findup-sync/index.js new file mode 100644 index 0000000..b843495 --- /dev/null +++ b/node_modules/matchdep/node_modules/findup-sync/index.js @@ -0,0 +1,85 @@ +'use strict'; + +/** + * Module dependencies + */ + +var fs = require('fs'); +var path = require('path'); +var isGlob = require('is-glob'); +var resolveDir = require('resolve-dir'); +var detect = require('detect-file'); +var mm = require('micromatch'); + +/** + * @param {String|Array} `pattern` Glob pattern or file path(s) to match against. + * @param {Object} `options` Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify the `options.cwd` property here. + * @return {String} Returns the first matching file. + * @api public + */ + +module.exports = function(patterns, options) { + options = options || {}; + var cwd = path.resolve(resolveDir(options.cwd || '')); + + if (typeof patterns === 'string') { + return lookup(cwd, [patterns], options); + } + + if (!Array.isArray(patterns)) { + throw new TypeError('findup-sync expects a string or array as the first argument.'); + } + + return lookup(cwd, patterns, options); +}; + +function lookup(cwd, patterns, options) { + var len = patterns.length; + var idx = -1; + var res; + + while (++idx < len) { + if (isGlob(patterns[idx])) { + res = matchFile(cwd, patterns[idx], options); + } else { + res = findFile(cwd, patterns[idx], options); + } + if (res) { + return res; + } + } + + var dir = path.dirname(cwd); + if (dir === cwd) { + return null; + } + return lookup(dir, patterns, options); +} + +function matchFile(cwd, pattern, opts) { + var isMatch = mm.matcher(pattern, opts); + var files = tryReaddirSync(cwd); + var len = files.length; + var idx = -1; + + while (++idx < len) { + var name = files[idx]; + var fp = path.join(cwd, name); + if (isMatch(name) || isMatch(fp)) { + return fp; + } + } + return null; +} + +function findFile(cwd, filename, options) { + var fp = cwd ? path.resolve(cwd, filename) : filename; + return detect(fp, options); +} + +function tryReaddirSync(fp) { + try { + return fs.readdirSync(fp); + } catch(err) {} + return []; +} diff --git a/node_modules/matchdep/node_modules/findup-sync/package.json b/node_modules/matchdep/node_modules/findup-sync/package.json new file mode 100644 index 0000000..435aa3a --- /dev/null +++ b/node_modules/matchdep/node_modules/findup-sync/package.json @@ -0,0 +1,44 @@ +{ + "name": "findup-sync", + "description": "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.", + "version": "2.0.0", + "author": "\"Cowboy\" Ben Alman (http://benalman.com)", + "repository": "js-cli/node-findup-sync", + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">= 0.10" + }, + "scripts": { + "lint": "jshint index.js test/support/index.js test/test.js", + "test": "npm run lint && mocha" + }, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "devDependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "jshint": "^2.9.5", + "mocha": "^3.5.0", + "normalize-path": "^2.1.1", + "resolve": "^1.4.0" + }, + "keywords": [ + "file", + "find", + "find-up", + "findup", + "glob", + "match", + "pattern", + "resolve", + "search" + ] +} diff --git a/node_modules/matchdep/node_modules/is-glob/LICENSE b/node_modules/matchdep/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/matchdep/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/matchdep/node_modules/is-glob/README.md b/node_modules/matchdep/node_modules/is-glob/README.md new file mode 100644 index 0000000..6f4404f --- /dev/null +++ b/node_modules/matchdep/node_modules/is-glob/README.md @@ -0,0 +1,142 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +isGlob('abc/?.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +isGlob('abc/\\?.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +## About + +### Related projects + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 40 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [tuvistavie](https://github.com/tuvistavie) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/matchdep/node_modules/is-glob/index.js b/node_modules/matchdep/node_modules/is-glob/index.js new file mode 100644 index 0000000..2ecbe2a --- /dev/null +++ b/node_modules/matchdep/node_modules/is-glob/index.js @@ -0,0 +1,25 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = require('is-extglob'); + +module.exports = function isGlob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) return true; + + var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; + var match; + + while ((match = regex.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; +}; diff --git a/node_modules/matchdep/node_modules/is-glob/package.json b/node_modules/matchdep/node_modules/is-glob/package.json new file mode 100644 index 0000000..53a137d --- /dev/null +++ b/node_modules/matchdep/node_modules/is-glob/package.json @@ -0,0 +1,80 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Daniel Perez (http://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/matchdep/package.json b/node_modules/matchdep/package.json new file mode 100644 index 0000000..85ab669 --- /dev/null +++ b/node_modules/matchdep/package.json @@ -0,0 +1,42 @@ +{ + "name": "matchdep", + "description": "Use micromatch to filter npm module dependencies by name.", + "version": "2.0.0", + "homepage": "https://github.com/tkellen/js-matchdep", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "repository": { + "type": "git", + "url": "git://github.com/tkellen/js-matchdep.git" + }, + "bugs": { + "url": "https://github.com/tkellen/js-matchdep/issues" + }, + "license": "MIT", + "main": "lib/matchdep", + "engines": { + "node": ">= 0.10.0" + }, + "scripts": { + "test": "grunt" + }, + "dependencies": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "devDependencies": { + "grunt": "^1.0.1", + "grunt-contrib-jshint": "^1.1.0", + "grunt-contrib-nodeunit": "^1.0.0" + }, + "keywords": [ + "package.json", + "dependencies", + "devDependencies", + "peerDependencies" + ] +} diff --git a/node_modules/micromatch/CHANGELOG.md b/node_modules/micromatch/CHANGELOG.md new file mode 100644 index 0000000..9d8e5ed --- /dev/null +++ b/node_modules/micromatch/CHANGELOG.md @@ -0,0 +1,37 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [3.0.0] - 2017-04-11 + +TODO. There should be no breaking changes. Please report any regressions. I will [reformat these release notes](https://github.com/micromatch/micromatch/pull/76) and add them to the changelog as soon as I have a chance. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + + +[Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/node_modules/micromatch/LICENSE b/node_modules/micromatch/LICENSE new file mode 100755 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/micromatch/README.md b/node_modules/micromatch/README.md new file mode 100644 index 0000000..5dfa149 --- /dev/null +++ b/node_modules/micromatch/README.md @@ -0,0 +1,1150 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/micromatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [Quickstart](#quickstart) +- [Why use micromatch?](#why-use-micromatch) + * [Matching features](#matching-features) +- [Switching to micromatch](#switching-to-micromatch) + * [From minimatch](#from-minimatch) + * [From multimatch](#from-multimatch) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nobrace](#optionsnobrace) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noext](#optionsnoext) + * [options.nonegate](#optionsnonegate) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Extended globbing](#extended-globbing) + * [extglobs](#extglobs) + * [braces](#braces) + * [regex character classes](#regex-character-classes) + * [regex groups](#regex-groups) + * [POSIX bracket expressions](#posix-bracket-expressions) +- [Notes](#notes) + * [Bash 4.3 parity](#bash-43-parity) + * [Backslashes](#backslashes) +- [Contributing](#contributing) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Latest results](#latest-results) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Quickstart + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); +``` + +The [main export](#micromatch) takes a list of strings and one or more glob patterns: + +```js +console.log(mm(['foo', 'bar', 'qux'], ['f*', 'b*'])); +//=> ['foo', 'bar'] +``` + +Use [.isMatch()](#ismatch) to get true/false: + +```js +console.log(mm.isMatch('foo', 'f*')); +//=> true +``` + +[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! + +## Why use micromatch? + +> micromatch is a [drop-in replacement](#switching-to-micromatch) for minimatch and multimatch + +* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Micromatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and maintain. +* More consistently accurate matching [than minimatch](https://github.com/yarnpkg/yarn/pull/3339), with more than 36,000 [test assertions](./test) to prove it. +* More complete support for the Bash 4.3 specification than minimatch and multimatch. In fact, micromatch passes _all of the spec tests_ from bash, including some that bash still fails. +* [Faster matching](#benchmarks), from a combination of optimized glob patterns, faster algorithms, and regex caching. +* [Micromatch is safer](https://github.com/micromatch/braces#braces-is-safe), and is not subject to DoS with brace patterns, like minimatch and multimatch. +* More reliable windows support than minimatch and multimatch. + +### Matching features + +* Support for multiple glob patterns (no need for wrappers like multimatch) +* Wildcards (`**`, `*.js`) +* Negation (`'!a/*.js'`, `'*!(b).js']`) +* [extglobs](https://github.com/micromatch/extglob) (`+(x|y)`, `!(a|b)`) +* [POSIX character classes](https://github.com/micromatch/expand-brackets) (`[[:alpha:][:digit:]]`) +* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) +* regex character classes (`foo-[1-5].js`) +* regex logical "or" (`foo/(abc|xyz).js`) + +You can mix and match these features to create whatever patterns you need! + +## Switching to micromatch + +There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information. + +### From minimatch + +Use [mm.isMatch()](#ismatch) instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use [mm.match()](#match) instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### From multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +## API + +### [micromatch](index.js#L41) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); + +console.log(mm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L93) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm.match(list, pattern[, options]); + +console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L154) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.isMatch(string, pattern[, options]); + +console.log(mm.isMatch('a.a', '*.a')); +//=> true +console.log(mm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L192) + +Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.some(list, patterns[, options]); + +console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L228) + +Returns true if every string in the given `list` matches any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.every(list, patterns[, options]); + +console.log(mm.every('foo.js', ['foo.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L260) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.any(string, patterns[, options]); + +console.log(mm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(mm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L308) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.all(string, patterns[, options]); + +console.log(mm.all('foo.js', ['foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(mm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L340) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.not(list, patterns[, options]); + +console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L376) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var mm = require('micromatch'); +mm.contains(string, pattern[, options]); + +console.log(mm.contains('aa/bb/cc', '*b')); +//=> true +console.log(mm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L432) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(mm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L461) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var mm = require('micromatch'); +mm.matcher(pattern[, options]); + +var isMatch = mm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L536) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var mm = require('micromatch'); +mm.capture(pattern, string[, options]); + +console.log(mm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(mm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L571) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.makeRe(pattern[, options]); + +console.log(mm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.braces](index.js#L618) + +Expand the given brace `pattern`. + +**Params** + +* `pattern` **{String}**: String with brace pattern to expand. +* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. +* `returns` **{Array}** + +**Example** + +```js +var mm = require('micromatch'); +console.log(mm.braces('foo/{a,b}/bar')); +//=> ['foo/(a|b)/bar'] + +console.log(mm.braces('foo/{a,b}/bar', {expand: true})); +//=> ['foo/(a|b)/bar'] +``` + +### [.create](index.js#L685) + +Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var mm = require('micromatch'); +mm.create(pattern[, options]); + +console.log(mm.create('abc/*.js')); +// [{ options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 }] +``` + +### [.parse](index.js#L732) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var mm = require('micromatch'); +mm.parse(pattern[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L780) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var mm = require('micromatch'); +mm.compile(ast[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(mm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L801) + +Clear the regex cache. + +**Example** + +```js +mm.clearCache(); +``` + +## Options + +* [basename](#optionsbasename) +* [bash](#optionsbash) +* [cache](#optionscache) +* [dot](#optionsdot) +* [failglob](#optionsfailglob) +* [ignore](#optionsignore) +* [matchBase](#optionsmatchBase) +* [nobrace](#optionsnobrace) +* [nocase](#optionsnocase) +* [nodupes](#optionsnodupes) +* [noext](#optionsnoext) +* [noglobstar](#optionsnoglobstar) +* [nonull](#optionsnonull) +* [nullglob](#optionsnullglob) +* [snapdragon](#optionssnapdragon) +* [sourcemap](#optionssourcemap) +* [unescape](#optionsunescape) +* [unixify](#optionsunixify) + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +**Type**: `Boolean` + +**Default**: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +**Type**: `Boolean` + +**Default**: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(mm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(mm(files, '[a-c]*', {bash: false})); +``` + +### options.cache + +Disable regex and function memoization. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +**Type**: `Boolean` + +**Default**: `false` + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.ignore + +String or array of glob patterns to match files to ignore. + +**Type**: `String|Array` + +**Default**: `undefined` + +### options.matchBase + +Alias for [options.basename](#options-basename). + +### options.nobrace + +Disable expansion of brace patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nobrace`. + +**Type**: `Boolean` + +**Default**: `undefined` + +See [braces](https://github.com/micromatch/braces) for more information about extended brace expansion. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.nodupes + +Remove duplicate elements from the result array. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['a/b/c', 'a/b/c'], 'a/b/c'); +//=> ['a/b/c', 'a/b/c'] + +mm.match(['a/b/c', 'a/b/c'], 'a/b/c', {nodupes: true}); +//=> ['abc'] +``` + +### options.noext + +Disable extglob support, so that extglobs are regarded as literal characters. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Examples** + +```js +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)'); +//=> ['a/b', 'a/!(z)'] + +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', {noext: true}); +//=> ['a/!(z)'] (matches only as literal characters) +``` + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.noglobstar + +Disable matching with globstars (`**`). + +**Type**: `Boolean` + +**Default**: `undefined` + +```js +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon), to customize parsers or compilers. + +**Type**: `Object` + +**Default**: `undefined` + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +_(Note that sourcemaps are currently not enabled for brace patterns)_ + +**Examples** + +``` js +var mm = require('micromatch'); +var pattern = '*(*(of*(a)x)z)'; + +var res = mm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = mm.parse('abc/**/*.js'); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } + +var ast = mm.parse(pattern); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC', +// sourcesContent: [ '*(*(of*(a)x)z)' ] } +``` + +### options.unescape + +Remove backslashes from returned matches. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +mm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +mm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +**Type**: `Boolean` + +**Default**: `true` on windows, `false` everywhere else + +**Example** + +```js +mm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +mm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +## Extended globbing + +Micromatch also supports extended globbing features. + +### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | +| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | +| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | + +* Note that `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/micromatch/extglob). Visit that library for the full range of options or to report extglob related issues. + +### braces + +Brace patterns can be used to match specific ranges or sets of characters. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. + +### regex character classes + +Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. + +### POSIX bracket expressions + +POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true + +mm.isMatch('a1', '[[:alpha:][:alpha:]]'); +//=> false +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about bracket expressions. + +*** + +## Notes + +### Bash 4.3 parity + +Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. + +However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. + +### Backslashes + +There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. + +* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows. This is consistent with bash behavior. +* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. + +We made this decision for micromatch for a couple of reasons: + +* consistency with bash conventions. +* glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. + +**A note about joining paths to globs** + +Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. + +In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. + +## Contributing + +All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. + +**Bug reports** + +Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: + +* [research existing issues first](../../issues) (open and closed) +* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern +* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js +* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. + +**Platform issues** + +It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmark +``` + +### Latest results + +As of February 18, 2018 (longer bars are better): + +```sh +# braces-globstar-large-list (485691 bytes) + micromatch ██████████████████████████████████████████████████ (517 ops/sec ±0.49%) + minimatch █ (18.92 ops/sec ±0.54%) + multimatch █ (18.94 ops/sec ±0.62%) + + micromatch is faster by an avg. of 2,733% + +# braces-multiple (3362 bytes) + micromatch ██████████████████████████████████████████████████ (33,625 ops/sec ±0.45%) + minimatch (2.92 ops/sec ±3.26%) + multimatch (2.90 ops/sec ±2.76%) + + micromatch is faster by an avg. of 1,156,935% + +# braces-range (727 bytes) + micromatch █████████████████████████████████████████████████ (155,220 ops/sec ±0.56%) + minimatch ██████ (20,186 ops/sec ±1.27%) + multimatch ██████ (19,809 ops/sec ±0.60%) + + micromatch is faster by an avg. of 776% + +# braces-set (2858 bytes) + micromatch █████████████████████████████████████████████████ (24,354 ops/sec ±0.92%) + minimatch █████ (2,566 ops/sec ±0.56%) + multimatch ████ (2,431 ops/sec ±1.25%) + + micromatch is faster by an avg. of 975% + +# globstar-large-list (485686 bytes) + micromatch █████████████████████████████████████████████████ (504 ops/sec ±0.45%) + minimatch ███ (33.36 ops/sec ±1.08%) + multimatch ███ (33.19 ops/sec ±1.35%) + + micromatch is faster by an avg. of 1,514% + +# globstar-long-list (90647 bytes) + micromatch ██████████████████████████████████████████████████ (2,694 ops/sec ±1.08%) + minimatch ████████████████ (870 ops/sec ±1.09%) + multimatch ████████████████ (862 ops/sec ±0.84%) + + micromatch is faster by an avg. of 311% + +# globstar-short-list (182 bytes) + micromatch ██████████████████████████████████████████████████ (328,921 ops/sec ±1.06%) + minimatch █████████ (64,808 ops/sec ±1.42%) + multimatch ████████ (57,991 ops/sec ±2.11%) + + micromatch is faster by an avg. of 536% + +# no-glob (701 bytes) + micromatch █████████████████████████████████████████████████ (415,935 ops/sec ±0.36%) + minimatch ███████████ (92,730 ops/sec ±1.44%) + multimatch █████████ (81,958 ops/sec ±2.13%) + + micromatch is faster by an avg. of 476% + +# star-basename-long (12339 bytes) + micromatch █████████████████████████████████████████████████ (7,963 ops/sec ±0.36%) + minimatch ███████████████████████████████ (5,072 ops/sec ±0.83%) + multimatch ███████████████████████████████ (5,028 ops/sec ±0.40%) + + micromatch is faster by an avg. of 158% + +# star-basename-short (349 bytes) + micromatch ██████████████████████████████████████████████████ (269,552 ops/sec ±0.70%) + minimatch ██████████████████████ (122,457 ops/sec ±1.39%) + multimatch ████████████████████ (110,788 ops/sec ±1.99%) + + micromatch is faster by an avg. of 231% + +# star-folder-long (19207 bytes) + micromatch █████████████████████████████████████████████████ (3,806 ops/sec ±0.38%) + minimatch ████████████████████████████ (2,204 ops/sec ±0.32%) + multimatch ██████████████████████████ (2,020 ops/sec ±1.07%) + + micromatch is faster by an avg. of 180% + +# star-folder-short (551 bytes) + micromatch ██████████████████████████████████████████████████ (249,077 ops/sec ±0.40%) + minimatch ███████████ (59,431 ops/sec ±1.67%) + multimatch ███████████ (55,569 ops/sec ±1.43%) + + micromatch is faster by an avg. of 433% +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 457 | [jonschlinkert](https://github.com/jonschlinkert) | +| 12 | [es128](https://github.com/es128) | +| 8 | [doowb](https://github.com/doowb) | +| 3 | [paulmillr](https://github.com/paulmillr) | +| 2 | [TrySound](https://github.com/TrySound) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [charlike-old](https://github.com/charlike-old) | +| 1 | [amilajack](https://github.com/amilajack) | +| 1 | [mrmlnc](https://github.com/mrmlnc) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [DianeLooney](https://github.com/DianeLooney) | +| 1 | [UltCombo](https://github.com/UltCombo) | +| 1 | [tomByrer](https://github.com/tomByrer) | +| 1 | [fidian](https://github.com/fidian) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/node_modules/micromatch/index.js b/node_modules/micromatch/index.js new file mode 100644 index 0000000..fe02f2c --- /dev/null +++ b/node_modules/micromatch/index.js @@ -0,0 +1,877 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var braces = require('braces'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var mm = require('micromatch'); + * mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function micromatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return micromatch.match(list, patterns[0], options); + } + + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options)); + } else { + keep.push.apply(keep, micromatch.match(list, pattern, options)); + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var mm = require('micromatch'); + * mm.match(list, pattern[, options]); + * + * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +micromatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, micromatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = micromatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.isMatch(string, pattern[, options]); + * + * console.log(mm.isMatch('a.a', '*.a')); + * //=> true + * console.log(mm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +micromatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, micromatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the strings in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length === 1) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length !== 1) { + return false; + } + } + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var mm = require('micromatch'); + * mm.any(string, patterns[, options]); + * + * console.log(mm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(mm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (micromatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * var mm = require('micromatch'); + * mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + if (typeof patterns === 'string') { + patterns = [patterns]; + } + for (var i = 0; i < patterns.length; i++) { + if (!micromatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + var unixify = utils.unixify(opts); + list = utils.arrayify(list).map(unixify); + + var matches = utils.diff(list, micromatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, micromatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +micromatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return micromatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +micromatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var mm = require('micromatch'); + * mm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = micromatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var mm = require('micromatch'); + * mm.matcher(pattern[, options]); + * + * var isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = function matcher(pattern, options) { + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = micromatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (micromatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + var fn = test(re); + Object.defineProperty(fn, 'result', { + configurable: true, + enumerable: false, + value: re.result + }); + return fn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * var mm = require('micromatch'); + * mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = function(pattern, str, options) { + var re = micromatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var result = micromatch.create(pattern, options); + var ast_array = []; + var output = result.map(function(obj) { + obj.ast.state = obj.state; + ast_array.push(obj.ast); + return obj.output; + }); + + var regex = toRegex(output.join('|'), options); + Object.defineProperty(regex, 'result', { + configurable: true, + enumerable: false, + value: ast_array + }); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Expand the given brace `pattern`. + * + * ```js + * var mm = require('micromatch'); + * console.log(mm.braces('foo/{a,b}/bar')); + * //=> ['foo/(a|b)/bar'] + * + * console.log(mm.braces('foo/{a,b}/bar', {expand: true})); + * //=> ['foo/(a|b)/bar'] + * ``` + * @param {String} `pattern` String with brace pattern to expand. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = function(pattern, options) { + if (typeof pattern !== 'string' && !Array.isArray(pattern)) { + throw new TypeError('expected pattern to be an array or string'); + } + + function expand() { + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return utils.arrayify(pattern); + } + return braces(pattern, options); + } + + return memoize('braces', pattern, options, expand); +}; + +/** + * Proxy to the [micromatch.braces](#method), for parity with + * minimatch. + */ + +micromatch.braceExpand = function(pattern, options) { + var opts = extend({}, options, {expand: true}); + return micromatch.braces(pattern, opts); +}; + +/** + * Parses the given glob `pattern` and returns an array of abstract syntax + * trees (ASTs), with the compiled `output` and optional source `map` on + * each AST. + * + * ```js + * var mm = require('micromatch'); + * mm.create(pattern[, options]); + * + * console.log(mm.create('abc/*.js')); + * // [{ options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 }] + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +micromatch.create = function(pattern, options) { + return memoize('create', pattern, options, function() { + function create(str, opts) { + return micromatch.compile(micromatch.parse(str, opts), opts); + } + + pattern = micromatch.braces(pattern, options); + var len = pattern.length; + var idx = -1; + var res = []; + + while (++idx < len) { + res.push(create(pattern[idx], options)); + } + return res; + }); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.parse(pattern[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +micromatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.compile(ast[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(mm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +micromatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = micromatch.parse(ast, options); + } + + return memoize('compile', ast.input, options, function() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + }); +}; + +/** + * Clear the regex cache. + * + * ```js + * mm.clearCache(); + * ``` + * @api public + */ + +micromatch.clearCache = function() { + micromatch.cache.caches = {}; +}; + +/** + * Returns true if the given value is effectively an empty string + */ + +function isEmptyString(val) { + return String(val) === '' || String(val) === './'; +} + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `micromatch` + */ + +micromatch.compilers = compilers; +micromatch.parsers = parsers; +micromatch.caches = cache.caches; + +/** + * Expose `micromatch` + * @type {Function} + */ + +module.exports = micromatch; diff --git a/node_modules/micromatch/lib/.DS_Store b/node_modules/micromatch/lib/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/node_modules/micromatch/lib/.DS_Store differ diff --git a/node_modules/micromatch/lib/cache.js b/node_modules/micromatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/node_modules/micromatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/node_modules/micromatch/lib/compilers.js b/node_modules/micromatch/lib/compilers.js new file mode 100644 index 0000000..85cda4f --- /dev/null +++ b/node_modules/micromatch/lib/compilers.js @@ -0,0 +1,77 @@ +'use strict'; + +var nanomatch = require('nanomatch'); +var extglob = require('extglob'); + +module.exports = function(snapdragon) { + var compilers = snapdragon.compiler.compilers; + var opts = snapdragon.options; + + // register nanomatch compilers + snapdragon.use(nanomatch.compilers); + + // get references to some specific nanomatch compilers before they + // are overridden by the extglob and/or custom compilers + var escape = compilers.escape; + var qmark = compilers.qmark; + var slash = compilers.slash; + var star = compilers.star; + var text = compilers.text; + var plus = compilers.plus; + var dot = compilers.dot; + + // register extglob compilers or escape exglobs if disabled + if (opts.extglob === false || opts.noext === true) { + snapdragon.compiler.use(escapeExtglobs); + } else { + snapdragon.use(extglob.compilers); + } + + snapdragon.use(function() { + this.options.star = this.options.star || function(/*node*/) { + return '[^\\\\/]*?'; + }; + }); + + // custom micromatch compilers + snapdragon.compiler + + // reset referenced compiler + .set('dot', dot) + .set('escape', escape) + .set('plus', plus) + .set('slash', slash) + .set('qmark', qmark) + .set('star', star) + .set('text', text); +}; + +function escapeExtglobs(compiler) { + compiler.set('paren', function(node) { + var val = ''; + visit(node, function(tok) { + if (tok.val) val += (/^\W/.test(tok.val) ? '\\' : '') + tok.val; + }); + return this.emit(val, node); + }); + + /** + * Visit `node` with the given `fn` + */ + + function visit(node, fn) { + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + + /** + * Map visit over array of `nodes`. + */ + + function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } + } +} diff --git a/node_modules/micromatch/lib/parsers.js b/node_modules/micromatch/lib/parsers.js new file mode 100644 index 0000000..f80498c --- /dev/null +++ b/node_modules/micromatch/lib/parsers.js @@ -0,0 +1,83 @@ +'use strict'; + +var extglob = require('extglob'); +var nanomatch = require('nanomatch'); +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); +var not; + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT = '([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+'; +var createNotRegex = function(opts) { + return not || (not = textRegex(TEXT)); +}; + +/** + * Parsers + */ + +module.exports = function(snapdragon) { + var parsers = snapdragon.parser.parsers; + + // register nanomatch parsers + snapdragon.use(nanomatch.parsers); + + // get references to some specific nanomatch parsers before they + // are overridden by the extglob and/or parsers + var escape = parsers.escape; + var slash = parsers.slash; + var qmark = parsers.qmark; + var plus = parsers.plus; + var star = parsers.star; + var dot = parsers.dot; + + // register extglob parsers + snapdragon.use(extglob.parsers); + + // custom micromatch parsers + snapdragon.parser + .use(function() { + // override "notRegex" created in nanomatch parser + this.notRegex = /^\!+(?!\()/; + }) + // reset the referenced parsers + .capture('escape', escape) + .capture('slash', slash) + .capture('qmark', qmark) + .capture('star', star) + .capture('plus', plus) + .capture('dot', dot) + + /** + * Override `text` parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(createNotRegex(this.options)); + if (!m || !m[0]) return; + + // escape regex boundary characters and simple brackets + var val = m[0].replace(/([[\]^$])/g, '\\$1'); + + return pos({ + type: 'text', + val: val + }); + }); +}; + +/** + * Create text regex + */ + +function textRegex(pattern) { + var notStr = regexNot.create(pattern, {contains: true, strictClose: false}); + var prefix = '(?:[\\^]|\\\\|'; + return toRegex(prefix + notStr + ')', {strictClose: false}); +} diff --git a/node_modules/micromatch/lib/utils.js b/node_modules/micromatch/lib/utils.js new file mode 100644 index 0000000..f0ba917 --- /dev/null +++ b/node_modules/micromatch/lib/utils.js @@ -0,0 +1,309 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || process.platform === 'win32'; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (utils.typeOf(options) !== 'object') { + return pattern; + } + var val = pattern; + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + val += ';' + key + '=' + String(options[key]); + } + return val; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\\/\s]/g, '\\$&'); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) !== '.') { + return str; + } + var ch = str.charAt(1); + if (utils.isSlash(ch)) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(path.basename(filepath)); + }; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + options = options || {}; + return function(filepath) { + if (utils.isWindows() || options.unixify === true) { + filepath = utils.toPosixPath(filepath); + } + if (options.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (options.unescape === true) { + filepath = utils.unescape(filepath); + } + return filepath; + }; +}; diff --git a/node_modules/micromatch/node_modules/extend-shallow/LICENSE b/node_modules/micromatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/micromatch/node_modules/extend-shallow/README.md b/node_modules/micromatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/extend-shallow/index.js b/node_modules/micromatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/micromatch/node_modules/extend-shallow/package.json b/node_modules/micromatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/micromatch/node_modules/is-extendable/LICENSE b/node_modules/micromatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/is-extendable/README.md b/node_modules/micromatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/is-extendable/index.d.ts b/node_modules/micromatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/micromatch/node_modules/is-extendable/index.js b/node_modules/micromatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/micromatch/node_modules/is-extendable/package.json b/node_modules/micromatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/micromatch/node_modules/is-plain-object/LICENSE b/node_modules/micromatch/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/micromatch/node_modules/is-plain-object/README.md b/node_modules/micromatch/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/is-plain-object/index.d.ts b/node_modules/micromatch/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/micromatch/node_modules/is-plain-object/index.js b/node_modules/micromatch/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/micromatch/node_modules/is-plain-object/package.json b/node_modules/micromatch/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md b/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/kind-of/LICENSE b/node_modules/micromatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/micromatch/node_modules/kind-of/README.md b/node_modules/micromatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/kind-of/index.js b/node_modules/micromatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/micromatch/node_modules/kind-of/package.json b/node_modules/micromatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json new file mode 100644 index 0000000..4475155 --- /dev/null +++ b/node_modules/micromatch/package.json @@ -0,0 +1,147 @@ +{ + "name": "micromatch", + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", + "version": "3.1.10", + "homepage": "https://github.com/micromatch/micromatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Amila Welihinda (amilajack.com)", + "Bogdan Chadkin (https://github.com/TrySound)", + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Elan Shanker (https://github.com/es128)", + "Fabrício Matté (https://ultcombo.js.org)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (https://kolarik.sk)", + "Olsten Larck (https://i.am.charlike.online)", + "Paul Miller (paulmillr.com)", + "Tom Byrer (https://github.com/tomByrer)", + "Tyler Akins (http://rumkin.com)", + "(https://github.com/DianeLooney)" + ], + "repository": "micromatch/micromatch", + "bugs": { + "url": "https://github.com/micromatch/micromatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "gulp-unused": "^0.2.1", + "is-windows": "^1.0.2", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./benchmark/helper.js" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "nanomatch" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "expand-brackets", + "extglob", + "glob-object", + "minimatch", + "multimatch", + "snapdragon" + ] + } +} diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +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. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md new file mode 100644 index 0000000..33ede1d --- /dev/null +++ b/node_modules/minimatch/README.md @@ -0,0 +1,230 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### allowWindowsEscape + +Windows path separator `\` is by default converted to `/`, which +prohibits the usage of `\` as a escape character. This flag skips that +behavior and allows using the escape character. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..fda45ad --- /dev/null +++ b/node_modules/minimatch/minimatch.js @@ -0,0 +1,947 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json new file mode 100644 index 0000000..566efdf --- /dev/null +++ b/node_modules/minimatch/package.json @@ -0,0 +1,33 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "devDependencies": { + "tap": "^15.1.6" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ] +} diff --git a/node_modules/mixin-deep/LICENSE b/node_modules/mixin-deep/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/mixin-deep/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/mixin-deep/README.md b/node_modules/mixin-deep/README.md new file mode 100644 index 0000000..111bde0 --- /dev/null +++ b/node_modules/mixin-deep/README.md @@ -0,0 +1,80 @@ +# mixin-deep [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep) + +> Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save mixin-deep +``` + +## Usage + +```js +var mixinDeep = require('mixin-deep'); + +mixinDeep({a: {aa: 'aa'}}, {a: {bb: 'bb'}}, {a: {cc: 'cc'}}); +//=> { a: { aa: 'aa', bb: 'bb', cc: 'cc' } } +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [defaults-deep](https://www.npmjs.com/package/defaults-deep): Like `extend` but recursively copies only the missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/defaults-deep "Like `extend` but recursively copies only the missing properties/values to the target object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://github.com/jonschlinkert/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object "Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 09, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/index.js b/node_modules/mixin-deep/index.js new file mode 100644 index 0000000..47face2 --- /dev/null +++ b/node_modules/mixin-deep/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var forIn = require('for-in'); + +function mixinDeep(target, objects) { + var len = arguments.length, i = 0; + while (++i < len) { + var obj = arguments[i]; + if (isObject(obj)) { + forIn(obj, copy, target); + } + } + return target; +} + +/** + * Copy properties from the source object to the + * target object. + * + * @param {*} `val` + * @param {String} `key` + */ + +function copy(val, key) { + if (!isValidKey(key)) { + return; + } + + var obj = this[key]; + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + this[key] = val; + } +} + +/** + * Returns true if `val` is an object or function. + * + * @param {any} val + * @return {Boolean} + */ + +function isObject(val) { + return isExtendable(val) && !Array.isArray(val); +} + +/** + * Returns true if `key` is a valid key to use when extending objects. + * + * @param {String} `key` + * @return {Boolean} + */ + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +/** + * Expose `mixinDeep` + */ + +module.exports = mixinDeep; diff --git a/node_modules/mixin-deep/node_modules/is-extendable/LICENSE b/node_modules/mixin-deep/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/mixin-deep/node_modules/is-extendable/README.md b/node_modules/mixin-deep/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts b/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/mixin-deep/node_modules/is-extendable/index.js b/node_modules/mixin-deep/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/mixin-deep/node_modules/is-extendable/package.json b/node_modules/mixin-deep/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/mixin-deep/node_modules/is-plain-object/LICENSE b/node_modules/mixin-deep/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/mixin-deep/node_modules/is-plain-object/README.md b/node_modules/mixin-deep/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/node_modules/is-plain-object/index.d.ts b/node_modules/mixin-deep/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/mixin-deep/node_modules/is-plain-object/index.js b/node_modules/mixin-deep/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/mixin-deep/node_modules/is-plain-object/package.json b/node_modules/mixin-deep/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/mixin-deep/package.json b/node_modules/mixin-deep/package.json new file mode 100644 index 0000000..0581c46 --- /dev/null +++ b/node_modules/mixin-deep/package.json @@ -0,0 +1,65 @@ +{ + "name": "mixin-deep", + "description": "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.", + "version": "1.3.2", + "homepage": "https://github.com/jonschlinkert/mixin-deep", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/mixin-deep", + "bugs": { + "url": "https://github.com/jonschlinkert/mixin-deep/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "should": "^13.1.3" + }, + "keywords": [ + "deep", + "extend", + "key", + "keys", + "merge", + "mixin", + "object", + "prop", + "properties", + "util", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "defaults-deep", + "extend-shallow", + "merge-deep", + "mixin-object" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000..6a31c81 --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/mute-stdout/LICENSE b/node_modules/mute-stdout/LICENSE new file mode 100644 index 0000000..695f76d --- /dev/null +++ b/node_modules/mute-stdout/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2018 Blaine Bublitz and Eric Schoffstall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/mute-stdout/README.md b/node_modules/mute-stdout/README.md new file mode 100644 index 0000000..e4bdbb0 --- /dev/null +++ b/node_modules/mute-stdout/README.md @@ -0,0 +1,55 @@ +

+ + + +

+ +# mute-stdout + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Mute and unmute stdout. + +## Usage + +```js +var stdout = require('mute-stdout'); + +stdout.mute(); + +console.log('will not print'); + +stdout.unmute(); + +console.log('will print'); +``` + +## API + +### mute() + +Mutes the `process.stdout` stream by replacing the `write` method with a no-op function. + +### unmute() + +Unmutes the `process.stdout` stream by restoring the original `write` method. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/mute-stdout.svg +[npm-url]: https://www.npmjs.com/package/mute-stdout +[npm-image]: http://img.shields.io/npm/v/mute-stdout.svg + +[travis-url]: https://travis-ci.org/gulpjs/mute-stdout +[travis-image]: http://img.shields.io/travis/gulpjs/mute-stdout.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/mute-stdout +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/mute-stdout.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/mute-stdout +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/mute-stdout/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/mute-stdout/index.js b/node_modules/mute-stdout/index.js new file mode 100644 index 0000000..5ba0e53 --- /dev/null +++ b/node_modules/mute-stdout/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var ogWrite = process.stdout.write; + +var muteStdout = { mute: mute, unmute: noop }; + +function noop() {} + +function mute() { + muteStdout.unmute = unmute; + process.stdout.write = noop; +} + +function unmute() { + process.stdout.write = ogWrite; + muteStdout.unmute = noop; +} + +module.exports = muteStdout; diff --git a/node_modules/mute-stdout/package.json b/node_modules/mute-stdout/package.json new file mode 100644 index 0000000..810ea06 --- /dev/null +++ b/node_modules/mute-stdout/package.json @@ -0,0 +1,40 @@ +{ + "name": "mute-stdout", + "version": "1.0.1", + "description": "Mute and unmute stdout.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/mute-stdout", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3" + }, + "keywords": [ + "mute", + "silence is golden", + "stdout" + ] +} diff --git a/node_modules/nanomatch/CHANGELOG.md b/node_modules/nanomatch/CHANGELOG.md new file mode 100644 index 0000000..8c3aead --- /dev/null +++ b/node_modules/nanomatch/CHANGELOG.md @@ -0,0 +1,57 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0] - 2017-04-11 + +**Fixed** + +- adds support for unclosed quotes + +**Added** + +- adds support for `options.noglobstar` + +### [1.0.4] - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3] - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +- More windows path edge cases + +**Added** + +- Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +[Unreleased]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/nanomatch/LICENSE b/node_modules/nanomatch/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/node_modules/nanomatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-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. diff --git a/node_modules/nanomatch/README.md b/node_modules/nanomatch/README.md new file mode 100644 index 0000000..bdd35a9 --- /dev/null +++ b/node_modules/nanomatch/README.md @@ -0,0 +1,1148 @@ +# nanomatch [![NPM version](https://img.shields.io/npm/v/nanomatch.svg?style=flat)](https://www.npmjs.com/package/nanomatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![NPM total downloads](https://img.shields.io/npm/dt/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/nanomatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/nanomatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/nanomatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/nanomatch) + +> Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces) + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [What is nanomatch?](#what-is-nanomatch) +- [Getting started](#getting-started) + * [Installing nanomatch](#installing-nanomatch) + * [Usage](#usage) +- [Documentation](#documentation) + * [Escaping](#escaping) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonegate](#optionsnonegate) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.slash](#optionsslash) + * [options.star](#optionsstar) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Features](#features) +- [Bash expansion libs](#bash-expansion-libs) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Nanomatch vs. Minimatch vs. Multimatch](#nanomatch-vs-minimatch-vs-multimatch) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save nanomatch +``` + +
+Release history + +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog)_): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes +* `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0](https://github.com/micromatch/nanomatch/compare/1.0.4...1.1.0) - 2017-04-11 + +**Fixed** + +* adds support for unclosed quotes + +**Added** + +* adds support for `options.noglobstar` + +### [1.0.4](https://github.com/micromatch/nanomatch/compare/1.0.3...1.0.4) - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3](https://github.com/micromatch/nanomatch/compare/1.0.1...1.0.3) - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +* More windows path edge cases + +**Added** + +* Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1](https://github.com/micromatch/nanomatch/compare/1.0.0...1.0.1) - 2016-12-12 + +**Added** + +* Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0](https://github.com/micromatch/nanomatch/compare/0.1.0...1.0.0) - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +
+ +## What is nanomatch? + +Nanomatch is a fast and accurate glob matcher with full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +**Learn more** + +* [Getting started](#getting-started): learn how to install and begin using nanomatch +* [Features](#features): jump to info about supported patterns, and a glob matching reference +* [API documentation](#api): jump to available options and methods +* [Unit tests](test): visit unit tests. there is no better way to learn a code library than spending time the unit tests. Nanomatch has 36,000 unit tests - go become a glob matching ninja! + +
+How is this different? + +**Speed and accuracy** + +Nanomatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which results in: + +* Granular control over the entire conversion process in a way that is easy to understand, reason about, and customize. +* Faster matching, from a combination of optimized glob patterns and (optional) caching. +* Much greater accuracy than minimatch. In fact, nanomatch passes _all of the spec tests_ from bash, including some that bash still fails. However, since there is no real specification for globs, if you encounter a pattern that yields unexpected match results [after researching previous issues](../../issues), [please let us know](../../issues/new). + +**Basic globbing only** + +Nanomatch supports [basic globbing only](#features), which is limited to `*`, `**`, `?` and regex-like brackets. + +If you need support for the other [bash "expansion" types](#bash-expansion-libs) (in addition to the wildcard matching provided by nanomatch), consider using [micromatch](https://github.com/micromatch/micromatch) instead. _(micromatch >=3.0.0 uses the nanomatch parser and compiler for basic glob matching)_ + +
+ +## Getting started + +### Installing nanomatch + +**Install with [yarn](https://yarnpkg.com/)** + +```sh +$ yarn add nanomatch +``` + +**Install with [npm](https://npmjs.com)** + +```sh +$ npm install nanomatch +``` + +### Usage + +Add nanomatch to your project using node's `require()` system: + +```js +var nanomatch = require('nanomatch'); + +// the main export is a function that takes an array of strings to match +// and a string or array of patterns to use for matching +nanomatch(list, patterns[, options]); +``` + +**Params** + +* `list` **{String|Array}**: List of strings to perform matches against. This is often a list of file paths. +* `patterns` **{String|Array}**: One or more [glob paterns](#features) to use for matching. +* `options` **{Object}**: Any [supported options](#options) may be passed + +**Examples** + +```js +var nm = require('nanomatch'); +console.log(nm(['a', 'b/b', 'c/c/c'], '*')); +//=> ['a'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '*/*')); +//=> ['b/b'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '**')); +//=> ['a', 'b/b', 'c/c/c'] +``` + +See the [API documentation](#api) for available methods and [options](https://github.com/einaros/options.js). + +## Documentation + +### Escaping + +_Backslashes and quotes_ can be used to escape characters, forcing nanomatch to regard those characters as a literal characters. + +**Backslashes** + +Use backslashes to escape single characters. For example, the following pattern would match `foo/*/bar` exactly: + +```js +'foo/\*/bar' +``` + +The following pattern would match `foo/` followed by a literal `*`, followed by zero or more of any characters besides `/`, followed by `/bar`. + +```js +'foo/\**/bar' +``` + +**Quoted strings** + +Use single or double quotes to escape sequences of characters. For example, the following patterns would match `foo/**/bar` exactly: + +```js +'foo/"**"/bar' +'foo/\'**\'/bar' +"foo/'**'/bar" +``` + +**Matching literal quotes** + +If you need to match quotes literally, you can escape them as well. For example, the following will match `foo/"*"/bar`, `foo/"a"/bar`, `foo/"b"/bar`, or `foo/"c"/bar`: + +```js +'foo/\\"*\\"/bar' +``` + +And the following will match `foo/'*'/bar`, `foo/'a'/bar`, `foo/'b'/bar`, or `foo/'c'/bar`: + +```js +'foo/\\\'*\\\'/bar' +``` + +## API + +### [nanomatch](index.js#L40) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm(list, patterns[, options]); + +console.log(nm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L106) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm.match(list, pattern[, options]); + +console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L167) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.isMatch(string, pattern[, options]); + +console.log(nm.isMatch('a.a', '*.a')); +//=> true +console.log(nm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L205) + +Returns true if some of the elements in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.some(list, patterns[, options]); + +console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L243) + +Returns true if every element in the given `list` matches at least one of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.every(list, patterns[, options]); + +console.log(nm.every('foo.js', ['foo.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L277) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.any(string, patterns[, options]); + +console.log(nm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(nm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L325) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.all(string, patterns[, options]); + +console.log(nm.all('foo.js', ['foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(nm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L359) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.not(list, patterns[, options]); + +console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L394) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.contains(string, pattern[, options]); + +console.log(nm.contains('aa/bb/cc', '*b')); +//=> true +console.log(nm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L450) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(nm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L479) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matcher(pattern[, options]); + +var isMatch = nm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L560) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.capture(pattern, string[, options]); + +console.log(nm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(nm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L595) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.makeRe(pattern[, options]); + +console.log(nm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.create](index.js#L658) + +Parses the given glob `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var nm = require('nanomatch'); +nm.create(pattern[, options]); + +console.log(nm.create('abc/*.js')); +// { options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 } +``` + +### [.parse](index.js#L697) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var nm = require('nanomatch'); +nm.parse(pattern[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L745) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var nm = require('nanomatch'); +nm.compile(ast[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(nm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L768) + +Clear the regex cache. + +**Example** + +```js +nm.clearCache(); +``` + +## Options + +
+basename + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +Type: `boolean` + +Default: `false` + +**Example** + +```js +nm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +nm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +
+ +
+bash + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(nm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(nm(files, '[a-c]*', {bash: false})); +``` + +
+ +
+cache + +### options.cache + +Disable regex and function memoization. + +Type: `boolean` + +Default: `undefined` + +
+ +
+dot + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +Type: `boolean` + +Default: `false` + +
+ +
+failglob + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +Type: `boolean` + +Default: `undefined` + +
+ +
+ignore + +### options.ignore + +String or array of glob patterns to match files to ignore. + +Type: `String|Array` + +Default: `undefined` + +
+ +
+matchBase + +### options.matchBase + +Alias for [options.basename](#options-basename). + +
+ +
+nocase + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `boolean` + +Default: `undefined` + +
+ +
+nodupes + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `boolean` + +Default: `true` (enabled by default) + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +nm.match(['a/b/c', 'a/b/c'], '**'); +//=> ['abc'] + +nm.match(['a/b/c', 'a/b/c'], '**', {nodupes: false}); +//=> ['a/b/c', 'a/b/c'] +``` + +
+ +
+nonegate + +### options.noglobstar + +Disable matching with globstars (`**`). + +Type: `boolean` + +Default: `undefined` + +```js +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +
+ +
+nonegate + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +Type: `boolean` + +Default: `undefined` + +
+ +
+nonull + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +
+ +
+nullglob + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +Type: `boolean` + +Default: `undefined` + +
+ +
+slash + +### options.slash + +Customize the slash character(s) to use for matching. + +Type: `string|function` + +Default: `[/\\]` (forward slash and backslash) + +
+ +
+star + +### options.star + +Customize the star character(s) to use for matching. It's not recommended that you modify this unless you have advanced knowledge of the compiler and matching rules. + +Type: `string|function` + +Default: `[^/\\]*?` + +
+ +
+snapdragon + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon) to customize parsers or compilers. + +Type: `object` + +Default: `undefined` + +
+ +
+snapdragon + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +**Examples** + +```js +var nm = require('nanomatch'); + +var res = nm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = nm.parse('abc/**/*.js'); +var res = nm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } +``` + +
+ +
+unescape + +### options.unescape + +Remove backslashes from returned matches. + +Type: `boolean` + +Default: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +nm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +nm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +
+ +
+unixify + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +nm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +nm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +
+ +## Features + +Nanomatch has full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +Here are some examples of how they work: + +| **Pattern** | **Description** | +| --- | --- | +| `*` | Matches any string except for `/`, leading `.`, or `/.` inside a path | +| `**` | Matches any string including `/`, but not a leading `.` or `/.` inside a path. More than two stars (e.g. `***` is treated the same as one star, and `**` loses its special meaning | when it's not the only thing in a path segment, per Bash specifications) | +| `foo*` | Matches any string beginning with `foo` | +| `*bar*` | Matches any string containing `bar` (beginning, middle or end) | +| `*.min.js` | Matches any string ending with `.min.js` | +| `[abc]*.js` | Matches any string beginning with `a`, `b`, or `c` and ending with `.js` | +| `abc?` | Matches `abcd` or `abcz` but not `abcde` | + +The exceptions noted for `*` apply to all patterns that contain a `*`. + +**Not supported** + +The following extended-globbing features are not supported: + +* [brace expansion](https://github.com/jonschlinkert/braces) (e.g. `{a,b,c}`) +* [extglobs](https://github.com/jonschlinkert/extglob) (e.g. `@(a|!(c|d))`) +* [POSIX brackets](https://github.com/jonschlinkert/expand-brackets) (e.g. `[[:alpha:][:digit:]]`) + +If you need any of these features consider using [micromatch](https://github.com/micromatch/micromatch) instead. + +## Bash expansion libs + +Nanomatch is part of a suite of libraries aimed at bringing the power and expressiveness of [Bash's](https://www.gnu.org/software/bash/) matching and expansion capabilities to JavaScript, _and - as you can see by the [benchmarks](#benchmarks) - without sacrificing speed_. + +| **Related library** | **Matching Type** | **Example** | **Description** | +| --- | --- | --- | --- | +| `nanomatch` (you are here) | Wildcards | `*` | [Filename expansion](https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html#Filename-Expansion), also referred to as globbing and pathname expansion, allows the use of [wildcards](#features) for matching. | +| [expand-tilde](https://github.com/jonschlinkert/expand-tilde) | Tildes | `~` | [Tilde expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html#Tilde-Expansion) converts the leading tilde in a file path to the user home directory. | +| [braces](https://github.com/jonschlinkert/braces) | Braces | `{a,b,c}` | [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) | +| [expand-brackets](https://github.com/jonschlinkert/expand-brackets) | Brackets | `[[:alpha:]]` | [POSIX character classes](https://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html) (also referred to as POSIX brackets, or POSIX character classes) | +| [extglob](https://github.com/jonschlinkert/extglob) | Parens | `!(a\ | b)` | [Extglobs](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html#Pattern-Matching) | +| [micromatch](https://github.com/micromatch/micromatch) | All | all | Micromatch is built on top of the other libraries. | + +There are many resources available on the web if you want to dive deeper into how these features work in Bash. + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && node benchmark +``` + +### Nanomatch vs. Minimatch vs. Multimatch + +```bash +# globstar-basic (182 bytes) + minimatch x 69,512 ops/sec ±1.92% (88 runs sampled) + multimatch x 63,376 ops/sec ±1.41% (89 runs sampled) + nanomatch x 432,451 ops/sec ±0.92% (88 runs sampled) + + fastest is nanomatch (by 651% avg) + +# large-list-globstar (485686 bytes) + minimatch x 34.02 ops/sec ±1.42% (59 runs sampled) + multimatch x 33.58 ops/sec ±1.97% (58 runs sampled) + nanomatch x 483 ops/sec ±1.06% (86 runs sampled) + + fastest is nanomatch (by 1429% avg) + +# long-list-globstar (194085 bytes) + minimatch x 383 ops/sec ±0.74% (90 runs sampled) + multimatch x 378 ops/sec ±0.59% (89 runs sampled) + nanomatch x 990 ops/sec ±1.14% (85 runs sampled) + + fastest is nanomatch (by 260% avg) + +# negation-basic (132 bytes) + minimatch x 242,145 ops/sec ±1.17% (89 runs sampled) + multimatch x 76,403 ops/sec ±0.78% (92 runs sampled) + nanomatch x 537,253 ops/sec ±1.44% (86 runs sampled) + + fastest is nanomatch (by 337% avg) + +# not-glob-basic (93 bytes) + minimatch x 252,402 ops/sec ±1.33% (89 runs sampled) + multimatch x 209,954 ops/sec ±1.30% (90 runs sampled) + nanomatch x 1,716,468 ops/sec ±1.13% (86 runs sampled) + + fastest is nanomatch (by 742% avg) + +# star-basic (93 bytes) + minimatch x 182,780 ops/sec ±1.41% (91 runs sampled) + multimatch x 153,210 ops/sec ±0.72% (89 runs sampled) + nanomatch x 599,621 ops/sec ±1.22% (90 runs sampled) + + fastest is nanomatch (by 357% avg) + +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 164 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [devongovett](https://github.com/devongovett) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/node_modules/nanomatch/index.js b/node_modules/nanomatch/index.js new file mode 100644 index 0000000..dddc612 --- /dev/null +++ b/node_modules/nanomatch/index.js @@ -0,0 +1,838 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var nm = require('nanomatch'); + * nm(list, patterns[, options]); + * + * console.log(nm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function nanomatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return nanomatch.match(list, patterns[0], options); + } + + var negated = false; + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options)); + negated = true; + } else { + keep.push.apply(keep, nanomatch.match(list, pattern, options)); + } + } + + // minimatch.match parity + if (negated && keep.length === 0) { + if (options && options.unixify === false) { + keep = list.slice(); + } else { + var unixify = utils.unixify(options); + for (var i = 0; i < list.length; i++) { + keep.push(unixify(list[i])); + } + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var nm = require('nanomatch'); + * nm.match(list, pattern[, options]); + * + * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +nanomatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, nanomatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = nanomatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.isMatch(string, pattern[, options]); + * + * console.log(nm.isMatch('a.a', '*.a')); + * //=> true + * console.log(nm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +nanomatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the elements in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.some(list, patterns[, options]); + * + * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length === 1) { + return true; + } + } + + return false; +}; + +/** + * Returns true if every element in the given `list` matches + * at least one of the given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.every(list, patterns[, options]); + * + * console.log(nm.every('foo.js', ['foo.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length !== 1) { + return false; + } + } + + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var nm = require('nanomatch'); + * nm.any(string, patterns[, options]); + * + * console.log(nm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(nm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (nanomatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` + * match the specified string. + * + * ```js + * var nm = require('nanomatch'); + * nm.all(string, patterns[, options]); + * + * console.log(nm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(nm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (!nanomatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.not(list, patterns[, options]); + * + * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +nanomatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + list = utils.arrayify(list); + + var matches = utils.diff(list, nanomatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, nanomatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var nm = require('nanomatch'); + * nm.contains(string, pattern[, options]); + * + * console.log(nm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(nm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +nanomatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return nanomatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +nanomatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var nm = require('nanomatch'); + * nm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(nm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +nanomatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = nanomatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var nm = require('nanomatch'); + * nm.matcher(pattern[, options]); + * + * var isMatch = nm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +nanomatch.matcher = function matcher(pattern, options) { + if (utils.isEmptyString(pattern)) { + return function() { + return false; + }; + } + + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = nanomatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (nanomatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + // create matcher function + var matcherFn = test(re); + // set result object from compiler on matcher function, + // as a non-enumerable property. useful for debugging + utils.define(matcherFn, 'result', re.result); + return matcherFn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or + * `null` if the pattern did not match. + * + * ```js + * var nm = require('nanomatch'); + * nm.capture(pattern, string[, options]); + * + * console.log(nm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(nm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +nanomatch.capture = function(pattern, str, options) { + var re = nanomatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.makeRe(pattern[, options]); + * + * console.log(nm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +nanomatch.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = utils.extend({wrap: false}, options); + var result = nanomatch.create(pattern, opts); + var regex = toRegex(result.output, opts); + utils.define(regex, 'result', result); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parses the given glob `pattern` and returns an object with the compiled `output` + * and optional source `map`. + * + * ```js + * var nm = require('nanomatch'); + * nm.create(pattern[, options]); + * + * console.log(nm.create('abc/*.js')); + * // { options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 } + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +nanomatch.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + function create() { + return nanomatch.compile(nanomatch.parse(pattern, options), options); + } + return memoize('create', pattern, options, create); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.parse(pattern[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +nanomatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.compile(ast[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(nm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +nanomatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = nanomatch.parse(ast, options); + } + + function compile() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + } + + return memoize('compile', ast.input, options, compile); +}; + +/** + * Clear the regex cache. + * + * ```js + * nm.clearCache(); + * ``` + * @api public + */ + +nanomatch.clearCache = function() { + nanomatch.cache.__data__ = {}; +}; + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `nanomatch` + */ + +nanomatch.compilers = compilers; +nanomatch.parsers = parsers; +nanomatch.cache = cache; + +/** + * Expose `nanomatch` + * @type {Function} + */ + +module.exports = nanomatch; diff --git a/node_modules/nanomatch/lib/cache.js b/node_modules/nanomatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/node_modules/nanomatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/node_modules/nanomatch/lib/compilers.js b/node_modules/nanomatch/lib/compilers.js new file mode 100644 index 0000000..d7a786e --- /dev/null +++ b/node_modules/nanomatch/lib/compilers.js @@ -0,0 +1,339 @@ +'use strict'; + +/** +* Nanomatch compilers +*/ + +module.exports = function(nanomatch, options) { + function slash() { + if (options && typeof options.slash === 'string') { + return options.slash; + } + if (options && typeof options.slash === 'function') { + return options.slash.call(nanomatch); + } + return '\\\\/'; + } + + function star() { + if (options && typeof options.star === 'string') { + return options.star; + } + if (options && typeof options.star === 'function') { + return options.star.call(nanomatch); + } + return '[^' + slash() + ']*?'; + } + + var ast = nanomatch.ast = nanomatch.parser.ast; + ast.state = nanomatch.parser.state; + nanomatch.compiler.state = ast.state; + nanomatch.compiler + + /** + * Negation / escaping + */ + + .set('not', function(node) { + var prev = this.prev(); + if (this.options.nonegate === true || prev.type !== 'bos') { + return this.emit('\\' + node.val, node); + } + return this.emit(node.val, node); + }) + .set('escape', function(node) { + if (this.options.unescape && /^[-\w_.]/.test(node.val)) { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + .set('quoted', function(node) { + return this.emit(node.val, node); + }) + + /** + * Regex + */ + + .set('dollar', function(node) { + if (node.parent.type === 'bracket') { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + if (node.dotfiles === true) this.dotfiles = true; + return this.emit('\\' + node.val, node); + }) + + /** + * Slashes: "/" and "\" + */ + + .set('backslash', function(node) { + return this.emit(node.val, node); + }) + .set('slash', function(node, nodes, i) { + var val = '[' + slash() + ']'; + var parent = node.parent; + var prev = this.prev(); + + // set "node.hasSlash" to true on all ancestor parens nodes + while (parent.type === 'paren' && !parent.hasSlash) { + parent.hasSlash = true; + parent = parent.parent; + } + + if (prev.addQmark) { + val += '?'; + } + + // word boundary + if (node.rest.slice(0, 2) === '\\b') { + return this.emit(val, node); + } + + // globstars + if (node.parsed === '**' || node.parsed === './**') { + this.output = '(?:' + this.output; + return this.emit(val + ')?', node); + } + + // negation + if (node.parsed === '!**' && this.options.nonegate !== true) { + return this.emit(val + '?\\b', node); + } + return this.emit(val, node); + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + var val = node.val; + + if (node.escaped === true) { + inner = inner.replace(/\\?(\W)/g, '\\$1'); + negated = ''; + } + + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + val = open + negated + inner + close; + return this.emit(val, node); + }) + + /** + * Square: "[.]" (only matches a single character in brackets) + */ + + .set('square', function(node) { + var val = (/^\W/.test(node.val) ? '\\' : '') + node.val; + return this.emit(val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var prev = this.prev(); + // don't use "slash" variable so that we always avoid + // matching backslashes and slashes with a qmark + var val = '[^.\\\\/]'; + if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) { + val = '[^\\\\/]'; + } + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch === '!' || ch === '=' || ch === ':') { + return this.emit(node.val, node); + } + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + var ch = this.output.slice(-1); + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * globstar: '**' + */ + + .set('globstar', function(node, nodes, i) { + if (!this.output) { + this.state.leadingGlobstar = true; + } + + var prev = this.prev(); + var before = this.prev(2); + var next = this.next(); + var after = this.next(2); + var type = prev.type; + var val = node.val; + + if (prev.type === 'slash' && next.type === 'slash') { + if (before.type === 'text') { + this.output += '?'; + + if (after.type !== 'text') { + this.output += '\\b'; + } + } + } + + var parsed = node.parsed; + if (parsed.charAt(0) === '!') { + parsed = parsed.slice(1); + } + + var isInside = node.isInside.paren || node.isInside.brace; + if (parsed && type !== 'slash' && type !== 'bos' && !isInside) { + val = star(); + } else { + val = this.options.dot !== true + ? '(?:(?!(?:[' + slash() + ']|^)\\.).)*?' + : '(?:(?!(?:[' + slash() + ']|^)(?:\\.{1,2})($|[' + slash() + ']))(?!\\.{2}).)*?'; + } + + if ((type === 'slash' || type === 'bos') && this.options.dot !== true) { + val = '(?!\\.)' + val; + } + + if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') { + if (after.type === 'text' || after.type === 'star') { + node.addQmark = true; + } + } + + if (this.options.capture) { + val = '(' + val + ')'; + } + + return this.emit(val, node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node, nodes, i) { + var prior = nodes[i - 2] || {}; + var prev = this.prev(); + var next = this.next(); + var type = prev.type; + + function isStart(n) { + return n.type === 'bos' || n.type === 'slash'; + } + + if (this.output === '' && this.options.contains !== true) { + this.output = '(?![' + slash() + '])'; + } + + if (type === 'bracket' && this.options.bash === false) { + var str = next && next.type === 'bracket' ? star() : '*?'; + if (!prev.nodes || prev.nodes[1].type !== 'posix') { + return this.emit(str, node); + } + } + + var prefix = !this.dotfiles && type !== 'text' && type !== 'escape' + ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\.)') + : ''; + + if (isStart(prev) || (isStart(prior) && type === 'not')) { + if (prefix !== '(?!\\.)') { + prefix += '(?!(\\.{2}|\\.[' + slash() + ']))(?=.)'; + } else { + prefix += '(?=.)'; + } + } else if (prefix === '(?!\\.)') { + prefix = ''; + } + + if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) { + this.output = '(?!\\.)' + this.output; + } + + var output = prefix + star(); + if (this.options.capture) { + output = '(' + output + ')'; + } + + return this.emit(output, node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val, node); + }) + + /** + * End-of-string + */ + + .set('eos', function(node) { + var prev = this.prev(); + var val = node.val; + + this.output = '(?:\\.[' + slash() + '](?=.))?' + this.output; + if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') { + val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)'); + } + + return this.emit(val, node); + }); + + /** + * Allow custom compilers to be passed on options + */ + + if (options && typeof options.compilers === 'function') { + options.compilers(nanomatch.compiler); + } +}; + diff --git a/node_modules/nanomatch/lib/parsers.js b/node_modules/nanomatch/lib/parsers.js new file mode 100644 index 0000000..f87df8f --- /dev/null +++ b/node_modules/nanomatch/lib/parsers.js @@ -0,0 +1,386 @@ +'use strict'; + +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var cached; +var NOT_REGEX = '[\\[!*+?$^"\'.\\\\/]+'; +var not = createTextRegex(NOT_REGEX); + +/** + * Nanomatch parsers + */ + +module.exports = function(nanomatch, options) { + var parser = nanomatch.parser; + var opts = parser.options; + + parser.state = { + slashes: 0, + paths: [] + }; + + parser.ast.state = parser.state; + parser + + /** + * Beginning-of-string + */ + + .capture('prefix', function() { + if (this.parsed) return; + var m = this.match(/^\.[\\/]/); + if (!m) return; + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^(?:\\(.)|([$^]))/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[2] || m[1] + }); + }) + + /** + * Quoted strings + */ + + .capture('quoted', function() { + var pos = this.position(); + var m = this.match(/^["']/); + if (!m) return; + + var quote = m[0]; + if (this.input.indexOf(quote) === -1) { + return pos({ + type: 'escape', + val: quote + }); + } + + var tok = advanceTo(this.input, quote); + this.consume(tok.len); + + return pos({ + type: 'quoted', + val: tok.esc + }); + }) + + /** + * Negations: "!" + */ + + .capture('not', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(this.notRegex || /^!+/); + if (!m) return; + var val = m[0]; + + var isNegated = (val.length % 2) === 1; + if (parsed === '' && !isNegated) { + val = ''; + } + + // if nothing has been parsed, we know `!` is at the start, + // so we need to wrap the result in a negation regex + if (parsed === '' && isNegated && this.options.nonegate !== true) { + this.bos.val = '(?!^(?:'; + this.append = ')$).*'; + val = ''; + } + return pos({ + type: 'not', + val: val + }); + }) + + /** + * Dot: "." + */ + + .capture('dot', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\.+/); + if (!m) return; + + var val = m[0]; + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + + return pos({ + type: 'dot', + dotfiles: this.state.dot, + val: val + }); + }) + + /** + * Plus: "+" + */ + + .capture('plus', /^\+(?!\()/) + + /** + * Question mark: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + + this.state.metachar = true; + this.state.qmark = true; + + return pos({ + type: 'qmark', + parsed: parsed, + val: m[0] + }); + }) + + /** + * Globstar: "**" + */ + + .capture('globstar', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\*{2}(?![*(])(?=[,)/]|$)/); + if (!m) return; + + var type = opts.noglobstar !== true ? 'globstar' : 'star'; + var node = pos({type: type, parsed: parsed}); + this.state.metachar = true; + + while (this.input.slice(0, 4) === '/**/') { + this.input = this.input.slice(3); + } + + node.isInside = { + brace: this.isInside('brace'), + paren: this.isInside('paren') + }; + + if (type === 'globstar') { + this.state.globstar = true; + node.val = '**'; + + } else { + this.state.star = true; + node.val = '*'; + } + + return node; + }) + + /** + * Star: "*" + */ + + .capture('star', function() { + var pos = this.position(); + var starRe = /^(?:\*(?![*(])|[*]{3,}(?!\()|[*]{2}(?![(/]|$)|\*(?=\*\())/; + var m = this.match(starRe); + if (!m) return; + + this.state.metachar = true; + this.state.star = true; + return pos({ + type: 'star', + val: m[0] + }); + }) + + /** + * Slash: "/" + */ + + .capture('slash', function() { + var pos = this.position(); + var m = this.match(/^\//); + if (!m) return; + + this.state.slashes++; + return pos({ + type: 'slash', + val: m[0] + }); + }) + + /** + * Backslash: "\\" + */ + + .capture('backslash', function() { + var pos = this.position(); + var m = this.match(/^\\(?![*+?(){}[\]'"])/); + if (!m) return; + + var val = m[0]; + + if (this.isInside('bracket')) { + val = '\\'; + } else if (val.length > 1) { + val = '\\\\'; + } + + return pos({ + type: 'backslash', + val: val + }); + }) + + /** + * Square: "[.]" + */ + + .capture('square', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\[([^!^\\])\]/); + if (!m) return; + + return pos({ + type: 'square', + val: m[1] + }); + }) + + /** + * Brackets: "[...]" (basic, this can be overridden by other parsers) + */ + + .capture('bracket', function() { + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]+|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = (m[2] || '').replace(/\\\\+/, '\\\\'); + var close = m[3] || ''; + + if (m[2] && inner.length < m[2].length) { + val = val.replace(/\\\\+/, '\\\\'); + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + }); + }) + + /** + * Text + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }); + + /** + * Allow custom parsers to be passed on options + */ + + if (options && typeof options.parsers === 'function') { + options.parsers(nanomatch.parser); + } +}; + +/** + * Advance to the next non-escaped character + */ + +function advanceTo(input, endChar) { + var ch = input.charAt(0); + var tok = { len: 1, val: '', esc: '' }; + var idx = 0; + + function advance() { + if (ch !== '\\') { + tok.esc += '\\' + ch; + tok.val += ch; + } + + ch = input.charAt(++idx); + tok.len++; + + if (ch === '\\') { + advance(); + advance(); + } + } + + while (ch && ch !== endChar) { + advance(); + } + return tok; +} + +/** + * Create text regex + */ + +function createTextRegex(pattern) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re = toRegex('^(?:[*]\\((?=.)|' + not + ')', opts); + return (cached = re); +} + +/** + * Expose negation string + */ + +module.exports.not = NOT_REGEX; diff --git a/node_modules/nanomatch/lib/utils.js b/node_modules/nanomatch/lib/utils.js new file mode 100644 index 0000000..0cf1501 --- /dev/null +++ b/node_modules/nanomatch/lib/utils.js @@ -0,0 +1,379 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var isWindows = require('is-windows')(); +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the given value is effectively an empty string + */ + +utils.isEmptyString = function(val) { + return String(val) === '' || String(val) === './'; +}; + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || isWindows === true; +}; + +/** + * Return the last element from an array + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.call(this, str, options); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (typeof options === 'undefined') { + return pattern; + } + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isRegex = function(val) { + return utils.typeOf(val) === 'regexp'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\/\s]/g, '\\$&'); +}; + +/** + * Combines duplicate characters in the provided `input` string. + * @param {String} `input` + * @returns {String} + */ + +utils.combineDupes = function(input, patterns) { + patterns = utils.arrayify(patterns).join('|').split('|'); + patterns = patterns.map(function(s) { + return s.replace(/\\?([+*\\/])/g, '\\$1'); + }); + var substr = patterns.join('|'); + var regex = new RegExp('(' + substr + ')(?=\\1)', 'g'); + return input.replace(regex, ''); +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(str); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the drive letter from a windows filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripDrive = function(fp) { + return utils.isWindows() ? fp.replace(/^[a-z]:[\\/]+?/i, '/') : fp; +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\')) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if `str` is a common character that doesn't need + * to be processed to be used for matching. + * @param {String} `str` + * @return {Boolean} + */ + +utils.isSimpleChar = function(str) { + return str.trim() === '' || str === '.'; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(filepath) || re.test(path.basename(filepath)); + }; +}; + +/** + * Returns the given value unchanced. + * @return {any} + */ + +utils.identity = function(val) { + return val; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + if (options && typeof options.unixify === 'function') { + return options.unixify(str); + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + var opts = options || {}; + return function(filepath) { + if (opts.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (opts.unescape === true) { + filepath = utils.unescape(filepath); + } + if (opts.unixify === true || utils.isWindows()) { + filepath = utils.toPosixPath(filepath); + } + return filepath; + }; +}; diff --git a/node_modules/nanomatch/node_modules/extend-shallow/LICENSE b/node_modules/nanomatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/nanomatch/node_modules/extend-shallow/README.md b/node_modules/nanomatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/extend-shallow/index.js b/node_modules/nanomatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/nanomatch/node_modules/extend-shallow/package.json b/node_modules/nanomatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/nanomatch/node_modules/is-extendable/LICENSE b/node_modules/nanomatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/is-extendable/README.md b/node_modules/nanomatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/is-extendable/index.d.ts b/node_modules/nanomatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/nanomatch/node_modules/is-extendable/index.js b/node_modules/nanomatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/nanomatch/node_modules/is-extendable/package.json b/node_modules/nanomatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/nanomatch/node_modules/is-plain-object/LICENSE b/node_modules/nanomatch/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/nanomatch/node_modules/is-plain-object/README.md b/node_modules/nanomatch/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/is-plain-object/index.d.ts b/node_modules/nanomatch/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/nanomatch/node_modules/is-plain-object/index.js b/node_modules/nanomatch/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/nanomatch/node_modules/is-plain-object/package.json b/node_modules/nanomatch/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/LICENSE b/node_modules/nanomatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/nanomatch/node_modules/kind-of/README.md b/node_modules/nanomatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/index.js b/node_modules/nanomatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/nanomatch/node_modules/kind-of/package.json b/node_modules/nanomatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/nanomatch/package.json b/node_modules/nanomatch/package.json new file mode 100644 index 0000000..0a85f0a --- /dev/null +++ b/node_modules/nanomatch/package.json @@ -0,0 +1,134 @@ +{ + "name": "nanomatch", + "description": "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)", + "version": "1.2.13", + "homepage": "https://github.com/micromatch/nanomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Devon Govett (http://badassjs.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/nanomatch", + "bugs": { + "url": "https://github.com/micromatch/nanomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "nanomatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "expand-brackets", + "expand-tilde", + "glob-object", + "micromatch", + "minimatch", + "options", + "snapdragon" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/next-tick/.editorconfig b/node_modules/next-tick/.editorconfig new file mode 100644 index 0000000..bd6d81e --- /dev/null +++ b/node_modules/next-tick/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[*.md] +indent_size = 2 +indent_style = space +trim_trailing_whitespace = false diff --git a/node_modules/next-tick/.github/FUNDING.yml b/node_modules/next-tick/.github/FUNDING.yml new file mode 100644 index 0000000..270b1dd --- /dev/null +++ b/node_modules/next-tick/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/next-tick" diff --git a/node_modules/next-tick/.lint b/node_modules/next-tick/.lint new file mode 100644 index 0000000..ac7ad3a --- /dev/null +++ b/node_modules/next-tick/.lint @@ -0,0 +1,16 @@ +@root + +module +es5 + +indent 2 +maxlen 100 +tabs + +ass +bitwise +nomen +plusplus +vars + +predef+ queueMicrotask, process, setImmediate, setTimeout, clearTimeout, document, MutationObserver, WebKitMutationObserver diff --git a/node_modules/next-tick/CHANGELOG.md b/node_modules/next-tick/CHANGELOG.md new file mode 100644 index 0000000..f990e1c --- /dev/null +++ b/node_modules/next-tick/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.1.0](https://github.com/medikoo/next-tick/compare/v1.0.0...v1.1.0) (2020-02-11) + +### Features + +* Add support for queueMicrotask (Closes [#13](https://github.com/medikoo/next-tick/issues/13)) ([471986e](https://github.com/medikoo/next-tick/commit/471986ee5f7179a498850cc03138a5ed5b9a248c)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/next-tick/CHANGES b/node_modules/next-tick/CHANGES new file mode 100644 index 0000000..931a8a4 --- /dev/null +++ b/node_modules/next-tick/CHANGES @@ -0,0 +1,28 @@ +For recent changelog see CHANGELOG.md + +----- + +v1.0.0 -- 2016.06.09 +* In case MutationObserver based solution ensure all callbacks are propagated + even if any on the way crashes (fixes #3) +* Support older engines (as IE8) which see typeof setTimeout as 'object' +* Fix spelling of LICENSE +* Configure lint scripts + +v0.2.2 -- 2014.04.18 +- Do not rely on es5-ext's valid-callable. Replace it with simple internal function +- In MutationObserver fallback rely on text node instead of attribute and assure + mutation event is invoked by real change of data + +v0.2.1 -- 2014.02.24 +- Fix case in import path + +v0.2.0 -- 2014.02.24 +- Assure microtask resultion if MutationObserver is available (thanks @Raynos) #1 +- Unify validation of callback. TypeError is throw for any non callable input +- Move main module from `lib` to root directory +- Improve documentation +- Remove Makefile (it's environment agnostic pacakge) + +v0.1.0 -- 2012.08.29 +Initial diff --git a/node_modules/next-tick/LICENSE b/node_modules/next-tick/LICENSE new file mode 100644 index 0000000..cfd3994 --- /dev/null +++ b/node_modules/next-tick/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012-2020, 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/node_modules/next-tick/README.md b/node_modules/next-tick/README.md new file mode 100644 index 0000000..7878e90 --- /dev/null +++ b/node_modules/next-tick/README.md @@ -0,0 +1,41 @@ +# next-tick +## Environment agnostic nextTick polyfill + +To be used in environment agnostic modules that need nextTick functionality. + +- When run in Node.js `process.nextTick` is used +- In modern engines, microtask resolution is guaranteed by `queueMicrotask` +- In older browsers, `MutationObserver` is used as a fallback +- In other engines `setImmediate` or `setTimeout(fn, 0)` is used as fallback. +- If none of the above is supported module resolves to `null` + +## Installation +### NPM + +In your project path: + + $ npm install next-tick + +#### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests [![Build Status](https://api.travis-ci.org/medikoo/next-tick.png?branch=master)](https://travis-ci.org/medikoo/next-tick) + + $ npm test + +## 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. + +--- + +
+ + Get professional support for d 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/node_modules/next-tick/index.js b/node_modules/next-tick/index.js new file mode 100644 index 0000000..4e3b280 --- /dev/null +++ b/node_modules/next-tick/index.js @@ -0,0 +1,74 @@ +'use strict'; + +var ensureCallable = function (fn) { + if (typeof fn !== 'function') throw new TypeError(fn + " is not a function"); + return fn; +}; + +var byObserver = function (Observer) { + var node = document.createTextNode(''), queue, currentQueue, i = 0; + new Observer(function () { + var callback; + if (!queue) { + if (!currentQueue) return; + queue = currentQueue; + } else if (currentQueue) { + queue = currentQueue.concat(queue); + } + currentQueue = queue; + queue = null; + if (typeof currentQueue === 'function') { + callback = currentQueue; + currentQueue = null; + callback(); + return; + } + node.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash + while (currentQueue) { + callback = currentQueue.shift(); + if (!currentQueue.length) currentQueue = null; + callback(); + } + }).observe(node, { characterData: true }); + return function (fn) { + ensureCallable(fn); + if (queue) { + if (typeof queue === 'function') queue = [queue, fn]; + else queue.push(fn); + return; + } + queue = fn; + node.data = (i = ++i % 2); + }; +}; + +module.exports = (function () { + // Node.js + if ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) { + return process.nextTick; + } + + // queueMicrotask + if (typeof queueMicrotask === "function") { + return function (cb) { queueMicrotask(ensureCallable(cb)); }; + } + + // MutationObserver + if ((typeof document === 'object') && document) { + if (typeof MutationObserver === 'function') return byObserver(MutationObserver); + if (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver); + } + + // W3C Draft + // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html + if (typeof setImmediate === 'function') { + return function (cb) { setImmediate(ensureCallable(cb)); }; + } + + // Wide available standard + if ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) { + return function (cb) { setTimeout(ensureCallable(cb), 0); }; + } + + return null; +}()); diff --git a/node_modules/next-tick/package.json b/node_modules/next-tick/package.json new file mode 100644 index 0000000..071c8ac --- /dev/null +++ b/node_modules/next-tick/package.json @@ -0,0 +1,27 @@ +{ + "name": "next-tick", + "version": "1.1.0", + "description": "Environment agnostic nextTick polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "nexttick", + "setImmediate", + "setTimeout", + "async" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/next-tick.git" + }, + "devDependencies": { + "tad": "^3.0.1", + "xlint": "^0.2.2", + "xlint-jslint-medikoo": "^0.1.4" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/next-tick/test/index.js b/node_modules/next-tick/test/index.js new file mode 100644 index 0000000..6b22cf4 --- /dev/null +++ b/node_modules/next-tick/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = function (t, a, d) { + var invoked; + + a(t(function () { + a(arguments.length, 0, "Arguments"); + invoked = true; + }), undefined, "Return"); + a(invoked, undefined, "Is not run immediately"); + setTimeout(function () { + a(invoked, true, "Run in next tick"); + invoked = []; + t(function () { invoked.push(0); }); + t(function () { invoked.push(1); }); + t(function () { invoked.push(2); }); + setTimeout(function () { + a.deep(invoked, [0, 1, 2], "Serial"); + d(); + }, 10); + }, 10); +}; diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 0000000..66282ba --- /dev/null +++ b/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE new file mode 100644 index 0000000..6ed662c --- /dev/null +++ b/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +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 THE AUTHOR 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 AUTHOR 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. diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md new file mode 100644 index 0000000..d2bd7bc --- /dev/null +++ b/node_modules/normalize-package-data/README.md @@ -0,0 +1,106 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain any characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/normalize-package-data/lib/extract_description.js new file mode 100644 index 0000000..83f10aa --- /dev/null +++ b/node_modules/normalize-package-data/lib/extract_description.js @@ -0,0 +1,14 @@ +module.exports = extractDescription + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n') + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js new file mode 100644 index 0000000..27682e9 --- /dev/null +++ b/node_modules/normalize-package-data/lib/fixer.js @@ -0,0 +1,418 @@ +var semver = require("semver") +var validateLicense = require('validate-npm-package-license'); +var hostedGitInfo = require("hosted-git-info") +var isBuiltinModule = require("resolve").isCore +var depTypes = ["dependencies","devDependencies","optionalDependencies"] +var extractDescription = require("./extract_description") +var url = require("url") +var typos = require("./typos.json") + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0] + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + } + } + var r = data.repository.url || "" + if (r) { + var hosted = hostedGitInfo.fromUrl(r) + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r) + } + } + +, fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos.topLevel[d]) + } + }, this) + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts") + delete data.scripts + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript") + delete data.scripts[k] + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts") + } + }, this) + } + +, fixFilesField: function(data) { + var files = data.files + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles") + delete data.files + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file) + return false + } else { + return true + } + }, this) + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {} + var match + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin + } else { + b[data.name] = data.bin + } + data.bin = b + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ] + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies" + var bd = "bundleDependencies" + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies") + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd) + data.dependencies[bd] = "*" + } + return true + } + }, this) + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict + objectifyDeps(data, this.warn) + addOptionalDepsToDeps(data, this.warn) + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps) + delete data[deps] + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d] + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)) + delete data[deps][d] + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]) + if (hosted) data[deps][d] = hosted.toString() + }, this) + }, this) + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules") + delete data.modules + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + this.warn("nonArrayKeywords") + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this) + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict + if (!data.version) { + data.version = "" + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose) + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson) + modifyPeople(data, parsePerson) + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options} + else if (typeof options === "undefined") options = {} + var strict = options.strict + if (!data.name && !strict) { + data.name = "" + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim() + ensureValidName(data.name, strict, options.allowLegacyCase) + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name) + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription") + delete data.description + } + if (data.readme && !data.description) + data.description = extractDescription(data.readme) + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription") + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme") + data.readme = "ERROR: No README data found!" + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()} + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/ + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs} + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs} + else + this.warn("nonEmailUrlBugsString") + } + else { + bugsTypos(data.bugs, this.warn) + var oldBugs = data.bugs + data.bugs = {} + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url + else + this.warn("nonUrlBugsUrlField") + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email + else + this.warn("nonEmailBugsEmailField") + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs + this.warn("emptyNormalizedBugs") + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.docs()) data.homepage = hosted.docs() + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage") + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 || + data.license.trim() === '' + ) { + this.warn("invalidLicense") + } else { + if (!validateLicense(data.license).validForNewPackages) + this.warn("invalidLicense") + } + } + } +} + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/') + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/) + var url = person.match(/\(([^\)]+)\)/) + var email = person.match(/<([^>]+)>/) + var obj = {} + if (name && name[0].trim()) obj.name = name[0].trim() + if (email) obj.email = email[1]; + if (url) obj.url = url[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies + if (!o) return; + var d = data.dependencies || {} + Object.keys(o).forEach(function (k) { + d[k] = o[k] + }) + data.dependencies = d +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/) + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type) + var o = {} + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/) + var dn = d.shift() + var dv = d.join("") + dv = dv.trim() + dv = dv.replace(/^@/, "") + o[dn] = dv + }) + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn) + }) +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs") + bugs[typos.bugs[k]] = bugs[k] + delete bugs[k] + } + }) +} diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js new file mode 100644 index 0000000..4ac74ad --- /dev/null +++ b/node_modules/normalize-package-data/lib/make_warning.js @@ -0,0 +1,23 @@ +var util = require("util") +var messages = require("./warning_messages.json") + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + var warningName = args.shift() + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" + args.unshift(msgTemplate) + return util.format.apply(null, args) + } +} + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']" + probableName = field + "['" + probableName + "']" + } + return util.format(messages.typo, providedName, probableName) +} diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js new file mode 100644 index 0000000..bd1bfef --- /dev/null +++ b/node_modules/normalize-package-data/lib/normalize.js @@ -0,0 +1,39 @@ +module.exports = normalize + +var fixer = require("./fixer") +normalize.fixer = fixer + +var makeWarning = require("./make_warning") + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license'] +var otherThingsToFix = ['dependencies','people', 'typos'] + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}) +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix) + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true + if(!strict) strict = false + if(!warn || data.private) warn = function(msg) { /* noop */ } + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true + } + fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict) + }) + data._id = data.name + "@" + data.version +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js new file mode 100644 index 0000000..b07f100 --- /dev/null +++ b/node_modules/normalize-package-data/lib/safe_format.js @@ -0,0 +1,9 @@ +var util = require('util') + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + args.forEach(function(arg) { + if (!arg) throw new TypeError('Bad arguments.') + }) + return util.format.apply(null, arguments) +} diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json new file mode 100644 index 0000000..7f9dd28 --- /dev/null +++ b/node_modules/normalize-package-data/lib/typos.json @@ -0,0 +1,25 @@ +{ + "topLevel": { + "dependancies": "dependencies" + ,"dependecies": "dependencies" + ,"depdenencies": "dependencies" + ,"devEependencies": "devDependencies" + ,"depends": "dependencies" + ,"dev-dependencies": "devDependencies" + ,"devDependences": "devDependencies" + ,"devDepenencies": "devDependencies" + ,"devdependencies": "devDependencies" + ,"repostitory": "repository" + ,"repo": "repository" + ,"prefereGlobal": "preferGlobal" + ,"hompage": "homepage" + ,"hampage": "homepage" + ,"autohr": "author" + ,"autor": "author" + ,"contributers": "contributors" + ,"publicationConfig": "publishConfig" + ,"script": "scripts" + }, + "bugs": { "web": "url", "name": "url" }, + "script": { "server": "start", "tests": "test" } +} diff --git a/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/normalize-package-data/lib/warning_messages.json new file mode 100644 index 0000000..4890f50 --- /dev/null +++ b/node_modules/normalize-package-data/lib/warning_messages.json @@ -0,0 +1,30 @@ +{ + "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field" + ,"missingRepository": "No repository field." + ,"brokenGitUrl": "Probably broken git url: %s" + ,"nonObjectScripts": "scripts must be an object" + ,"nonStringScript": "script values must be string commands" + ,"nonArrayFiles": "Invalid 'files' member" + ,"invalidFilename": "Invalid filename in 'files' list: %s" + ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names" + ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s" + ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s" + ,"nonObjectDependencies": "%s field must be an object" + ,"nonStringDependency": "Invalid dependency: %s %s" + ,"deprecatedArrayDependencies": "specifying %s as array is deprecated" + ,"deprecatedModules": "modules field is deprecated" + ,"nonArrayKeywords": "keywords should be an array of strings" + ,"nonStringKeyword": "keywords should be an array of strings" + ,"conflictingName": "%s is also the name of a node core module." + ,"nonStringDescription": "'description' field should be a string" + ,"missingDescription": "No description" + ,"missingReadme": "No README data" + ,"missingLicense": "No license field." + ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" + ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." + ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." + ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." + ,"nonUrlHomepage": "homepage field must be a string url. Deleted." + ,"invalidLicense": "license should be a valid SPDX license expression" + ,"typo": "%s should probably be %s." +} diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json new file mode 100644 index 0000000..dea34bb --- /dev/null +++ b/node_modules/normalize-package-data/package.json @@ -0,0 +1,31 @@ +{ + "name": "normalize-package-data", + "version": "2.5.0", + "author": "Meryn Stol ", + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "async": "^2.6.1", + "tap": "^12.4.0", + "underscore": "^1.8.3" + }, + "files": [ + "lib/*.js", + "lib/*.json", + "AUTHORS" + ] +} diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/normalize-path/README.md b/node_modules/normalize-path/README.md new file mode 100644 index 0000000..726d4d6 --- /dev/null +++ b/node_modules/normalize-path/README.md @@ -0,0 +1,127 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +const normalize = require('normalize-path'); + +console.log(normalize('\\foo\\bar\\baz\\')); +//=> '/foo/bar/baz' +``` + +**win32 namespaces** + +```js +console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); +//=> '//?/UNC/Server01/user/docs/Letter.txt' + +console.log(normalize('\\\\.\\CdRomX')); +//=> '//./CdRomX' +``` + +**Consecutive slashes** + +Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash. + +```js +console.log(normalize('.//foo//bar///////baz/')); +//=> './foo/bar/baz' +``` + +### Trailing slashes + +By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_: + +```js +console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/' +console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' +``` + +## Release history + +### v3.0 + +No breaking changes in this release. + +* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library. +* a minor optimization was made to simplify how the trailing separator was handled + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +Other useful path-related libraries: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 35 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js new file mode 100644 index 0000000..6fac553 --- /dev/null +++ b/node_modules/normalize-path/index.js @@ -0,0 +1,35 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +module.exports = function(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + var len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + var prefix = ''; + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json new file mode 100644 index 0000000..ad61098 --- /dev/null +++ b/node_modules/normalize-path/package.json @@ -0,0 +1,77 @@ +{ + "name": "normalize-path", + "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "absolute", + "backslash", + "delimiter", + "file", + "file-path", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "relative", + "separator", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "Other useful path-related libraries:", + "list": [ + "contains-path", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-ends-with", + "unixify" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/now-and-later/LICENSE b/node_modules/now-and-later/LICENSE new file mode 100644 index 0000000..0b2955a --- /dev/null +++ b/node_modules/now-and-later/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blaine Bublitz, Eric Schoffstall 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/node_modules/now-and-later/README.md b/node_modules/now-and-later/README.md new file mode 100644 index 0000000..15486a8 --- /dev/null +++ b/node_modules/now-and-later/README.md @@ -0,0 +1,203 @@ +

+ + + +

+ +# now-and-later + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks. + +## Usage + +```js +var nal = require('now-and-later'); + +function iterator(value, key, cb){ + // called with each value in sequence + // also passes the key + cb(null, value * 2) +} + +function create(value, key){ + // called at the beginning of every iteration + // return a storage object to be passed to each lifecycle method + return { key: key, value: value }; +} + +function before(storage){ + // called before the iterator function of every iteration + // receives the storage returned from `create` +} + +function after(result, storage){ + // called after a success occurs in the iterator function of any iteration + // receives the `result` of the iterator and the storage returned from `create` +} + +function error(error, storage){ + // called after an error occurs in the iterator function of any iteration + // receives the `error` of the iterator and the storage returned from `create` +} + +function done(error, results) { + // called after all iterations complete or an error occurs in an iterator + // receives an `error` if one occurred and all results (or partial results upon error) of the iterators +} + +/* + Calling mapSeries with an object can't guarantee order + It uses Object.keys to get an order + It is better to use an array if order must be guaranteed + */ +nal.mapSeries([1, 2, 3], iterator, { + create: create, + before: before, + after: after, + error: error +}, done); + +nal.map({ + iter1: 1, + iter2: 2 +}, iterator, { + create: create, + before: before, + after: after, + error: error +}, done); +``` + +## API + +### `map(values, iterator[, extensions][, callback])` + +Takes an object or array of `values` and an `iterator` function to execute with each value. +Optionally, takes an `extensions` object and a `callback` function that is called upon completion of the iterations. + +All iterations run in parallel. + +#### `values` + +An array or object of values to iterate over. + +If `values` is an array, iterations are started in order by index. If `values` is an object, iterations are started in order by the order returned by `Object.keys` (order is not guaranteed). + +If `values` is an array, the results of each iteration will be mapped to an array. If `values` is an object, the results of each iteration will be mapped to an object with corresponding keys. + +#### `iterator(value, key, done)` + +An async function called per iteration. All iterations are run in parallel. + +The `iterator` function is called once with each `value`, `key` and a function (`done(error, result)`) to call when the async work is complete. + +If `done` is passed an error as the first argument, the iteration will fail and the sequence will be ended; however, any iterations in progress will still complete. If `done` is passed a `result` value as the second argument, it will be added to the final results array or object. + +#### `extensions` + +The `extensions` object is used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are `create`, `before`, `after` and `error`. If an extension point is not specified, it defaults to a no-op function. + +##### `extensions.create(value, key)` + +Called at the very beginning of each iteration with the `value` being iterated and the `key` from the array or object. If `create` returns a value (`storage`), it is passed to the `before`, `after` and `error` extension points. + +If a value is not returned, an empty object is used as `storage` for each other extension point. + +This is useful for tracking information across an iteration. + +##### `extensions.before(storage)` + +Called immediately before each iteration with the `storage` value returned from the `create` extension point. + +##### `extensions.after(result, storage)` + +Called immediately after each iteration with the `result` of the iteration and the `storage` value returned from the `create` extension point. + +##### `extensions.error(error, storage)` + +Called immediately after a failed iteration with the `error` of the iteration and the `storage` value returned from the `create` extension point. + +#### `callback(error, results)` + +A function that is called after all iterations have completed or one iteration has errored. + +If all iterations completed successfully, the `error` argument will be empty and the `results` will be a mapping of the `iterator` results. + +If an iteration errored, the `error` argument will be passed from that iteration and the `results` will be whatever partial results had completed successfully before the error occurred. + +### `mapSeries(values, iterator[, extensions][, callback])` + +Takes an object or array of `values` and an `iterator` function to execute with each value. +Optionally, takes an `extensions` object and a `callback` function that is called upon completion of the iterations. + +All iterations run in serial. + +#### `values` + +An array or object of values to iterate over. + +If `values` is an array, iterations are started in order by index. If `values` is an object, iterations are started in order by the order returned by `Object.keys` (order is not guaranteed). + +If `values` is an array, the results of each iteration will be mapped to an array. If `values` is an object, the results of each iteration will be mapped to an object with corresponding keys. + +#### `iterator(value, key, done)` + +An async function called per iteration. All iterations are run in serial. + +The `iterator` function is called once with each `value`, `key` and a function (`done(error, result)`) to call when the async work is complete. + +If `done` is passed an error as the first argument, the iteration will fail and the sequence will be ended without executing any more iterations. If `done` is passed a `result` value as the second argument, it will be added to the final results array or object. + +#### `extensions` + +The `extensions` object is used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are `create`, `before`, `after` and `error`. If an extension point is not specified, it defaults to a no-op function. + +##### `extensions.create(value, key)` + +Called at the very beginning of each iteration with the `value` being iterated and the `key` from the array or object. If `create` returns a value (`storage`), it is passed to the `before`, `after` and `error` extension points. + +If a value is not returned, an empty object is used as `storage` for each other extension point. + +This is useful for tracking information across an iteration. + +##### `extensions.before(storage)` + +Called immediately before each iteration with the `storage` value returned from the `create` extension point. + +##### `extensions.after(result, storage)` + +Called immediately after each iteration with the `result` of the iteration and the `storage` value returned from the `create` extension point. + +##### `extensions.error(error, storage)` + +Called immediately after a failed iteration with the `error` of the iteration and the `storage` value returned from the `create` extension point. + +#### `callback(error, results)` + +A function that is called after all iterations have completed or one iteration has errored. + +If all iterations completed successfully, the `error` argument will be empty and the `results` will be a mapping of the `iterator` results. + +If an iteration errored, the `error` argument will be passed from that iteration and the `results` will be whatever partial results had completed successfully before the error occurred. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/now-and-later.svg +[npm-url]: https://www.npmjs.com/package/now-and-later +[npm-image]: http://img.shields.io/npm/v/now-and-later.svg + +[travis-url]: https://travis-ci.org/gulpjs/now-and-later +[travis-image]: http://img.shields.io/travis/gulpjs/now-and-later.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/now-and-later +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/now-and-later.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/now-and-later +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/now-and-later/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/now-and-later/index.js b/node_modules/now-and-later/index.js new file mode 100644 index 0000000..692f0b7 --- /dev/null +++ b/node_modules/now-and-later/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = { + map: require('./lib/map'), + mapSeries: require('./lib/mapSeries'), +}; diff --git a/node_modules/now-and-later/lib/helpers.js b/node_modules/now-and-later/lib/helpers.js new file mode 100644 index 0000000..b0e913c --- /dev/null +++ b/node_modules/now-and-later/lib/helpers.js @@ -0,0 +1,41 @@ +'use strict'; + +function noop() {} + +var defaultExts = { + create: noop, + before: noop, + after: noop, + error: noop, +}; + +function defaultExtensions(extensions) { + extensions = extensions || {}; + return { + create: extensions.create || defaultExts.create, + before: extensions.before || defaultExts.before, + after: extensions.after || defaultExts.after, + error: extensions.error || defaultExts.error, + }; +} + +function initializeResults(values) { + var keys = Object.keys(values); + var results = Array.isArray(values) ? [] : {}; + + var idx = 0; + var length = keys.length; + + for (idx = 0; idx < length; idx++) { + var key = keys[idx]; + results[key] = undefined; + } + + return results; +} + +module.exports = { + defaultExtensions: defaultExtensions, + noop: noop, + initializeResults: initializeResults, +}; diff --git a/node_modules/now-and-later/lib/map.js b/node_modules/now-and-later/lib/map.js new file mode 100644 index 0000000..cd278fe --- /dev/null +++ b/node_modules/now-and-later/lib/map.js @@ -0,0 +1,63 @@ +'use strict'; + +var once = require('once'); + +var helpers = require('./helpers'); + +function map(values, iterator, extensions, done) { + // Allow for extensions to not be specified + if (typeof extensions === 'function') { + done = extensions; + extensions = {}; + } + + // Handle no callback case + if (typeof done !== 'function') { + done = helpers.noop; + } + + done = once(done); + + // Will throw if non-object + var keys = Object.keys(values); + var length = keys.length; + var count = length; + var idx = 0; + // Return the same type as passed in + var results = helpers.initializeResults(values); + + var exts = helpers.defaultExtensions(extensions); + + if (length === 0) { + return done(null, results); + } + + for (idx = 0; idx < length; idx++) { + var key = keys[idx]; + next(key); + } + + function next(key) { + var value = values[key]; + + var storage = exts.create(value, key) || {}; + + exts.before(storage); + iterator(value, key, once(handler)); + + function handler(err, result) { + if (err) { + exts.error(err, storage); + return done(err, results); + } + + exts.after(result, storage); + results[key] = result; + if (--count === 0) { + done(err, results); + } + } + } +} + +module.exports = map; diff --git a/node_modules/now-and-later/lib/mapSeries.js b/node_modules/now-and-later/lib/mapSeries.js new file mode 100644 index 0000000..02cce77 --- /dev/null +++ b/node_modules/now-and-later/lib/mapSeries.js @@ -0,0 +1,63 @@ +'use strict'; + +var once = require('once'); + +var helpers = require('./helpers'); + +function mapSeries(values, iterator, extensions, done) { + // Allow for extensions to not be specified + if (typeof extensions === 'function') { + done = extensions; + extensions = {}; + } + + // Handle no callback case + if (typeof done !== 'function') { + done = helpers.noop; + } + + done = once(done); + + // Will throw if non-object + var keys = Object.keys(values); + var length = keys.length; + var idx = 0; + // Return the same type as passed in + var results = helpers.initializeResults(values); + + var exts = helpers.defaultExtensions(extensions); + + if (length === 0) { + return done(null, results); + } + + var key = keys[idx]; + next(key); + + function next(key) { + var value = values[key]; + + var storage = exts.create(value, key) || {}; + + exts.before(storage); + iterator(value, key, once(handler)); + + function handler(err, result) { + if (err) { + exts.error(err, storage); + return done(err, results); + } + + exts.after(result, storage); + results[key] = result; + + if (++idx >= length) { + done(err, results); + } else { + next(keys[idx]); + } + } + } +} + +module.exports = mapSeries; diff --git a/node_modules/now-and-later/package.json b/node_modules/now-and-later/package.json new file mode 100644 index 0000000..9b2a0f0 --- /dev/null +++ b/node_modules/now-and-later/package.json @@ -0,0 +1,54 @@ +{ + "name": "now-and-later", + "version": "2.0.1", + "description": "Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/now-and-later", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "index.js", + "lib", + "LICENSE" + ], + "scripts": { + "lint": "eslint . && jscs index.js lib/ test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "once": "^1.3.2" + }, + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "async", + "async.js", + "map", + "control", + "flow", + "extension", + "tracing", + "debug", + "aop", + "aspect", + "timing", + "tracing" + ] +} diff --git a/node_modules/number-is-nan/index.js b/node_modules/number-is-nan/index.js new file mode 100644 index 0000000..79be4b9 --- /dev/null +++ b/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/node_modules/number-is-nan/license b/node_modules/number-is-nan/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/number-is-nan/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/number-is-nan/package.json b/node_modules/number-is-nan/package.json new file mode 100644 index 0000000..d2f51d4 --- /dev/null +++ b/node_modules/number-is-nan/package.json @@ -0,0 +1,35 @@ +{ + "name": "number-is-nan", + "version": "1.0.1", + "description": "ES2015 Number.isNaN() ponyfill", + "license": "MIT", + "repository": "sindresorhus/number-is-nan", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "es2015", + "ecmascript", + "ponyfill", + "polyfill", + "shim", + "number", + "is", + "nan", + "not" + ], + "devDependencies": { + "ava": "*" + } +} diff --git a/node_modules/number-is-nan/readme.md b/node_modules/number-is-nan/readme.md new file mode 100644 index 0000000..2463508 --- /dev/null +++ b/node_modules/number-is-nan/readme.md @@ -0,0 +1,28 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save number-is-nan +``` + + +## Usage + +```js +var numberIsNan = require('number-is-nan'); + +numberIsNan(NaN); +//=> true + +numberIsNan('unicorn'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/object-copy/LICENSE b/node_modules/object-copy/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/object-copy/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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. diff --git a/node_modules/object-copy/index.js b/node_modules/object-copy/index.js new file mode 100644 index 0000000..f9faa22 --- /dev/null +++ b/node_modules/object-copy/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var typeOf = require('kind-of'); +var copyDescriptor = require('copy-descriptor'); +var define = require('define-property'); + +/** + * Copy static properties, prototype properties, and descriptors from one object to another. + * + * ```js + * function App() {} + * var proto = App.prototype; + * App.prototype.set = function() {}; + * App.prototype.get = function() {}; + * + * var obj = {}; + * copy(obj, proto); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +function copy(receiver, provider, omit) { + if (!isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var props = nativeKeys(provider); + var keys = Object.keys(provider); + var len = props.length; + omit = arrayify(omit); + + while (len--) { + var key = props[len]; + + if (has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !has(omit, key)) { + copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Return true if the given value is an object or function + */ + +function isObject(val) { + return typeOf(val) === 'object' || typeof val === 'function'; +} + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * has(['a', 'b', 'c'], 'c'); + * //=> true + * + * has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + */ + +function has(obj, val) { + val = arrayify(val); + var len = val.length; + + if (isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = nativeKeys(obj); + return has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +} + +/** + * Cast the given value to an array. + * + * ```js + * arrayify('foo'); + * //=> ['foo'] + * + * arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Returns true if a value has a `contructor` + * + * ```js + * hasConstructor({}); + * //=> true + * + * hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + */ + +function hasConstructor(val) { + return isObject(val) && typeof val.constructor !== 'undefined'; +} + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + */ + +function nativeKeys(val) { + if (!hasConstructor(val)) return []; + return Object.getOwnPropertyNames(val); +} + +/** + * Expose `copy` + */ + +module.exports = copy; + +/** + * Expose `copy.has` for tests + */ + +module.exports.has = has; diff --git a/node_modules/object-copy/node_modules/define-property/LICENSE b/node_modules/object-copy/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/object-copy/node_modules/define-property/README.md b/node_modules/object-copy/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/object-copy/node_modules/define-property/index.js b/node_modules/object-copy/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/object-copy/node_modules/define-property/package.json b/node_modules/object-copy/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/object-copy/node_modules/is-accessor-descriptor/LICENSE b/node_modules/object-copy/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/object-copy/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/object-copy/node_modules/is-accessor-descriptor/README.md b/node_modules/object-copy/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..3743fe6 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,123 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg)](https://www.npmjs.com/package/is-accessor-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [API](#api) +- [Related projects](#related-projects) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-accessor-descriptor --save +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-accessor-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-accessor-descriptor/index.js b/node_modules/object-copy/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..2ca4af8 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/object-copy/node_modules/is-accessor-descriptor/package.json b/node_modules/object-copy/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..0f39c64 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,61 @@ +{ + "name": "is-accessor-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "version": "0.1.6", + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-accessor-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "layout": "default" + } +} diff --git a/node_modules/object-copy/node_modules/is-data-descriptor/LICENSE b/node_modules/object-copy/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/object-copy/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/object-copy/node_modules/is-data-descriptor/README.md b/node_modules/object-copy/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..41e1643 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-data-descriptor/README.md @@ -0,0 +1,128 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg)](https://www.npmjs.com/package/is-data-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-data-descriptor --save +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-data-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-data-descriptor/index.js b/node_modules/object-copy/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..d4d09c9 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-data-descriptor/index.js @@ -0,0 +1,55 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// data descriptor properties +var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' +}; + +function isDataDescriptor(obj, prop) { + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +/** + * Expose `isDataDescriptor` + */ + +module.exports = isDataDescriptor; diff --git a/node_modules/object-copy/node_modules/is-data-descriptor/package.json b/node_modules/object-copy/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..5fb294b --- /dev/null +++ b/node_modules/object-copy/node_modules/is-data-descriptor/package.json @@ -0,0 +1,60 @@ +{ + "name": "is-data-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "version": "0.1.4", + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-data-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/LICENSE b/node_modules/object-copy/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-descriptor/README.md b/node_modules/object-copy/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-descriptor/index.js b/node_modules/object-copy/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/LICENSE b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/README.md b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..170bf30 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,342 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +### v5.0.0 + +**Added** + +* `Set Iterator` and `Map Iterator` support + +**Fixed** + +* Now returns `generatorfunction` for generator functions + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of is more correct than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly tests instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 13, 2017._ \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/index.js b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..fc5cde9 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,147 @@ +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/package.json b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..334235f --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,91 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "5.1.0", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.4.0", + "gulp-format-md": "^0.1.12", + "matched": "^0.4.4", + "mocha": "^3.4.2", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/package.json b/node_modules/object-copy/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..a561bfe --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/package.json @@ -0,0 +1,75 @@ +{ + "name": "is-descriptor", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "version": "0.1.6", + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-descriptor", + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/object-copy/node_modules/kind-of/LICENSE b/node_modules/object-copy/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/object-copy/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/object-copy/node_modules/kind-of/README.md b/node_modules/object-copy/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/object-copy/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/kind-of/index.js b/node_modules/object-copy/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/object-copy/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/object-copy/node_modules/kind-of/package.json b/node_modules/object-copy/node_modules/kind-of/package.json new file mode 100644 index 0000000..5de879e --- /dev/null +++ b/node_modules/object-copy/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/object-copy/package.json b/node_modules/object-copy/package.json new file mode 100644 index 0000000..f02a96c --- /dev/null +++ b/node_modules/object-copy/package.json @@ -0,0 +1,47 @@ +{ + "name": "object-copy", + "description": "Copy static properties, prototype properties, and descriptors from one object to another.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/object-copy", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-copy", + "bugs": { + "url": "https://github.com/jonschlinkert/object-copy/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "devDependencies": { + "gulp-format-md": "*", + "mocha": "*" + }, + "keywords": [ + "copy", + "object" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [] + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/object-keys/.editorconfig b/node_modules/object-keys/.editorconfig new file mode 100644 index 0000000..eaa2141 --- /dev/null +++ b/node_modules/object-keys/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/object-keys/.eslintrc b/node_modules/object-keys/.eslintrc new file mode 100644 index 0000000..9a8d5b0 --- /dev/null +++ b/node_modules/object-keys/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 23], + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 3], + "max-statements": [2, 23], + "max-statements-per-line": [2, { "max": 2 }], + "no-extra-parens": [1], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "after"] + } +} diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml new file mode 100644 index 0000000..94a6ce4 --- /dev/null +++ b/node_modules/object-keys/.travis.yml @@ -0,0 +1,277 @@ +language: node_js +os: + - linux +node_js: + - "11.8" + - "10.15" + - "9.11" + - "8.15" + - "7.10" + - "6.16" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "11.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.15" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true + - env: POSTTEST=true diff --git a/node_modules/object-keys/CHANGELOG.md b/node_modules/object-keys/CHANGELOG.md new file mode 100644 index 0000000..b7d92df --- /dev/null +++ b/node_modules/object-keys/CHANGELOG.md @@ -0,0 +1,232 @@ +1.1.1 / 2019-04-06 +================= + * [Fix] exclude deprecated Firefox keys (#53) + +1.1.0 / 2019-02-10 +================= + * [New] [Refactor] move full implementation to `implementation` entry point + * [Refactor] only evaluate the implementation if `Object.keys` is not present + * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16` + * [Tests] remove jscs + * [Tests] switch to `npm audit` from `nsp` + +1.0.12 / 2018-06-18 +================= + * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) + +1.0.11 / 2016-07-05 +================= + * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) + +1.0.10 / 2016-07-04 +================= + * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) + * [Fix] In IE 6, `window.external` makes `Object.keys` throw + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] remove unused eccheck script + dep + +1.0.9 / 2015-10-19 +================= + * [Fix] Blacklist 'frame' property on window (#16, #17) + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` + +1.0.8 / 2015-10-14 +================= + * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) + * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` + +1.0.7 / 2015-07-18 +================= + * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. + * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) + * [Tests] Improve test output for automation equality bugfix + * [Tests] Test on `io.js` `v2.4` + +1.0.6 / 2015-07-09 +================= + * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) + * [Tests] ES3 browsers don't have `Array.isArray` + * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. + +1.0.5 / 2015-07-03 +================= + * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws + * [Tests] Test up to `io.js` `v2.3` + * [Dev Deps] Update `nsp`, `eslint` + +1.0.4 / 2015-05-23 +================= + * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` + * Test on latest `node` and `io.js` + * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` + +1.0.3 / 2015-01-06 +================= + * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance + +1.0.2 / 2014-12-28 +================= + * Update lots of dev dependencies + * Tweaks to README + * Make `object-keys` more robust against later environment tampering + +1.0.1 / 2014-09-03 +================= + * Update URLs and badges in README + +1.0.0 / 2014-08-26 +================= + * v1.0.0 + +0.6.1 / 2014-08-25 +================= + * v0.6.1 + * Updating dependencies (tape, covert, is) + * Update badges in readme + * Use separate var statements + +0.6.0 / 2014-04-23 +================= + * v0.6.0 + * Updating dependencies (tape, covert) + * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers + * Improve test matrix: test all node versions, but only latest two stables are a failure + * Remove internal foreach shim. + +0.5.1 / 2014-03-09 +================= + * 0.5.1 + * Updating dependencies (tape, covert, is) + * Removing forEach from the module (but keeping it in tests) + +0.5.0 / 2014-01-30 +================= + * 0.5.0 + * Explicitly returning the shim, instead of returning native Object.keys when present + * Adding a changelog. + * Cleaning up IIFE wrapping + * Testing on node 0.4 through 0.11 + +0.4.0 / 2013-08-14 +================== + + * v0.4.0 + * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' + * If it's a string, make sure to use charAt instead of brackets. + * Only use Function#call if necessary. + * Making sure the context tests actually run. + * Better function detection + * Adding the android browser + * Fixing testling files + * Updating tape + * Removing the "is" dependency. + * Making an isArguments shim. + * Adding a local forEach shim and tests. + * Updating paths. + * Moving the shim test. + * v0.3.0 + +0.3.0 / 2013-05-18 +================== + + * README tweak. + * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). + * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) + * Updating readme. + * Updating dependencies. + * Giving credit to lodash. + * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). + * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding node 0.10 to travis. + * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) + * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) + * Moving "indexof" and "is" to be dev dependencies. + * Making sure the shim works with functions. + * Flattening the tests. + +0.2.0 / 2013-05-10 +================== + + * v0.2.0 + * Object.keys should work with arrays. + +0.1.8 / 2013-05-10 +================== + + * v0.1.8 + * Upgrading dependencies. + * Using a simpler check. + * Fixing a bug in hasDontEnumBug browsers. + * Using the newest tape! + * Fixing this error test. + * "undefined" is probably a reserved word in ES3. + * Better test message. + +0.1.7 / 2013-04-17 +================== + + * Upgrading "is" once more. + * The key "null" is breaking some browsers. + +0.1.6 / 2013-04-17 +================== + + * v0.1.6 + * Upgrading "is" + +0.1.5 / 2013-04-14 +================== + + * Bumping version. + * Adding more testling browsers. + * Updating "is" + +0.1.4 / 2013-04-08 +================== + + * Using "is" instead of "is-extended". + +0.1.3 / 2013-04-07 +================== + + * Using "foreach" instead of my own shim. + * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. + +0.1.2 / 2013-04-03 +================== + + * Adding dependency status; moving links to an index at the bottom. + * Upgrading is-extended; version 0.1.2 + * Adding an npm version badge. + +0.1.1 / 2013-04-01 +================== + + * Adding Travis CI. + * Bumping the version. + * Adding indexOf since IE sucks. + * Adding a forEach shim since older browsers don't have Array#forEach. + * Upgrading tape - 0.3.2 uses Array#map + * Using explicit end instead of plan. + * Can't test with Array.isArray in older browsers. + * Using is-extended. + * Fixing testling files. + * JSHint/JSLint-ing. + * Removing an unused object. + * Using strict mode. + +0.1.0 / 2013-03-30 +================== + + * Changing the exports should have meant a higher version bump. + * Oops, fixing the repo URL. + * Adding more tests. + * 0.0.2 + * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) + * Move shim export to a separate file. diff --git a/node_modules/object-keys/LICENSE b/node_modules/object-keys/LICENSE new file mode 100644 index 0000000..28553fd --- /dev/null +++ b/node_modules/object-keys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/object-keys/README.md b/node_modules/object-keys/README.md new file mode 100644 index 0000000..ed4c277 --- /dev/null +++ b/node_modules/object-keys/README.md @@ -0,0 +1,76 @@ +#object-keys [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-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] + +[![browser support][testling-svg]][testling-url] + +An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. + +Most common usage: +```js +var keys = Object.keys || require('object-keys'); +``` + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.deepEqual(keys(obj), ['a', 'b', 'c']); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is not present */ +delete Object.keys; +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is present */ +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, Object.keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +## Source +Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object-keys +[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg +[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg +[travis-url]: https://travis-ci.org/ljharb/object-keys +[deps-svg]: https://david-dm.org/ljharb/object-keys.svg +[deps-url]: https://david-dm.org/ljharb/object-keys +[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object-keys.png +[testling-url]: https://ci.testling.com/ljharb/object-keys +[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 +[lodash-url]: https://github.com/lodash/lodash +[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-keys.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-keys + diff --git a/node_modules/object-keys/implementation.js b/node_modules/object-keys/implementation.js new file mode 100644 index 0000000..5b32986 --- /dev/null +++ b/node_modules/object-keys/implementation.js @@ -0,0 +1,122 @@ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js new file mode 100644 index 0000000..a43807d --- /dev/null +++ b/node_modules/object-keys/index.js @@ -0,0 +1,32 @@ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js new file mode 100644 index 0000000..f2a2a90 --- /dev/null +++ b/node_modules/object-keys/isArguments.js @@ -0,0 +1,17 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json new file mode 100644 index 0000000..99ea923 --- /dev/null +++ b/node_modules/object-keys/package.json @@ -0,0 +1,88 @@ +{ + "name": "object-keys", + "version": "1.1.1", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Ivan Starkov", + "email": "istarkov@gmail.com" + }, + { + "name": "Gary Katsevman", + "email": "git@gkatsev.com" + } + ], + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent audit", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "preaudit": "npm install --package-lock --package-lock-only", + "audit": "npm audit", + "postaudit": "rm package-lock.json" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^13.1.1", + "covert": "^1.1.1", + "eslint": "^5.13.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "tape": "^4.9.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js new file mode 100644 index 0000000..5402465 --- /dev/null +++ b/node_modules/object-keys/test/index.js @@ -0,0 +1,5 @@ +'use strict'; + +require('./isArguments'); + +require('./shim'); diff --git a/node_modules/object-visit/LICENSE b/node_modules/object-visit/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/object-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/object-visit/README.md b/node_modules/object-visit/README.md new file mode 100644 index 0000000..64015cb --- /dev/null +++ b/node_modules/object-visit/README.md @@ -0,0 +1,83 @@ +# object-visit [![NPM version](https://img.shields.io/npm/v/object-visit.svg?style=flat)](https://www.npmjs.com/package/object-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![NPM total downloads](https://img.shields.io/npm/dt/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object-visit) + +> Call a specified method on each value in the given object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object-visit +``` + +## Usage + +```js +var visit = require('object-visit'); + +var ctx = { + data: {}, + set: function (key, value) { + if (typeof key === 'object') { + visit(ctx, 'set', key); + } else { + ctx.data[key] = value; + } + } +}; + +ctx.set('a', 'a'); +ctx.set('b', 'b'); +ctx.set('c', 'c'); +ctx.set({d: {e: 'f'}}); + +console.log(ctx.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }}; +``` + +## About + +### Related projects + +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit "Map `visit` over an array of objects.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 30, 2017._ \ No newline at end of file diff --git a/node_modules/object-visit/index.js b/node_modules/object-visit/index.js new file mode 100644 index 0000000..fcaeda9 --- /dev/null +++ b/node_modules/object-visit/index.js @@ -0,0 +1,33 @@ +/*! + * object-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function visit(thisArg, method, target, val) { + if (!isObject(thisArg) && typeof thisArg !== 'function') { + throw new Error('object-visit expects `thisArg` to be an object.'); + } + + if (typeof method !== 'string') { + throw new Error('object-visit expects `method` name to be a string'); + } + + if (typeof thisArg[method] !== 'function') { + return thisArg; + } + + var args = [].slice.call(arguments, 3); + target = target || {}; + + for (var key in target) { + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); + } + return thisArg; +}; diff --git a/node_modules/object-visit/package.json b/node_modules/object-visit/package.json new file mode 100644 index 0000000..15fd0ff --- /dev/null +++ b/node_modules/object-visit/package.json @@ -0,0 +1,65 @@ +{ + "name": "object-visit", + "description": "Call a specified method on each value in the given object.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/object-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/object-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "context", + "function", + "helper", + "key", + "method", + "object", + "value", + "visit", + "visitor" + ], + "verb": { + "related": { + "list": [ + "base-methods", + "collection-visit", + "define-property", + "map-visit" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/object.assign/.editorconfig b/node_modules/object.assign/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/object.assign/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc new file mode 100644 index 0000000..1318516 --- /dev/null +++ b/node_modules/object.assign/.eslintrc @@ -0,0 +1,28 @@ +{ + "root": true, + + "extends": "@ljharb", + + "ignorePatterns": ["dist/"], + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": [2, { "min": 1, "max": 30 }], + "max-statements": [2, 33], + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": [1, { "ignore": [0] }], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-invalid-this": 1, + "max-lines-per-function": 0, + "max-statements-per-line": [2, { "max": 3 }], + "no-magic-numbers": 0, + }, + }, + ], +} diff --git a/node_modules/object.assign/.github/FUNDING.yml b/node_modules/object.assign/.github/FUNDING.yml new file mode 100644 index 0000000..ef7fdbf --- /dev/null +++ b/node_modules/object.assign/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/object.assign +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/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/object.assign/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md new file mode 100644 index 0000000..426c5b7 --- /dev/null +++ b/node_modules/object.assign/CHANGELOG.md @@ -0,0 +1,225 @@ +4.1.4 / 2022-08-16 +================== + * [meta] fix `npmignore` integration (#83) + +4.1.3 / 2022-08-05 +================== + * [Refactor] make steps closer to actual spec + * [Refactor] simplify object coercible check + * [readme] remove defunct badges, add coverage and actions badges + * [eslint] ignore coverage output + * [meta] use `npmignore` to autogenerate an npmignore file + * [meta] remove audit-level + * [Deps] update `call-bind`, `define-properties`, `has-symbols` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Tests] add implementation tests + * [Tests] use `mock-property` + * [Tests] disable posttest pending `aud` handling `file:` deps + * [Tests] migrate remaining tests to Github Actions (#81) + * [Tests] gitignore coverage output + * [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80) + +4.1.2 / 2020-10-30 +================== + * [Refactor] use extracted `call-bind` instead of full `es-abstract` + * [Dev Deps] update `eslint`, `ses`, `browserify` + * [Tests] run tests in SES + * [Tests] ses-compat: show error stacks + +4.1.1 / 2020-09-11 +================== + * [Fix] avoid mutating `Object.assign` in modern engines + * [Refactor] use `callBind` from `es-abstract` instead of `function-bind` + * [Deps] update `has-symbols`, `object-keys`, `define-properties` + * [meta] add `funding` field, FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `browserify`, `covert`, `for-each`, `is`, `tape`, `functions-have-names`; add `aud`, `safe-publish-latest`; remove `jscs` + * [actions] add Require Allow Edits workflow + * [actions] add automatic rebasing / merge commit blocking + * [Tests] ses-compat - add test to ensure package initializes correctly after ses lockdown (#77) + * [Tests] Add passing test for a source of `window.location` (#68) + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `npm audit` with hoops or `nsp` + * [Tests] use `functions-have-names` + +4.1.0 / 2017-12-21 +================== + * [New] add `auto` entry point (#52) + * [Refactor] Use `has-symbols` module + * [Deps] update `function-bind`, `object-keys` + * [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is` + * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +4.0.4 / 2016-07-04 +================== + * [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api` + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] run sham tests on node 0.10 + * [Tests] use pretest/posttest for linting/security + +4.0.3 / 2015-10-21 +================== + * [Fix] Support core-js's Symbol sham (#17) + * [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16) + * [Fix] Avoid looking up keys and values more than once + * [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122)) + * [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests + * [Tests] Create `npm run test:shams` and better organize tests for symbol shams + * [Tests] Remove `nsp` in favor of `requiresafe` + +4.0.2 / 2015-10-20 +================== + * [Fix] Ensure correct property enumeration order, particularly in v8 (#15) + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +4.0.1 / 2015-08-16 +================== + * [Docs] Add `Symbol` note to readme + +4.0.0 / 2015-08-15 +================== + * [Breaking] Implement the [es-shim API](es-shims/api). + * [Robustness] Make implementation robust against later modification of environment methods. + * [Refactor] Move implementation to `implementation.js` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify` + * [Tests] Add `npm run tests-only` + * [Tests] use my personal shared `eslint` config. + * [Tests] up to `io.js` `v3.0` + +3.0.1 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3. + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp` + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348 + +3.0.0 / 2015-05-20 +================== + * Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12) + * Make a separate `hasSymbols` internal module + * Update `browserify`, `eslint` + +2.0.3 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3 + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `browserify`, `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +2.0.2 / 2015-05-20 +================== + * Make sure `.shim` is non-enumerable. + * Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original. + * Update docs to match spec/implementation. (#11) + * Add `npm run eslint` + * Test up to `io.js` `v2.0` + * Update `jscs`, `browserify`, `covert` + +2.0.1 / 2015-04-12 +================== + * Make sure non-enumerable Symbols are excluded. + +2.0.0 / 2015-04-12 +================== + * Make sure the shim function overwrites a broken implementation with pending exceptions. + * Ensure shim is not enumerable using `define-properties` + * Ensure `Object.assign` includes symbols. + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. + * Add `npm run security` via `nsp` + * Update `browserify`, `jscs`, `tape`, `object-keys`, `is` + +1.1.1 / 2014-12-14 +================== + * Actually include the browser build in `npm` + +1.1.0 / 2014-12-14 +================== + * Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process. + * Update `is`, `jscs` + +1.0.3 / 2014-11-29 +================== + * Revert "optimize --production installs" + +1.0.2 / 2014-11-27 +================== + * Update `jscs`, `is`, `object-keys`, `tape` + * Add badges to README + * Name URLs in README + * Lock `covert` to `v1.0.0` + * Optimize --production installs + +1.0.1 / 2014-08-26 +================== + * Update `is`, `covert` + +1.0.0 / 2014-08-07 +================== + * Update `object-keys`, `tape` + +0.5.0 / 2014-07-31 +================== + * Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096 + +0.4.3 / 2014-07-30 +================== + * Don’t modify vars in the function signature, since it deoptimizes v8 + +0.4.2 / 2014-07-30 +================== + * Fixing the version number: v0.4.2 + +0.4.1 / 2014-07-19 +================== + * Revert "Use the native Object.keys if it’s available." + +0.4.0 / 2014-07-19 +================== + * Use the native Object.keys if it’s available. + * Fixes [#2](https://github.com/ljharb/object.assign/issues/2). + * Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2). + * Fix indentation. + * Adding `npm run lint` + * Update `tape`, `covert` + * README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1 + +0.3.1 / 2014-04-10 +================== + * Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400 + +0.3.0 / 2014-04-10 +================== + * Update with newest ES6 behavior - Object.assign now takes a variable number of source objects. + * Update `tape` + * Make sure old and unstable nodes don’t fail Travis + +0.2.1 / 2014-03-16 +================== + * Let object-keys handle the fallback + * Update dependency badges + * Adding bower.json + +0.2.0 / 2014-03-16 +================== + * Use a for loop, because ES3 browsers don’t have "reduce" + +0.1.1 / 2014-03-14 +================== + * Updating readme + +0.1.0 / 2014-03-14 +================== + * Initial release. + diff --git a/node_modules/object.assign/LICENSE b/node_modules/object.assign/LICENSE new file mode 100644 index 0000000..ab29cbd --- /dev/null +++ b/node_modules/object.assign/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/object.assign/README.md b/node_modules/object.assign/README.md new file mode 100644 index 0000000..8e933fe --- /dev/null +++ b/node_modules/object.assign/README.md @@ -0,0 +1,136 @@ +# object.assign [![Version Badge][npm-version-svg]][npm-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]][npm-url] + +An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Takes a minimum of 2 arguments: `target` and `source`. +Takes a variable sized list of source arguments - at least 1, as many as you want. +Throws a TypeError if the `target` argument is `null` or `undefined`. + +Most common usage: +```js +var assign = require('object.assign').getPolyfill(); // returns native method if compliant + /* or */ +var assign = require('object.assign/polyfill')(); // returns native method if compliant +``` + +## Example + +```js +var assert = require('assert'); + +// Multiple sources! +var target = { a: true }; +var source1 = { b: true }; +var source2 = { c: true }; +var sourceN = { n: true }; + +var expected = { + a: true, + b: true, + c: true, + n: true +}; + +assign(target, source1, source2, sourceN); +assert.deepEqual(target, expected); // AWESOME! +``` + +```js +var target = { + a: true, + b: true, + c: true +}; +var source1 = { + c: false, + d: false +}; +var sourceN = { + e: false +}; + +var assigned = assign(target, source1, sourceN); +assert.equal(target, assigned); // returns the target object +assert.deepEqual(assigned, { + a: true, + b: true, + c: false, + d: false, + e: false +}); +``` + +```js +/* when Object.assign is not present */ +delete Object.assign; +var shimmedAssign = require('object.assign').shim(); + /* or */ +var shimmedAssign = require('object.assign/shim')(); + +assert.equal(shimmedAssign, assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +var assigned = assign(target, source); +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +```js +/* when Object.assign is present */ +var shimmedAssign = require('object.assign').shim(); +assert.equal(shimmedAssign, Object.assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[npm-url]: https://npmjs.org/package/object.assign +[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg +[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg +[travis-url]: https://travis-ci.org/ljharb/object.assign +[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io +[deps-url]: https://david-dm.org/ljharb/object.assign +[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io +[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object.assign.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object.assign +[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign +[actions-url]: https://github.com/ljharb/object.assign/actions diff --git a/node_modules/object.assign/auto.js b/node_modules/object.assign/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/object.assign/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js new file mode 100644 index 0000000..115a457 --- /dev/null +++ b/node_modules/object.assign/dist/browser.js @@ -0,0 +1,944 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +},{"./":5,"get-intrinsic":9}],5:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + +},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; // eslint-disable-line no-param-reassign + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + +},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],8:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":7}],9:[function(require,module,exports){ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('has'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"get-intrinsic":9}],11:[function(require,module,exports){ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +},{"./shams":12}],12:[function(require,module,exports){ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{}],13:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + +},{"function-bind":8}],14:[function(require,module,exports){ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + +},{"./isArguments":16}],15:[function(require,module,exports){ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + +},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + +},{}],17:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; + +},{"./implementation":2}],18:[function(require,module,exports){ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; + +},{"./polyfill":17,"define-properties":6}]},{},[1]); diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js new file mode 100644 index 0000000..34841e0 --- /dev/null +++ b/node_modules/object.assign/hasSymbols.js @@ -0,0 +1,43 @@ +'use strict'; + +var keys = require('object-keys'); + +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + /* + * temp disabled per https://github.com/ljharb/object.assign/issues/17 + * if (sym instanceof Symbol) { return false; } + * temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + * if (!(symObj instanceof Symbol)) { return false; } + */ + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop + if (keys(obj).length !== 0) { return false; } + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js new file mode 100644 index 0000000..7a85167 --- /dev/null +++ b/node_modules/object.assign/implementation.js @@ -0,0 +1,46 @@ +'use strict'; + +// modified from https://github.com/es-shims/es6-shim +var objectKeys = require('object-keys'); +var hasSymbols = require('has-symbols/shams')(); +var callBound = require('call-bind/callBound'); +var toObject = Object; +var $push = callBound('Array.prototype.push'); +var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; + +// eslint-disable-next-line no-unused-vars +module.exports = function assign(target, source1) { + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); + var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); + if (getSymbols) { + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); + } + } + } + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b + } + } + } + + return to; // step 4 +}; diff --git a/node_modules/object.assign/index.js b/node_modules/object.assign/index.js new file mode 100644 index 0000000..9b50603 --- /dev/null +++ b/node_modules/object.assign/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = callBind.apply(getPolyfill()); +// eslint-disable-next-line no-unused-vars +var bound = function assign(target, source1) { + return polyfill(Object, arguments); +}; + +defineProperties(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json new file mode 100644 index 0000000..c3e413e --- /dev/null +++ b/node_modules/object.assign/package.json @@ -0,0 +1,96 @@ +{ + "name": "object.assign", + "version": "4.1.4", + "author": "Jordan Harband", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint && es-shim-api --bound", + "test": "npm run tests-only && npm run test:ses", + "posttest": "aud --production", + "tests-only": "npm run test:implementation && npm run test:shim", + "test:native": "nyc node test/native", + "test:shim": "nyc node test/shimmed", + "test:implementation": "nyc node test", + "test:ses": "node test/ses-compat", + "lint": "eslint .", + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.assign.git" + }, + "keywords": [ + "Object.assign", + "assign", + "ES6", + "extend", + "$.extend", + "jQuery", + "_.extend", + "Underscore", + "es-shim API", + "polyfill", + "shim" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "browserify": "^16.5.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has": "^1.0.3", + "has-strict-mode": "^1.0.1", + "is": "^3.3.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "ses": "^0.11.1", + "tape": "^5.5.3" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "bower.json", + "browserShim.js", + "!dist/" + ] + } +} diff --git a/node_modules/object.assign/polyfill.js b/node_modules/object.assign/polyfill.js new file mode 100644 index 0000000..ca94aea --- /dev/null +++ b/node_modules/object.assign/polyfill.js @@ -0,0 +1,55 @@ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; diff --git a/node_modules/object.assign/shim.js b/node_modules/object.assign/shim.js new file mode 100644 index 0000000..9f896ae --- /dev/null +++ b/node_modules/object.assign/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/object.assign/test.html b/node_modules/object.assign/test.html new file mode 100644 index 0000000..c4efa6d --- /dev/null +++ b/node_modules/object.assign/test.html @@ -0,0 +1,18458 @@ +

diff --git a/node_modules/object.assign/test/implementation.js b/node_modules/object.assign/test/implementation.js
new file mode 100644
index 0000000..05d7d7a
--- /dev/null
+++ b/node_modules/object.assign/test/implementation.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var implementation = require('../implementation');
+var callBind = require('call-bind');
+var test = require('tape');
+var hasStrictMode = require('has-strict-mode')();
+var runTests = require('./tests');
+
+test('as a function', function (t) {
+	t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
+		st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	runTests(callBind(implementation, Object), t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/index.js b/node_modules/object.assign/test/index.js
new file mode 100644
index 0000000..776b2b3
--- /dev/null
+++ b/node_modules/object.assign/test/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var assign = require('../');
+var test = require('tape');
+var runTests = require('./tests');
+
+test('as a function', function (t) {
+	t.test('bad array/this value', function (st) {
+		st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { assign(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	runTests(assign, t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/native.js b/node_modules/object.assign/test/native.js
new file mode 100644
index 0000000..49a70f7
--- /dev/null
+++ b/node_modules/object.assign/test/native.js
@@ -0,0 +1,49 @@
+'use strict';
+
+var test = require('tape');
+var defineProperties = require('define-properties');
+var isEnumerable = Object.prototype.propertyIsEnumerable;
+var functionsHaveNames = require('functions-have-names')();
+
+var runTests = require('./tests');
+
+test('native', function (t) {
+	t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
+	t.test('Function name', { skip: !functionsHaveNames }, function (st) {
+		st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
+		st.end();
+	});
+
+	t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
+		et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
+		et.end();
+	});
+
+	var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
+
+	t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
+		st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	// v8 in node 0.8 and 0.10 have non-enumerable string properties
+	var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
+	t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
+		/*
+		 * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
+		 * which is 72% slower than our shim, and Firefox 40's native implementation.
+		 */
+		var thrower = Object.preventExtensions({ 1: '2' });
+		var error;
+		try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
+		st.equal(error instanceof TypeError, true, 'error is TypeError');
+		st.equal(thrower[1], '2', 'thrower[1] === "2"');
+
+		st.end();
+	});
+
+	runTests(Object.assign, t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/ses-compat.js b/node_modules/object.assign/test/ses-compat.js
new file mode 100644
index 0000000..9669eb9
--- /dev/null
+++ b/node_modules/object.assign/test/ses-compat.js
@@ -0,0 +1,12 @@
+'use strict';
+
+/* globals lockdown */
+
+// requiring ses exposes "lockdown" on the global
+require('ses');
+
+// lockdown freezes the primordials
+lockdown({ errorTaming: 'unsafe' });
+
+// initialize the module
+require('./');
diff --git a/node_modules/object.assign/test/shimmed.js b/node_modules/object.assign/test/shimmed.js
new file mode 100644
index 0000000..ee57758
--- /dev/null
+++ b/node_modules/object.assign/test/shimmed.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var assign = require('../');
+assign.shim();
+
+var test = require('tape');
+var defineProperties = require('define-properties');
+var isEnumerable = Object.prototype.propertyIsEnumerable;
+var functionsHaveNames = require('functions-have-names')();
+
+var runTests = require('./tests');
+
+test('shimmed', function (t) {
+	t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
+	t.test('Function name', { skip: !functionsHaveNames }, function (st) {
+		st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
+		st.end();
+	});
+
+	t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
+		et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
+		et.end();
+	});
+
+	var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
+
+	t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
+		st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	// v8 in node 0.8 and 0.10 have non-enumerable string properties
+	var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
+	t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
+		/*
+		 * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
+		 * which is 72% slower than our shim, and Firefox 40's native implementation.
+		 */
+		var thrower = Object.preventExtensions({ 1: '2' });
+		var error;
+		try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
+		st.equal(error instanceof TypeError, true, 'error is TypeError');
+		st.equal(thrower[1], '2', 'thrower[1] === "2"');
+
+		st.end();
+	});
+
+	runTests(Object.assign, t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js
new file mode 100644
index 0000000..40b0b80
--- /dev/null
+++ b/node_modules/object.assign/test/tests.js
@@ -0,0 +1,232 @@
+'use strict';
+
+var hasSymbols = require('has-symbols/shams')();
+var forEach = require('for-each');
+var has = require('has');
+var mockProperty = require('mock-property');
+
+module.exports = function (assign, t) {
+	t.test('error cases', function (st) {
+		st['throws'](function () { assign(null); }, TypeError, 'target must be an object');
+		st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object');
+		st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object');
+		st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object');
+		st.end();
+	});
+
+	t.test('non-object target, no sources', function (st) {
+		var bool = assign(true);
+		st.equal(typeof bool, 'object', 'bool is object');
+		st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
+
+		var number = assign(1);
+		st.equal(typeof number, 'object', 'number is object');
+		st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
+
+		var string = assign('1');
+		st.equal(typeof string, 'object', 'number is object');
+		st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
+
+		st.end();
+	});
+
+	t.test('non-object target, with sources', function (st) {
+		var signal = {};
+
+		st.test('boolean', function (st2) {
+			var bool = assign(true, { a: signal });
+			st2.equal(typeof bool, 'object', 'bool is object');
+			st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
+			st2.equal(bool.a, signal, 'source properties copied');
+			st2.end();
+		});
+
+		st.test('number', function (st2) {
+			var number = assign(1, { a: signal });
+			st2.equal(typeof number, 'object', 'number is object');
+			st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
+			st2.equal(number.a, signal, 'source properties copied');
+			st2.end();
+		});
+
+		st.test('string', function (st2) {
+			var string = assign('1', { a: signal });
+			st2.equal(typeof string, 'object', 'number is object');
+			st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
+			st2.equal(string.a, signal, 'source properties copied');
+			st2.end();
+		});
+
+		st.end();
+	});
+
+	t.test('non-object sources', function (st) {
+		st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source');
+		st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source');
+		st.end();
+	});
+
+	t.test('returns the modified target object', function (st) {
+		var target = {};
+		var returned = assign(target, { a: 1 });
+		st.equal(returned, target, 'returned object is the same reference as the target object');
+		st.end();
+	});
+
+	t.test('has the right length', function (st) {
+		st.equal(assign.length, 2, 'length is 2 => 2 required arguments');
+		st.end();
+	});
+
+	t.test('merge two objects', function (st) {
+		var target = { a: 1 };
+		var returned = assign(target, { b: 2 });
+		st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both');
+		st.end();
+	});
+
+	t.test('works with functions', function (st) {
+		var target = function () {};
+		target.a = 1;
+		var returned = assign(target, { b: 2 });
+		st.equal(target, returned, 'returned object is target');
+		st.equal(returned.a, 1);
+		st.equal(returned.b, 2);
+		st.end();
+	});
+
+	t.test('works with primitives', function (st) {
+		var target = 2;
+		var source = { b: 42 };
+		var returned = assign(target, source);
+		st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive');
+		st.equal(Number(returned), target, 'returned and target have same valueOf');
+		st.equal(returned.b, source.b);
+		st.end();
+	});
+
+	/* globals window */
+	t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) {
+		var target = {};
+		assign(target, window.location);
+		for (var prop in window.location) {
+			if (has(window.location, prop)) {
+				st.deepEqual(target[prop], window.location[prop], prop + ' is copied');
+			}
+		}
+		st.end();
+	});
+
+	t.test('merge N objects', function (st) {
+		var target = { a: 1 };
+		var source1 = { b: 2 };
+		var source2 = { c: 3 };
+		var returned = assign(target, source1, source2);
+		st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources');
+		st.end();
+	});
+
+	t.test('only iterates over own keys', function (st) {
+		var Foo = function () {};
+		Foo.prototype.bar = true;
+		var foo = new Foo();
+		foo.baz = true;
+		var target = { a: 1 };
+		var returned = assign(target, foo);
+		st.equal(returned, target, 'returned object is the same reference as the target object');
+		st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both');
+		st.end();
+	});
+
+	t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) {
+		var visited = [];
+		var obj = {};
+		Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
+		var symbol = Symbol('enumerable');
+		Object.defineProperty(obj, symbol, {
+			enumerable: true,
+			get: function () { visited.push(symbol); return Infinity; }
+		});
+		var nonEnumSymbol = Symbol('non-enumerable');
+		Object.defineProperty(obj, nonEnumSymbol, {
+			enumerable: false,
+			get: function () { visited.push(nonEnumSymbol); return -Infinity; }
+		});
+		var target = assign({}, obj);
+		st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol');
+		st.equal(target.a, 42, 'target.a is 42');
+		st.equal(target[symbol], Infinity, 'target[symbol] is Infinity');
+		st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity');
+		st.end();
+	});
+
+	t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
+		st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
+
+		var visited = [];
+		var obj = {};
+		Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
+		var keys = ['a'];
+		if (hasSymbols) {
+			var symbol = Symbol('sym');
+			Object.defineProperty(obj, symbol, {
+				enumerable: true,
+				get: function () { visited.push(symbol); return Infinity; }
+			});
+			keys.push(symbol);
+		}
+		var target = assign({}, obj);
+		st.deepEqual(visited, keys, 'assign visits expected keys');
+		st.equal(target.a, 42, 'target.a is 42');
+
+		if (hasSymbols) {
+			st.equal(target[symbol], Infinity);
+		}
+		st.end();
+	});
+
+	t.test('preserves correct property enumeration order', function (st) {
+		var str = 'abcdefghijklmnopqrst';
+		var letters = {};
+		forEach(str.split(''), function (letter) {
+			letters[letter] = letter;
+		});
+
+		var n = 5;
+		st.comment('run the next test ' + n + ' times');
+		var object = assign({}, letters);
+		var actual = '';
+		for (var k in object) {
+			actual += k;
+		}
+		for (var i = 0; i < n; ++i) {
+			st.equal(actual, str, 'property enumeration order should be followed');
+		}
+		st.end();
+	});
+
+	t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) {
+		var targetBvalue = {};
+		var targetCvalue = {};
+		var target = { b: targetBvalue, c: targetCvalue };
+		var source = {};
+		Object.defineProperty(source, 'a', {
+			enumerable: true,
+			get: function () {
+				delete this.b;
+				Object.defineProperty(this, 'c', { enumerable: false });
+				return 'a';
+			}
+		});
+		var sourceBvalue = {};
+		var sourceCvalue = {};
+		source.b = sourceBvalue;
+		source.c = sourceCvalue;
+		var result = assign(target, source);
+		st.equal(result, target, 'sanity check: result is === target');
+		st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key');
+		st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key');
+
+		st.end();
+	});
+};
diff --git a/node_modules/object.defaults/LICENSE b/node_modules/object.defaults/LICENSE
new file mode 100644
index 0000000..d290fe0
--- /dev/null
+++ b/node_modules/object.defaults/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, 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.
diff --git a/node_modules/object.defaults/README.md b/node_modules/object.defaults/README.md
new file mode 100644
index 0000000..435c897
--- /dev/null
+++ b/node_modules/object.defaults/README.md
@@ -0,0 +1,85 @@
+# object.defaults [![NPM version](https://img.shields.io/npm/v/object.defaults.svg?style=flat)](https://www.npmjs.com/package/object.defaults) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.defaults.svg?style=flat)](https://npmjs.org/package/object.defaults)  [![NPM total downloads](https://img.shields.io/npm/dt/object.defaults.svg?style=flat)](https://npmjs.org/package/object.defaults) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.defaults.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.defaults)
+
+> Like `extend` but only copies missing properties/values to the target object.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save object.defaults
+```
+
+Install with [bower](https://bower.io/)
+
+```sh
+$ bower install object.defaults --save
+```
+
+## Usage
+
+```js
+var defaults = require('object.defaults');
+
+var obj = {a: 'c'};
+defaults(obj, {a: 'bbb', d: 'c'});
+console.log(obj);
+//=> {a: 'c', d: 'c'}
+```
+
+Or immutable defaulting:
+```js
+var defaults = require('object.defaults/immutable');
+var obj = {a: 'c'};
+var defaulted = defaults(obj, {a: 'bbb', d: 'c'});
+console.log(obj !== defaulted);
+//=> true
+```
+
+## About
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** | 
+| --- | --- |
+| 16 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [phated](https://github.com/phated) |
+| 1 | [sobolevn](https://github.com/sobolevn) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 26, 2017._
\ No newline at end of file
diff --git a/node_modules/object.defaults/immutable.js b/node_modules/object.defaults/immutable.js
new file mode 100644
index 0000000..16d847e
--- /dev/null
+++ b/node_modules/object.defaults/immutable.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var slice = require('array-slice');
+
+var defaults = require('./mutable');
+
+/**
+ * Extends an empty object with properties of one or
+ * more additional `objects`
+ *
+ * @name .defaults.immutable
+ * @param  {Object} `objects`
+ * @return {Object}
+ * @api public
+ */
+
+module.exports = function immutableDefaults() {
+  var args = slice(arguments);
+  return defaults.apply(null, [{}].concat(args));
+};
diff --git a/node_modules/object.defaults/index.js b/node_modules/object.defaults/index.js
new file mode 100644
index 0000000..b9e6437
--- /dev/null
+++ b/node_modules/object.defaults/index.js
@@ -0,0 +1,11 @@
+/*!
+ * object.defaults 
+ *
+ * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+module.exports = require('./mutable');
+module.exports.immutable = require('./immutable');
diff --git a/node_modules/object.defaults/mutable.js b/node_modules/object.defaults/mutable.js
new file mode 100644
index 0000000..fac447f
--- /dev/null
+++ b/node_modules/object.defaults/mutable.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var each = require('array-each');
+var slice = require('array-slice');
+var forOwn = require('for-own');
+var isObject = require('isobject');
+
+/**
+ * Extends the `target` object with properties of one or
+ * more additional `objects`
+ *
+ * @name .defaults
+ * @param  {Object} `target` The target object. Pass an empty object to shallow clone.
+ * @param  {Object} `objects`
+ * @return {Object}
+ * @api public
+ */
+
+module.exports = function defaults(target, objects) {
+  if (target == null) {
+    return {};
+  }
+
+  each(slice(arguments, 1), function(obj) {
+    if (isObject(obj)) {
+      forOwn(obj, function(val, key) {
+        if (target[key] == null) {
+          target[key] = val;
+        }
+      });
+    }
+  });
+
+  return target;
+};
diff --git a/node_modules/object.defaults/package.json b/node_modules/object.defaults/package.json
new file mode 100644
index 0000000..56cf82c
--- /dev/null
+++ b/node_modules/object.defaults/package.json
@@ -0,0 +1,67 @@
+{
+  "name": "object.defaults",
+  "description": "Like `extend` but only copies missing properties/values to the target object.",
+  "version": "1.1.0",
+  "homepage": "https://github.com/jonschlinkert/object.defaults",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Jon Schlinkert  (http://twitter.com/jonschlinkert)",
+    "Sobolev Nikita  (https://github.com/sobolevn)"
+  ],
+  "repository": "jonschlinkert/object.defaults",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/object.defaults/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js",
+    "immutable.js",
+    "mutable.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "dependencies": {
+    "array-each": "^1.0.1",
+    "array-slice": "^1.0.0",
+    "for-own": "^1.0.0",
+    "isobject": "^3.0.0"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.11",
+    "mocha": "^3.2.0"
+  },
+  "keywords": [
+    "copy",
+    "default",
+    "defaults",
+    "extend",
+    "javascript",
+    "js",
+    "merge",
+    "object",
+    "properties",
+    "property",
+    "util",
+    "utils",
+    "value",
+    "values"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}
diff --git a/node_modules/object.map/LICENSE b/node_modules/object.map/LICENSE
new file mode 100644
index 0000000..2a3cb73
--- /dev/null
+++ b/node_modules/object.map/LICENSE
@@ -0,0 +1,24 @@
+
+
+Copyright (c) 2014-2017, Jon Schlinkert, contributors.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/object.map/README.md b/node_modules/object.map/README.md
new file mode 100644
index 0000000..a189bb9
--- /dev/null
+++ b/node_modules/object.map/README.md
@@ -0,0 +1,87 @@
+# object.map [![NPM version](https://img.shields.io/npm/v/object.map.svg?style=flat)](https://www.npmjs.com/package/object.map) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.map.svg?style=flat)](https://npmjs.org/package/object.map)  [![NPM total downloads](https://img.shields.io/npm/dt/object.map.svg?style=flat)](https://npmjs.org/package/object.map) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.map.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.map) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/object.map.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/object.map)
+
+> Similar to map for arrays, this creates a new object by calling the callback on each property of the original object.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save object.map
+```
+
+## Usage
+
+```js
+var mapValues = require('object.map');
+
+var result = mapValues({a: 'a', b: 'b'}, function(val, key, obj) {
+  return val + val;
+});
+console.log(result);
+//=> {a: 'aa', b: 'bb'}
+```
+
+Optionally specify a `thisArg` as the last argument:
+
+```js
+var result = mapValues({a: 'b'}, function(val, key, obj) {
+  return this.foo;
+}, {foo: 'bar'});
+console.log(result);
+//=> {a: 'bar'}
+```
+
+## About
+
+### Related projects
+
+* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.")
+* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
+* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |  
+| --- | --- |  
+| 4 | [jonschlinkert](https://github.com/jonschlinkert) |  
+| 1 | [phated](https://github.com/phated) |  
+| 1 | [doowb](https://github.com/doowb) |  
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 20, 2017._
\ No newline at end of file
diff --git a/node_modules/object.map/index.js b/node_modules/object.map/index.js
new file mode 100644
index 0000000..0baef88
--- /dev/null
+++ b/node_modules/object.map/index.js
@@ -0,0 +1,22 @@
+/*!
+ * object.map 
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+var makeIterator = require('make-iterator');
+var forOwn = require('for-own');
+
+module.exports = function(obj, fn, thisArg) {
+  var iterator = makeIterator(fn, thisArg);
+  var result = {};
+
+  forOwn(obj, function(value, key, orig) {
+    result[key] = iterator(value, key, orig);
+  });
+
+  return result;
+};
diff --git a/node_modules/object.map/package.json b/node_modules/object.map/package.json
new file mode 100644
index 0000000..0f331e8
--- /dev/null
+++ b/node_modules/object.map/package.json
@@ -0,0 +1,59 @@
+{
+  "name": "object.map",
+  "description": "Similar to map for arrays, this creates a new object by calling the callback on each property of the original object.",
+  "version": "1.0.1",
+  "homepage": "https://github.com/jonschlinkert/object.map",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "Blaine Bublitz (https://twitter.com/BlaineBublitz)",
+    "Brian Woodward (https://twitter.com/doowb)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)"
+  ],
+  "repository": "jonschlinkert/object.map",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/object.map/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "dependencies": {
+    "for-own": "^1.0.0",
+    "make-iterator": "^1.0.0"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.11",
+    "mocha": "^3.2.0"
+  },
+  "keywords": [
+    "map",
+    "object"
+  ],
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "list": [
+        "arr-map",
+        "array-each",
+        "collection-map"
+      ]
+    },
+    "lint": {
+      "reflinks": true
+    }
+  }
+}
diff --git a/node_modules/object.pick/LICENSE b/node_modules/object.pick/LICENSE
new file mode 100644
index 0000000..39245ac
--- /dev/null
+++ b/node_modules/object.pick/LICENSE
@@ -0,0 +1,21 @@
+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.
diff --git a/node_modules/object.pick/README.md b/node_modules/object.pick/README.md
new file mode 100644
index 0000000..48f7453
--- /dev/null
+++ b/node_modules/object.pick/README.md
@@ -0,0 +1,76 @@
+# object.pick [![NPM version](https://img.shields.io/npm/v/object.pick.svg?style=flat)](https://www.npmjs.com/package/object.pick) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick)  [![NPM total downloads](https://img.shields.io/npm/dt/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.pick.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.pick)
+
+> Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.
+
+You might also be interested in [object.omit](https://github.com/jonschlinkert/object.omit).
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save object.pick
+```
+
+## benchmarks
+
+This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome!
+
+## Usage
+
+```js
+var pick = require('object.pick');
+
+pick({a: 'a', b: 'b'}, 'a')
+//=> {a: 'a'}
+
+pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b'])
+//=> {a: 'a', b: 'b'}
+```
+
+## About
+
+### Related projects
+
+* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
+* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.")
+* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
+* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/object.pick/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._
\ No newline at end of file
diff --git a/node_modules/object.pick/index.js b/node_modules/object.pick/index.js
new file mode 100644
index 0000000..0ce0178
--- /dev/null
+++ b/node_modules/object.pick/index.js
@@ -0,0 +1,35 @@
+/*!
+ * object.pick 
+ *
+ * Copyright (c) 2014-2015 Jon Schlinkert, contributors.
+ * Licensed under the MIT License
+ */
+
+'use strict';
+
+var isObject = require('isobject');
+
+module.exports = function pick(obj, keys) {
+  if (!isObject(obj) && typeof obj !== 'function') {
+    return {};
+  }
+
+  var res = {};
+  if (typeof keys === 'string') {
+    if (keys in obj) {
+      res[keys] = obj[keys];
+    }
+    return res;
+  }
+
+  var len = keys.length;
+  var idx = -1;
+
+  while (++idx < len) {
+    var key = keys[idx];
+    if (key in obj) {
+      res[key] = obj[key];
+    }
+  }
+  return res;
+};
diff --git a/node_modules/object.pick/package.json b/node_modules/object.pick/package.json
new file mode 100644
index 0000000..b655dbe
--- /dev/null
+++ b/node_modules/object.pick/package.json
@@ -0,0 +1,60 @@
+{
+  "name": "object.pick",
+  "description": "Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.",
+  "version": "1.3.0",
+  "homepage": "https://github.com/jonschlinkert/object.pick",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "repository": "jonschlinkert/object.pick",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/object.pick/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "dependencies": {
+    "isobject": "^3.0.1"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^1.0.0",
+    "mocha": "^3.1.2",
+    "vinyl": "^2.0.0"
+  },
+  "keywords": [
+    "object",
+    "pick"
+  ],
+  "verb": {
+    "run": true,
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "list": [
+        "extend-shallow",
+        "get-value",
+        "mixin-deep",
+        "set-value"
+      ],
+      "highlight": "object.omit"
+    },
+    "reflinks": [
+      "verb"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}
diff --git a/node_modules/object.reduce/LICENSE b/node_modules/object.reduce/LICENSE
new file mode 100644
index 0000000..d290fe0
--- /dev/null
+++ b/node_modules/object.reduce/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, 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.
diff --git a/node_modules/object.reduce/README.md b/node_modules/object.reduce/README.md
new file mode 100644
index 0000000..9c21207
--- /dev/null
+++ b/node_modules/object.reduce/README.md
@@ -0,0 +1,95 @@
+# object.reduce [![NPM version](https://img.shields.io/npm/v/object.reduce.svg?style=flat)](https://www.npmjs.com/package/object.reduce) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.reduce.svg?style=flat)](https://npmjs.org/package/object.reduce) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.reduce.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.reduce)
+
+> Reduces an object to a value that is the accumulated result of running each property in the object through a callback.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save object.reduce
+```
+
+Install with [yarn](https://yarnpkg.com):
+
+```sh
+$ yarn add object.reduce
+```
+
+Install with [bower](https://bower.io/)
+
+```sh
+$ bower install object.reduce --save
+```
+
+## Usage
+
+the initial value (or value from the previous callback call), the `value` of the current property, the `key` of the current property, and the `object` over which the function is iterating. Node.js/JavaScript utility.)_
+
+**Params**
+
+* `object` **{Object}**: The object to iterate over (the iteratee)
+* `fn` **{Function}**: The function invoked per iteration.
+* `init` **{Object}**: The initial value to use for the accumulator.
+* `thisArg` **{Object}**: (optional) Object to use as the invocation context for the iterator (expose as `this` inside the iterator)
+
+Executes the given callback `fn` once for each own enumerable property in the object. The callback receives the following arguments:
+
+* `acc`: the initial value (or value from the previous callback call),
+* `value`: the of the current property,
+* `key`: the of the current property, and
+* the original `object` over which the function is iterating.
+
+**Example**
+
+```js
+var reduce = require('object.reduce');
+var a = {a: 'foo', b: 'bar', c: 'baz'};
+
+reduce(a, function(acc, value, key, obj) {
+  acc[key] = value.toUpperCase();
+  return acc;
+}, {});
+
+//=> {a: 'FOO', b: 'BAR', c: 'BAZ'};
+```
+
+## About
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 17, 2017._
\ No newline at end of file
diff --git a/node_modules/object.reduce/index.js b/node_modules/object.reduce/index.js
new file mode 100644
index 0000000..29ec49c
--- /dev/null
+++ b/node_modules/object.reduce/index.js
@@ -0,0 +1,31 @@
+/*!
+ * object.reduce 
+ *
+ * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+var makeIterator = require('make-iterator');
+var forOwn = require('for-own');
+
+module.exports = function reduce(target, fn, acc, thisArg) {
+  var first = arguments.length > 2;
+  if (target && !Object.keys(target).length && !first) {
+    return null;
+  }
+
+  var iterator = makeIterator(fn, thisArg);
+
+  forOwn(target, function(value, key, orig) {
+    if (!first) {
+      acc = value;
+      first = true;
+    } else {
+      acc = iterator(acc, value, key, orig);
+    }
+  });
+
+  return acc;
+};
diff --git a/node_modules/object.reduce/package.json b/node_modules/object.reduce/package.json
new file mode 100644
index 0000000..61d4dc1
--- /dev/null
+++ b/node_modules/object.reduce/package.json
@@ -0,0 +1,47 @@
+{
+  "name": "object.reduce",
+  "description": "Reduces an object to a value that is the accumulated result of running each property in the object through a callback.",
+  "version": "1.0.1",
+  "homepage": "https://github.com/jonschlinkert/object.reduce",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "repository": "jonschlinkert/object.reduce",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/object.reduce/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "keywords": [
+    "object",
+    "reduce"
+  ],
+  "dependencies": {
+    "for-own": "^1.0.0",
+    "make-iterator": "^1.0.0"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.11",
+    "mocha": "^3.2.0"
+  },
+  "verb": {
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}
diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/once/LICENSE
@@ -0,0 +1,15 @@
+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.
diff --git a/node_modules/once/README.md b/node_modules/once/README.md
new file mode 100644
index 0000000..1f1ffca
--- /dev/null
+++ b/node_modules/once/README.md
@@ -0,0 +1,79 @@
+# once
+
+Only call a function once.
+
+## usage
+
+```javascript
+var once = require('once')
+
+function load (file, cb) {
+  cb = once(cb)
+  loader.load('file')
+  loader.once('load', cb)
+  loader.once('error', cb)
+}
+```
+
+Or add to the Function.prototype in a responsible way:
+
+```javascript
+// only has to be done once
+require('once').proto()
+
+function load (file, cb) {
+  cb = cb.once()
+  loader.load('file')
+  loader.once('load', cb)
+  loader.once('error', cb)
+}
+```
+
+Ironically, the prototype feature makes this module twice as
+complicated as necessary.
+
+To check whether you function has been called, use `fn.called`. Once the
+function is called for the first time the return value of the original
+function is saved in `fn.value` and subsequent calls will continue to
+return this value.
+
+```javascript
+var once = require('once')
+
+function load (cb) {
+  cb = once(cb)
+  var stream = createStream()
+  stream.once('data', cb)
+  stream.once('end', function () {
+    if (!cb.called) cb(new Error('not found'))
+  })
+}
+```
+
+## `once.strict(func)`
+
+Throw an error if the function is called twice.
+
+Some functions are expected to be called only once. Using `once` for them would
+potentially hide logical errors.
+
+In the example below, the `greet` function has to call the callback only once:
+
+```javascript
+function greet (name, cb) {
+  // return is missing from the if statement
+  // when no name is passed, the callback is called twice
+  if (!name) cb('Hello anonymous')
+  cb('Hello ' + name)
+}
+
+function log (msg) {
+  console.log(msg)
+}
+
+// this will print 'Hello anonymous' but the logical error will be missed
+greet(null, once(msg))
+
+// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
+greet(null, once.strict(msg))
+```
diff --git a/node_modules/once/once.js b/node_modules/once/once.js
new file mode 100644
index 0000000..2354067
--- /dev/null
+++ b/node_modules/once/once.js
@@ -0,0 +1,42 @@
+var wrappy = require('wrappy')
+module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
+
+once.proto = once(function () {
+  Object.defineProperty(Function.prototype, 'once', {
+    value: function () {
+      return once(this)
+    },
+    configurable: true
+  })
+
+  Object.defineProperty(Function.prototype, 'onceStrict', {
+    value: function () {
+      return onceStrict(this)
+    },
+    configurable: true
+  })
+})
+
+function once (fn) {
+  var f = function () {
+    if (f.called) return f.value
+    f.called = true
+    return f.value = fn.apply(this, arguments)
+  }
+  f.called = false
+  return f
+}
+
+function onceStrict (fn) {
+  var f = function () {
+    if (f.called)
+      throw new Error(f.onceError)
+    f.called = true
+    return f.value = fn.apply(this, arguments)
+  }
+  var name = fn.name || 'Function wrapped with `once`'
+  f.onceError = name + " shouldn't be called more than once"
+  f.called = false
+  return f
+}
diff --git a/node_modules/once/package.json b/node_modules/once/package.json
new file mode 100644
index 0000000..16815b2
--- /dev/null
+++ b/node_modules/once/package.json
@@ -0,0 +1,33 @@
+{
+  "name": "once",
+  "version": "1.4.0",
+  "description": "Run a function exactly one time",
+  "main": "once.js",
+  "directories": {
+    "test": "test"
+  },
+  "dependencies": {
+    "wrappy": "1"
+  },
+  "devDependencies": {
+    "tap": "^7.0.1"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "files": [
+    "once.js"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/once"
+  },
+  "keywords": [
+    "once",
+    "function",
+    "one",
+    "single"
+  ],
+  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
+  "license": "ISC"
+}
diff --git a/node_modules/ordered-read-streams/LICENSE b/node_modules/ordered-read-streams/LICENSE
new file mode 100644
index 0000000..16fd428
--- /dev/null
+++ b/node_modules/ordered-read-streams/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Artem Medeusheyev
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ordered-read-streams/README.md b/node_modules/ordered-read-streams/README.md
new file mode 100644
index 0000000..2fa2489
--- /dev/null
+++ b/node_modules/ordered-read-streams/README.md
@@ -0,0 +1,65 @@
+# ordered-read-streams [![NPM version](https://img.shields.io/npm/v/ordered-read-streams.svg)](http://badge.fury.io/js/ordered-read-streams) [![Build Status](https://travis-ci.org/armed/ordered-read-streams.svg?branch=master)](https://travis-ci.org/armed/ordered-read-streams)
+
+Combines array of streams into one read stream in strict order.
+
+## Installation
+
+`npm install ordered-read-streams`
+
+## Overview
+
+`ordered-read-streams` handles all data/errors from input streams in parallel, but emits data/errors in strict order in which streams are passed to constructor. This is `objectMode = true` stream.
+
+## Example
+
+```js
+var through = require('through2');
+var Ordered = require('ordered-read-streams');
+
+var s1 = through.obj(function (data, enc, next) {
+  var self = this;
+  setTimeout(function () {
+    self.push(data);
+    next();
+  }, 200)
+});
+var s2 = through.obj(function (data, enc, next) {
+  var self = this;
+  setTimeout(function () {
+    self.push(data);
+    next();
+  }, 30)
+});
+var s3 = through.obj(function (data, enc, next) {
+  var self = this;
+  setTimeout(function () {
+    self.push(data);
+    next();
+  }, 100)
+});
+
+var streams = new Ordered([s1, s2, s3]);
+streams.on('data', function (data) {
+  console.log(data);
+})
+
+s1.write('stream 1');
+s1.end();
+
+s2.write('stream 2');
+s2.end();
+
+s3.write('stream 3');
+s3.end();
+```
+Ouput will be:
+
+```
+stream 1
+stream 2
+stream 3
+```
+
+## Licence
+
+MIT
diff --git a/node_modules/ordered-read-streams/index.js b/node_modules/ordered-read-streams/index.js
new file mode 100644
index 0000000..61f3886
--- /dev/null
+++ b/node_modules/ordered-read-streams/index.js
@@ -0,0 +1,99 @@
+var Readable = require('readable-stream/readable');
+var util = require('util');
+
+function isReadable(stream) {
+  if (typeof stream.pipe !== 'function') {
+    return false;
+  }
+
+  if (!stream.readable) {
+    return false;
+  }
+
+  if (typeof stream._read !== 'function') {
+    return false;
+  }
+
+  if (!stream._readableState) {
+    return false;
+  }
+
+  return true;
+}
+
+function addStream (streams, stream) {
+  if (!isReadable(stream)) {
+    throw new Error('All input streams must be readable');
+  }
+
+  var self = this;
+
+  stream._buffer = [];
+
+  stream.on('readable', function () {
+    var chunk = stream.read();
+    while (chunk) {
+      if (this === streams[0]) {
+        self.push(chunk);
+      } else {
+        this._buffer.push(chunk);
+      }
+      chunk = stream.read();
+    }
+  });
+
+  stream.on('end', function () {
+    for (var stream = streams[0];
+      stream && stream._readableState.ended;
+      stream = streams[0]) {
+      while (stream._buffer.length) {
+        self.push(stream._buffer.shift());
+      }
+
+      streams.shift();
+    }
+
+    if (!streams.length) {
+      self.push(null);
+    }
+  });
+
+  stream.on('error', this.emit.bind(this, 'error'));
+
+  streams.push(stream);
+}
+
+function OrderedStreams (streams, options) {
+  if (!(this instanceof(OrderedStreams))) {
+    return new OrderedStreams(streams, options);
+  }
+
+  streams = streams || [];
+  options = options || {};
+
+  options.objectMode = true;
+
+  Readable.call(this, options);
+
+  if (!Array.isArray(streams)) {
+    streams = [streams];
+  }
+  if (!streams.length) {
+    return this.push(null);  // no streams, close
+  }
+
+  var addStreamBinded = addStream.bind(this, []);
+
+  streams.forEach(function (item) {
+    if (Array.isArray(item)) {
+      item.forEach(addStreamBinded);
+    } else {
+      addStreamBinded(item);
+    }
+  });
+}
+util.inherits(OrderedStreams, Readable);
+
+OrderedStreams.prototype._read = function () {};
+
+module.exports = OrderedStreams;
diff --git a/node_modules/ordered-read-streams/package.json b/node_modules/ordered-read-streams/package.json
new file mode 100644
index 0000000..56a0742
--- /dev/null
+++ b/node_modules/ordered-read-streams/package.json
@@ -0,0 +1,26 @@
+{
+  "name": "ordered-read-streams",
+  "version": "1.0.1",
+  "description": "Combines array of streams into one read stream in strict order",
+  "files": [
+    "index.js"
+  ],
+  "scripts": {
+    "test": "jscs *.js test/*js && jshint *.js test/*.js && mocha"
+  },
+  "repository": "armed/ordered-read-streams",
+  "author": "Artem Medeusheyev ",
+  "license": "MIT",
+  "dependencies": {
+    "readable-stream": "^2.0.1"
+  },
+  "devDependencies": {
+    "expect": "^1.20.2",
+    "jscs": "^1.13.1",
+    "jshint": "^2.8.0",
+    "mississippi": "^1.3.0",
+    "mocha": "^2.2.5",
+    "pre-commit": "^1.0.10",
+    "through2": "^2.0.0"
+  }
+}
diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js
new file mode 100644
index 0000000..2c8a006
--- /dev/null
+++ b/node_modules/os-locale/index.js
@@ -0,0 +1,127 @@
+'use strict';
+var childProcess = require('child_process');
+var execFileSync = childProcess.execFileSync;
+var lcid = require('lcid');
+var defaultOpts = {spawn: true};
+var cache;
+
+function fallback() {
+	cache = 'en_US';
+	return cache;
+}
+
+function getEnvLocale(env) {
+	env = env || process.env;
+	var ret = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;
+	cache = getLocale(ret);
+	return ret;
+}
+
+function parseLocale(x) {
+	var env = x.split('\n').reduce(function (env, def) {
+		def = def.split('=');
+		env[def[0]] = def[1];
+		return env;
+	}, {});
+	return getEnvLocale(env);
+}
+
+function getLocale(str) {
+	return (str && str.replace(/[.:].*/, '')) || fallback();
+}
+
+module.exports = function (opts, cb) {
+	if (typeof opts === 'function') {
+		cb = opts;
+		opts = defaultOpts;
+	} else {
+		opts = opts || defaultOpts;
+	}
+
+	if (cache || getEnvLocale() || opts.spawn === false) {
+		setImmediate(cb, null, cache);
+		return;
+	}
+
+	var getAppleLocale = function () {
+		childProcess.execFile('defaults', ['read', '-g', 'AppleLocale'], function (err, stdout) {
+			if (err) {
+				fallback();
+				return;
+			}
+
+			cache = stdout.trim() || fallback();
+			cb(null, cache);
+		});
+	};
+
+	if (process.platform === 'win32') {
+		childProcess.execFile('wmic', ['os', 'get', 'locale'], function (err, stdout) {
+			if (err) {
+				fallback();
+				return;
+			}
+
+			var lcidCode = parseInt(stdout.replace('Locale', ''), 16);
+			cache = lcid.from(lcidCode) || fallback();
+			cb(null, cache);
+		});
+	} else {
+		childProcess.execFile('locale', function (err, stdout) {
+			if (err) {
+				fallback();
+				return;
+			}
+
+			var res = parseLocale(stdout);
+
+			if (!res && process.platform === 'darwin') {
+				getAppleLocale();
+				return;
+			}
+
+			cache = getLocale(res);
+			cb(null, cache);
+		});
+	}
+};
+
+module.exports.sync = function (opts) {
+	opts = opts || defaultOpts;
+
+	if (cache || getEnvLocale() || !execFileSync || opts.spawn === false) {
+		return cache;
+	}
+
+	if (process.platform === 'win32') {
+		var stdout;
+
+		try {
+			stdout = execFileSync('wmic', ['os', 'get', 'locale'], {encoding: 'utf8'});
+		} catch (err) {
+			return fallback();
+		}
+
+		var lcidCode = parseInt(stdout.replace('Locale', ''), 16);
+		cache = lcid.from(lcidCode) || fallback();
+		return cache;
+	}
+
+	var res;
+
+	try {
+		res = parseLocale(execFileSync('locale', {encoding: 'utf8'}));
+	} catch (err) {}
+
+	if (!res && process.platform === 'darwin') {
+		try {
+			cache = execFileSync('defaults', ['read', '-g', 'AppleLocale'], {encoding: 'utf8'}).trim() || fallback();
+			return cache;
+		} catch (err) {
+			return fallback();
+		}
+	}
+
+	cache = getLocale(res);
+	return cache;
+};
diff --git a/node_modules/os-locale/license b/node_modules/os-locale/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/os-locale/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus  (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/os-locale/package.json b/node_modules/os-locale/package.json
new file mode 100644
index 0000000..934f572
--- /dev/null
+++ b/node_modules/os-locale/package.json
@@ -0,0 +1,43 @@
+{
+  "name": "os-locale",
+  "version": "1.4.0",
+  "description": "Get the system locale",
+  "license": "MIT",
+  "repository": "sindresorhus/os-locale",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "xo && ava"
+  },
+  "files": [
+    "index.js"
+  ],
+  "keywords": [
+    "locale",
+    "lang",
+    "language",
+    "system",
+    "os",
+    "string",
+    "str",
+    "user",
+    "country",
+    "id",
+    "identifier",
+    "region"
+  ],
+  "dependencies": {
+    "lcid": "^1.0.0"
+  },
+  "devDependencies": {
+    "ava": "*",
+    "require-uncached": "^1.0.2",
+    "xo": "*"
+  }
+}
diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md
new file mode 100644
index 0000000..b80a0bd
--- /dev/null
+++ b/node_modules/os-locale/readme.md
@@ -0,0 +1,47 @@
+# os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale)
+
+> Get the system [locale](http://en.wikipedia.org/wiki/Locale)
+
+Useful for localizing your module or app.
+
+POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.
+
+
+## Install
+
+```
+$ npm install --save os-locale
+```
+
+
+## Usage
+
+```js
+var osLocale = require('os-locale');
+
+osLocale(function (err, locale) {
+	console.log(locale);
+	//=> 'en_US'
+});
+```
+
+
+## API
+
+### osLocale([options], callback(error, locale))
+
+### osLocale.sync([options])
+
+Returns the locale.
+
+#### options.spawn
+
+Type: `boolean`  
+Default: `true`
+
+Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/parse-filepath/LICENSE b/node_modules/parse-filepath/LICENSE
new file mode 100644
index 0000000..fa30c4c
--- /dev/null
+++ b/node_modules/parse-filepath/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, 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.
diff --git a/node_modules/parse-filepath/README.md b/node_modules/parse-filepath/README.md
new file mode 100644
index 0000000..3eb7ce5
--- /dev/null
+++ b/node_modules/parse-filepath/README.md
@@ -0,0 +1,111 @@
+# parse-filepath [![NPM version](https://img.shields.io/npm/v/parse-filepath.svg?style=flat)](https://www.npmjs.com/package/parse-filepath) [![NPM downloads](https://img.shields.io/npm/dm/parse-filepath.svg?style=flat)](https://npmjs.org/package/parse-filepath) [![Build Status](https://img.shields.io/travis/jonschlinkert/parse-filepath.svg?style=flat)](https://travis-ci.org/jonschlinkert/parse-filepath)
+
+> Pollyfill for node.js `path.parse`, parses a filepath into an object.
+
+You might also be interested in [global-prefix](https://github.com/jonschlinkert/global-prefix).
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install parse-filepath --save
+```
+
+## Usage
+
+```js
+var parsePath = require('parse-filepath');
+parsePath(filepath);
+```
+
+This can be used as a polyfill for the native node.js `path.parse()` method, and it also adds a few properties:
+
+* `path`: the original filepath
+* `isAbsolute`: (getter) true if the given path is absolute
+* `absolute`: (getter) fully resolved, absolute filepath
+* `dirname`: alias for `dir`
+* `basename`: alias for `base`
+* `extname`: alias for `ext`
+* `stem`: alias for `name`
+
+**Example**
+
+```js
+var parsePath = require('parse-filepath');
+console.log(parsePath('foo/bar/baz/index.js'));
+```
+
+Returns:
+
+```js
+{ root: '',
+  dir: 'foo/bar/baz',
+  base: 'index.js',
+  ext: '.js',
+  name: 'index',
+
+  // aliases
+  extname: '.js',
+  basename: 'index.js',
+  dirname: 'foo/bar/baz',
+  stem: 'index',
+
+  // original path
+  path: 'foo/bar/baz/index.js',
+
+  // getters
+  absolute: [Getter/Setter],
+  isAbsolute: [Getter/Setter] }
+```
+
+## Related projects
+
+You might also be interested in these projects:
+
+* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix)
+* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)
+* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)
+* [relative](https://www.npmjs.com/package/relative): Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file,… [more](https://www.npmjs.com/package/relative) | [homepage](https://github.com/jonschlinkert/relative)
+
+## Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/parse-filepath/issues/new).
+
+## Building docs
+
+Generate readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install verb && npm run docs
+```
+
+Or, if [verb](https://github.com/verbose/verb) is installed globally:
+
+```sh
+$ verb
+```
+
+## Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
+
+## Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/parse-filepath/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb](https://github.com/verbose/verb), v, on March 29, 2016._
\ No newline at end of file
diff --git a/node_modules/parse-filepath/index.js b/node_modules/parse-filepath/index.js
new file mode 100644
index 0000000..0df0170
--- /dev/null
+++ b/node_modules/parse-filepath/index.js
@@ -0,0 +1,95 @@
+'use strict';
+
+var path = require('path');
+var isAbsolute = require('is-absolute');
+var pathRoot = require('path-root');
+var MapCache = require('map-cache');
+var cache = new MapCache();
+
+module.exports = function(filepath) {
+  if (typeof filepath !== 'string') {
+    throw new TypeError('parse-filepath expects a string');
+  }
+
+  if (cache.has(filepath)) {
+    return cache.get(filepath);
+  }
+
+  var obj = {};
+  if (typeof path.parse === 'function') {
+    obj = path.parse(filepath);
+    obj.extname = obj.ext;
+    obj.basename = obj.base;
+    obj.dirname = obj.dir;
+    obj.stem = obj.name;
+
+  } else {
+    define(obj, 'root', function() {
+      return pathRoot(this.path);
+    });
+
+    define(obj, 'extname', function() {
+      return path.extname(filepath);
+    });
+
+    define(obj, 'ext', function() {
+      return this.extname;
+    });
+
+    define(obj, 'name', function() {
+      return path.basename(filepath, this.ext);
+    });
+
+    define(obj, 'stem', function() {
+      return this.name;
+    });
+
+    define(obj, 'base', function() {
+      return this.name + this.ext;
+    });
+
+    define(obj, 'basename', function() {
+      return this.base;
+    });
+
+    define(obj, 'dir', function() {
+      var dir = path.dirname(filepath);
+      if (dir === '.') {
+        return (filepath[0] === '.') ? dir : '';
+      } else {
+        return dir;
+      }
+    });
+
+    define(obj, 'dirname', function() {
+      return this.dir;
+    });
+  }
+
+  obj.path = filepath;
+
+  define(obj, 'absolute', function() {
+    return path.resolve(this.path);
+  });
+
+  define(obj, 'isAbsolute', function() {
+    return isAbsolute(this.path);
+  });
+
+  cache.set(filepath, obj);
+  return obj;
+};
+
+function define(obj, prop, fn) {
+  var cached;
+  Object.defineProperty(obj, prop, {
+    configurable: true,
+    enumerable: true,
+    set: function(val) {
+      cached = val;
+    },
+    get: function() {
+      return cached || (cached = fn.call(obj));
+    }
+  });
+}
diff --git a/node_modules/parse-filepath/package.json b/node_modules/parse-filepath/package.json
new file mode 100644
index 0000000..1f0ab47
--- /dev/null
+++ b/node_modules/parse-filepath/package.json
@@ -0,0 +1,79 @@
+{
+  "name": "parse-filepath",
+  "description": "Pollyfill for node.js `path.parse`, parses a filepath into an object.",
+  "version": "1.0.2",
+  "homepage": "https://github.com/jonschlinkert/parse-filepath",
+  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "repository": "jonschlinkert/parse-filepath",
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/parse-filepath/issues"
+  },
+  "license": "MIT",
+  "files": [
+    "index.js"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.8"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "dependencies": {
+    "is-absolute": "^1.0.0",
+    "map-cache": "^0.2.0",
+    "path-root": "^0.1.1"
+  },
+  "devDependencies": {
+    "gulp-format-md": "^0.1.7",
+    "mocha": "^2.2.5",
+    "should": "^7.0.2"
+  },
+  "keywords": [
+    "absolute",
+    "basename",
+    "dir",
+    "directory",
+    "dirname",
+    "ext",
+    "extension",
+    "extname",
+    "file",
+    "filename",
+    "filepath",
+    "is-absolute",
+    "name",
+    "object",
+    "parse",
+    "parser",
+    "parts",
+    "path",
+    "segment"
+  ],
+  "verb": {
+    "run": true,
+    "toc": false,
+    "layout": "default",
+    "tasks": [
+      "readme"
+    ],
+    "plugins": [
+      "gulp-format-md"
+    ],
+    "related": {
+      "highlight": "global-prefix",
+      "list": [
+        "global-prefix",
+        "is-absolute",
+        "is-relative",
+        "relative"
+      ]
+    },
+    "reflinks": [
+      "verb"
+    ],
+    "lint": {
+      "reflinks": true
+    }
+  }
+}
diff --git a/node_modules/parse-json/index.js b/node_modules/parse-json/index.js
new file mode 100644
index 0000000..04add8a
--- /dev/null
+++ b/node_modules/parse-json/index.js
@@ -0,0 +1,35 @@
+'use strict';
+var errorEx = require('error-ex');
+var fallback = require('./vendor/parse');
+
+var JSONError = errorEx('JSONError', {
+	fileName: errorEx.append('in %s')
+});
+
+module.exports = function (x, reviver, filename) {
+	if (typeof reviver === 'string') {
+		filename = reviver;
+		reviver = null;
+	}
+
+	try {
+		try {
+			return JSON.parse(x, reviver);
+		} catch (err) {
+			fallback.parse(x, {
+				mode: 'json',
+				reviver: reviver
+			});
+
+			throw err;
+		}
+	} catch (err) {
+		var jsonErr = new JSONError(err);
+
+		if (filename) {
+			jsonErr.fileName = filename;
+		}
+
+		throw jsonErr;
+	}
+};
diff --git a/node_modules/parse-json/license b/node_modules/parse-json/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/parse-json/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus  (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/parse-json/package.json b/node_modules/parse-json/package.json
new file mode 100644
index 0000000..93e3c41
--- /dev/null
+++ b/node_modules/parse-json/package.json
@@ -0,0 +1,46 @@
+{
+  "name": "parse-json",
+  "version": "2.2.0",
+  "description": "Parse JSON with more helpful errors",
+  "license": "MIT",
+  "repository": "sindresorhus/parse-json",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "sindresorhus.com"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "xo && node test.js"
+  },
+  "files": [
+    "index.js",
+    "vendor"
+  ],
+  "keywords": [
+    "parse",
+    "json",
+    "graceful",
+    "error",
+    "message",
+    "humanize",
+    "friendly",
+    "helpful",
+    "string",
+    "str"
+  ],
+  "dependencies": {
+    "error-ex": "^1.2.0"
+  },
+  "devDependencies": {
+    "ava": "0.0.4",
+    "xo": "*"
+  },
+  "xo": {
+    "ignores": [
+      "vendor/**"
+    ]
+  }
+}
diff --git a/node_modules/parse-json/readme.md b/node_modules/parse-json/readme.md
new file mode 100644
index 0000000..ca96e60
--- /dev/null
+++ b/node_modules/parse-json/readme.md
@@ -0,0 +1,83 @@
+# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json)
+
+> Parse JSON with more helpful errors
+
+
+## Install
+
+```
+$ npm install --save parse-json
+```
+
+
+## Usage
+
+```js
+var parseJson = require('parse-json');
+var json = '{\n\t"foo": true,\n}';
+
+
+JSON.parse(json);
+/*
+undefined:3
+}
+^
+SyntaxError: Unexpected token }
+*/
+
+
+parseJson(json);
+/*
+JSONError: Trailing comma in object at 3:1
+}
+^
+*/
+
+
+parseJson(json, 'foo.json');
+/*
+JSONError: Trailing comma in object at 3:1 in foo.json
+}
+^
+*/
+
+
+// you can also add the filename at a later point
+try {
+	parseJson(json);
+} catch (err) {
+	err.fileName = 'foo.json';
+	throw err;
+}
+/*
+JSONError: Trailing comma in object at 3:1 in foo.json
+}
+^
+*/
+```
+
+## API
+
+### parseJson(input, [reviver], [filename])
+
+#### input
+
+Type: `string`
+
+#### reviver
+
+Type: `function`
+
+Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
+) for more.
+
+#### filename
+
+Type: `string`
+
+Filename displayed in the error message.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/parse-json/vendor/parse.js b/node_modules/parse-json/vendor/parse.js
new file mode 100644
index 0000000..5f9fe99
--- /dev/null
+++ b/node_modules/parse-json/vendor/parse.js
@@ -0,0 +1,752 @@
+/*
+ * Author: Alex Kocharin 
+ * GIT: https://github.com/rlidwka/jju
+ * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/
+ */
+
+// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
+
+var Uni = require('./unicode')
+
+function isHexDigit(x) {
+  return (x >= '0' && x <= '9')
+      || (x >= 'A' && x <= 'F')
+      || (x >= 'a' && x <= 'f')
+}
+
+function isOctDigit(x) {
+  return x >= '0' && x <= '7'
+}
+
+function isDecDigit(x) {
+  return x >= '0' && x <= '9'
+}
+
+var unescapeMap = {
+  '\'': '\'',
+  '"' : '"',
+  '\\': '\\',
+  'b' : '\b',
+  'f' : '\f',
+  'n' : '\n',
+  'r' : '\r',
+  't' : '\t',
+  'v' : '\v',
+  '/' : '/',
+}
+
+function formatError(input, msg, position, lineno, column, json5) {
+  var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1)
+    , tmppos = position - column - 1
+    , srcline = ''
+    , underline = ''
+
+  var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
+
+  // output no more than 70 characters before the wrong ones
+  if (tmppos < position - 70) {
+    tmppos = position - 70
+  }
+
+  while (1) {
+    var chr = input[++tmppos]
+
+    if (isLineTerminator(chr) || tmppos === input.length) {
+      if (position >= tmppos) {
+        // ending line error, so show it after the last char
+        underline += '^'
+      }
+      break
+    }
+    srcline += chr
+
+    if (position === tmppos) {
+      underline += '^'
+    } else if (position > tmppos) {
+      underline += input[tmppos] === '\t' ? '\t' : ' '
+    }
+
+    // output no more than 78 characters on the string
+    if (srcline.length > 78) break
+  }
+
+  return result + '\n' + srcline + '\n' + underline
+}
+
+function parse(input, options) {
+  // parse as a standard JSON mode
+  var json5 = !(options.mode === 'json' || options.legacy)
+  var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
+  var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON
+
+  var length = input.length
+    , lineno = 0
+    , linestart = 0
+    , position = 0
+    , stack = []
+
+  var tokenStart = function() {}
+  var tokenEnd = function(v) {return v}
+
+  /* tokenize({
+       raw: '...',
+       type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline',
+       value: 'number'|'string'|'whatever',
+       path: [...],
+     })
+  */
+  if (options._tokenize) {
+    ;(function() {
+      var start = null
+      tokenStart = function() {
+        if (start !== null) throw Error('internal error, token overlap')
+        start = position
+      }
+
+      tokenEnd = function(v, type) {
+        if (start != position) {
+          var hash = {
+            raw: input.substr(start, position-start),
+            type: type,
+            stack: stack.slice(0),
+          }
+          if (v !== undefined) hash.value = v
+          options._tokenize.call(null, hash)
+        }
+        start = null
+        return v
+      }
+    })()
+  }
+
+  function fail(msg) {
+    var column = position - linestart
+
+    if (!msg) {
+      if (position < length) {
+        var token = '\'' +
+          JSON
+            .stringify(input[position])
+            .replace(/^"|"$/g, '')
+            .replace(/'/g, "\\'")
+            .replace(/\\"/g, '"')
+          + '\''
+
+        if (!msg) msg = 'Unexpected token ' + token
+      } else {
+        if (!msg) msg = 'Unexpected end of input'
+      }
+    }
+
+    var error = SyntaxError(formatError(input, msg, position, lineno, column, json5))
+    error.row = lineno + 1
+    error.column = column + 1
+    throw error
+  }
+
+  function newline(chr) {
+    // account for 
+    if (chr === '\r' && input[position] === '\n') position++
+    linestart = position
+    lineno++
+  }
+
+  function parseGeneric() {
+    var result
+
+    while (position < length) {
+      tokenStart()
+      var chr = input[position++]
+
+      if (chr === '"' || (chr === '\'' && json5)) {
+        return tokenEnd(parseString(chr), 'literal')
+
+      } else if (chr === '{') {
+        tokenEnd(undefined, 'separator')
+        return parseObject()
+
+      } else if (chr === '[') {
+        tokenEnd(undefined, 'separator')
+        return parseArray()
+
+      } else if (chr === '-'
+             ||  chr === '.'
+             ||  isDecDigit(chr)
+                 //           + number       Infinity          NaN
+             ||  (json5 && (chr === '+' || chr === 'I' || chr === 'N'))
+      ) {
+        return tokenEnd(parseNumber(), 'literal')
+
+      } else if (chr === 'n') {
+        parseKeyword('null')
+        return tokenEnd(null, 'literal')
+
+      } else if (chr === 't') {
+        parseKeyword('true')
+        return tokenEnd(true, 'literal')
+
+      } else if (chr === 'f') {
+        parseKeyword('false')
+        return tokenEnd(false, 'literal')
+
+      } else {
+        position--
+        return tokenEnd(undefined)
+      }
+    }
+  }
+
+  function parseKey() {
+    var result
+
+    while (position < length) {
+      tokenStart()
+      var chr = input[position++]
+
+      if (chr === '"' || (chr === '\'' && json5)) {
+        return tokenEnd(parseString(chr), 'key')
+
+      } else if (chr === '{') {
+        tokenEnd(undefined, 'separator')
+        return parseObject()
+
+      } else if (chr === '[') {
+        tokenEnd(undefined, 'separator')
+        return parseArray()
+
+      } else if (chr === '.'
+             ||  isDecDigit(chr)
+      ) {
+        return tokenEnd(parseNumber(true), 'key')
+
+      } else if (json5
+             &&  Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) {
+        // unicode char or a unicode sequence
+        var rollback = position - 1
+        var result = parseIdentifier()
+
+        if (result === undefined) {
+          position = rollback
+          return tokenEnd(undefined)
+        } else {
+          return tokenEnd(result, 'key')
+        }
+
+      } else {
+        position--
+        return tokenEnd(undefined)
+      }
+    }
+  }
+
+  function skipWhiteSpace() {
+    tokenStart()
+    while (position < length) {
+      var chr = input[position++]
+
+      if (isLineTerminator(chr)) {
+        position--
+        tokenEnd(undefined, 'whitespace')
+        tokenStart()
+        position++
+        newline(chr)
+        tokenEnd(undefined, 'newline')
+        tokenStart()
+
+      } else if (isWhiteSpace(chr)) {
+        // nothing
+
+      } else if (chr === '/'
+             && json5
+             && (input[position] === '/' || input[position] === '*')
+      ) {
+        position--
+        tokenEnd(undefined, 'whitespace')
+        tokenStart()
+        position++
+        skipComment(input[position++] === '*')
+        tokenEnd(undefined, 'comment')
+        tokenStart()
+
+      } else {
+        position--
+        break
+      }
+    }
+    return tokenEnd(undefined, 'whitespace')
+  }
+
+  function skipComment(multi) {
+    while (position < length) {
+      var chr = input[position++]
+
+      if (isLineTerminator(chr)) {
+        // LineTerminator is an end of singleline comment
+        if (!multi) {
+          // let parent function deal with newline
+          position--
+          return
+        }
+
+        newline(chr)
+
+      } else if (chr === '*' && multi) {
+        // end of multiline comment
+        if (input[position] === '/') {
+          position++
+          return
+        }
+
+      } else {
+        // nothing
+      }
+    }
+
+    if (multi) {
+      fail('Unclosed multiline comment')
+    }
+  }
+
+  function parseKeyword(keyword) {
+    // keyword[0] is not checked because it should've checked earlier
+    var _pos = position
+    var len = keyword.length
+    for (var i=1; i= length || keyword[i] != input[position]) {
+        position = _pos-1
+        fail()
+      }
+      position++
+    }
+  }
+
+  function parseObject() {
+    var result = options.null_prototype ? Object.create(null) : {}
+      , empty_object = {}
+      , is_non_empty = false
+
+    while (position < length) {
+      skipWhiteSpace()
+      var item1 = parseKey()
+      skipWhiteSpace()
+      tokenStart()
+      var chr = input[position++]
+      tokenEnd(undefined, 'separator')
+
+      if (chr === '}' && item1 === undefined) {
+        if (!json5 && is_non_empty) {
+          position--
+          fail('Trailing comma in object')
+        }
+        return result
+
+      } else if (chr === ':' && item1 !== undefined) {
+        skipWhiteSpace()
+        stack.push(item1)
+        var item2 = parseGeneric()
+        stack.pop()
+
+        if (item2 === undefined) fail('No value found for key ' + item1)
+        if (typeof(item1) !== 'string') {
+          if (!json5 || typeof(item1) !== 'number') {
+            fail('Wrong key type: ' + item1)
+          }
+        }
+
+        if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') {
+          if (options.reserved_keys === 'throw') {
+            fail('Reserved key: ' + item1)
+          } else {
+            // silently ignore it
+          }
+        } else {
+          if (typeof(options.reviver) === 'function') {
+            item2 = options.reviver.call(null, item1, item2)
+          }
+
+          if (item2 !== undefined) {
+            is_non_empty = true
+            Object.defineProperty(result, item1, {
+              value: item2,
+              enumerable: true,
+              configurable: true,
+              writable: true,
+            })
+          }
+        }
+
+        skipWhiteSpace()
+
+        tokenStart()
+        var chr = input[position++]
+        tokenEnd(undefined, 'separator')
+
+        if (chr === ',') {
+          continue
+
+        } else if (chr === '}') {
+          return result
+
+        } else {
+          fail()
+        }
+
+      } else {
+        position--
+        fail()
+      }
+    }
+
+    fail()
+  }
+
+  function parseArray() {
+    var result = []
+
+    while (position < length) {
+      skipWhiteSpace()
+      stack.push(result.length)
+      var item = parseGeneric()
+      stack.pop()
+      skipWhiteSpace()
+      tokenStart()
+      var chr = input[position++]
+      tokenEnd(undefined, 'separator')
+
+      if (item !== undefined) {
+        if (typeof(options.reviver) === 'function') {
+          item = options.reviver.call(null, String(result.length), item)
+        }
+        if (item === undefined) {
+          result.length++
+          item = true // hack for check below, not included into result
+        } else {
+          result.push(item)
+        }
+      }
+
+      if (chr === ',') {
+        if (item === undefined) {
+          fail('Elisions are not supported')
+        }
+
+      } else if (chr === ']') {
+        if (!json5 && item === undefined && result.length) {
+          position--
+          fail('Trailing comma in array')
+        }
+        return result
+
+      } else {
+        position--
+        fail()
+      }
+    }
+  }
+
+  function parseNumber() {
+    // rewind because we don't know first char
+    position--
+
+    var start = position
+      , chr = input[position++]
+      , t
+
+    var to_num = function(is_octal) {
+      var str = input.substr(start, position - start)
+
+      if (is_octal) {
+        var result = parseInt(str.replace(/^0o?/, ''), 8)
+      } else {
+        var result = Number(str)
+      }
+
+      if (Number.isNaN(result)) {
+        position--
+        fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"')
+      } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {
+        // additional restrictions imposed by json
+        position--
+        fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"')
+      } else {
+        return result
+      }
+    }
+
+    // ex: -5982475.249875e+29384
+    //     ^ skipping this
+    if (chr === '-' || (chr === '+' && json5)) chr = input[position++]
+
+    if (chr === 'N' && json5) {
+      parseKeyword('NaN')
+      return NaN
+    }
+
+    if (chr === 'I' && json5) {
+      parseKeyword('Infinity')
+
+      // returning +inf or -inf
+      return to_num()
+    }
+
+    if (chr >= '1' && chr <= '9') {
+      // ex: -5982475.249875e+29384
+      //        ^^^ skipping these
+      while (position < length && isDecDigit(input[position])) position++
+      chr = input[position++]
+    }
+
+    // special case for leading zero: 0.123456
+    if (chr === '0') {
+      chr = input[position++]
+
+      //             new syntax, "0o777"           old syntax, "0777"
+      var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr)
+      var is_hex = chr === 'x' || chr === 'X'
+
+      if (json5 && (is_octal || is_hex)) {
+        while (position < length
+           &&  (is_hex ? isHexDigit : isOctDigit)( input[position] )
+        ) position++
+
+        var sign = 1
+        if (input[start] === '-') {
+          sign = -1
+          start++
+        } else if (input[start] === '+') {
+          start++
+        }
+
+        return sign * to_num(is_octal)
+      }
+    }
+
+    if (chr === '.') {
+      // ex: -5982475.249875e+29384
+      //                ^^^ skipping these
+      while (position < length && isDecDigit(input[position])) position++
+      chr = input[position++]
+    }
+
+    if (chr === 'e' || chr === 'E') {
+      chr = input[position++]
+      if (chr === '-' || chr === '+') position++
+      // ex: -5982475.249875e+29384
+      //                       ^^^ skipping these
+      while (position < length && isDecDigit(input[position])) position++
+      chr = input[position++]
+    }
+
+    // we have char in the buffer, so count for it
+    position--
+    return to_num()
+  }
+
+  function parseIdentifier() {
+    // rewind because we don't know first char
+    position--
+
+    var result = ''
+
+    while (position < length) {
+      var chr = input[position++]
+
+      if (chr === '\\'
+      &&  input[position] === 'u'
+      &&  isHexDigit(input[position+1])
+      &&  isHexDigit(input[position+2])
+      &&  isHexDigit(input[position+3])
+      &&  isHexDigit(input[position+4])
+      ) {
+        // UnicodeEscapeSequence
+        chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16))
+        position += 5
+      }
+
+      if (result.length) {
+        // identifier started
+        if (Uni.isIdentifierPart(chr)) {
+          result += chr
+        } else {
+          position--
+          return result
+        }
+
+      } else {
+        if (Uni.isIdentifierStart(chr)) {
+          result += chr
+        } else {
+          return undefined
+        }
+      }
+    }
+
+    fail()
+  }
+
+  function parseString(endChar) {
+    // 7.8.4 of ES262 spec
+    var result = ''
+
+    while (position < length) {
+      var chr = input[position++]
+
+      if (chr === endChar) {
+        return result
+
+      } else if (chr === '\\') {
+        if (position >= length) fail()
+        chr = input[position++]
+
+        if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) {
+          result += unescapeMap[chr]
+
+        } else if (json5 && isLineTerminator(chr)) {
+          // line continuation
+          newline(chr)
+
+        } else if (chr === 'u' || (chr === 'x' && json5)) {
+          // unicode/character escape sequence
+          var off = chr === 'u' ? 4 : 2
+
+          // validation for \uXXXX
+          for (var i=0; i= length) fail()
+            if (!isHexDigit(input[position])) fail('Bad escape sequence')
+            position++
+          }
+
+          result += String.fromCharCode(parseInt(input.substr(position-off, off), 16))
+        } else if (json5 && isOctDigit(chr)) {
+          if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) {
+            // three-digit octal
+            var digits = 3
+          } else if (isOctDigit(input[position])) {
+            // two-digit octal
+            var digits = 2
+          } else {
+            var digits = 1
+          }
+          position += digits - 1
+          result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8))
+          /*if (!isOctDigit(input[position])) {
+            // \0 is allowed still
+            result += '\0'
+          } else {
+            fail('Octal literals are not supported')
+          }*/
+
+        } else if (json5) {
+          // \X -> x
+          result += chr
+
+        } else {
+          position--
+          fail()
+        }
+
+      } else if (isLineTerminator(chr)) {
+        fail()
+
+      } else {
+        if (!json5 && chr.charCodeAt(0) < 32) {
+          position--
+          fail('Unexpected control character')
+        }
+
+        // SourceCharacter but not one of " or \ or LineTerminator
+        result += chr
+      }
+    }
+
+    fail()
+  }
+
+  skipWhiteSpace()
+  var return_value = parseGeneric()
+  if (return_value !== undefined || position < length) {
+    skipWhiteSpace()
+
+    if (position >= length) {
+      if (typeof(options.reviver) === 'function') {
+        return_value = options.reviver.call(null, '', return_value)
+      }
+      return return_value
+    } else {
+      fail()
+    }
+
+  } else {
+    if (position) {
+      fail('No data, only a whitespace')
+    } else {
+      fail('No data, empty input')
+    }
+  }
+}
+
+/*
+ * parse(text, options)
+ * or
+ * parse(text, reviver)
+ *
+ * where:
+ * text - string
+ * options - object
+ * reviver - function
+ */
+module.exports.parse = function parseJSON(input, options) {
+  // support legacy functions
+  if (typeof(options) === 'function') {
+    options = {
+      reviver: options
+    }
+  }
+
+  if (input === undefined) {
+    // parse(stringify(x)) should be equal x
+    // with JSON functions it is not 'cause of undefined
+    // so we're fixing it
+    return undefined
+  }
+
+  // JSON.parse compat
+  if (typeof(input) !== 'string') input = String(input)
+  if (options == null) options = {}
+  if (options.reserved_keys == null) options.reserved_keys = 'ignore'
+
+  if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') {
+    if (options.null_prototype == null) {
+      options.null_prototype = true
+    }
+  }
+
+  try {
+    return parse(input, options)
+  } catch(err) {
+    // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack
+    //
+    // this catch is used to skip all those internal calls
+    if (err instanceof SyntaxError && err.row != null && err.column != null) {
+      var old_err = err
+      err = SyntaxError(old_err.message)
+      err.column = old_err.column
+      err.row = old_err.row
+    }
+    throw err
+  }
+}
+
+module.exports.tokenize = function tokenizeJSON(input, options) {
+  if (options == null) options = {}
+
+  options._tokenize = function(smth) {
+    if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack)
+    tokens.push(smth)
+  }
+
+  var tokens = []
+  tokens.data = module.exports.parse(input, options)
+  return tokens
+}
+
diff --git a/node_modules/parse-json/vendor/unicode.js b/node_modules/parse-json/vendor/unicode.js
new file mode 100644
index 0000000..1a29143
--- /dev/null
+++ b/node_modules/parse-json/vendor/unicode.js
@@ -0,0 +1,71 @@
+
+// This is autogenerated with esprima tools, see:
+// https://github.com/ariya/esprima/blob/master/esprima.js
+//
+// PS: oh God, I hate Unicode
+
+// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:
+
+var Uni = module.exports
+
+module.exports.isWhiteSpace = function isWhiteSpace(x) {
+  // section 7.2, table 2
+  return x === '\u0020'
+      || x === '\u00A0'
+      || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one
+      || (x >= '\u0009' && x <= '\u000D') // 9 A B C D
+
+      // + whitespace characters from unicode, category Zs
+      || x === '\u1680'
+      || x === '\u180E'
+      || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A
+      || x === '\u2028'
+      || x === '\u2029'
+      || x === '\u202F'
+      || x === '\u205F'
+      || x === '\u3000'
+}
+
+module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) {
+  return x === '\u0020'
+      || x === '\u0009'
+      || x === '\u000A'
+      || x === '\u000D'
+}
+
+module.exports.isLineTerminator = function isLineTerminator(x) {
+  // ok, here is the part when JSON is wrong
+  // section 7.3, table 3
+  return x === '\u000A'
+      || x === '\u000D'
+      || x === '\u2028'
+      || x === '\u2029'
+}
+
+module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) {
+  return x === '\u000A'
+      || x === '\u000D'
+}
+
+module.exports.isIdentifierStart = function isIdentifierStart(x) {
+  return x === '$'
+      || x === '_'
+      || (x >= 'A' && x <= 'Z')
+      || (x >= 'a' && x <= 'z')
+      || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x))
+}
+
+module.exports.isIdentifierPart = function isIdentifierPart(x) {
+  return x === '$'
+      || x === '_'
+      || (x >= 'A' && x <= 'Z')
+      || (x >= 'a' && x <= 'z')
+      || (x >= '0' && x <= '9') // <-- addition to Start
+      || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x))
+}
+
+module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
+
+// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:
+
+module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
diff --git a/node_modules/parse-node-version/LICENSE b/node_modules/parse-node-version/LICENSE
new file mode 100644
index 0000000..bde9654
--- /dev/null
+++ b/node_modules/parse-node-version/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Blaine Bublitz  and Eric Schoffstall 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/parse-node-version/README.md b/node_modules/parse-node-version/README.md
new file mode 100644
index 0000000..2bb35bf
--- /dev/null
+++ b/node_modules/parse-node-version/README.md
@@ -0,0 +1,51 @@
+

+ + + +

+ +# parse-node-version + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Turn node's process.version into something useful. + +## Usage + +```js +var nodeVersion = require('parse-node-version')(process.version); + +console.log( + nodeVersion.major, + nodeVersion.minor, + nodeVersion.patch, + nodeVersion.pre, + nodeVersion.build +); +``` + +## API + +### parseVersion(nodeVersionString) + +Takes a node version string (usually `process.version`) and returns an object with the `major`/`minor`/`patch` (which will all be numbers) and `pre`/`build` keys (which will always be a string). If the version doesn't contain any pre-release or build information, the properties will be returned as empty string. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/parse-node-version.svg +[npm-url]: https://www.npmjs.com/package/parse-node-version +[npm-image]: http://img.shields.io/npm/v/parse-node-version.svg + +[travis-url]: https://travis-ci.org/gulpjs/parse-node-version +[travis-image]: http://img.shields.io/travis/gulpjs/parse-node-version.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/parse-node-version +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/parse-node-version.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/parse-node-version +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/parse-node-version/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/parse-node-version/index.js b/node_modules/parse-node-version/index.js new file mode 100644 index 0000000..87fc764 --- /dev/null +++ b/node_modules/parse-node-version/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function parseNodeVersion(version) { + var match = version.match(/^v(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:-([0-9A-Za-z-.]+))?(?:\+([0-9A-Za-z-.]+))?$/); // eslint-disable-line max-len + if (!match) { + throw new Error('Unable to parse: ' + version); + } + + var res = { + major: parseInt(match[1], 10), + minor: parseInt(match[2], 10), + patch: parseInt(match[3], 10), + pre: match[4] || '', + build: match[5] || '', + }; + + return res; +} + +module.exports = parseNodeVersion; diff --git a/node_modules/parse-node-version/package.json b/node_modules/parse-node-version/package.json new file mode 100644 index 0000000..f4124e2 --- /dev/null +++ b/node_modules/parse-node-version/package.json @@ -0,0 +1,40 @@ +{ + "name": "parse-node-version", + "version": "1.0.1", + "description": "Turn node's process.version into something useful.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/parse-node-version", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^2.13.0", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "mocha": "^3.5.3" + }, + "keywords": [ + "process.version", + "node version", + "version parse" + ] +} diff --git a/node_modules/parse-passwd/LICENSE b/node_modules/parse-passwd/LICENSE new file mode 100644 index 0000000..f92fdcf --- /dev/null +++ b/node_modules/parse-passwd/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Brian Woodward + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/parse-passwd/README.md b/node_modules/parse-passwd/README.md new file mode 100644 index 0000000..31b1e79 --- /dev/null +++ b/node_modules/parse-passwd/README.md @@ -0,0 +1,86 @@ +# parse-passwd [![NPM version](https://img.shields.io/npm/v/parse-passwd.svg?style=flat)](https://www.npmjs.com/package/parse-passwd) [![NPM downloads](https://img.shields.io/npm/dm/parse-passwd.svg?style=flat)](https://npmjs.org/package/parse-passwd) [![Linux Build Status](https://img.shields.io/travis/doowb/parse-passwd.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/parse-passwd) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/parse-passwd.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/parse-passwd) + +> Parse a passwd file into a list of users. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save parse-passwd +``` + +## Usage + +```js +var parse = require('parse-passwd'); +``` + +## API + +**Example** + +```js +// assuming '/etc/passwd' contains: +// doowb:*:123:123:Brian Woodward:/Users/doowb:/bin/bash +console.log(parse(fs.readFileSync('/etc/passwd', 'utf8'))); + +//=> [ +//=> { +//=> username: 'doowb', +//=> password: '*', +//=> uid: '123', +//=> gid: '123', +//=> gecos: 'Brian Woodward', +//=> homedir: '/Users/doowb', +//=> shell: '/bin/bash' +//=> } +//=> ] +``` + +**Params** + +* `content` **{String}**: Content of a passwd file to parse. +* `returns` **{Array}**: Array of user objects parsed from the content. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](contributing.md) for avice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](http://twitter.com/doowb) + +### License + +Copyright © 2016, [Brian Woodward](https://github.com/doowb). +Released under the [MIT license](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 19, 2016._ \ No newline at end of file diff --git a/node_modules/parse-passwd/index.js b/node_modules/parse-passwd/index.js new file mode 100644 index 0000000..7524520 --- /dev/null +++ b/node_modules/parse-passwd/index.js @@ -0,0 +1,56 @@ +'use strict'; + +/** + * Parse the content of a passwd file into a list of user objects. + * This function ignores blank lines and comments. + * + * ```js + * // assuming '/etc/passwd' contains: + * // doowb:*:123:123:Brian Woodward:/Users/doowb:/bin/bash + * console.log(parse(fs.readFileSync('/etc/passwd', 'utf8'))); + * + * //=> [ + * //=> { + * //=> username: 'doowb', + * //=> password: '*', + * //=> uid: '123', + * //=> gid: '123', + * //=> gecos: 'Brian Woodward', + * //=> homedir: '/Users/doowb', + * //=> shell: '/bin/bash' + * //=> } + * //=> ] + * ``` + * @param {String} `content` Content of a passwd file to parse. + * @return {Array} Array of user objects parsed from the content. + * @api public + */ + +module.exports = function(content) { + if (typeof content !== 'string') { + throw new Error('expected a string'); + } + return content + .split('\n') + .map(user) + .filter(Boolean); +}; + +function user(line, i) { + if (!line || !line.length || line.charAt(0) === '#') { + return null; + } + + // see https://en.wikipedia.org/wiki/Passwd for field descriptions + var fields = line.split(':'); + return { + username: fields[0], + password: fields[1], + uid: fields[2], + gid: fields[3], + // see https://en.wikipedia.org/wiki/Gecos_field for GECOS field descriptions + gecos: fields[4], + homedir: fields[5], + shell: fields[6] + }; +} diff --git a/node_modules/parse-passwd/package.json b/node_modules/parse-passwd/package.json new file mode 100644 index 0000000..b09fb0f --- /dev/null +++ b/node_modules/parse-passwd/package.json @@ -0,0 +1,55 @@ +{ + "name": "parse-passwd", + "description": "Parse a passwd file into a list of users.", + "version": "1.0.0", + "homepage": "https://github.com/doowb/parse-passwd", + "author": "Brian Woodward (https://github.com/doowb)", + "repository": "doowb/parse-passwd", + "bugs": { + "url": "https://github.com/doowb/parse-passwd/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.1.2" + }, + "keywords": [ + "etc", + "etc-passwd", + "etc/passwd", + "parse", + "parse-passwd", + "passwd" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/pascalcase/LICENSE b/node_modules/pascalcase/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/pascalcase/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 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. diff --git a/node_modules/pascalcase/README.md b/node_modules/pascalcase/README.md new file mode 100644 index 0000000..fa3fd00 --- /dev/null +++ b/node_modules/pascalcase/README.md @@ -0,0 +1,80 @@ +# pascalcase [![NPM version](https://badge.fury.io/js/pascalcase.svg)](http://badge.fury.io/js/pascalcase) + +> Convert a string to pascal-case. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i pascalcase --save +``` + +## Usage + +```js +var pascalcase = require('pascalcase'); + +pascalcase('a'); +//=> 'A' + +pascalcase('foo bar baz'); +//=> 'FooBarBaz' + +pascalcase('foo_bar-baz'); +//=> 'FooBarBaz' + +pascalcase('foo.bar.baz'); +//=> 'FooBarBaz' + +pascalcase('foo/bar/baz'); +//=> 'FooBarBaz' + +pascalcase('foo[bar)baz'); +//=> 'FooBarBaz' + +pascalcase('#foo+bar*baz'); +//=> 'FooBarBaz' + +pascalcase('$foo~bar`baz'); +//=> 'FooBarBaz' + +pascalcase('_foo_bar-baz-'); +//=> 'FooBarBaz' +``` + +## Related projects + +* [justified](https://github.com/jonschlinkert/justified): Wrap words to a specified length and justified the text. +* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. +* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pascalcase/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._ \ No newline at end of file diff --git a/node_modules/pascalcase/index.js b/node_modules/pascalcase/index.js new file mode 100644 index 0000000..7e8159c --- /dev/null +++ b/node_modules/pascalcase/index.js @@ -0,0 +1,21 @@ +/*! + * pascalcase + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +function pascalcase(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string.'); + } + str = str.replace(/([A-Z])/g, ' $1'); + if (str.length === 1) { return str.toUpperCase(); } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + str = str.charAt(0).toUpperCase() + str.slice(1); + return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { + return ch.toUpperCase(); + }); +} + +module.exports = pascalcase; diff --git a/node_modules/pascalcase/package.json b/node_modules/pascalcase/package.json new file mode 100644 index 0000000..0576d13 --- /dev/null +++ b/node_modules/pascalcase/package.json @@ -0,0 +1,46 @@ +{ + "name": "pascalcase", + "description": "Convert a string to pascal-case.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/pascalcase", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/pascalcase", + "bugs": { + "url": "https://github.com/jonschlinkert/pascalcase/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "camelcase", + "case", + "casing", + "pascal", + "pascal-case", + "pascalcase", + "string" + ], + "verb": { + "related": { + "list": [ + "pad-left", + "pad-right", + "word-wrap", + "repeat-string", + "justified" + ] + } + } +} \ No newline at end of file diff --git a/node_modules/path-dirname/index.js b/node_modules/path-dirname/index.js new file mode 100644 index 0000000..ed67817 --- /dev/null +++ b/node_modules/path-dirname/index.js @@ -0,0 +1,143 @@ +'use strict'; + +var path = require('path'); +var inspect = require('util').inspect; + +function assertPath(path) { + if (typeof path !== 'string') { + throw new TypeError('Path must be a string. Received ' + inspect(path)); + } +} + +function posix(path) { + assertPath(path); + if (path.length === 0) + return '.'; + var code = path.charCodeAt(0); + var hasRoot = (code === 47/*/*/); + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) + return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) + return '//'; + return path.slice(0, end); +} + +function win32(path) { + assertPath(path); + var len = path.length; + if (len === 0) + return '.'; + var rootEnd = -1; + var end = -1; + var matchedSlash = true; + var offset = 0; + var code = path.charCodeAt(0); + + // Try to match a root + if (len > 1) { + if (code === 47/*/*/ || code === 92/*\*/) { + // Possible UNC root + + rootEnd = offset = 1; + + code = path.charCodeAt(1); + if (code === 47/*/*/ || code === 92/*\*/) { + // Matched double path separator at beginning + var j = 2; + var last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code !== 47/*/*/ && code !== 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || + (code >= 97/*a*/ && code <= 122/*z*/)) { + // Possible device root + + code = path.charCodeAt(1); + if (path.charCodeAt(1) === 58/*:*/) { + rootEnd = offset = 2; + if (len > 2) { + code = path.charCodeAt(2); + if (code === 47/*/*/ || code === 92/*\*/) + rootEnd = offset = 3; + } + } + } + } else if (code === 47/*/*/ || code === 92/*\*/) { + return path[0]; + } + + for (var i = len - 1; i >= offset; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/ || code === 92/*\*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) { + if (rootEnd === -1) + return '.'; + else + end = rootEnd; + } + return path.slice(0, end); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/node_modules/path-dirname/license b/node_modules/path-dirname/license new file mode 100644 index 0000000..1981663 --- /dev/null +++ b/node_modules/path-dirname/license @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) Elan Shanker and 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. diff --git a/node_modules/path-dirname/package.json b/node_modules/path-dirname/package.json new file mode 100644 index 0000000..eb78533 --- /dev/null +++ b/node_modules/path-dirname/package.json @@ -0,0 +1,29 @@ +{ + "name": "path-dirname", + "version": "1.0.2", + "description": "Node.js path.dirname() ponyfill", + "license": "MIT", + "repository": "es128/path-dirname", + "author": "Elan Shanker", + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "dirname", + "dir", + "path", + "paths", + "file", + "built-in", + "util", + "utils", + "core", + "stdlib", + "ponyfill", + "polyfill", + "shim" + ] +} diff --git a/node_modules/path-dirname/readme.md b/node_modules/path-dirname/readme.md new file mode 100644 index 0000000..652a562 --- /dev/null +++ b/node_modules/path-dirname/readme.md @@ -0,0 +1,53 @@ +# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) + +> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) + +This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 + +## Install + +``` +$ npm install --save path-dirname +``` + + +## Usage + +```js +const pathDirname = require('path-dirname'); + +pathDirname('/home/foo'); +//=> '/home' +pathDirname('C:\\Users\\foo'); +//=> 'C:\\Users' +pathDirname('foo'); +//=> '.' +pathDirname('foo/bar'); +//=> 'foo' + +//Using posix version for consistent output when dealing with glob escape chars +pathDirname.win32('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo/' +pathDirname.posix('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo' +``` + + +## API + +See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). + +### pathDirname(path) + +### pathDirname.posix(path) + +POSIX specific version. + +### pathDirname.win32(path) + +Windows specific version. + + +## License + +MIT diff --git a/node_modules/path-exists/index.js b/node_modules/path-exists/index.js new file mode 100644 index 0000000..a7e680a --- /dev/null +++ b/node_modules/path-exists/index.js @@ -0,0 +1,24 @@ +'use strict'; +var fs = require('fs'); +var Promise = require('pinkie-promise'); + +module.exports = function (fp) { + var fn = typeof fs.access === 'function' ? fs.access : fs.stat; + + return new Promise(function (resolve) { + fn(fp, function (err) { + resolve(!err); + }); + }); +}; + +module.exports.sync = function (fp) { + var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync; + + try { + fn(fp); + return true; + } catch (err) { + return false; + } +}; diff --git a/node_modules/path-exists/license b/node_modules/path-exists/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-exists/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-exists/package.json b/node_modules/path-exists/package.json new file mode 100644 index 0000000..5477ee8 --- /dev/null +++ b/node_modules/path-exists/package.json @@ -0,0 +1,40 @@ +{ + "name": "path-exists", + "version": "2.1.0", + "description": "Check if a path exists", + "license": "MIT", + "repository": "sindresorhus/path-exists", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "exists", + "exist", + "file", + "filepath", + "fs", + "filesystem", + "file-system", + "access", + "stat" + ], + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/path-exists/readme.md b/node_modules/path-exists/readme.md new file mode 100644 index 0000000..8fbcd68 --- /dev/null +++ b/node_modules/path-exists/readme.md @@ -0,0 +1,45 @@ +# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) + +> Check if a path exists + +Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. + +Never use this before handling a file though: + +> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. + + +## Install + +``` +$ npm install --save path-exists +``` + + +## Usage + +```js +// foo.js +var pathExists = require('path-exists'); + +pathExists('foo.js').then(function (exists) { + console.log(exists); + //=> true +}); +``` + + +## API + +### pathExists(path) + +Returns a promise that resolves to a boolean of whether the path exists. + +### pathExists.sync(path) + +Returns a boolean of whether the path exists. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..22aa6c3 --- /dev/null +++ b/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..91196d5 --- /dev/null +++ b/node_modules/path-is-absolute/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + } +} diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..8dbdf5f --- /dev/null +++ b/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE new file mode 100644 index 0000000..810f3db --- /dev/null +++ b/node_modules/path-parse/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Javier Blanco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-parse/README.md b/node_modules/path-parse/README.md new file mode 100644 index 0000000..05097f8 --- /dev/null +++ b/node_modules/path-parse/README.md @@ -0,0 +1,42 @@ +# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) + +> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). + +## Install + +``` +$ npm install --save path-parse +``` + +## Usage + +```js +var pathParse = require('path-parse'); + +pathParse('/home/user/dir/file.txt'); +//=> { +// root : "/", +// dir : "/home/user/dir", +// base : "file.txt", +// ext : ".txt", +// name : "file" +// } +``` + +## API + +See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. + +### pathParse(path) + +### pathParse.posix(path) + +The Posix specific version. + +### pathParse.win32(path) + +The Windows specific version. + +## License + +MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js new file mode 100644 index 0000000..f062d0a --- /dev/null +++ b/node_modules/path-parse/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isWindows = process.platform === 'win32'; + +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; + +var win32 = {}; + +function win32SplitPath(filename) { + return splitWindowsRe.exec(filename).slice(1); +} + +win32.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = win32SplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + return { + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3] + }; +}; + + + +// Split a filename into [dir, root, basename, name, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; +var posix = {}; + + +function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); +} + + +posix.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = posixSplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[1], + dir: allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3], + }; +}; + + +if (isWindows) + module.exports = win32.parse; +else /* posix */ + module.exports = posix.parse; + +module.exports.posix = posix.parse; +module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json new file mode 100644 index 0000000..36c23f8 --- /dev/null +++ b/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/node_modules/path-root-regex/LICENSE b/node_modules/path-root-regex/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/path-root-regex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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. diff --git a/node_modules/path-root-regex/README.md b/node_modules/path-root-regex/README.md new file mode 100644 index 0000000..9cc61ec --- /dev/null +++ b/node_modules/path-root-regex/README.md @@ -0,0 +1,53 @@ +# path-root-regex [![NPM version](https://img.shields.io/npm/v/path-root-regex.svg?style=flat)](https://www.npmjs.com/package/path-root-regex) [![NPM downloads](https://img.shields.io/npm/dm/path-root-regex.svg?style=flat)](https://npmjs.org/package/path-root-regex) [![Build Status](https://img.shields.io/travis/regexhq/path-root-regex.svg?style=flat)](https://travis-ci.org/regexhq/path-root-regex) + +> Regular expression for getting the root of a posix or windows filepath. + +You might also be interested in [path-root](https://github.com/jonschlinkert/path-root). + +## Usage + +The module exposes a function that must be called to get the regex (modified from the split device regex in the node.js path module); + +```js +var pathRootRegex = require('path-root-regex'); + +console.log(pathRootRegex() instanceof RegExp); +//=> true +``` + +See the [path-root](https://github.com/jonschlinkert/path-root) module for examples. + +## Related projects + +You might also be interested in these projects: + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/path-root-regex/issues/new). + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/regexhq/path-root-regex/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 29, 2016._ \ No newline at end of file diff --git a/node_modules/path-root-regex/index.js b/node_modules/path-root-regex/index.js new file mode 100644 index 0000000..b6eeea4 --- /dev/null +++ b/node_modules/path-root-regex/index.js @@ -0,0 +1,13 @@ +/*! + * path-root-regex + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function() { + // Regex is modified from the split device regex in the node.js path module. + return /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?/; +}; diff --git a/node_modules/path-root-regex/package.json b/node_modules/path-root-regex/package.json new file mode 100644 index 0000000..0596371 --- /dev/null +++ b/node_modules/path-root-regex/package.json @@ -0,0 +1,65 @@ +{ + "name": "path-root-regex", + "description": "Regular expression for getting the root of a posix or windows filepath.", + "version": "0.1.2", + "homepage": "https://github.com/regexhq/path-root-regex", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "regexhq/path-root-regex", + "bugs": { + "url": "https://github.com/regexhq/path-root-regex/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "detect", + "expression", + "file", + "filepath", + "match", + "parse", + "path", + "regex", + "regexp", + "regular", + "root", + "test" + ], + "verb": { + "run": true, + "toc": false, + "layout": false, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "highlight": "path-root", + "list": [ + "parse-filepath", + "is-absolute" + ] + }, + "reflinks": [ + "verb", + "path-root" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/path-root/LICENSE b/node_modules/path-root/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/path-root/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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. diff --git a/node_modules/path-root/README.md b/node_modules/path-root/README.md new file mode 100644 index 0000000..aa3c861 --- /dev/null +++ b/node_modules/path-root/README.md @@ -0,0 +1,94 @@ +# path-root [![NPM version](https://img.shields.io/npm/v/path-root.svg?style=flat)](https://www.npmjs.com/package/path-root) [![NPM downloads](https://img.shields.io/npm/dm/path-root.svg?style=flat)](https://npmjs.org/package/path-root) [![Build Status](https://img.shields.io/travis/jonschlinkert/path-root.svg?style=flat)](https://travis-ci.org/jonschlinkert/path-root) + +> Get the root of a posix or windows filepath. + +You might also be interested in [parse-filepath](https://github.com/jonschlinkert/parse-filepath). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install path-root --save +``` + +## Usage + +```js +var pathRoot = require('path-root'); +``` + +**Examples** + +```js +pathRoot('\\\\server\\share\\abc'); +//=> '\\\\server\\share\\' + +pathRoot('\\\\server foo\\some folder\\base-file.js'); +//=> '\\\\server foo\\some folder\\' + +pathRoot('\\\\?\\UNC\\server\\share'); +//=> '\\\\?\\UNC\\' + +pathRoot('foo/bar/baz.js'); +//=> '' + +pathRoot('c:\\foo\\bar\\baz.js'); +//=> 'c:\\' + +pathRoot('\\\\slslslsl\\admin$\\system32'); +//=> '\\\\slslslsl\\admin$\\' + +pathRoot('/foo/bar/baz.js'); +//=> '/' +``` + +## Related projects + +You might also be interested in these projects: + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath) +* [path-root-regex](https://www.npmjs.com/package/path-root-regex): Regular expression for getting the root of a posix or windows filepath. | [homepage](https://github.com/regexhq/path-root-regex) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/path-root/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/path-root/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 29, 2016._ \ No newline at end of file diff --git a/node_modules/path-root/index.js b/node_modules/path-root/index.js new file mode 100644 index 0000000..8e141ba --- /dev/null +++ b/node_modules/path-root/index.js @@ -0,0 +1,21 @@ +/*! + * path-root + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var pathRootRegex = require('path-root-regex'); + +module.exports = function(filepath) { + if (typeof filepath !== 'string') { + throw new TypeError('expected a string'); + } + + var match = pathRootRegex().exec(filepath); + if (match) { + return match[0]; + } +}; diff --git a/node_modules/path-root/package.json b/node_modules/path-root/package.json new file mode 100644 index 0000000..35cf577 --- /dev/null +++ b/node_modules/path-root/package.json @@ -0,0 +1,58 @@ +{ + "name": "path-root", + "description": "Get the root of a posix or windows filepath.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/path-root", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/path-root", + "bugs": { + "url": "https://github.com/jonschlinkert/path-root/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "path", + "root" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "highlight": "parse-filepath", + "list": [ + "path-root-regex", + "parse-filepath", + "is-absolute" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/path-type/index.js b/node_modules/path-type/index.js new file mode 100644 index 0000000..207a1d1 --- /dev/null +++ b/node_modules/path-type/index.js @@ -0,0 +1,29 @@ +'use strict'; +var fs = require('graceful-fs'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); + +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError('Expected a string')); + } + + return pify(fs[fn], Promise)(fp).then(function (stats) { + return stats[fn2](); + }); +} + +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError('Expected a string'); + } + + return fs[fn](fp)[fn2](); +} + +exports.file = type.bind(null, 'stat', 'isFile'); +exports.dir = type.bind(null, 'stat', 'isDirectory'); +exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); +exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); diff --git a/node_modules/path-type/license b/node_modules/path-type/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-type/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-type/package.json b/node_modules/path-type/package.json new file mode 100644 index 0000000..6e54f69 --- /dev/null +++ b/node_modules/path-type/package.json @@ -0,0 +1,52 @@ +{ + "name": "path-type", + "version": "1.1.0", + "description": "Check if a path is a file, directory, or symlink", + "license": "MIT", + "repository": "sindresorhus/path-type", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "fs", + "type", + "is", + "check", + "directory", + "dir", + "file", + "filepath", + "symlink", + "symbolic", + "link", + "stat", + "stats", + "filesystem" + ], + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/path-type/readme.md b/node_modules/path-type/readme.md new file mode 100644 index 0000000..eac12d6 --- /dev/null +++ b/node_modules/path-type/readme.md @@ -0,0 +1,42 @@ +# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type) + +> Check if a path is a file, directory, or symlink + + +## Install + +``` +$ npm install --save path-type +``` + + +## Usage + +```js +var pathType = require('path-type'); + +pathType.file('package.json').then(function (isFile) { + console.log(isFile); + //=> true +}) +``` + + +## API + +### .file(path) +### .dir(path) +### .symlink(path) + +Returns a promise that resolves to a boolean of whether the path is the checked type. + +### .fileSync(path) +### .dirSync(path) +### .symlinkSync(path) + +Returns a boolean of whether the path is the checked type. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/picocolors/LICENSE b/node_modules/picocolors/LICENSE new file mode 100644 index 0000000..496098c --- /dev/null +++ b/node_modules/picocolors/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021 Alexey 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. diff --git a/node_modules/picocolors/README.md b/node_modules/picocolors/README.md new file mode 100644 index 0000000..8e47aa8 --- /dev/null +++ b/node_modules/picocolors/README.md @@ -0,0 +1,21 @@ +# picocolors + +The tiniest and the fastest library for terminal output formatting with ANSI colors. + +```javascript +import pc from "picocolors" + +console.log( + pc.green(`How are ${pc.italic(`you`)} doing?`) +) +``` + +- **No dependencies.** +- **14 times** smaller and **2 times** faster than chalk. +- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. +- Node.js v6+ & browsers support. Support for both CJS and ESM projects. +- TypeScript type declarations included. +- [`NO_COLOR`](https://no-color.org/) friendly. + +## Docs +Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/node_modules/picocolors/package.json b/node_modules/picocolors/package.json new file mode 100644 index 0000000..85a12d5 --- /dev/null +++ b/node_modules/picocolors/package.json @@ -0,0 +1,25 @@ +{ + "name": "picocolors", + "version": "1.0.0", + "main": "./picocolors.js", + "types": "./picocolors.d.ts", + "browser": { + "./picocolors.js": "./picocolors.browser.js" + }, + "sideEffects": false, + "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", + "files": [ + "picocolors.*", + "types.ts" + ], + "keywords": [ + "terminal", + "colors", + "formatting", + "cli", + "console" + ], + "author": "Alexey Raspopov", + "repository": "alexeyraspopov/picocolors", + "license": "ISC" +} diff --git a/node_modules/picocolors/picocolors.browser.js b/node_modules/picocolors/picocolors.browser.js new file mode 100644 index 0000000..5eb9fbe --- /dev/null +++ b/node_modules/picocolors/picocolors.browser.js @@ -0,0 +1,4 @@ +var x=String; +var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}}; +module.exports=create(); +module.exports.createColors = create; diff --git a/node_modules/picocolors/picocolors.d.ts b/node_modules/picocolors/picocolors.d.ts new file mode 100644 index 0000000..94e146a --- /dev/null +++ b/node_modules/picocolors/picocolors.d.ts @@ -0,0 +1,5 @@ +import { Colors } from "./types" + +declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } + +export = picocolors diff --git a/node_modules/picocolors/picocolors.js b/node_modules/picocolors/picocolors.js new file mode 100644 index 0000000..fdb6304 --- /dev/null +++ b/node_modules/picocolors/picocolors.js @@ -0,0 +1,58 @@ +let tty = require("tty") + +let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty.isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env) + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input + let index = string.indexOf(close, open.length) + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + } + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace + let end = string.substring(index + close.length) + let nextIndex = end.indexOf(close) + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +} + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}) + +module.exports = createColors() +module.exports.createColors = createColors diff --git a/node_modules/picocolors/types.ts b/node_modules/picocolors/types.ts new file mode 100644 index 0000000..b4bacee --- /dev/null +++ b/node_modules/picocolors/types.ts @@ -0,0 +1,30 @@ +export type Formatter = (input: string | number | null | undefined) => string + +export interface Colors { + isColorSupported: boolean + reset: Formatter + bold: Formatter + dim: Formatter + italic: Formatter + underline: Formatter + inverse: Formatter + hidden: Formatter + strikethrough: Formatter + black: Formatter + red: Formatter + green: Formatter + yellow: Formatter + blue: Formatter + magenta: Formatter + cyan: Formatter + white: Formatter + gray: Formatter + bgBlack: Formatter + bgRed: Formatter + bgGreen: Formatter + bgYellow: Formatter + bgBlue: Formatter + bgMagenta: Formatter + bgCyan: Formatter + bgWhite: Formatter +} diff --git a/node_modules/picomatch/CHANGELOG.md b/node_modules/picomatch/CHANGELOG.md new file mode 100644 index 0000000..8ccc6c1 --- /dev/null +++ b/node_modules/picomatch/CHANGELOG.md @@ -0,0 +1,136 @@ +# Release history + +**All notable changes to this project will be documented in this file.** + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## 2.3.1 (2022-01-02) + +### Fixed + +* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)). + +### Changed + +* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)). + +## 2.3.0 (2021-05-21) + +### Fixed + +* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef)) + +## 2.2.3 (2021-04-10) + +### Fixed + +* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)). +* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)). + +## 2.2.2 (2020-03-21) + +### Fixed + +* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)). + +## 2.2.1 (2020-01-04) + +* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals. + +## 2.2.0 (2020-01-04) + +* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f)) +* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`. + +## 2.1.0 (2019-10-31) + +* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92)) +* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650)) +* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c)) +* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9)) +* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625)) +* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0)) +* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8)) +* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07)) +* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45)) +* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34)) +* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55)) +* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03)) +* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87)) +* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d)) +* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa)) +* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d)) +* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54)) +* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367)) +* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569)) +* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77)) +* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038)) +* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd)) + +## 2.0.7 (2019-05-14) + +* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71)) +* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e)) +* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279)) +* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44)) + +## 2.0.4 (2019-04-10) + +### Fixed + +- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. +- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. + +## 2.0.0 (2019-04-10) + +### Added + +- Adds support for `options.onIgnore`. See the readme for details +- Adds support for `options.onResult`. See the readme for details + +### Breaking changes + +- The unixify option was renamed to `windows` +- caching and all related options and methods have been removed + +## 1.0.0 (2018-11-05) + +- adds `.onMatch` option +- improvements to `.scan` method +- numerous improvements and optimizations for matching and parsing +- better windows path handling + +## 0.1.0 - 2017-04-13 + +First release. + + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE new file mode 100644 index 0000000..3608dca --- /dev/null +++ b/node_modules/picomatch/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md new file mode 100644 index 0000000..b0526e2 --- /dev/null +++ b/node_modules/picomatch/README.md @@ -0,0 +1,708 @@ +

Picomatch

+ +

+ +version + + +test status + + +coverage status + + +downloads + +

+ +
+
+ +

+Blazing fast and accurate glob matcher written in JavaScript.
+No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. +

+ +
+
+ +## Why picomatch? + +* **Lightweight** - No dependencies +* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. +* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) +* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) +* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. +* **Well tested** - Thousands of unit tests + +See the [library comparison](#library-comparisons) to other libraries. + +
+
+ +## Table of Contents + +
Click to expand + +- [Install](#install) +- [Usage](#usage) +- [API](#api) + * [picomatch](#picomatch) + * [.test](#test) + * [.matchBase](#matchbase) + * [.isMatch](#ismatch) + * [.parse](#parse) + * [.scan](#scan) + * [.compileRe](#compilere) + * [.makeRe](#makere) + * [.toRegex](#toregex) +- [Options](#options) + * [Picomatch options](#picomatch-options) + * [Scan Options](#scan-options) + * [Options Examples](#options-examples) +- [Globbing features](#globbing-features) + * [Basic globbing](#basic-globbing) + * [Advanced globbing](#advanced-globbing) + * [Braces](#braces) + * [Matching special characters as literals](#matching-special-characters-as-literals) +- [Library Comparisons](#library-comparisons) +- [Benchmarks](#benchmarks) +- [Philosophies](#philosophies) +- [About](#about) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +
+ +
+
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +npm install --save picomatch +``` + +
+ +## Usage + +The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. + +```js +const pm = require('picomatch'); +const isMatch = pm('*.js'); + +console.log(isMatch('abcd')); //=> false +console.log(isMatch('a.js')); //=> true +console.log(isMatch('a.md')); //=> false +console.log(isMatch('a/b.js')); //=> false +``` + +
+ +## API + +### [picomatch](lib/picomatch.js#L32) + +Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. + +**Params** + +* `globs` **{String|Array}**: One or more glob patterns. +* `options` **{Object=}** +* `returns` **{Function=}**: Returns a matcher function. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch(glob[, options]); + +const isMatch = picomatch('*.!(*a)'); +console.log(isMatch('a.a')); //=> false +console.log(isMatch('a.b')); //=> true +``` + +### [.test](lib/picomatch.js#L117) + +Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. + +**Params** + +* `input` **{String}**: String to test. +* `regex` **{RegExp}** +* `returns` **{Object}**: Returns an object with matching info. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.test(input, regex[, options]); + +console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); +// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } +``` + +### [.matchBase](lib/picomatch.js#L161) + +Match the basename of a filepath. + +**Params** + +* `input` **{String}**: String to test. +* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). +* `returns` **{Boolean}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.matchBase(input, glob[, options]); +console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true +``` + +### [.isMatch](lib/picomatch.js#L183) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* **{String|Array}**: str The string to test. +* **{String|Array}**: patterns One or more glob patterns to use for matching. +* **{Object}**: See available [options](#options). +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.isMatch(string, patterns[, options]); + +console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true +console.log(picomatch.isMatch('a.a', 'b.*')); //=> false +``` + +### [.parse](lib/picomatch.js#L199) + +Parse a glob pattern to create the source string for a regular expression. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.parse(pattern[, options]); +``` + +### [.scan](lib/picomatch.js#L231) + +Scan a glob pattern to separate the pattern into segments. + +**Params** + +* `input` **{String}**: Glob pattern to scan. +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.scan(input[, options]); + +const result = picomatch.scan('!./foo/*.js'); +console.log(result); +{ prefix: '!./', + input: '!./foo/*.js', + start: 3, + base: 'foo', + glob: '*.js', + isBrace: false, + isBracket: false, + isGlob: true, + isExtglob: false, + isGlobstar: false, + negated: true } +``` + +### [.compileRe](lib/picomatch.js#L245) + +Compile a regular expression from the `state` object returned by the +[parse()](#parse) method. + +**Params** + +* `state` **{Object}** +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. +* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. +* `returns` **{RegExp}** + +### [.makeRe](lib/picomatch.js#L286) + +Create a regular expression from a parsed glob pattern. + +**Params** + +* `state` **{String}**: The object returned from the `.parse` method. +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. +* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +const picomatch = require('picomatch'); +const state = picomatch.parse('*.js'); +// picomatch.compileRe(state[, options]); + +console.log(picomatch.compileRe(state)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +### [.toRegex](lib/picomatch.js#L321) + +Create a regular expression from the given regex source string. + +**Params** + +* `source` **{String}**: Regular expression source string. +* `options` **{Object}** +* `returns` **{RegExp}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.toRegex(source[, options]); + +const { output } = picomatch.parse('*.js'); +console.log(picomatch.toRegex(output)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +
+ +## Options + +### Picomatch options + +The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | +| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | +| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | +| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | +| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | +| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | +| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | +| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | +| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | +| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | +| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | +| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | +| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | +| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | +| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | +| `matchBase` | `boolean` | `false` | Alias for `basename` | +| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | +| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | +| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | +| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | +| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | +| `noext` | `boolean` | `false` | Alias for `noextglob` | +| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | +| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | +| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | +| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | +| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | +| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | +| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | +| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | +| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | +| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | +| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | +| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | +| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | +| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | +| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | + +picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error. + +### Scan Options + +In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | +| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.scan('!./foo/*.js', { tokens: true }); +console.log(result); +// { +// prefix: '!./', +// input: '!./foo/*.js', +// start: 3, +// base: 'foo', +// glob: '*.js', +// isBrace: false, +// isBracket: false, +// isGlob: true, +// isExtglob: false, +// isGlobstar: false, +// negated: true, +// maxDepth: 2, +// tokens: [ +// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, +// { value: 'foo', depth: 1, isGlob: false }, +// { value: '*.js', depth: 1, isGlob: true } +// ], +// slashes: [ 2, 6 ], +// parts: [ 'foo', '*.js' ] +// } +``` + +
+ +### Options Examples + +#### options.expandRange + +**Type**: `function` + +**Default**: `undefined` + +Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. + +**Example** + +The following example shows how to create a glob that matches a folder + +```js +const fill = require('fill-range'); +const regex = pm.makeRe('foo/{01..25}/bar', { + expandRange(a, b) { + return `(${fill(a, b, { toRegex: true })})`; + } +}); + +console.log(regex); +//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ + +console.log(regex.test('foo/00/bar')) // false +console.log(regex.test('foo/01/bar')) // true +console.log(regex.test('foo/10/bar')) // true +console.log(regex.test('foo/22/bar')) // true +console.log(regex.test('foo/25/bar')) // true +console.log(regex.test('foo/26/bar')) // false +``` + +#### options.format + +**Type**: `function` + +**Default**: `undefined` + +Custom function for formatting strings before they're matched. + +**Example** + +```js +// strip leading './' from strings +const format = str => str.replace(/^\.\//, ''); +const isMatch = picomatch('foo/*.js', { format }); +console.log(isMatch('./foo/bar.js')); //=> true +``` + +#### options.onMatch + +```js +const onMatch = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onMatch }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onIgnore + +```js +const onIgnore = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onResult + +```js +const onResult = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onResult, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +
+
+ +## Globbing features + +* [Basic globbing](#basic-globbing) (Wildcard matching) +* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) + +### Basic globbing + +| **Character** | **Description** | +| --- | --- | +| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | +| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | +| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | +| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | + +#### Matching behavior vs. Bash + +Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: + +* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. +* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. + +
+ +### Advanced globbing + +* [extglobs](#extglobs) +* [POSIX brackets](#posix-brackets) +* [Braces](#brace-expansion) + +#### Extglobs + +| **Pattern** | **Description** | +| --- | --- | +| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | +| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | +| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | +| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | +| `!(pattern)` | Match _anything but_ `pattern` | + +**Examples** + +```js +const pm = require('picomatch'); + +// *(pattern) matches ZERO or more of "pattern" +console.log(pm.isMatch('a', 'a*(z)')); // true +console.log(pm.isMatch('az', 'a*(z)')); // true +console.log(pm.isMatch('azzz', 'a*(z)')); // true + +// +(pattern) matches ONE or more of "pattern" +console.log(pm.isMatch('a', 'a*(z)')); // true +console.log(pm.isMatch('az', 'a*(z)')); // true +console.log(pm.isMatch('azzz', 'a*(z)')); // true + +// supports multiple extglobs +console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false + +// supports nested extglobs +console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true +``` + +#### POSIX brackets + +POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. + +**Enable POSIX bracket support** + +```js +console.log(pm.makeRe('[[:word:]]+', { posix: true })); +//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ +``` + +**Supported POSIX classes** + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` +* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. +* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. +* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. +* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. +* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. +* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. +* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. +* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. +* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. +* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. +* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. +* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. +* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. + +See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. + +### Braces + +Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. + +### Matching special characters as literals + +If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: + +**Special Characters** + +Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. + +To match any of the following characters as literals: `$^*+?()[] + +Examples: + +```js +console.log(pm.makeRe('foo/bar \\(1\\)')); +console.log(pm.makeRe('foo/bar \\(1\\)')); +``` + +
+
+ +## Library Comparisons + +The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). + +| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | +| --- | --- | --- | --- | --- | --- | --- | --- | +| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | +| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | +| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | +| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | +| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | +| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | +| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | +| File system operations | - | - | - | - | - | - | - | + +
+
+ +## Benchmarks + +Performance comparison of picomatch and minimatch. + +``` +# .makeRe star + picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled) + minimatch x 627,206 ops/sec ±1.96% (87 runs sampled)) + +# .makeRe star; dot=true + picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled) + minimatch x 525,876 ops/sec ±0.60% (88 runs sampled) + +# .makeRe globstar + picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled) + minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d) + +# .makeRe globstars + picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled) + minimatch x 477,179 ops/sec ±1.33% (91 runs sampled) + +# .makeRe with leading star + picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled) + minimatch x 453,564 ops/sec ±1.43% (94 runs sampled) + +# .makeRe - basic braces + picomatch x 392,067 ops/sec ±0.70% (90 runs sampled) + minimatch x 99,532 ops/sec ±2.03% (87 runs sampled)) +``` + +
+
+ +## Philosophies + +The goal of this library is to be blazing fast, without compromising on accuracy. + +**Accuracy** + +The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. + +Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. + +**Performance** + +Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. + +
+
+ +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js new file mode 100644 index 0000000..d2f2bc5 --- /dev/null +++ b/node_modules/picomatch/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/picomatch'); diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js new file mode 100644 index 0000000..a62ef38 --- /dev/null +++ b/node_modules/picomatch/lib/constants.js @@ -0,0 +1,179 @@ +'use strict'; + +const path = require('path'); +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js new file mode 100644 index 0000000..58269d0 --- /dev/null +++ b/node_modules/picomatch/lib/parse.js @@ -0,0 +1,1091 @@ +'use strict'; + +const constants = require('./constants'); +const utils = require('./utils'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js new file mode 100644 index 0000000..782d809 --- /dev/null +++ b/node_modules/picomatch/lib/picomatch.js @@ -0,0 +1,342 @@ +'use strict'; + +const path = require('path'); +const scan = require('./scan'); +const parse = require('./parse'); +const utils = require('./utils'); +const constants = require('./constants'); +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse(input, options); + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js new file mode 100644 index 0000000..e59cd7a --- /dev/null +++ b/node_modules/picomatch/lib/scan.js @@ -0,0 +1,391 @@ +'use strict'; + +const utils = require('./utils'); +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = require('./constants'); + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js new file mode 100644 index 0000000..c3ca766 --- /dev/null +++ b/node_modules/picomatch/lib/utils.js @@ -0,0 +1,64 @@ +'use strict'; + +const path = require('path'); +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = require('./constants'); + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json new file mode 100644 index 0000000..3db22d4 --- /dev/null +++ b/node_modules/picomatch/package.json @@ -0,0 +1,81 @@ +{ + "name": "picomatch", + "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", + "version": "2.3.1", + "homepage": "https://github.com/micromatch/picomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "funding": "https://github.com/sponsors/jonschlinkert", + "repository": "micromatch/picomatch", + "bugs": { + "url": "https://github.com/micromatch/picomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8.6" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, + "devDependencies": { + "eslint": "^6.8.0", + "fill-range": "^7.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.2.2", + "nyc": "^15.0.0", + "time-require": "github:jonschlinkert/time-require" + }, + "keywords": [ + "glob", + "match", + "picomatch" + ], + "nyc": { + "reporter": [ + "html", + "lcov", + "text-summary" + ] + }, + "verb": { + "toc": { + "render": true, + "method": "preWrite", + "maxdepth": 3 + }, + "layout": "empty", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "braces", + "micromatch" + ] + }, + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "micromatch", + "minimatch", + "nanomatch", + "picomatch" + ] + } +} diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js new file mode 100644 index 0000000..7c720eb --- /dev/null +++ b/node_modules/pify/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var processFn = function (fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + + fn.apply(that, args); + }); + }; +}; + +var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function (key) { + var match = function (pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + + return ret; + }, ret); +}; + +pify.all = pify; diff --git a/node_modules/pify/license b/node_modules/pify/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/pify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json new file mode 100644 index 0000000..311d198 --- /dev/null +++ b/node_modules/pify/package.json @@ -0,0 +1,48 @@ +{ + "name": "pify", + "version": "2.3.0", + "description": "Promisify a callback-style function", + "license": "MIT", + "repository": "sindresorhus/pify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava && npm run optimization-test", + "optimization-test": "node --allow-natives-syntax optimization-test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "promisify", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "es2015" + ], + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + } +} diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md new file mode 100644 index 0000000..c79ca8b --- /dev/null +++ b/node_modules/pify/readme.md @@ -0,0 +1,119 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// promisify a single function + +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// or promisify all methods in a module + +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [promiseModule], [options]) + +Returns a promise wrapped version of the supplied function or module. + +#### input + +Type: `function`, `object` + +Callback-style function or module whose methods you want to promisify. + +#### promiseModule + +Type: `function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + +#### options + +##### multiArgs + +Type: `boolean` +Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `array` of (`string`|`regex`) + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `array` of (`string`|`regex`) +Default: `[/.+Sync$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean` +Default: `false` + +By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(data, null); + }); +}; + +// promisify methods but not fn() +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/pinkie-promise/index.js b/node_modules/pinkie-promise/index.js new file mode 100644 index 0000000..777377a --- /dev/null +++ b/node_modules/pinkie-promise/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/node_modules/pinkie-promise/license b/node_modules/pinkie-promise/license new file mode 100644 index 0000000..1aeb74f --- /dev/null +++ b/node_modules/pinkie-promise/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json new file mode 100644 index 0000000..3515f8f --- /dev/null +++ b/node_modules/pinkie-promise/package.json @@ -0,0 +1,35 @@ +{ + "name": "pinkie-promise", + "version": "2.0.1", + "description": "ES2015 Promise ponyfill", + "license": "MIT", + "repository": "floatdrop/pinkie-promise", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "es2015", + "es6", + "polyfill", + "ponyfill" + ], + "dependencies": { + "pinkie": "^2.0.0" + }, + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/pinkie-promise/readme.md b/node_modules/pinkie-promise/readme.md new file mode 100644 index 0000000..78477f4 --- /dev/null +++ b/node_modules/pinkie-promise/readme.md @@ -0,0 +1,28 @@ +# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) + +> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill + +Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. + +## Install + +``` +$ npm install --save pinkie-promise +``` + +## Usage + +```js +var Promise = require('pinkie-promise'); + +new Promise(function (resolve) { resolve('unicorns'); }); +//=> Promise { 'unicorns' } +``` + +## Related + +- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/pinkie/index.js b/node_modules/pinkie/index.js new file mode 100644 index 0000000..14ce1bf --- /dev/null +++ b/node_modules/pinkie/index.js @@ -0,0 +1,292 @@ +'use strict'; + +var PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; +var NOOP = function () {}; +var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; + +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; +var asyncQueue = []; +var asyncTimer; + +function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } + + // reset async asyncQueue + asyncQueue = []; + asyncTimer = false; +} + +function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } +} + +function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } +} + +function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } +} + +function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || typeof value === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + + reject(promise, reason); + } + }); + + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; +} + +function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } +} + +function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + + asyncCall(publishFulfillment, promise); + } +} + +function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + + asyncCall(publishRejection, promise); + } +} + +function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); +} + +function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); +} + +function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + if (!promise._handled && isNode) { + global.process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + global.process.emit('rejectionHandled', promise); +} + +/** + * @class + */ +function Promise(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof Promise === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + + invokeResolver(resolver, this); +} + +Promise.prototype = { + constructor: Promise, + + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + + then: function (onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + + catch: function (onRejection) { + return this.then(null, onRejection); + } +}; + +Promise.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new Promise(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + if (!--remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); +}; + +Promise.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new Promise(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); +}; + +Promise.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise) { + return value; + } + + return new Promise(function (resolve) { + resolve(value); + }); +}; + +Promise.reject = function (reason) { + return new Promise(function (resolve, reject) { + reject(reason); + }); +}; + +module.exports = Promise; diff --git a/node_modules/pinkie/license b/node_modules/pinkie/license new file mode 100644 index 0000000..1aeb74f --- /dev/null +++ b/node_modules/pinkie/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pinkie/package.json b/node_modules/pinkie/package.json new file mode 100644 index 0000000..cb9057b --- /dev/null +++ b/node_modules/pinkie/package.json @@ -0,0 +1,36 @@ +{ + "name": "pinkie", + "version": "2.0.4", + "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", + "license": "MIT", + "repository": "floatdrop/pinkie", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "es2015", + "es6" + ], + "devDependencies": { + "core-assert": "^0.1.1", + "coveralls": "^2.11.4", + "mocha": "*", + "nyc": "^3.2.2", + "promises-aplus-tests": "*", + "xo": "^0.10.1" + } +} diff --git a/node_modules/pinkie/readme.md b/node_modules/pinkie/readme.md new file mode 100644 index 0000000..1565f95 --- /dev/null +++ b/node_modules/pinkie/readme.md @@ -0,0 +1,83 @@ +

+
+ pinkie +
+
+

+ +> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation + +[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) + +There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. + +This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). + + +## Install + +``` +$ npm install --save pinkie +``` + + +## Usage + +```js +var fs = require('fs'); +var Promise = require('pinkie'); + +new Promise(function (resolve, reject) { + fs.readFile('foo.json', 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + + resolve(data); + }); +}); +//=> Promise +``` + + +### API + +`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: + +#### new Promise(executor) + +Returns new instance of `Promise`. + +##### executor + +*Required* +Type: `function` + +Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. + +#### pinkie.all(promises) + +Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. + +#### pinkie.race(promises) + +Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. + +#### pinkie.reject(reason) + +Returns a Promise object that is rejected with the given `reason`. + +#### pinkie.resolve(value) + +Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. + + +## Related + +- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module + + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/plugin-error/LICENSE b/node_modules/plugin-error/LICENSE new file mode 100644 index 0000000..e6755b6 --- /dev/null +++ b/node_modules/plugin-error/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz , Eric Schoffstall 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/node_modules/plugin-error/README.md b/node_modules/plugin-error/README.md new file mode 100644 index 0000000..f5199c8 --- /dev/null +++ b/node_modules/plugin-error/README.md @@ -0,0 +1,69 @@ +

+ + + +

+ +# plugin-error + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Error handling for Vinyl plugins. + +## Usage + +```js +var PluginError = require('plugin-error'); + +var err = new PluginError('test', { + message: 'something broke' +}); + +var err = new PluginError({ + plugin: 'test', + message: 'something broke' +}); + +var err = new PluginError('test', 'something broke'); + +var err = new PluginError('test', 'something broke', { showStack: true }); + +var existingError = new Error('OMG'); +var err = new PluginError('test', existingError, { showStack: true }); +``` + +## API + +### `new PluginError(pluginName, message[, options])` + +Error constructor that takes: +* `pluginName` - a `String` that should be the module name of your plugin +* `message` - a `String` message or an existing `Error` object +* `options` - an `Object` of your options + +**Behavior:** + +* By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. +* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created. +* If you pass in a custom stack string you need to include the message along with that. +* Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/plugin-error.svg +[npm-url]: https://www.npmjs.com/package/plugin-error +[npm-image]: http://img.shields.io/npm/v/plugin-error.svg + +[travis-url]: https://travis-ci.org/gulpjs/plugin-error +[travis-image]: http://img.shields.io/travis/gulpjs/plugin-error.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/plugin-error +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/plugin-error.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/plugin-error +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/plugin-error/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/plugin-error/index.d.ts b/node_modules/plugin-error/index.d.ts new file mode 100644 index 0000000..4ff8f54 --- /dev/null +++ b/node_modules/plugin-error/index.d.ts @@ -0,0 +1,114 @@ +declare namespace PluginError { + interface Constructor { + /** + * @param plugin Plugin name + * @param error Base error + * @param options Error options + */ + new (plugin: string, error: E, options?: Options): PluginError; + + /** + * @param plugin Plugin name + * @param error Base error or error message + * @param options Error options + */ + new (plugin: string, error: E | string, options: Options): PluginError; + + /** + * @param plugin Plugin name + * @param error Base error, error message, or options with message + */ + new (plugin: string, error: E | string | (Options & {message: string})): PluginError; + + /** + * @param options Options with plugin name and message + */ + new(options: Options & {plugin: string, message: string}): PluginError; + } + + interface Options { + /** + * Error name + */ + name?: string; + + /** + * Error message + */ + message?: any; + + /** + * File name where the error occurred + */ + fileName?: string; + + + /** + * Line number where the error occurred + */ + lineNumber?: number; + + /** + * Error properties will be included in err.toString(). Can be omitted by + * setting this to false. + * + * Default: `true` + */ + showProperties?: boolean; + + /** + * By default the stack will not be shown. Set this to true if you think the + * stack is important for your error. + * + * Default: `false` + */ + showStack?: boolean; + + /** + * Error stack to use for `err.toString()` if `showStack` is `true`. + * By default it uses the `stack` of the original error if you used one, otherwise it captures a new stack. + */ + stack?: string; + } + + /** + * The `SimplePluginError` interface defines the properties available on all the the instances of `PluginError`. + * + * @internal + */ + interface SimplePluginError extends Error { + /** + * Plugin name + */ + plugin: string; + + /** + * Boolean controlling if the stack will be shown in `err.toString()`. + */ + showStack: boolean; + + /** + * Boolean controlling if properties will be shown in `err.toString()`. + */ + showProperties: boolean; + + /** + * File name where the error occurred + */ + fileName?: string; + + /** + * Line number where the error occurred + */ + lineNumber?: number; + } +} + +/** + * Abstraction for error handling for Vinyl plugins + */ +type PluginError = PluginError.SimplePluginError & T; + +declare const PluginError: PluginError.Constructor; + +export = PluginError; diff --git a/node_modules/plugin-error/index.js b/node_modules/plugin-error/index.js new file mode 100644 index 0000000..a4d360d --- /dev/null +++ b/node_modules/plugin-error/index.js @@ -0,0 +1,190 @@ +var util = require('util'); +var colors = require('ansi-colors'); +var extend = require('extend-shallow'); +var differ = require('arr-diff'); +var union = require('arr-union'); + +var nonEnum = ['message', 'name', 'stack']; +var ignored = union(nonEnum, ['__safety', '_stack', 'plugin', 'showProperties', 'showStack']); +var props = ['fileName', 'lineNumber', 'message', 'name', 'plugin', 'showProperties', 'showStack', 'stack']; + +function PluginError(plugin, message, options) { + if (!(this instanceof PluginError)) { + throw new Error('Call PluginError using new'); + } + + Error.call(this); + var opts = setDefaults(plugin, message, options); + var self = this; + + // If opts has an error, get details from it + if (typeof opts.error === 'object') { + var keys = union(Object.keys(opts.error), nonEnum); + + // These properties are not enumerable, so we have to add them explicitly. + keys.forEach(function(prop) { + self[prop] = opts.error[prop]; + }); + } + + // Opts object can override + props.forEach(function(prop) { + if (prop in opts) { + this[prop] = opts[prop]; + } + }, this); + + // Defaults + if (!this.name) { + this.name = 'Error'; + } + if (!this.stack) { + + /** + * `Error.captureStackTrace` appends a stack property which + * relies on the toString method of the object it is applied to. + * + * Since we are using our own toString method which controls when + * to display the stack trace, if we don't go through this safety + * object we'll get stack overflow problems. + */ + + var safety = {}; + safety.toString = function() { + return this._messageWithDetails() + '\nStack:'; + }.bind(this); + + Error.captureStackTrace(safety, arguments.callee || this.constructor); + this.__safety = safety; + } + if (!this.plugin) { + throw new Error('Missing plugin name'); + } + if (!this.message) { + throw new Error('Missing error message'); + } +} + +util.inherits(PluginError, Error); + +/** + * Output a formatted message with details + */ + +PluginError.prototype._messageWithDetails = function() { + var msg = 'Message:\n ' + this.message; + var details = this._messageDetails(); + if (details !== '') { + msg += '\n' + details; + } + return msg; +}; + +/** + * Output actual message details + */ + +PluginError.prototype._messageDetails = function() { + if (!this.showProperties) { + return ''; + } + + var props = differ(Object.keys(this), ignored); + var len = props.length; + + if (len === 0) { + return ''; + } + + var res = ''; + var i = 0; + while (len--) { + var prop = props[i++]; + res += ' '; + res += prop + ': ' + this[prop]; + res += '\n'; + } + return 'Details:\n' + res; +}; + +/** + * Override the `toString` method + */ + +PluginError.prototype.toString = function() { + var detailsWithStack = function(stack) { + return this._messageWithDetails() + '\nStack:\n' + stack; + }.bind(this); + + var msg = ''; + if (this.showStack) { + // If there is no wrapped error, use the stack captured in the PluginError ctor + if (this.__safety) { + msg = this.__safety.stack; + + } else if (this._stack) { + msg = detailsWithStack(this._stack); + + } else { + // Stack from wrapped error + msg = detailsWithStack(this.stack); + } + return message(msg, this); + } + + msg = this._messageWithDetails(); + return message(msg, this); +}; + +// Format the output message +function message(msg, thisArg) { + var sig = colors.red(thisArg.name); + sig += ' in plugin '; + sig += '"' + colors.cyan(thisArg.plugin) + '"'; + sig += '\n'; + sig += msg; + return sig; +} + +/** + * Set default options based on arguments. + */ + +function setDefaults(plugin, message, opts) { + if (typeof plugin === 'object') { + return defaults(plugin); + } + opts = opts || {}; + if (message instanceof Error) { + opts.error = message; + } else if (typeof message === 'object') { + opts = message; + } else { + opts.message = message; + } + opts.plugin = plugin; + return defaults(opts); +} + +/** + * Extend default options with: + * + * - `showStack`: default=false + * - `showProperties`: default=true + * + * @param {Object} `opts` Options to extend + * @return {Object} + */ + +function defaults(opts) { + return extend({ + showStack: false, + showProperties: true, + }, opts); +} + +/** + * Expose `PluginError` + */ + +module.exports = PluginError; diff --git a/node_modules/plugin-error/node_modules/extend-shallow/LICENSE b/node_modules/plugin-error/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/plugin-error/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/plugin-error/node_modules/extend-shallow/README.md b/node_modules/plugin-error/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/plugin-error/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/plugin-error/node_modules/extend-shallow/index.js b/node_modules/plugin-error/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/plugin-error/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/plugin-error/node_modules/extend-shallow/package.json b/node_modules/plugin-error/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/plugin-error/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/plugin-error/node_modules/is-extendable/LICENSE b/node_modules/plugin-error/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/plugin-error/node_modules/is-extendable/README.md b/node_modules/plugin-error/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/plugin-error/node_modules/is-extendable/index.d.ts b/node_modules/plugin-error/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/plugin-error/node_modules/is-extendable/index.js b/node_modules/plugin-error/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/plugin-error/node_modules/is-extendable/package.json b/node_modules/plugin-error/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/plugin-error/node_modules/is-plain-object/LICENSE b/node_modules/plugin-error/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/plugin-error/node_modules/is-plain-object/README.md b/node_modules/plugin-error/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/plugin-error/node_modules/is-plain-object/index.d.ts b/node_modules/plugin-error/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/plugin-error/node_modules/is-plain-object/index.js b/node_modules/plugin-error/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/plugin-error/node_modules/is-plain-object/package.json b/node_modules/plugin-error/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/plugin-error/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/plugin-error/package.json b/node_modules/plugin-error/package.json new file mode 100644 index 0000000..cd75f29 --- /dev/null +++ b/node_modules/plugin-error/package.json @@ -0,0 +1,51 @@ +{ + "name": "plugin-error", + "version": "1.0.1", + "description": "Error handling for Vinyl plugins.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Jon Schlinkert ", + "Blaine Bublitz " + ], + "repository": "gulpjs/plugin-error", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.d.ts", + "index.js" + ], + "scripts": { + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only && npm run test-types", + "test-types": "tsc -p test/types", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + }, + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^3.0.0", + "typescript": "^2.6.2" + }, + "keywords": [ + "error", + "plugin", + "gulp-util" + ] +} diff --git a/node_modules/posix-character-classes/LICENSE b/node_modules/posix-character-classes/LICENSE new file mode 100644 index 0000000..b11cb79 --- /dev/null +++ b/node_modules/posix-character-classes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-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. diff --git a/node_modules/posix-character-classes/README.md b/node_modules/posix-character-classes/README.md new file mode 100644 index 0000000..894ae23 --- /dev/null +++ b/node_modules/posix-character-classes/README.md @@ -0,0 +1,103 @@ +# posix-character-classes [![NPM version](https://img.shields.io/npm/v/posix-character-classes.svg?style=flat)](https://www.npmjs.com/package/posix-character-classes) [![NPM monthly downloads](https://img.shields.io/npm/dm/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![NPM total downloads](https://img.shields.io/npm/dt/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/posix-character-classes.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/posix-character-classes) + +> POSIX character classes for creating regular expressions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save posix-character-classes +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add posix-character-classes +``` + +## Usage + +```js +var posix = require('posix-character-classes'); +console.log(posix.alpha); +//=> 'A-Za-z' +``` + +## POSIX Character classes + +The POSIX standard supports the following classes or categories of charactersh (note that classes must be defined within brackets)[1]: + +| **POSIX class** | **Equivalent to** | **Matches** | +| --- | --- | --- | +| `[:alnum:]` | `[A-Za-z0-9]` | digits, uppercase and lowercase letters | +| `[:alpha:]` | `[A-Za-z]` | upper- and lowercase letters | +| `[:ascii:]` | `[\x00-\x7F]` | ASCII characters | +| `[:blank:]` | `[ \t]` | space and TAB characters only | +| `[:cntrl:]` | `[\x00-\x1F\x7F]` | Control characters | +| `[:digit:]` | `[0-9]` | digits | +| `[:graph:]` | `[^[:cntrl:]]` | graphic characters (all characters which have graphic representation) | +| `[:lower:]` | `[a-z]` | lowercase letters | +| `[:print:]` | `[[:graph] ]` | graphic characters and space | +| `[:punct:]` | ``[-!"#$%&'()*+,./:;<=>?@[]^_`{ | }~]`` | all punctuation characters (all graphic characters except letters and digits) | +| `[:space:]` | `[ \t\n\r\f\v]` | all blank (whitespace) characters, including spaces, tabs, new lines, carriage returns, form feeds, and vertical tabs | +| `[:upper:]` | `[A-Z]` | uppercase letters | +| `[:word:]` | `[A-Za-z0-9_]` | word characters | +| `[:xdigit:]` | `[0-9A-Fa-f]` | hexadecimal digits | + +## Examples + +* `a[[:digit:]]b` matches `a0b`, `a1b`, ..., `a9b`. +* `a[:digit:]b` is invalid, character classes must be enclosed in brackets +* `[[:digit:]abc]` matches any digit, as well as `a`, `b`, and `c`. +* `[abc[:digit:]]` is the same as the previous, matching any digit, as well as `a`, `b`, and `c` +* `[^ABZ[:lower:]]` matches any character except lowercase letters, `A`, `B`, and `Z`. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ + +
+
+
    +
  1. table and examples are based on the WikiBooks page for [Regular Expressions/POSIX Basic Regular Expressions](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions), which is available under the [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/3.0/). + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/posix-character-classes/index.js b/node_modules/posix-character-classes/index.js new file mode 100644 index 0000000..19f1c98 --- /dev/null +++ b/node_modules/posix-character-classes/index.js @@ -0,0 +1,22 @@ +'use strict'; + +/** + * POSIX character classes + */ + +module.exports = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; diff --git a/node_modules/posix-character-classes/package.json b/node_modules/posix-character-classes/package.json new file mode 100644 index 0000000..acce4ba --- /dev/null +++ b/node_modules/posix-character-classes/package.json @@ -0,0 +1,54 @@ +{ + "name": "posix-character-classes", + "description": "POSIX character classes for creating regular expressions.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/posix-character-classes", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/posix-character-classes", + "bugs": { + "url": "https://github.com/jonschlinkert/posix-character-classes/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "character", + "classes", + "posix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + }, + "related-list": [ + "micromatch", + "nanomatch", + "extglob", + "expand-brackets" + ] + } +} diff --git a/node_modules/pretty-hrtime/.jshintignore b/node_modules/pretty-hrtime/.jshintignore new file mode 100644 index 0000000..cb28eb3 --- /dev/null +++ b/node_modules/pretty-hrtime/.jshintignore @@ -0,0 +1 @@ +node_modules/** diff --git a/node_modules/pretty-hrtime/.npmignore b/node_modules/pretty-hrtime/.npmignore new file mode 100644 index 0000000..094a5f3 --- /dev/null +++ b/node_modules/pretty-hrtime/.npmignore @@ -0,0 +1,10 @@ +.DS_Store +*.log +node_modules +build +*.node +components +*.orig +.idea +test +.travis.yml diff --git a/node_modules/pretty-hrtime/LICENSE b/node_modules/pretty-hrtime/LICENSE new file mode 100644 index 0000000..b7346ab --- /dev/null +++ b/node_modules/pretty-hrtime/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.com/) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pretty-hrtime/README.md b/node_modules/pretty-hrtime/README.md new file mode 100644 index 0000000..f4be28d --- /dev/null +++ b/node_modules/pretty-hrtime/README.md @@ -0,0 +1,57 @@ +[![Build Status](https://secure.travis-ci.org/robrich/pretty-hrtime.png?branch=master)](https://travis-ci.org/robrich/pretty-hrtime) +[![Dependency Status](https://david-dm.org/robrich/pretty-hrtime.png)](https://david-dm.org/robrich/pretty-hrtime) + +pretty-hrtime +============ + +[process.hrtime()](http://nodejs.org/api/process.html#process_process_hrtime) to words + +Usage +----- + +```javascript +var prettyHrtime = require('pretty-hrtime'); + +var start = process.hrtime(); +// do stuff +var end = process.hrtime(start); + +var words = prettyHrtime(end); +console.log(words); // '1.2 ms' + +words = prettyHrtime(end, {verbose:true}); +console.log(words); // '1 millisecond 209 microseconds' + +words = prettyHrtime(end, {precise:true}); +console.log(words); // '1.20958 ms' +``` + +Note: process.hrtime() has been available since 0.7.6. +See [http://nodejs.org/changelog.html](http://nodejs.org/changelog.html) +and [https://github.com/joyent/node/commit/f06abd](https://github.com/joyent/node/commit/f06abd). + +LICENSE +------- + +(MIT License) + +Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.com/) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pretty-hrtime/index.js b/node_modules/pretty-hrtime/index.js new file mode 100644 index 0000000..bed3f89 --- /dev/null +++ b/node_modules/pretty-hrtime/index.js @@ -0,0 +1,80 @@ +/*jshint node:true */ + +"use strict"; + +var minimalDesc = ['h', 'min', 's', 'ms', 'μs', 'ns']; +var verboseDesc = ['hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond']; +var convert = [60*60, 60, 1, 1e6, 1e3, 1]; + +module.exports = function (source, opts) { + var verbose, precise, i, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds; + + verbose = false; + precise = false; + if (opts) { + verbose = opts.verbose || false; + precise = opts.precise || false; + } + + if (!Array.isArray(source) || source.length !== 2) { + return ''; + } + if (typeof source[0] !== 'number' || typeof source[1] !== 'number') { + return ''; + } + + // normalize source array due to changes in node v5.4+ + if (source[1] < 0) { + totalSeconds = source[0] + source[1] / 1e9; + source[0] = parseInt(totalSeconds); + source[1] = parseFloat((totalSeconds % 1).toPrecision(9)) * 1e9; + } + + results = ''; + + // foreach unit + for (i = 0; i < 6; i++) { + spot = i < 3 ? 0 : 1; // grabbing first or second spot in source array + sourceAtStep = source[spot]; + if (i !== 3 && i !== 0) { + sourceAtStep = sourceAtStep % convert[i-1]; // trim off previous portions + } + if (i === 2) { + sourceAtStep += source[1]/1e9; // get partial seconds from other portion of the array + } + valAtStep = sourceAtStep / convert[i]; // val at this unit + if (valAtStep >= 1) { + if (verbose) { + valAtStep = Math.floor(valAtStep); // deal in whole units, subsequent laps will get the decimal portion + } + if (!precise) { + // don't fling too many decimals + decimals = valAtStep >= 10 ? 0 : 2; + strAtStep = valAtStep.toFixed(decimals); + } else { + strAtStep = valAtStep.toString(); + } + if (strAtStep.indexOf('.') > -1 && strAtStep[strAtStep.length-1] === '0') { + strAtStep = strAtStep.replace(/\.?0+$/,''); // remove trailing zeros + } + if (results) { + results += ' '; // append space if we have a previous value + } + results += strAtStep; // append the value + // append units + if (verbose) { + results += ' '+verboseDesc[i]; + if (strAtStep !== '1') { + results += 's'; + } + } else { + results += ' '+minimalDesc[i]; + } + if (!verbose) { + break; // verbose gets as many groups as necessary, the rest get only one + } + } + } + + return results; +}; diff --git a/node_modules/pretty-hrtime/package.json b/node_modules/pretty-hrtime/package.json new file mode 100644 index 0000000..e4a7985 --- /dev/null +++ b/node_modules/pretty-hrtime/package.json @@ -0,0 +1,25 @@ +{ + "name": "pretty-hrtime", + "description": "process.hrtime() to words", + "version": "1.0.3", + "homepage": "https://github.com/robrich/pretty-hrtime", + "repository": "git://github.com/robrich/pretty-hrtime.git", + "author": "Rob Richardson (http://robrich.org/)", + "main": "./index.js", + "keywords": [ + "hrtime", + "benchmark" + ], + "devDependencies": { + "jshint": "^2.9.4", + "mocha": "^3.1.2", + "should": "^11.1.1" + }, + "scripts": { + "test": "mocha && jshint ." + }, + "engines": { + "node": ">= 0.8" + }, + "license": "MIT" +} diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js new file mode 100644 index 0000000..3eecf11 --- /dev/null +++ b/node_modules/process-nextick-args/index.js @@ -0,0 +1,45 @@ +'use strict'; + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md new file mode 100644 index 0000000..c67e353 --- /dev/null +++ b/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json new file mode 100644 index 0000000..6070b72 --- /dev/null +++ b/node_modules/process-nextick-args/package.json @@ -0,0 +1,25 @@ +{ + "name": "process-nextick-args", + "version": "2.0.1", + "description": "process.nextTick but always with args", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "devDependencies": { + "tap": "~0.2.6" + } +} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md new file mode 100644 index 0000000..ecb432c --- /dev/null +++ b/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var pna = require('process-nextick-args'); + +pna.nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml new file mode 100644 index 0000000..17f9433 --- /dev/null +++ b/node_modules/pump/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + +script: "npm test" diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE new file mode 100644 index 0000000..757562e --- /dev/null +++ b/node_modules/pump/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. \ No newline at end of file diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md new file mode 100644 index 0000000..5029b27 --- /dev/null +++ b/node_modules/pump/README.md @@ -0,0 +1,56 @@ +# pump + +pump is a small node module that pipes streams together and destroys all of them if one of them closes. + +``` +npm install pump +``` + +[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) + +## What problem does it solve? + +When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. +You are also not able to provide a callback to tell when then pipe has finished. + +pump does these two things for you + +## Usage + +Simply pass the streams you want to pipe together to pump and add an optional callback + +``` js +var pump = require('pump') +var fs = require('fs') + +var source = fs.createReadStream('/dev/random') +var dest = fs.createWriteStream('/dev/null') + +pump(source, dest, function(err) { + console.log('pipe finished', err) +}) + +setTimeout(function() { + dest.destroy() // when dest is closed pump will destroy source +}, 1000) +``` + +You can use pump to pipe more than two streams together as well + +``` js +var transform = someTransformStream() + +pump(source, transform, anotherTransform, dest, function(err) { + console.log('pipe finished', err) +}) +``` + +If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. + +## License + +MIT + +## Related + +`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js new file mode 100644 index 0000000..d9ca033 --- /dev/null +++ b/node_modules/pump/index.js @@ -0,0 +1,82 @@ +var once = require('once') +var eos = require('end-of-stream') +var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + streams.reduce(pipe) +} + +module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json new file mode 100644 index 0000000..0f921f6 --- /dev/null +++ b/node_modules/pump/package.json @@ -0,0 +1,24 @@ +{ + "name": "pump", + "version": "2.0.1", + "repository": "git://github.com/mafintosh/pump.git", + "license": "MIT", + "description": "pipe streams together and close all of them if one of them closes", + "browser": { + "fs": false + }, + "keywords": [ + "streams", + "pipe", + "destroy", + "callback" + ], + "author": "Mathias Buus Madsen ", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "scripts": { + "test": "node test-browser.js && node test-node.js" + } +} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js new file mode 100644 index 0000000..75ea4a2 --- /dev/null +++ b/node_modules/pump/test-browser.js @@ -0,0 +1,62 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-browser.js passes') + clearTimeout(timeout) + } +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +var timeout = setTimeout(function () { + check() + throw new Error('timeout') +}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js new file mode 100644 index 0000000..034a654 --- /dev/null +++ b/node_modules/pump/test-node.js @@ -0,0 +1,53 @@ +var pump = require('./index') + +var rs = require('fs').createReadStream('/dev/random') +var ws = require('fs').createWriteStream('/dev/null') + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-node.js passes') + clearTimeout(timeout) + } +} + +ws.on('close', function () { + wsClosed = true + check() +}) + +rs.on('close', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res) { + process.exit(1) +} + +setTimeout(function () { + rs.destroy() +}, 1000) + +var timeout = setTimeout(function () { + throw new Error('timeout') +}, 5000) diff --git a/node_modules/pumpify/.travis.yml b/node_modules/pumpify/.travis.yml new file mode 100644 index 0000000..32e71a6 --- /dev/null +++ b/node_modules/pumpify/.travis.yml @@ -0,0 +1,8 @@ +language: node_js + +node_js: + - "0.10" + - "4" + - "5" + +sudo: false diff --git a/node_modules/pumpify/LICENSE b/node_modules/pumpify/LICENSE new file mode 100644 index 0000000..757562e --- /dev/null +++ b/node_modules/pumpify/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. \ No newline at end of file diff --git a/node_modules/pumpify/README.md b/node_modules/pumpify/README.md new file mode 100644 index 0000000..4988f7b --- /dev/null +++ b/node_modules/pumpify/README.md @@ -0,0 +1,56 @@ +# pumpify + +Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify). +If one of the streams closes/errors all streams in the pipeline will be destroyed. + +``` +npm install pumpify +``` + +[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify) + +## Usage + +Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`. +`pipeline` is a duplex stream that writes to the first streams and reads from the last one. +Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes +all streams will be destroyed. + +``` js +var pumpify = require('pumpify') +var tar = require('tar-fs') +var zlib = require('zlib') +var fs = require('fs') + +var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder')) +// you can also pass an array instead +// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')]) + +fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar) +``` + +If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`. +Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify). + +### Using `setPipeline(s1, s2, ...)` + +Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)` + +``` js +var untar = pumpify() + +setTimeout(function() { + // will start draining the input now + untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder')) +}, 1000) + +fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar) +``` + +## License + +MIT + +## Related + +`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pumpify/index.js b/node_modules/pumpify/index.js new file mode 100644 index 0000000..473e256 --- /dev/null +++ b/node_modules/pumpify/index.js @@ -0,0 +1,60 @@ +var pump = require('pump') +var inherits = require('inherits') +var Duplexify = require('duplexify') + +var toArray = function(args) { + if (!args.length) return [] + return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args) +} + +var define = function(opts) { + var Pumpify = function() { + var streams = toArray(arguments) + if (!(this instanceof Pumpify)) return new Pumpify(streams) + Duplexify.call(this, null, null, opts) + if (streams.length) this.setPipeline(streams) + } + + inherits(Pumpify, Duplexify) + + Pumpify.prototype.setPipeline = function() { + var streams = toArray(arguments) + var self = this + var ended = false + var w = streams[0] + var r = streams[streams.length-1] + + r = r.readable ? r : null + w = w.writable ? w : null + + var onclose = function() { + streams[0].emit('error', new Error('stream was destroyed')) + } + + this.on('close', onclose) + this.on('prefinish', function() { + if (!ended) self.cork() + }) + + pump(streams, function(err) { + self.removeListener('close', onclose) + if (err) return self.destroy(err.message === 'premature close' ? null : err) + ended = true + // pump ends after the last stream is not writable *but* + // pumpify still forwards the readable part so we need to catch errors + // still, so reenable autoDestroy in this case + if (self._autoDestroy === false) self._autoDestroy = true + self.uncork() + }) + + if (this.destroyed) return onclose() + this.setWritable(w) + this.setReadable(r) + } + + return Pumpify +} + +module.exports = define({autoDestroy:false, destroy:false}) +module.exports.obj = define({autoDestroy: false, destroy:false, objectMode:true, highWaterMark:16}) +module.exports.ctor = define diff --git a/node_modules/pumpify/package.json b/node_modules/pumpify/package.json new file mode 100644 index 0000000..616e3c3 --- /dev/null +++ b/node_modules/pumpify/package.json @@ -0,0 +1,37 @@ +{ + "name": "pumpify", + "version": "1.5.1", + "description": "Combine an array of streams into a single duplex stream using pump and duplexify", + "main": "index.js", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "devDependencies": { + "tape": "^4.8.0", + "through2": "^2.0.3" + }, + "scripts": { + "test": "tape test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pumpify" + }, + "keywords": [ + "pump", + "duplexify", + "duplex", + "streams", + "stream", + "pipeline", + "combine" + ], + "author": "Mathias Buus", + "license": "MIT", + "bugs": { + "url": "https://github.com/mafintosh/pumpify/issues" + }, + "homepage": "https://github.com/mafintosh/pumpify" +} diff --git a/node_modules/pumpify/test.js b/node_modules/pumpify/test.js new file mode 100644 index 0000000..b603c4d --- /dev/null +++ b/node_modules/pumpify/test.js @@ -0,0 +1,235 @@ +var tape = require('tape') +var through = require('through2') +var pumpify = require('./') +var stream = require('stream') +var duplexify = require('duplexify') + +tape('basic', function(t) { + t.plan(3) + + var pipeline = pumpify( + through(function(data, enc, cb) { + t.same(data.toString(), 'hello') + cb(null, data.toString().toUpperCase()) + }), + through(function(data, enc, cb) { + t.same(data.toString(), 'HELLO') + cb(null, data.toString().toLowerCase()) + }) + ) + + pipeline.write('hello') + pipeline.on('data', function(data) { + t.same(data.toString(), 'hello') + t.end() + }) +}) + +tape('3 times', function(t) { + t.plan(4) + + var pipeline = pumpify( + through(function(data, enc, cb) { + t.same(data.toString(), 'hello') + cb(null, data.toString().toUpperCase()) + }), + through(function(data, enc, cb) { + t.same(data.toString(), 'HELLO') + cb(null, data.toString().toLowerCase()) + }), + through(function(data, enc, cb) { + t.same(data.toString(), 'hello') + cb(null, data.toString().toUpperCase()) + }) + ) + + pipeline.write('hello') + pipeline.on('data', function(data) { + t.same(data.toString(), 'HELLO') + t.end() + }) +}) + +tape('destroy', function(t) { + var test = through() + test.destroy = function() { + t.ok(true) + t.end() + } + + var pipeline = pumpify(through(), test) + + pipeline.destroy() +}) + +tape('close', function(t) { + var test = through() + var pipeline = pumpify(through(), test) + + pipeline.on('error', function(err) { + t.same(err.message, 'lol') + t.end() + }) + + test.emit('error', new Error('lol')) +}) + +tape('end waits for last one', function(t) { + var ran = false + + var a = through() + var b = through() + var c = through(function(data, enc, cb) { + setTimeout(function() { + ran = true + cb() + }, 100) + }) + + var pipeline = pumpify(a, b, c) + + pipeline.write('foo') + pipeline.end(function() { + t.ok(ran) + t.end() + }) + + t.ok(!ran) +}) + +tape('always wait for finish', function(t) { + var a = new stream.Readable() + a._read = function() {} + a.push('hello') + + var pipeline = pumpify(a, through(), through()) + var ran = false + + pipeline.on('finish', function() { + t.ok(ran) + t.end() + }) + + setTimeout(function() { + ran = true + a.push(null) + }, 100) +}) + +tape('async', function(t) { + var pipeline = pumpify() + + t.plan(4) + + pipeline.write('hello') + pipeline.on('data', function(data) { + t.same(data.toString(), 'HELLO') + t.end() + }) + + setTimeout(function() { + pipeline.setPipeline( + through(function(data, enc, cb) { + t.same(data.toString(), 'hello') + cb(null, data.toString().toUpperCase()) + }), + through(function(data, enc, cb) { + t.same(data.toString(), 'HELLO') + cb(null, data.toString().toLowerCase()) + }), + through(function(data, enc, cb) { + t.same(data.toString(), 'hello') + cb(null, data.toString().toUpperCase()) + }) + ) + }, 100) +}) + +tape('early destroy', function(t) { + var a = through() + var b = through() + var c = through() + + b.destroy = function() { + t.ok(true) + t.end() + } + + var pipeline = pumpify() + + pipeline.destroy() + setTimeout(function() { + pipeline.setPipeline(a, b, c) + }, 100) +}) + +tape('preserves error', function (t) { + var a = through() + var b = through(function (data, enc, cb) { + cb(new Error('stop')) + }) + var c = through() + var s = pumpify() + + s.on('error', function (err) { + t.same(err.message, 'stop') + t.end() + }) + + s.setPipeline(a, b, c) + s.resume() + s.write('hi') +}) + +tape('preserves error again', function (t) { + var ws = new stream.Writable() + var rs = new stream.Readable({highWaterMark: 16}) + + ws._write = function (data, enc, cb) { + cb(null) + } + + rs._read = function () { + process.nextTick(function () { + rs.push('hello world') + }) + } + + var pumpifyErr = pumpify( + through(), + through(function(chunk, _, cb) { + cb(new Error('test')) + }), + ws + ) + + rs.pipe(pumpifyErr) + .on('error', function (err) { + t.ok(err) + t.ok(err.message !== 'premature close', 'does not close with premature close') + t.end() + }) +}) + +tape('returns error from duplexify', function (t) { + var a = through() + var b = duplexify() + var s = pumpify() + + s.setPipeline(a, b) + + s.on('error', function (err) { + t.same(err.message, 'stop') + t.end() + }) + + s.write('data') + // Test passes if `.end()` is not called + s.end() + + b.setWritable(through()) + + setImmediate(function () { + b.destroy(new Error('stop')) + }) +}) diff --git a/node_modules/read-pkg-up/index.js b/node_modules/read-pkg-up/index.js new file mode 100644 index 0000000..beb3d48 --- /dev/null +++ b/node_modules/read-pkg-up/index.js @@ -0,0 +1,31 @@ +'use strict'; +var findUp = require('find-up'); +var readPkg = require('read-pkg'); + +module.exports = function (opts) { + return findUp('package.json', opts).then(function (fp) { + if (!fp) { + return {}; + } + + return readPkg(fp, opts).then(function (pkg) { + return { + pkg: pkg, + path: fp + }; + }); + }); +}; + +module.exports.sync = function (opts) { + var fp = findUp.sync('package.json', opts); + + if (!fp) { + return {}; + } + + return { + pkg: readPkg.sync(fp, opts), + path: fp + }; +}; diff --git a/node_modules/read-pkg-up/license b/node_modules/read-pkg-up/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/read-pkg-up/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/read-pkg-up/package.json b/node_modules/read-pkg-up/package.json new file mode 100644 index 0000000..0f7ff70 --- /dev/null +++ b/node_modules/read-pkg-up/package.json @@ -0,0 +1,59 @@ +{ + "name": "read-pkg-up", + "version": "1.0.1", + "description": "Read the closest package.json file", + "license": "MIT", + "repository": "sindresorhus/read-pkg-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/read-pkg-up/readme.md b/node_modules/read-pkg-up/readme.md new file mode 100644 index 0000000..dbd88f3 --- /dev/null +++ b/node_modules/read-pkg-up/readme.md @@ -0,0 +1,79 @@ +# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up) + +> Read the closest package.json file + + +## Why + +- [Finds the closest package.json](https://github.com/sindresorhus/find-up) +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install --save read-pkg-up +``` + + +## Usage + +```js +var readPkgUp = require('read-pkg-up'); + +readPkgUp().then(function (result) { + console.log(result); + /* + { + pkg: { + name: 'awesome-package', + version: '1.0.0', + ... + }, + path: '/Users/sindresorhus/dev/awesome-package' + } + */ +}); +``` + + +## API + +### readPkgUp([options]) + +Returns a promise that resolves to a result object. + +### readPkgUp.sync([options]) + +Returns a result object. + +#### options + +##### cwd + +Type: `string` +Default: `.` + +Directory to start looking for a package.json file. + +##### normalize + +Type: `boolean` +Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file +- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories +- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/read-pkg/index.js b/node_modules/read-pkg/index.js new file mode 100644 index 0000000..c5c3afa --- /dev/null +++ b/node_modules/read-pkg/index.js @@ -0,0 +1,48 @@ +'use strict'; +var path = require('path'); +var loadJsonFile = require('load-json-file'); +var normalizePackageData = require('normalize-package-data'); +var pathType = require('path-type'); + +module.exports = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(function (isDir) { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(function (x) { + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; + }); +}; + +module.exports.sync = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + var x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; +}; diff --git a/node_modules/read-pkg/license b/node_modules/read-pkg/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/read-pkg/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/read-pkg/package.json b/node_modules/read-pkg/package.json new file mode 100644 index 0000000..594b0c2 --- /dev/null +++ b/node_modules/read-pkg/package.json @@ -0,0 +1,42 @@ +{ + "name": "read-pkg", + "version": "1.1.0", + "description": "Read a package.json file", + "license": "MIT", + "repository": "sindresorhus/read-pkg", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "normalize" + ], + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/read-pkg/readme.md b/node_modules/read-pkg/readme.md new file mode 100644 index 0000000..9a0d4cc --- /dev/null +++ b/node_modules/read-pkg/readme.md @@ -0,0 +1,79 @@ +# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) + +> Read a package.json file + + +## Why + +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install --save read-pkg +``` + + +## Usage + +```js +var readPkg = require('read-pkg'); + +readPkg().then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(__dirname).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(path.join('unicorn', 'package.json')).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); +``` + + +## API + +### readPkg([path], [options]) + +Returns a promise that resolves to the parsed JSON. + +### readPkg.sync([path], [options]) + +Returns the parsed JSON. + +#### path + +Type: `string` +Default: `.` + +Path to a `package.json` file or its directory. + +#### options + +##### normalize + +Type: `boolean` +Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file +- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file +- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000..f62cdac --- /dev/null +++ b/node_modules/readable-stream/.travis.yml @@ -0,0 +1,34 @@ +sudo: false +language: node_js +before_install: + - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: NPM_LEGACY=true + - node_js: '0.10' + env: NPM_LEGACY=true + - node_js: '0.11' + env: NPM_LEGACY=true + - node_js: '0.12' + env: NPM_LEGACY=true + - node_js: 1 + env: NPM_LEGACY=true + - node_js: 2 + env: NPM_LEGACY=true + - node_js: 3 + env: NPM_LEGACY=true + - node_js: 4 + - node_js: 5 + - node_js: 6 + - node_js: 7 + - node_js: 8 + - node_js: 9 +script: "npm run test" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +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/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md new file mode 100644 index 0000000..23fe3f3 --- /dev/null +++ b/node_modules/readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000..83275f1 --- /dev/null +++ b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/node_modules/readable-stream/duplex-browser.js b/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000..f8b2db8 --- /dev/null +++ b/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..46924cb --- /dev/null +++ b/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..57003c3 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..612edb4 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..0f80764 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// 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 pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..fcfc105 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..b0b0220 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,687 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000..aefc68b --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,79 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000..5a0a0d8 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,74 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json new file mode 100644 index 0000000..2afa6fb --- /dev/null +++ b/node_modules/readable-stream/package.json @@ -0,0 +1,52 @@ +{ + "name": "readable-stream", + "version": "2.3.7", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "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" + }, + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..ffd791d --- /dev/null +++ b/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..e503725 --- /dev/null +++ b/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..ec89ec5 --- /dev/null +++ b/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..b1baba2 --- /dev/null +++ b/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/node_modules/readable-stream/writable-browser.js b/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000..ebdde6a --- /dev/null +++ b/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..3211a6f --- /dev/null +++ b/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/node_modules/readdirp/LICENSE b/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..8a63b80 --- /dev/null +++ b/node_modules/readdirp/LICENSE @@ -0,0 +1,20 @@ +This software is released under the MIT license: + +Copyright (c) 2012-2015 Thorsten Lorenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/readdirp/README.md b/node_modules/readdirp/README.md new file mode 100644 index 0000000..431f402 --- /dev/null +++ b/node_modules/readdirp/README.md @@ -0,0 +1,204 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.svg)](http://travis-ci.org/thlorenz/readdirp) + +[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- to learn more about streams, consult the very detailed + [nodejs streams documentation](http://nodejs.org/api/stream.html) or the + [stream-handbook](https://github.com/substack/stream-handbook) + + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. + +- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp({ root: '.' }, function(fileInfo) { + // do something with file entry here + }, function (err, res) { + // all done, move on or do final step for all file entries here +}); +``` + +Try more examples by following [instructions](https://github.com/paulmillr/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## tests + +The [readdirp tests](https://github.com/paulmillr/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json new file mode 100644 index 0000000..39314a2 --- /dev/null +++ b/node_modules/readdirp/package.json @@ -0,0 +1,50 @@ +{ + "author": "Thorsten Lorenz (thlorenz.com)", + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming api.", + "version": "2.2.1", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "readdirp.js", + "stream-api.js" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "main": "readdirp.js", + "scripts": { + "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-4": "nave use 4.4 npm run test-main", + "test-6": "nave use 6.2 npm run test-main", + "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", + "test": "npm run test-main" + }, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "devDependencies": { + "nave": "^0.5.1", + "proxyquire": "^1.7.9", + "tap": "1.3.2", + "through2": "^2.0.0" + }, + "license": "MIT" +} diff --git a/node_modules/readdirp/readdirp.js b/node_modules/readdirp/readdirp.js new file mode 100644 index 0000000..863bd17 --- /dev/null +++ b/node_modules/readdirp/readdirp.js @@ -0,0 +1,294 @@ +'use strict'; + +var fs = require('graceful-fs') + , path = require('path') + , micromatch = require('micromatch').isMatch + , toString = Object.prototype.toString + ; + + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) === '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) === '[object String]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + , paused = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + stream.on('pause', function () { paused = true; }); + stream.on('resume', function () { paused = false; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/paulmillr/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + opts.entryType = opts.entryType || 'files'; + + var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/paulmillr/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return micromatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return micromatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return micromatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry) + , relPath = path.join(relDir, entry); + + statfn(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + var args = arguments; + if (aborted) return; + if (paused) { + setImmediate(function () { + readdirRec.apply(null, args); + }) + return; + } + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(di); + } + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { + var isCorrectType = opts.entryType === 'all' ? + !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); + return isCorrectType && opts.fileFilter(ei); + }) + .forEach(function (fi) { + if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(fi); + } + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/node_modules/readdirp/stream-api.js b/node_modules/readdirp/stream-api.js new file mode 100644 index 0000000..bffd1a9 --- /dev/null +++ b/node_modules/readdirp/stream-api.js @@ -0,0 +1,98 @@ +'use strict'; + +var stream = require('readable-stream'); +var util = require('util'); + +var Readable = stream.Readable; + +module.exports = ReaddirpReadable; + +util.inherits(ReaddirpReadable, Readable); + +function ReaddirpReadable (opts) { + if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); + + opts = opts || {}; + + opts.objectMode = true; + Readable.call(this, opts); + + // backpressure not implemented at this point + this.highWaterMark = Infinity; + + this._destroyed = false; + this._paused = false; + this._warnings = []; + this._errors = []; + + this._pauseResumeErrors(); +} + +var proto = ReaddirpReadable.prototype; + +proto._pauseResumeErrors = function () { + var self = this; + self.on('pause', function () { self._paused = true }); + self.on('resume', function () { + if (self._destroyed) return; + self._paused = false; + + self._warnings.forEach(function (err) { self.emit('warn', err) }); + self._warnings.length = 0; + + self._errors.forEach(function (err) { self.emit('error', err) }); + self._errors.length = 0; + }) +} + +// called for each entry +proto._processEntry = function (entry) { + if (this._destroyed) return; + this.push(entry); +} + +proto._read = function () { } + +proto.destroy = function () { + // when stream is destroyed it will emit nothing further, not even errors or warnings + this.push(null); + this.readable = false; + this._destroyed = true; + this.emit('close'); +} + +proto._done = function () { + this.push(null); +} + +// we emit errors and warnings async since we may handle errors like invalid args +// within the initial event loop before any event listeners subscribed +proto._handleError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._warnings.push(err); + if (!self._destroyed) self.emit('warn', err); + }); +} + +proto._handleFatalError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._errors.push(err); + if (!self._destroyed) self.emit('error', err); + }); +} + +function createStreamAPI () { + var stream = new ReaddirpReadable(); + + return { + stream : stream + , processEntry : stream._processEntry.bind(stream) + , done : stream._done.bind(stream) + , handleError : stream._handleError.bind(stream) + , handleFatalError : stream._handleFatalError.bind(stream) + }; +} + +module.exports = createStreamAPI; diff --git a/node_modules/rechoir/.npmignore b/node_modules/rechoir/.npmignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/node_modules/rechoir/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/rechoir/.travis.yml b/node_modules/rechoir/.travis.yml new file mode 100644 index 0000000..57e9fda --- /dev/null +++ b/node_modules/rechoir/.travis.yml @@ -0,0 +1,24 @@ +sudo: false +language: node_js +node_js: + - "0.10" + - "0.12" +env: + global: + - REMOVE_DEPS="" + matrix: + - "CUSTOM_DEPS=coffee-script@~1.3" + - "CUSTOM_DEPS=coffee-script@~1.5" + - "CUSTOM_DEPS=coffee-script@~1.7" + - "CUSTOM_DEPS=coffee-script@latest" + - "CUSTOM_DEPS=iced-coffee-script@1.6.3-j" + - "CUSTOM_DEPS=iced-coffee-script@latest" + - "CUSTOM_DEPS=LiveScript@1.3.1 REMOVE_DEPS=livescript" + - "CUSTOM_DEPS=typescript-require REMOVE_DEPS=typescript-register" +matrix: + fast_finish: true +before_install: + - "npm install -g npm" # needs the newest version of npm +before_script: + - "[ \"${REMOVE_DEPS}\" == \"\" ] || npm rm $REMOVE_DEPS" + - "npm install $CUSTOM_DEPS" # install a specific version of dependencies diff --git a/node_modules/rechoir/CHANGELOG b/node_modules/rechoir/CHANGELOG new file mode 100644 index 0000000..e10327b --- /dev/null +++ b/node_modules/rechoir/CHANGELOG @@ -0,0 +1,38 @@ +v0.6.2: + date: 2015-07-22 + changes: + - Return `undefined` when an unknown extension is provided to prepare and + the `nothrow` option is specified. +v0.6.1: + date: 2015-05-22 + changes: + - Add option for not throwing. +v0.6.0: + date: 2015-05-20 + changes: + - Include module name when prepare is successful. +v0.5.0: + date: 2015-05-20 + changes: + - Overhaul to support interpret 0.6.0. +v0.3.0: + date: 2015-01-10 + changes: + - Breaking: `load` method removed. + - Improved extension recognition. + - No longer fails upon dots in filenames. + - Support confuration objects. + - Support and test ES6. + - Support legacy module loading. +v0.2.2: + date: 2014-12-17 + changes: + - Expose interpret. +v0.2.0: + date: 2014-04-20 + changes: + - Simplify loading of coffee-script and iced-coffee-script. +v0.1.0: + date: 2014-04-20 + changes: + - Initial public release. diff --git a/node_modules/rechoir/LICENSE b/node_modules/rechoir/LICENSE new file mode 100644 index 0000000..f467993 --- /dev/null +++ b/node_modules/rechoir/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015 Tyler Kellen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/rechoir/README.md b/node_modules/rechoir/README.md new file mode 100644 index 0000000..32280c0 --- /dev/null +++ b/node_modules/rechoir/README.md @@ -0,0 +1,42 @@ +# rechoir [![Build Status](https://secure.travis-ci.org/tkellen/js-rechoir.png)](http://travis-ci.org/tkellen/js-rechoir) +> Require any supported file as a node module. + +[![NPM](https://nodei.co/npm/rechoir.png)](https://nodei.co/npm/rechoir/) + +## What is it? +This module, in conjunction with [interpret]-like objects can register any file type the npm ecosystem has a module loader for. This library is a dependency of [Liftoff]. + +## API + +### prepare(config, filepath, requireFrom) +Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions](http://nodejs.org/api/globals.html#globals_require_extensions). + +`config` An [interpret]-like configuration object. + +`filepath` A file whose type you'd like to register a module loader for. + +`requireFrom` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. + +If calling this method is successful (aka: it doesn't throw), you can now require files of the type you requested natively. + +An error with a `failures` property will be thrown if the module loader(s) configured for a given extension cannot be registered. + +If a loader is already registered, this will simply return `true`. + +**Note:** While rechoir will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. + +#### Usage +```js +const config = require('interpret').extensions; +const rechoir = require('rechoir'); +rechoir.prepare(config, './test/fixtures/test.coffee'); +rechoir.prepare(config, './test/fixtures/test.csv'); +rechoir.prepare(config, './test/fixtures/test.toml'); + +console.log(require('./test/fixtures/test.coffee')); +console.log(require('./test/fixtures/test.csv')); +console.log(require('./test/fixtures/test.toml')); +``` + +[interpret]: http://github.com/tkellen/js-interpret +[Liftoff]: http://github.com/tkellen/js-liftoff diff --git a/node_modules/rechoir/index.js b/node_modules/rechoir/index.js new file mode 100644 index 0000000..0c36d05 --- /dev/null +++ b/node_modules/rechoir/index.js @@ -0,0 +1,59 @@ +const path = require('path'); + +const extension = require('./lib/extension'); +const normalize = require('./lib/normalize'); +const register = require('./lib/register'); + +exports.prepare = function (extensions, filepath, cwd, nothrow) { + var option, attempt; + var attempts = []; + var err; + var onlyErrors = false; + var ext = extension(filepath); + if (Object.keys(require.extensions).indexOf(ext) !== -1) { + return true; + } + var config = normalize(extensions[ext]); + if (!config) { + if (nothrow) { + return; + } else { + throw new Error('No module loader found for "'+ext+'".'); + } + } + if (!cwd) { + cwd = path.dirname(path.resolve(filepath)); + } + if (!Array.isArray(config)) { + config = [config]; + } + for (var i in config) { + option = config[i]; + attempt = register(cwd, option.module, option.register); + error = (attempt instanceof Error) ? attempt : null; + if (error) { + attempt = null; + } + attempts.push({ + moduleName: option.module, + module: attempt, + error: error + }); + if (!error) { + onlyErrors = false; + break; + } else { + onlyErrors = true; + } + } + if (onlyErrors) { + err = new Error('Unable to use specified module loaders for "'+ext+'".'); + err.failures = attempts; + if (nothrow) { + return err; + } else { + throw err; + } + } + return attempts; +}; diff --git a/node_modules/rechoir/lib/extension.js b/node_modules/rechoir/lib/extension.js new file mode 100644 index 0000000..60f19da --- /dev/null +++ b/node_modules/rechoir/lib/extension.js @@ -0,0 +1,11 @@ +const path = require('path'); + +const EXTRE = /^[.]?[^.]+([.].*)$/; + +module.exports = function (input) { + var extension = EXTRE.exec(path.basename(input)); + if (!extension) { + return; + } + return extension[1]; +}; diff --git a/node_modules/rechoir/lib/normalize.js b/node_modules/rechoir/lib/normalize.js new file mode 100644 index 0000000..0da5e58 --- /dev/null +++ b/node_modules/rechoir/lib/normalize.js @@ -0,0 +1,15 @@ +function normalizer (config) { + if (typeof config === 'string') { + return { + module: config + } + } + return config; +}; + +module.exports = function (config) { + if (Array.isArray(config)) { + return config.map(normalizer); + } + return normalizer(config); +}; diff --git a/node_modules/rechoir/lib/register.js b/node_modules/rechoir/lib/register.js new file mode 100644 index 0000000..20e8ca7 --- /dev/null +++ b/node_modules/rechoir/lib/register.js @@ -0,0 +1,15 @@ +const path = require('path'); +const resolve = require('resolve'); + +module.exports = function (cwd, moduleName, register) { + try { + var modulePath = resolve.sync(moduleName, {basedir: cwd}); + var result = require(modulePath); + if (typeof register === 'function') { + register(result); + } + } catch (e) { + result = e; + } + return result; +}; diff --git a/node_modules/rechoir/package.json b/node_modules/rechoir/package.json new file mode 100644 index 0000000..5629390 --- /dev/null +++ b/node_modules/rechoir/package.json @@ -0,0 +1,88 @@ +{ + "name": "rechoir", + "description": "Require any supported file as a node module.", + "version": "0.6.2", + "homepage": "https://github.com/tkellen/node-rechoir", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "repository": { + "type": "git", + "url": "git://github.com/tkellen/node-rechoir.git" + }, + "bugs": { + "url": "https://github.com/tkellen/node-rechoir/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tkellen/node-rechoir/blob/master/LICENSE" + } + ], + "main": "index.js", + "engines": { + "node": ">= 0.10" + }, + "scripts": { + "test": "mocha -R spec test/index.js" + }, + "dependencies": { + "resolve": "^1.1.6" + }, + "devDependencies": { + "babel": "^5.4.3", + "chai": "^2.3.0", + "coco": "^0.9.1", + "coffee-script": "^1.9.2", + "earlgrey": "0.0.9", + "iced-coffee-script": "^1.8.0-d", + "interpret": "^0.6.1", + "json5": "^0.4.0", + "livescript": "^1.4.0", + "mocha": "^2.2.5", + "node-jsx": "^0.13.3", + "require-csv": "0.0.1", + "require-ini": "0.0.1", + "require-uncached": "^1.0.2", + "require-xml": "0.0.1", + "require-yaml": "0.0.1", + "rimraf": "^2.3.4", + "semver": "^4.3.4", + "sinon": "^1.14.1", + "toml-require": "^1.0.1", + "typescript-register": "^1.1.0" + }, + "keywords": [ + "require", + "cjsx", + "co", + "coco", + "coffee-script", + "coffee", + "coffee.md", + "csv", + "earlgrey", + "es", + "es6", + "iced", + "iced.md", + "iced-coffee-script", + "ini", + "js", + "json", + "json5", + "jsx", + "react", + "litcoffee", + "liticed", + "ls", + "livescript", + "toml", + "ts", + "typescript", + "xml", + "yaml", + "yml" + ] +} diff --git a/node_modules/regex-not/LICENSE b/node_modules/regex-not/LICENSE new file mode 100644 index 0000000..8ee09d9 --- /dev/null +++ b/node_modules/regex-not/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, 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. diff --git a/node_modules/regex-not/README.md b/node_modules/regex-not/README.md new file mode 100644 index 0000000..24d00e7 --- /dev/null +++ b/node_modules/regex-not/README.md @@ -0,0 +1,133 @@ +# regex-not [![NPM version](https://img.shields.io/npm/v/regex-not.svg?style=flat)](https://www.npmjs.com/package/regex-not) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![NPM total downloads](https://img.shields.io/npm/dt/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-not.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-not) + +> Create a javascript regular expression for matching everything except for the given string. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save regex-not +``` + +## Usage + +```js +var not = require('regex-not'); +``` + +The main export is a function that takes a string an options object. + +```js +not(string[, options]); +``` + +**Example** + +```js +var not = require('regex-not'); +console.log(not('foo')); +//=> /^(?:(?!^(?:foo)$).)+$/ +``` + +**Strict matching** + +By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, "match this string if it does NOT _exactly equal_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo')); //=> false +console.log(re.test('bar')); //=> true +console.log(re.test('foobar')); //=> true +console.log(re.test('barfoo')); //=> true +``` + +### .create + +Returns a string to allow you to create your own regex: + +```js +console.log(not.create('foo')); +//=> '(?:(?!^(?:foo)$).)+' +``` + +### Options + +**options.contains** + +You can relax strict matching by setting `options.contains` to true (in other words, "match this string if it does NOT _contain_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo', {contains: true})); //=> false +console.log(re.test('bar', {contains: true})); //=> true +console.log(re.test('foobar', {contains: true})); //=> false +console.log(re.test('barfoo', {contains: true})); //=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [regex-cache](https://www.npmjs.com/package/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache) | [homepage](https://github.com/jonschlinkert/regex-cache "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.") +* [to-regex](https://www.npmjs.com/package/to-regex): Generate a regex from a string or array of strings. | [homepage](https://github.com/jonschlinkert/to-regex "Generate a regex from a string or array of strings.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 9 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [EdwardBetts](https://github.com/EdwardBetts) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 19, 2018._ \ No newline at end of file diff --git a/node_modules/regex-not/index.js b/node_modules/regex-not/index.js new file mode 100644 index 0000000..02bfed4 --- /dev/null +++ b/node_modules/regex-not/index.js @@ -0,0 +1,72 @@ +'use strict'; + +var extend = require('extend-shallow'); +var safe = require('safe-regex'); + +/** + * The main export is a function that takes a `pattern` string and an `options` object. + * + * ```js + & var not = require('regex-not'); + & console.log(not('foo')); + & //=> /^(?:(?!^(?:foo)$).)*$/ + * ``` + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`. + * @api public + */ + +function toRegex(pattern, options) { + return new RegExp(toRegex.create(pattern, options)); +} + +/** + * Create a regex-compatible string from the given `pattern` and `options`. + * + * ```js + & var not = require('regex-not'); + & console.log(not.create('foo')); + & //=> '^(?:(?!^(?:foo)$).)*$' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +toRegex.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var opts = extend({}, options); + if (opts.contains === true) { + opts.strictNegate = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var endChar = opts.endChar ? opts.endChar : '+'; + var str = pattern; + + if (opts.strictNegate === false) { + str = '(?:(?!(?:' + pattern + ')).)' + endChar; + } else { + str = '(?:(?!^(?:' + pattern + ')$).)' + endChar; + } + + var res = open + str + close; + if (opts.safe === true && safe(res) === false) { + throw new Error('potentially unsafe regular expression: ' + res); + } + + return res; +}; + +/** + * Expose `toRegex` + */ + +module.exports = toRegex; diff --git a/node_modules/regex-not/node_modules/extend-shallow/LICENSE b/node_modules/regex-not/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 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. diff --git a/node_modules/regex-not/node_modules/extend-shallow/README.md b/node_modules/regex-not/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/extend-shallow/index.js b/node_modules/regex-not/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/regex-not/node_modules/extend-shallow/package.json b/node_modules/regex-not/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/node_modules/is-extendable/LICENSE b/node_modules/regex-not/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/is-extendable/README.md b/node_modules/regex-not/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/is-extendable/index.d.ts b/node_modules/regex-not/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/regex-not/node_modules/is-extendable/index.js b/node_modules/regex-not/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/regex-not/node_modules/is-extendable/package.json b/node_modules/regex-not/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/node_modules/is-plain-object/LICENSE b/node_modules/regex-not/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/regex-not/node_modules/is-plain-object/README.md b/node_modules/regex-not/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/is-plain-object/index.d.ts b/node_modules/regex-not/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/regex-not/node_modules/is-plain-object/index.js b/node_modules/regex-not/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/regex-not/node_modules/is-plain-object/package.json b/node_modules/regex-not/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/package.json b/node_modules/regex-not/package.json new file mode 100644 index 0000000..0320d53 --- /dev/null +++ b/node_modules/regex-not/package.json @@ -0,0 +1,63 @@ +{ + "name": "regex-not", + "description": "Create a javascript regular expression for matching everything except for the given string.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/regex-not", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/regex-not", + "bugs": { + "url": "https://github.com/jonschlinkert/regex-not/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "exec", + "match", + "negate", + "negation", + "not", + "regex", + "regular expression", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "regex-cache", + "to-regex" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/remove-bom-buffer/LICENSE b/node_modules/remove-bom-buffer/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/remove-bom-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. \ No newline at end of file diff --git a/node_modules/remove-bom-buffer/README.md b/node_modules/remove-bom-buffer/README.md new file mode 100644 index 0000000..8ed18a4 --- /dev/null +++ b/node_modules/remove-bom-buffer/README.md @@ -0,0 +1,65 @@ +# remove-bom-buffer [![NPM version](https://img.shields.io/npm/v/remove-bom-buffer.svg?style=flat)](https://www.npmjs.com/package/remove-bom-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/remove-bom-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/remove-bom-buffer) + +> Remove a byte order mark (BOM) from a buffer. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save remove-bom-buffer +``` + +## Usage + +```js +var remove = require('remove-bom-buffer'); +remove(new Buffer('\ufefffoo')); +``` + +## About + +### Related projects + +* [cr](https://www.npmjs.com/package/cr): Strip windows carriage returns, or convert carriage returns to newlines. | [homepage](https://github.com/jonschlinkert/cr "Strip windows carriage returns, or convert carriage returns to newlines.") +* [has-bom](https://www.npmjs.com/package/has-bom): Returns true if a buffer or string has a byte order mark (BOM) | [homepage](https://github.com/jonschlinkert/has-bom "Returns true if a buffer or string has a byte order mark (BOM)") +* [read-file](https://www.npmjs.com/package/read-file): Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding… [more](https://github.com/jonschlinkert/read-file) | [homepage](https://github.com/jonschlinkert/read-file "Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding is chosen. Also optionally replaces windows newlines with unix newlines.") +* [strip-bom-string](https://www.npmjs.com/package/strip-bom-string): Strip a byte order mark (BOM) from a string. | [homepage](https://github.com/jonschlinkert/strip-bom-string "Strip a byte order mark (BOM) from a string.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 16, 2017._ \ No newline at end of file diff --git a/node_modules/remove-bom-buffer/index.js b/node_modules/remove-bom-buffer/index.js new file mode 100644 index 0000000..7a299ca --- /dev/null +++ b/node_modules/remove-bom-buffer/index.js @@ -0,0 +1,27 @@ +/*! + * remove-bom-buffer + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isUTF8 = require('is-utf8'); +var isBuffer = require('is-buffer'); + +function matchBOM(buf) { + return buf[0] === 0xEF && buf[1] === 0xBB && buf[2] === 0xBF; +} + +function maybeUTF8(buf) { + // Only "maybe" because we aren't sniffing the whole buffer + return isUTF8(buf.slice(3, 7)); +} + +module.exports = function(buf) { + if (isBuffer(buf) && matchBOM(buf) && maybeUTF8(buf)) { + return buf.slice(3); + } + return buf; +}; diff --git a/node_modules/remove-bom-buffer/package.json b/node_modules/remove-bom-buffer/package.json new file mode 100644 index 0000000..546b010 --- /dev/null +++ b/node_modules/remove-bom-buffer/package.json @@ -0,0 +1,67 @@ +{ + "name": "remove-bom-buffer", + "description": "Remove a byte order mark (BOM) from a buffer.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/remove-bom-buffer", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Erik Kemperman (https://github.com/erikkemperman)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/remove-bom-buffer", + "bugs": { + "url": "https://github.com/jonschlinkert/remove-bom-buffer/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "bom", + "buffer", + "byte-order-mark", + "normalize", + "remove", + "strip", + "strip-bom", + "strip-bom-buffer", + "strip-bom-string" + ], + "verb": { + "related": { + "list": [ + "cr", + "has-bom", + "read-file", + "strip-bom-string" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/remove-bom-stream/LICENSE b/node_modules/remove-bom-stream/LICENSE new file mode 100644 index 0000000..b8fc743 --- /dev/null +++ b/node_modules/remove-bom-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/remove-bom-stream/README.md b/node_modules/remove-bom-stream/README.md new file mode 100644 index 0000000..c4a0589 --- /dev/null +++ b/node_modules/remove-bom-stream/README.md @@ -0,0 +1,51 @@ +

+ + + +

+ +# remove-bom-stream + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Remove a UTF8 BOM at the start of the stream. + +## Usage + +```js +var fs = require('fs'); +var concat = require('concat-stream'); +var removeBOM = require('remove-bom-stream'); + +fs.createReadStream('utf8-file-with-bom.txt') + .pipe(removeBOM()) + .pipe(concat(function(result) { + // result won't have a BOM + })); +``` + +## API + +### `removeBOM()` + +Returns a `through2` stream that will remove a BOM, given the data is a UTF8 Buffer with a BOM at the beginning. If the data is not UTF8 or does not have a BOM, the data is not changed and this becomes a normal passthrough stream. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/remove-bom-stream.svg +[npm-url]: https://npmjs.com/package/remove-bom-stream +[npm-image]: http://img.shields.io/npm/v/remove-bom-stream.svg + +[travis-url]: https://travis-ci.org/gulpjs/remove-bom-stream +[travis-image]: http://img.shields.io/travis/gulpjs/remove-bom-stream.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/remove-bom-stream +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/remove-bom-stream.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/remove-bom-stream +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/remove-bom-stream/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/remove-bom-stream/index.js b/node_modules/remove-bom-stream/index.js new file mode 100644 index 0000000..93501f1 --- /dev/null +++ b/node_modules/remove-bom-stream/index.js @@ -0,0 +1,51 @@ +'use strict'; + +var through = require('through2'); +var removeBom = require('remove-bom-buffer'); +var SafeBuffer = require('safe-buffer').Buffer; + +function removeBomStream() { + var completed = false; + var buffer = SafeBuffer.alloc(0); + + return through(onChunk, onFlush); + + function removeAndCleanup(data) { + completed = true; + + buffer = null; + + return removeBom(data); + } + + function onChunk(data, enc, cb) { + if (completed) { + return cb(null, data); + } + + if (data.length >= 7) { + return cb(null, removeAndCleanup(data)); + } + + var bufferLength = buffer.length; + var chunkLength = data.length; + var totalLength = bufferLength + chunkLength; + + buffer = SafeBuffer.concat([buffer, data], totalLength); + + if (totalLength >= 7) { + return cb(null, removeAndCleanup(buffer)); + } + cb(); + } + + function onFlush(cb) { + if (completed || !buffer) { + return cb(); + } + + cb(null, removeAndCleanup(buffer)); + } +} + +module.exports = removeBomStream; diff --git a/node_modules/remove-bom-stream/package.json b/node_modules/remove-bom-stream/package.json new file mode 100644 index 0000000..b548829 --- /dev/null +++ b/node_modules/remove-bom-stream/package.json @@ -0,0 +1,51 @@ +{ + "name": "remove-bom-stream", + "version": "1.2.0", + "description": "Remove a UTF8 BOM at the start of the stream.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/remove-bom-stream", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint index.js test/ && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "safe-buffer": "^5.1.0", + "remove-bom-buffer": "^3.0.0", + "through2": "^2.0.3" + }, + "devDependencies": { + "buffer-equal": "^1.0.0", + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mississippi": "^1.3.0", + "mocha": "^3.2.0", + "stream-chunker": "^1.2.8" + }, + "keywords": [ + "bom", + "remove", + "utf8", + "streaming", + "stream" + ] +} diff --git a/node_modules/remove-trailing-separator/history.md b/node_modules/remove-trailing-separator/history.md new file mode 100644 index 0000000..e15e8a4 --- /dev/null +++ b/node_modules/remove-trailing-separator/history.md @@ -0,0 +1,17 @@ +## History + +### 1.1.0 - 16th Aug 2017 + +- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing + +### 1.0.2 - 07th Jun 2017 + +- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility + +### 1.0.1 - 25th Sep 2016 + +- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems + +### 1.0.0 - 24th Sep 2016 + +Initial release. diff --git a/node_modules/remove-trailing-separator/index.js b/node_modules/remove-trailing-separator/index.js new file mode 100644 index 0000000..512306b --- /dev/null +++ b/node_modules/remove-trailing-separator/index.js @@ -0,0 +1,17 @@ +var isWin = process.platform === 'win32'; + +module.exports = function (str) { + var i = str.length - 1; + if (i < 2) { + return str; + } + while (isSeparator(str, i)) { + i--; + } + return str.substr(0, i + 1); +}; + +function isSeparator(str, i) { + var char = str[i]; + return i > 0 && (char === '/' || (isWin && char === '\\')); +} diff --git a/node_modules/remove-trailing-separator/license b/node_modules/remove-trailing-separator/license new file mode 100644 index 0000000..a169aff --- /dev/null +++ b/node_modules/remove-trailing-separator/license @@ -0,0 +1,3 @@ +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. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/package.json b/node_modules/remove-trailing-separator/package.json new file mode 100644 index 0000000..47ef27a --- /dev/null +++ b/node_modules/remove-trailing-separator/package.json @@ -0,0 +1,37 @@ +{ + "name": "remove-trailing-separator", + "version": "1.1.0", + "description": "Removes separators from the end of the string.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "xo", + "pretest": "npm run lint", + "test": "nyc ava", + "report": "nyc report --reporter=html" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/darsain/remove-trailing-separator.git" + }, + "keywords": [ + "remove", + "strip", + "trailing", + "separator" + ], + "author": "darsain", + "license": "ISC", + "bugs": { + "url": "https://github.com/darsain/remove-trailing-separator/issues" + }, + "homepage": "https://github.com/darsain/remove-trailing-separator#readme", + "devDependencies": { + "ava": "^0.16.0", + "coveralls": "^2.11.14", + "nyc": "^8.3.0", + "xo": "^0.16.0" + } +} diff --git a/node_modules/remove-trailing-separator/readme.md b/node_modules/remove-trailing-separator/readme.md new file mode 100644 index 0000000..747086a --- /dev/null +++ b/node_modules/remove-trailing-separator/readme.md @@ -0,0 +1,51 @@ +# remove-trailing-separator + +[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] + +Removes all separators from the end of a string. + +## Install + +``` +npm install remove-trailing-separator +``` + +## Examples + +```js +const removeTrailingSeparator = require('remove-trailing-separator'); + +removeTrailingSeparator('/foo/bar/') // '/foo/bar' +removeTrailingSeparator('/foo/bar///') // '/foo/bar' + +// leaves only/last separator +removeTrailingSeparator('/') // '/' +removeTrailingSeparator('///') // '/' + +// returns empty string +removeTrailingSeparator('') // '' +``` + +## Notable backslash, or win32 separator behavior + +`\` is considered a separator only on WIN32 systems. All POSIX compliant systems +see backslash as a valid file name character, so it would break POSIX compliance +to remove it there. + +In practice, this means that this code will return different things depending on +what system it runs on: + +```js +removeTrailingSeparator('\\foo\\') +// UNIX => '\\foo\\' +// WIN32 => '\\foo' +``` + +[npm-url]: https://npmjs.org/package/remove-trailing-separator +[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg +[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator +[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master +[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master +[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true +[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master +[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/node_modules/repeat-element/LICENSE b/node_modules/repeat-element/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/repeat-element/README.md b/node_modules/repeat-element/README.md new file mode 100644 index 0000000..6006418 --- /dev/null +++ b/node_modules/repeat-element/README.md @@ -0,0 +1,99 @@ +# repeat-element [![NPM version](https://img.shields.io/npm/v/repeat-element.svg?style=flat)](https://www.npmjs.com/package/repeat-element) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-element.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-element) + +> Create an array by repeating the given value n times. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-element +``` + +## Usage + +```js +const repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [LinusU](https://github.com/LinusU) | +| 1 | [architectcodes](https://github.com/architectcodes) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._ \ No newline at end of file diff --git a/node_modules/repeat-element/index.js b/node_modules/repeat-element/index.js new file mode 100644 index 0000000..dde8a27 --- /dev/null +++ b/node_modules/repeat-element/index.js @@ -0,0 +1,22 @@ +/*! + * repeat-element + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + if (Array.prototype.fill) { + return new Array(num).fill(ele); + } + + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/node_modules/repeat-element/package.json b/node_modules/repeat-element/package.json new file mode 100644 index 0000000..537055f --- /dev/null +++ b/node_modules/repeat-element/package.json @@ -0,0 +1,49 @@ +{ + "name": "repeat-element", + "description": "Create an array by repeating the given value n times.", + "version": "1.1.4", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/repeat-element", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.4.1", + "glob": "^7.1.2", + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/repeat-string/LICENSE b/node_modules/repeat-string/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/repeat-string/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/repeat-string/README.md b/node_modules/repeat-string/README.md new file mode 100644 index 0000000..aaa5e91 --- /dev/null +++ b/node_modules/repeat-string/README.md @@ -0,0 +1,136 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-string +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +# 2x +repeat-string █████████████████████████ (26,953,977 ops/sec) +repeating █████████ (9,855,695 ops/sec) +native ██████████████████ (19,453,895 ops/sec) + +# 3x +repeat-string █████████████████████████ (19,445,252 ops/sec) +repeating ███████████ (8,661,565 ops/sec) +native ████████████████████ (16,020,598 ops/sec) + +# 10x +repeat-string █████████████████████████ (23,792,521 ops/sec) +repeating █████████ (8,571,332 ops/sec) +native ███████████████ (14,582,955 ops/sec) + +# 50x +repeat-string █████████████████████████ (23,640,179 ops/sec) +repeating █████ (5,505,509 ops/sec) +native ██████████ (10,085,557 ops/sec) + +# 250x +repeat-string █████████████████████████ (23,489,618 ops/sec) +repeating ████ (3,962,937 ops/sec) +native ████████ (7,724,892 ops/sec) + +# 2000x +repeat-string █████████████████████████ (20,315,172 ops/sec) +repeating ████ (3,297,079 ops/sec) +native ███████ (6,203,331 ops/sec) + +# 20000x +repeat-string █████████████████████████ (23,382,915 ops/sec) +repeating ███ (2,980,058 ops/sec) +native █████ (5,578,808 ops/sec) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## About + +### Related projects + +[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 51 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [LinusU](https://github.com/LinusU) | +| 2 | [tbusser](https://github.com/tbusser) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wooorm](https://github.com/wooorm) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/node_modules/repeat-string/index.js b/node_modules/repeat-string/index.js new file mode 100644 index 0000000..4459afd --- /dev/null +++ b/node_modules/repeat-string/index.js @@ -0,0 +1,70 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} diff --git a/node_modules/repeat-string/package.json b/node_modules/repeat-string/package.json new file mode 100644 index 0000000..09f8892 --- /dev/null +++ b/node_modules/repeat-string/package.json @@ -0,0 +1,77 @@ +{ + "name": "repeat-string", + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "version": "1.6.1", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "author": "Jon Schlinkert (http://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://github.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Linus Unnebäck (http://linus.unnebäck.se)", + "Thijs Busser (http://tbusser.net)", + "Titus (wooorm.com)" + ], + "repository": "jonschlinkert/repeat-string", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^0.2.5", + "gulp-format-md": "^0.1.11", + "isobject": "^2.1.0", + "mocha": "^3.1.2", + "repeating": "^3.0.0", + "text-table": "^0.2.0", + "yargs-parser": "^4.0.2" + }, + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "helpers": [ + "./benchmark/helper.js" + ], + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/replace-ext/LICENSE b/node_modules/replace-ext/LICENSE new file mode 100644 index 0000000..fd38d69 --- /dev/null +++ b/node_modules/replace-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blaine Bublitz , Eric Schoffstall 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/node_modules/replace-ext/README.md b/node_modules/replace-ext/README.md new file mode 100644 index 0000000..acfcfd0 --- /dev/null +++ b/node_modules/replace-ext/README.md @@ -0,0 +1,62 @@ +

+ + + +

+ +# replace-ext + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Replaces a file extension with another one. + +## Usage + +```js +var replaceExt = require('replace-ext'); + +var path = '/some/dir/file.js'; +var newPath = replaceExt(path, '.coffee'); + +console.log(newPath); // /some/dir/file.coffee +``` + +## API + +### `replaceExt(path, extension)` + +Replaces the extension from `path` with `extension` and returns the updated path string. + +Does not replace the extension if `path` is not a string or is empty. + + +## replace-ext for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of replace-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-replace-ext?utm_source=npm-replace-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg +[npm-url]: https://www.npmjs.com/package/replace-ext +[npm-image]: http://img.shields.io/npm/v/replace-ext.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/replace-ext/_build/latest?branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/replace-ext/_apis/build/status/replace-ext?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/replace-ext +[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg + diff --git a/node_modules/replace-ext/index.js b/node_modules/replace-ext/index.js new file mode 100644 index 0000000..7a78278 --- /dev/null +++ b/node_modules/replace-ext/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var path = require('path'); + +function replaceExt(npath, ext) { + if (typeof npath !== 'string') { + return npath; + } + + if (npath.length === 0) { + return npath; + } + + var nFileName = path.basename(npath, path.extname(npath)) + ext; + var nFilepath = path.join(path.dirname(npath), nFileName); + + // Because `path.join` removes the head './' from the given path. + // This removal can cause a problem when passing the result to `require` or + // `import`. + if (startsWithSingleDot(npath)) { + return '.' + path.sep + nFilepath; + } + + return nFilepath; +} + +function startsWithSingleDot(fpath) { + var first2chars = fpath.slice(0, 2); + return (first2chars === '.' + path.sep) || + (first2chars === './'); +} + +module.exports = replaceExt; diff --git a/node_modules/replace-ext/package.json b/node_modules/replace-ext/package.json new file mode 100644 index 0000000..29aaef5 --- /dev/null +++ b/node_modules/replace-ext/package.json @@ -0,0 +1,43 @@ +{ + "name": "replace-ext", + "version": "1.0.1", + "description": "Replaces a file extension with another one", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Eric Schoffstall ", + "Blaine Bublitz " + ], + "repository": "gulpjs/replace-ext", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "cover": "nyc --reporter=lcov --reporter=text-summary npm test", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": {}, + "devDependencies": { + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^3.0.0", + "nyc": "^10.3.2" + }, + "keywords": [ + "gulp", + "extensions", + "filepath", + "basename" + ] +} diff --git a/node_modules/replace-homedir/LICENSE b/node_modules/replace-homedir/LICENSE new file mode 100644 index 0000000..b8fc743 --- /dev/null +++ b/node_modules/replace-homedir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/replace-homedir/README.md b/node_modules/replace-homedir/README.md new file mode 100644 index 0000000..70ba6bf --- /dev/null +++ b/node_modules/replace-homedir/README.md @@ -0,0 +1,48 @@ +

+ + + +

+ +# replace-homedir + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Replace user home in a string with another string. Useful for tildifying a path. + +## Usage + +```js +var replaceHomedir = require('replace-homedir'); + +var shortPath = replaceHomedir('/Users/phated/myProject', '~'); +// shortPath === '~/myProject' +``` + +## API + +### `replaceHomedir(path, replacement)` + +Takes a string `path` as the first argument and a string or function `replacement` as the second argument. If the `path` is absolute and begins with the User's homedir, the homedir portion of the path is replaced with `replacement` using String#replace. + +If `path` is not a string, the function will throw. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/replace-homedir.svg +[npm-url]: https://www.npmjs.com/package/replace-homedir +[npm-image]: http://img.shields.io/npm/v/replace-homedir.svg + +[travis-url]: https://travis-ci.org/gulpjs/replace-homedir +[travis-image]: http://img.shields.io/travis/gulpjs/replace-homedir.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-homedir +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-homedir.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/replace-homedir +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-homedir/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/replace-homedir/index.js b/node_modules/replace-homedir/index.js new file mode 100644 index 0000000..5ca7bee --- /dev/null +++ b/node_modules/replace-homedir/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var path = require('path'); + +var homedir = require('homedir-polyfill'); +var isAbsolute = require('is-absolute'); +var removeTrailingSep = require('remove-trailing-separator'); + +function replaceHomedir(filepath, replacement) { + if (typeof filepath !== 'string') { + throw new Error('Path for replace-homedir must be a string.'); + } + + if (!isAbsolute(filepath)) { + return filepath; + } + + var home = removeTrailingSep(homedir()); + var lookupHome = home + path.sep; + var lookupPath = removeTrailingSep(filepath) + path.sep; + + if (lookupPath.indexOf(lookupHome) !== 0) { + return filepath; + } + + return filepath.replace(home, replacement); +} + +module.exports = replaceHomedir; diff --git a/node_modules/replace-homedir/package.json b/node_modules/replace-homedir/package.json new file mode 100644 index 0000000..c0fd800 --- /dev/null +++ b/node_modules/replace-homedir/package.json @@ -0,0 +1,50 @@ +{ + "name": "replace-homedir", + "version": "1.0.0", + "description": "Replace user home in a string with another string. Useful for tildifying a path.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/replace-homedir", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + }, + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "path", + "homedir", + "tilde", + "replace", + "subsitute", + "user home", + "tilde" + ] +} diff --git a/node_modules/require-directory/.jshintrc b/node_modules/require-directory/.jshintrc new file mode 100644 index 0000000..e14e4dc --- /dev/null +++ b/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/node_modules/require-directory/.npmignore b/node_modules/require-directory/.npmignore new file mode 100644 index 0000000..47cf365 --- /dev/null +++ b/node_modules/require-directory/.npmignore @@ -0,0 +1 @@ +test/** diff --git a/node_modules/require-directory/.travis.yml b/node_modules/require-directory/.travis.yml new file mode 100644 index 0000000..20fd86b --- /dev/null +++ b/node_modules/require-directory/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.10 diff --git a/node_modules/require-directory/LICENSE b/node_modules/require-directory/LICENSE new file mode 100644 index 0000000..a70f253 --- /dev/null +++ b/node_modules/require-directory/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011 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. diff --git a/node_modules/require-directory/README.markdown b/node_modules/require-directory/README.markdown new file mode 100644 index 0000000..926a063 --- /dev/null +++ b/node_modules/require-directory/README.markdown @@ -0,0 +1,184 @@ +# require-directory + +Recursively iterates over specified directory, `require()`'ing each file, and returning a nested hash structure containing those modules. + +**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** + +[![NPM](https://nodei.co/npm/require-directory.png?downloads=true&stars=true)](https://nodei.co/npm/require-directory/) + +[![build status](https://secure.travis-ci.org/troygoode/node-require-directory.png)](http://travis-ci.org/troygoode/node-require-directory) + +## How To Use + +### Installation (via [npm](https://npmjs.org/package/require-directory)) + +```bash +$ npm install require-directory +``` + +### Usage + +A common pattern in node.js is to include an index file which creates a hash of the files in its current directory. Given a directory structure like so: + +* app.js +* routes/ + * index.js + * home.js + * auth/ + * login.js + * logout.js + * register.js + +`routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like so: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module); +``` + +`app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the exports from the `./routes/` directory: + +```javascript +var routes = require('./routes'); + +// snip + +app.get('/', routes.home); +app.get('/register', routes.auth.register); +app.get('/login', routes.auth.login); +app.get('/logout', routes.auth.logout); +``` + +The `routes` variable above is the equivalent of this: + +```javascript +var routes = { + home: require('routes/home.js'), + auth: { + login: require('routes/auth/login.js'), + logout: require('routes/auth/logout.js'), + register: require('routes/auth/register.js') + } +}; +``` + +*Note that `routes.index` will be `undefined` as you would hope.* + +### Specifying Another Directory + +You can specify which directory you want to build a tree of (if it isn't the current directory for whatever reason) by passing it as the second parameter. Not specifying the path (`requireDirectory(module)`) is the equivelant of `requireDirectory(module, __dirname)`: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module, './some/subdirectory'); +``` + +For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/index.js` and instead changed the first lines of `app.js` to: + +```javascript +var requireDirectory = require('require-directory'); +var routes = requireDirectory(module, './routes'); +``` + +## Options + +You can pass an options hash to `require-directory` as the 2nd parameter (or 3rd if you're passing the path to another directory as the 2nd parameter already). Here are the available options: + +### Whitelisting + +Whitelisting (either via RegExp or function) allows you to specify that only certain files be loaded. + +```javascript +var requireDirectory = require('require-directory'), + whitelist = /onlyinclude.js$/, + hash = requireDirectory(module, {include: whitelist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/onlyinclude.js$/.test(path)){ + return true; // don't include + }else{ + return false; // go ahead and include + } + }, + hash = requireDirectory(module, {include: check}); +``` + +### Blacklisting + +Blacklisting (either via RegExp or function) allows you to specify that all but certain files should be loaded. + +```javascript +var requireDirectory = require('require-directory'), + blacklist = /dontinclude\.js$/, + hash = requireDirectory(module, {exclude: blacklist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/dontinclude\.js$/.test(path)){ + return false; // don't include + }else{ + return true; // go ahead and include + } + }, + hash = requireDirectory(module, {exclude: check}); +``` + +### Visiting Objects As They're Loaded + +`require-directory` takes a function as the `visit` option that will be called for each module that is added to module.exports. + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + console.log(obj); // will be called for every module that is loaded + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +The visitor can also transform the objects by returning a value: + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + return obj(new Date()); + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +### Renaming Keys + +```javascript +var requireDirectory = require('require-directory'), + renamer = function(name) { + return name.toUpperCase(); + }, + hash = requireDirectory(module, {rename: renamer}); +``` + +### No Recursion + +```javascript +var requireDirectory = require('require-directory'), + hash = requireDirectory(module, {recurse: false}); +``` + +## Run Unit Tests + +```bash +$ npm run lint +$ npm test +``` + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) + +## Author + +[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) + diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js new file mode 100644 index 0000000..cd37da7 --- /dev/null +++ b/node_modules/require-directory/index.js @@ -0,0 +1,86 @@ +'use strict'; + +var fs = require('fs'), + join = require('path').join, + resolve = require('path').resolve, + dirname = require('path').dirname, + defaultOptions = { + extensions: ['js', 'json', 'coffee'], + recurse: true, + rename: function (name) { + return name; + }, + visit: function (obj) { + return obj; + } + }; + +function checkFileInclusion(path, filename, options) { + return ( + // verify file has valid extension + (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && + + // if options.include is a RegExp, evaluate it and make sure the path passes + !(options.include && options.include instanceof RegExp && !options.include.test(path)) && + + // if options.include is a function, evaluate it and make sure the path passes + !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && + + // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass + !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && + + // if options.exclude is a function, evaluate it and make sure the path doesn't pass + !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) + ); +} + +function requireDirectory(m, path, options) { + var retval = {}; + + // path is optional + if (path && !options && typeof path !== 'string') { + options = path; + path = null; + } + + // default options + options = options || {}; + for (var prop in defaultOptions) { + if (typeof options[prop] === 'undefined') { + options[prop] = defaultOptions[prop]; + } + } + + // if no path was passed in, assume the equivelant of __dirname from caller + // otherwise, resolve path relative to the equivalent of __dirname + path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); + + // get the path of each file in specified directory, append to current tree node, recurse + fs.readdirSync(path).forEach(function (filename) { + var joined = join(path, filename), + files, + key, + obj; + + if (fs.statSync(joined).isDirectory() && options.recurse) { + // this node is a directory; recurse + files = requireDirectory(m, joined, options); + // exclude empty directories + if (Object.keys(files).length) { + retval[options.rename(filename, joined, filename)] = files; + } + } else { + if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { + // hash node key shouldn't include file extension + key = filename.substring(0, filename.lastIndexOf('.')); + obj = m.require(joined); + retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; + } + } + }); + + return retval; +} + +module.exports = requireDirectory; +module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json new file mode 100644 index 0000000..25ece4b --- /dev/null +++ b/node_modules/require-directory/package.json @@ -0,0 +1,40 @@ +{ + "author": "Troy Goode (http://github.com/troygoode/)", + "name": "require-directory", + "version": "2.1.1", + "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", + "keywords": [ + "require", + "directory", + "library", + "recursive" + ], + "homepage": "https://github.com/troygoode/node-require-directory/", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/troygoode/node-require-directory.git" + }, + "contributors": [ + { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "web": "http://github.com/troygoode/" + } + ], + "license": "MIT", + "bugs": { + "url": "http://github.com/troygoode/node-require-directory/issues/" + }, + "engines": { + "node": ">=0.10.0" + }, + "devDependencies": { + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "scripts": { + "test": "mocha", + "lint": "jshint index.js test/test.js" + } +} diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore new file mode 100644 index 0000000..6f9fe6b --- /dev/null +++ b/node_modules/require-main-filename/.npmignore @@ -0,0 +1,3 @@ +node_modules +.DS_Store +.nyc_output diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml new file mode 100644 index 0000000..ab61ce7 --- /dev/null +++ b/node_modules/require-main-filename/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +os: + - linux +node_js: + - "0.10" + - "0.12" + - "4.1" + - "node" diff --git a/node_modules/require-main-filename/LICENSE.txt b/node_modules/require-main-filename/LICENSE.txt new file mode 100644 index 0000000..836440b --- /dev/null +++ b/node_modules/require-main-filename/LICENSE.txt @@ -0,0 +1,14 @@ +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/node_modules/require-main-filename/README.md b/node_modules/require-main-filename/README.md new file mode 100644 index 0000000..820d9f5 --- /dev/null +++ b/node_modules/require-main-filename/README.md @@ -0,0 +1,26 @@ +# require-main-filename + +[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename) +[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master) +[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename) + +`require.main.filename` is great for figuring out the entry +point for the current application. This can be combined with a module like +[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load +top-level configuration. + +Unfortunately, `require.main.filename` sometimes fails when an application is +executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode). + +`require-main-filename` is a shim that addresses this problem. + +## Usage + +```js +var main = require('require-main-filename')() +// use main as an alternative to require.main.filename. +``` + +## License + +ISC diff --git a/node_modules/require-main-filename/index.js b/node_modules/require-main-filename/index.js new file mode 100644 index 0000000..dca7f0c --- /dev/null +++ b/node_modules/require-main-filename/index.js @@ -0,0 +1,18 @@ +module.exports = function (_require) { + _require = _require || require + var main = _require.main + if (main && isIISNode(main)) return handleIISNode(main) + else return main ? main.filename : process.cwd() +} + +function isIISNode (main) { + return /\\iisnode\\/.test(main.filename) +} + +function handleIISNode (main) { + if (!main.children.length) { + return main.filename + } else { + return main.children[0].filename + } +} diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json new file mode 100644 index 0000000..558db27 --- /dev/null +++ b/node_modules/require-main-filename/package.json @@ -0,0 +1,30 @@ +{ + "name": "require-main-filename", + "version": "1.0.1", + "description": "shim for require.main.filename() that works in as many environments as possible", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "tap --coverage test.js" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/require-main-filename.git" + }, + "keywords": [ + "require", + "shim", + "iisnode" + ], + "author": "Ben Coe ", + "license": "ISC", + "bugs": { + "url": "https://github.com/yargs/require-main-filename/issues" + }, + "homepage": "https://github.com/yargs/require-main-filename#readme", + "devDependencies": { + "chai": "^3.5.0", + "standard": "^6.0.5", + "tap": "^5.2.0" + } +} diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js new file mode 100644 index 0000000..d89e7dc --- /dev/null +++ b/node_modules/require-main-filename/test.js @@ -0,0 +1,36 @@ +/* global describe, it */ + +var requireMainFilename = require('./') + +require('tap').mochaGlobals() +require('chai').should() + +describe('require-main-filename', function () { + it('returns require.main.filename in normal circumstances', function () { + requireMainFilename().should.match(/test\.js/) + }) + + it('should use children[0].filename when running on iisnode', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ] + } + requireMainFilename({ + main: main + }).should.match(/server\.js/) + }) + + it('should not use children[0] if no children exist', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [] + } + requireMainFilename({ + main: main + }).should.match(/interceptor\.js/) + }) + + it('should default to process.cwd() if require.main is undefined', function () { + requireMainFilename({}).should.match(/require-main-filename/) + }) +}) diff --git a/node_modules/resolve-dir/LICENSE b/node_modules/resolve-dir/LICENSE new file mode 100644 index 0000000..6525171 --- /dev/null +++ b/node_modules/resolve-dir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-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. diff --git a/node_modules/resolve-dir/README.md b/node_modules/resolve-dir/README.md new file mode 100644 index 0000000..3660757 --- /dev/null +++ b/node_modules/resolve-dir/README.md @@ -0,0 +1,88 @@ +# resolve-dir [![NPM version](https://img.shields.io/npm/v/resolve-dir.svg?style=flat)](https://www.npmjs.com/package/resolve-dir) [![NPM downloads](https://img.shields.io/npm/dm/resolve-dir.svg?style=flat)](https://npmjs.org/package/resolve-dir) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/resolve-dir.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/resolve-dir) + +> Resolve a directory that is either local, global or in the user's home directory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save resolve-dir +``` + +## Usage + +```js +var resolve = require('resolve-dir'); +``` + +Returns a local directory path unchanged + +```js +resolve('a') +//=> 'a' +``` + +Resolves the path to user home + +```js +resolve('~') +//=> '/Users/jonschlinkert' +resolve('~/foo') +//=> '/Users/jonschlinkert/foo' +``` + +Resolves the path to global npm modules + +```js +resolve('@') +//=> '/usr/local/lib/node_modules' +resolve('@/foo') +//=> '/usr/local/lib/node_modules/foo' +``` + +## About + +### Related projects + +* [expand-tilde](https://www.npmjs.com/package/expand-tilde): Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the… [more](https://github.com/jonschlinkert/expand-tilde) | [homepage](https://github.com/jonschlinkert/expand-tilde "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.") +* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/cowboy/node-findup-sync) | [homepage](https://github.com/cowboy/node-findup-sync "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.") +* [resolve-modules](https://www.npmjs.com/package/resolve-modules): Resolves local and global npm modules that match specified patterns, and returns a configuration object… [more](https://github.com/jonschlinkert/resolve-modules) | [homepage](https://github.com/jonschlinkert/resolve-modules "Resolves local and global npm modules that match specified patterns, and returns a configuration object for each resolved module.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/resolve-dir/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 18, 2016._ \ No newline at end of file diff --git a/node_modules/resolve-dir/index.js b/node_modules/resolve-dir/index.js new file mode 100644 index 0000000..3fe5366 --- /dev/null +++ b/node_modules/resolve-dir/index.js @@ -0,0 +1,22 @@ +/*! + * resolve-dir + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var path = require('path'); +var expand = require('expand-tilde'); +var gm = require('global-modules'); + +module.exports = function resolveDir(dir) { + if (dir.charAt(0) === '~') { + dir = expand(dir); + } + if (dir.charAt(0) === '@') { + dir = path.join(gm, dir.slice(1)); + } + return dir; +}; diff --git a/node_modules/resolve-dir/package.json b/node_modules/resolve-dir/package.json new file mode 100644 index 0000000..1899e6e --- /dev/null +++ b/node_modules/resolve-dir/package.json @@ -0,0 +1,73 @@ +{ + "name": "resolve-dir", + "description": "Resolve a directory that is either local, global or in the user's home directory.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/resolve-dir", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/resolve-dir", + "bugs": { + "url": "https://github.com/jonschlinkert/resolve-dir/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "homedir-polyfill": "^1.0.1", + "mocha": "^3.5.0" + }, + "keywords": [ + "dir", + "directory", + "expansion", + "file", + "filepath", + "fp", + "global", + "home", + "modules", + "npm", + "path", + "resolve", + "tilde", + "user", + "user-home", + "userhome" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "expand-tilde", + "findup-sync", + "resolve-modules" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/resolve-options/LICENSE b/node_modules/resolve-options/LICENSE new file mode 100644 index 0000000..b8fc743 --- /dev/null +++ b/node_modules/resolve-options/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall 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/node_modules/resolve-options/README.md b/node_modules/resolve-options/README.md new file mode 100644 index 0000000..60efcb3 --- /dev/null +++ b/node_modules/resolve-options/README.md @@ -0,0 +1,104 @@ +

+ + + +

+ +# resolve-options + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Resolve an options object based on configuration. + +## Usage + +```js +// This example assumes a Vinyl file + +var createResolver = require('resolve-options'); + +var config = { + cwd: { + type: 'string', + default: process.cwd + }, + sourcemaps: { + type: 'boolean', + default: false + }, + since: { + type: ['date', 'number'] + }, + read: { + type: 'boolean' + } +}; + +var options = { + sourcemaps: true, + since: Date.now(), + read: function(file) { + return (file.extname !== '.mp4'); + } +}; + +var resolver = createResolver(config, options); + +var cwd = resolver.resolve('cwd', file); +// cwd === process.cwd() + +var sourcemaps = resolver.resolve('sourcemaps', file); +// sourcemaps === true + +var read = resolver.resolve('read', file); +// Given .mp4, read === false +// Given .txt, read === true +``` + +## API + +### `createResolver([config,] [options])` + +Takes a `config` object that describes the options to accept/resolve and an `options` object (usually passed by a user) to resolve against the `config`. Returns a `resolver` that contains a `resolve` method for realtime resolution of options. + +The `config` object takes the following structure: +```graphql +config { + [optionKey] { + type // string, array or function + default // any value or function + } +} +``` + +Each option is represented by its `optionKey` in the `config` object. It must be an object with a `type` property. + +The `type` property must be a string, array or function which will be passed to the [`value-or-function`][value-or-function] module (functions will be bound to the resolver to allow for dependent options). + +A `default` property may also be specified as a fallback if the option isn't available or is invalid. The `default` value can be any value or a function (functions will be bound to the resolver to allow for dependent defaults). __Note:__ `default` values are not type-validated by the `value-or-function` module. + +### `resolver.resolve(optionKey, [...arguments])` + +Takes an `optionKey` string and any number of `arguments` to apply if an option is a function. Returns the resolved value for the `optionKey`. + +## License + +MIT + +[value-or-function]: https://github.com/gulpjs/value-or-function + +[downloads-image]: http://img.shields.io/npm/dm/resolve-options.svg +[npm-url]: https://npmjs.com/package/resolve-options +[npm-image]: http://img.shields.io/npm/v/resolve-options.svg + +[travis-url]: https://travis-ci.org/gulpjs/resolve-options +[travis-image]: http://img.shields.io/travis/gulpjs/resolve-options.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/resolve-options +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/resolve-options.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/resolve-options +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/resolve-options/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/resolve-options/index.js b/node_modules/resolve-options/index.js new file mode 100644 index 0000000..21ef429 --- /dev/null +++ b/node_modules/resolve-options/index.js @@ -0,0 +1,111 @@ +'use strict'; + +var normalize = require('value-or-function'); + +var slice = Array.prototype.slice; + +function createResolver(config, options) { + // TODO: should the config object be validated? + config = config || {}; + options = options || {}; + + var resolver = { + resolve: resolve, + }; + + + // Keep constants separately + var constants = {}; + + function resolveConstant(key) { + if (constants.hasOwnProperty(key)) { + return constants[key]; + } + + var definition = config[key]; + // Ignore options that are not defined + if (!definition) { + return; + } + + var option = options[key]; + + if (option != null) { + if (typeof option === 'function') { + return; + } + option = normalize.call(resolver, definition.type, option); + if (option != null) { + constants[key] = option; + return option; + } + } + + var fallback = definition.default; + if (option == null && typeof fallback !== 'function') { + constants[key] = fallback; + return fallback; + } + } + + + // Keep requested keys to detect (and disallow) recursive resolution + var stack = []; + + function resolve(key) { + var option = resolveConstant(key); + if (option != null) { + return option; + } + + var definition = config[key]; + // Ignore options that are not defined + if (!definition) { + return; + } + + if (stack.indexOf(key) >= 0) { + throw new Error('Recursive resolution denied.'); + } + + option = options[key]; + var fallback = definition.default; + var appliedArgs = slice.call(arguments, 1); + var args = [definition.type, option].concat(appliedArgs); + + function toResolve() { + stack.push(key); + var option = normalize.apply(resolver, args); + + if (option == null) { + option = fallback; + if (typeof option === 'function') { + option = option.apply(resolver, appliedArgs); + } + } + + return option; + } + + function onResolve() { + stack.pop(); + } + + return tryResolve(toResolve, onResolve); + } + + + return resolver; +} + + +function tryResolve(toResolve, onResolve) { + try { + return toResolve(); + } finally { + onResolve(); + } +} + + +module.exports = createResolver; diff --git a/node_modules/resolve-options/package.json b/node_modules/resolve-options/package.json new file mode 100644 index 0000000..b1c89f6 --- /dev/null +++ b/node_modules/resolve-options/package.json @@ -0,0 +1,50 @@ +{ + "name": "resolve-options", + "version": "1.1.0", + "description": "Resolve an options object based on configuration.", + "author": "Gulp Team (http://gulpjs.com/)", + "contributors": [ + "Blaine Bublitz " + ], + "repository": "gulpjs/resolve-options", + "license": "MIT", + "engines": { + "node": ">= 0.10" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint index.js test/ && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" + }, + "dependencies": { + "value-or-function": "^3.0.0" + }, + "devDependencies": { + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.20.2", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.4.0", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "options", + "functions", + "resolver", + "type", + "configuration", + "config", + "opts", + "opt", + "default" + ] +} diff --git a/node_modules/resolve-url/.jshintrc b/node_modules/resolve-url/.jshintrc new file mode 100644 index 0000000..aaf3358 --- /dev/null +++ b/node_modules/resolve-url/.jshintrc @@ -0,0 +1,44 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": true, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": false, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "browser": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/resolve-url/LICENSE b/node_modules/resolve-url/LICENSE new file mode 100644 index 0000000..0595be3 --- /dev/null +++ b/node_modules/resolve-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 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. diff --git a/node_modules/resolve-url/bower.json b/node_modules/resolve-url/bower.json new file mode 100644 index 0000000..31aa6f4 --- /dev/null +++ b/node_modules/resolve-url/bower.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "authors": ["Simon Lydell"], + "license": "MIT", + "main": "resolve-url.js", + "keywords": [ + "resolve", + "url" + ], + "ignore": [ + ".*" + ] +} diff --git a/node_modules/resolve-url/changelog.md b/node_modules/resolve-url/changelog.md new file mode 100644 index 0000000..2a4a630 --- /dev/null +++ b/node_modules/resolve-url/changelog.md @@ -0,0 +1,15 @@ +### Version 0.2.1 (2014-02-25) ### + +- Fix edge case when (accidentally) supplying only one argument, and that + argument happens to be a falsy value such as `undefined` or `null`. + + +### Version 0.2.0 (2014-02-24) ### + +- Disallow passing 0 arguments. It’s weird and inconsistent between browsers. + (Backwards incompatible change.) + + +### Version 0.1.0 (2014-02-23) ### + +- Initial release. diff --git a/node_modules/resolve-url/component.json b/node_modules/resolve-url/component.json new file mode 100644 index 0000000..f37cf00 --- /dev/null +++ b/node_modules/resolve-url/component.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "license": "MIT", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "main": "resolve-url.js", + "repo": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": [ + "resolve-url.js" + ] +} diff --git a/node_modules/resolve-url/package.json b/node_modules/resolve-url/package.json new file mode 100644 index 0000000..9442366 --- /dev/null +++ b/node_modules/resolve-url/package.json @@ -0,0 +1,34 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "author": "Simon Lydell", + "license": "MIT", + "main": "resolve-url.js", + "repository": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": { + "test": "jshint resolve-url.js test/ && testling -u" + }, + "devDependencies": { + "testling": "~1.6.0", + "jshint": "~2.4.3", + "tape": "~2.5.0" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/node_modules/resolve-url/readme.md b/node_modules/resolve-url/readme.md new file mode 100644 index 0000000..edfff73 --- /dev/null +++ b/node_modules/resolve-url/readme.md @@ -0,0 +1,83 @@ +Overview +======== + +[![browser support](https://ci.testling.com/lydell/resolve-url.png)](https://ci.testling.com/lydell/resolve-url) + +Like Node.js’ [`path.resolve`]/[`url.resolve`] for the browser. + +```js +var resolveUrl = require("resolve-url") + +window.location +// https://example.com/articles/resolving-urls/edit + +resolveUrl("remove") +// https://example.com/articles/resolving-urls/remove + +resolveUrl("/static/scripts/app.js") +// https://example.com/static/scripts/app.js + +// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map` +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map") +// https://example.com/static/source-maps/app.js.map + +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee") +// https://example.com/static/coffee/app.coffee + +resolveUrl("//cdn.example.com/jquery.js") +// https://cdn.example.com/jquery.js + +resolveUrl("http://foo.org/") +// http://foo.org/ +``` + + +Installation +============ + +- `npm install resolve-url` +- `bower install resolve-url` +- `component install lydell/resolve-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `resolveUrl(...urls)` ### + +Pass one or more urls. Resolves the last one to an absolute url, using the +previous ones and `window.location`. + +It’s like starting out on `window.location`, and then clicking links with the +urls as `href` attributes in order, from left to right. + +Unlike Node.js’ [`path.resolve`], this function always goes through all of the +arguments, from left to right. `path.resolve` goes from right to left and only +in the worst case goes through them all. Should that matter. + +Actually, the function is _really_ like clicking a lot of links in series: An +actual `` gets its `href` attribute set for each url! This means that the +url resolution of the browser is used, which makes this module really +light-weight. + +Also note that this functions deals with urls, not paths, so in that respect it +has more in common with Node.js’ [`url.resolve`]. But the arguments are more +like [`path.resolve`]. + +[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to +[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to + + +Tests +===== + +Run `npm test`, which lints the code and then gives you a link to open in a +browser of choice (using `testling`). + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/resolve-url/resolve-url.js b/node_modules/resolve-url/resolve-url.js new file mode 100644 index 0000000..19e8d04 --- /dev/null +++ b/node_modules/resolve-url/resolve-url.js @@ -0,0 +1,47 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.resolveUrl = factory() + } +}(this, function() { + + function resolveUrl(/* ...urls */) { + var numUrls = arguments.length + + if (numUrls === 0) { + throw new Error("resolveUrl requires at least one argument; got none.") + } + + var base = document.createElement("base") + base.href = arguments[0] + + if (numUrls === 1) { + return base.href + } + + var head = document.getElementsByTagName("head")[0] + head.insertBefore(base, head.firstChild) + + var a = document.createElement("a") + var resolved + + for (var index = 1; index < numUrls; index++) { + a.href = arguments[index] + resolved = a.href + base.href = resolved + } + + head.removeChild(base) + + return resolved + } + + return resolveUrl + +})); diff --git a/node_modules/resolve-url/test/resolve-url.js b/node_modules/resolve-url/test/resolve-url.js new file mode 100644 index 0000000..18532ed --- /dev/null +++ b/node_modules/resolve-url/test/resolve-url.js @@ -0,0 +1,70 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var test = require("tape") + +var resolveUrl = require("../") + +"use strict" + +test("resolveUrl", function(t) { + + t.plan(7) + + t.equal(typeof resolveUrl, "function", "is a function") + + t.equal( + resolveUrl("https://example.com/"), + "https://example.com/" + ) + + var loc = "https://example.com/articles/resolving-urls/edit" + + t.equal( + resolveUrl(loc, "remove"), + "https://example.com/articles/resolving-urls/remove" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js"), + "https://example.com/static/scripts/app.js" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map"), + "https://example.com/static/source-maps/app.js.map" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee"), + "https://example.com/static/coffee/app.coffee" + ) + + t.equal( + resolveUrl(loc, "//cdn.example.com/jquery.js"), + "https://cdn.example.com/jquery.js" + ) + +}) + +test("edge cases", function(t) { + + t.plan(4) + + t["throws"](resolveUrl, /at least one argument/, "throws with no arguments") + + var accidentallyUndefined + var result + t.doesNotThrow( + function() { result = resolveUrl(accidentallyUndefined) }, + "undefined is still an argument" + ) + t.ok(result.match(/\/undefined$/), "undefined is stringified") + + t.equal( + resolveUrl("http://foo.org/test", undefined, {}, ["a/b"], null), + "http://foo.org/a/null", + "arguments are stringified" + ) + +}) diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig new file mode 100644 index 0000000..d63f0bb --- /dev/null +++ b/node_modules/resolve/.editorconfig @@ -0,0 +1,37 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 200 + +[*.js] +block_comment_start = /* +block_comment = * +block_comment_end = */ + +[*.yml] +indent_size = 1 + +[package.json] +indent_style = tab + +[lib/core.json] +indent_style = tab + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[{*.json,Makefile}] +max_line_length = off + +[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] +indent_style = off +indent_size = off +max_line_length = off +insert_final_newline = off diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000..ce1be6e --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,65 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 1, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines": [2, 350], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-shadow": 0, + "no-use-before-define": 0, + "sort-keys": 0, + }, + "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", + ], +} diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 0000000..d9c0595 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# 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/resolve +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/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000..ff4fce2 --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 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/node_modules/resolve/SECURITY.md b/node_modules/resolve/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/resolve/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 0000000..f38c581 --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 0000000..5ee329a --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env._ && path.resolve(process.env._) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000..20e65dc --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000..54b2cc1 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000..125d814 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000..60d2555 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,329 @@ +var fs = require('fs'); +var getHomedir = require('./homedir'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var readPackage = opts.readPackage || defaultReadPackage; + if (opts.readFile && opts.readPackage) { + var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); + return process.nextTick(function () { + cb(conflictErr); + }); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) return cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000..b14a280 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000..ecc5b2e --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,52 @@ +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function specifierIncluded(specifier) { + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(current[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { return false; } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(specifiers[i])) { return false; } + } + return true; +} + +function versionIncluded(specifierValue) { + if (typeof specifierValue === 'boolean') { return specifierValue; } + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(specifierValue[i])) { return true; } + } + return false; + } + return matchesRange(specifierValue); +} + +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000..058584b --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,153 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": ">= 18", + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 0000000..5ffdf73 --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js new file mode 100644 index 0000000..537f5c7 --- /dev/null +++ b/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000..1cff010 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,42 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + if ((/^([A-Za-z]:)/).test(absoluteStart)) { + prefix = ''; + } else if ((/^\\\\/).test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.resolve(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths( + request, + start, + function () { return getNodeModulesDirs(start, modules); }, + opts + ); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js new file mode 100644 index 0000000..4b56904 --- /dev/null +++ b/node_modules/resolve/lib/normalize-options.js @@ -0,0 +1,10 @@ +module.exports = function (x, opts) { + /** + * This file is purposefully a passthrough. It's expected that third-party + * environments will override it at runtime in order to inject special logic + * into `resolve` (by manipulating the options). One such example is the PnP + * code path in Yarn. + */ + + return opts || {}; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000..0b6cd58 --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,208 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var getHomedir = require('./homedir'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && (stat.isFile() || stat.isFIFO()); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var readPackageSync = opts.readPackageSync || defaultReadPackageSync; + if (opts.readFileSync && opts.readPackageSync) { + throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var pkg = readPackageSync(readFileSync, pkgfile); + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var pkg = readPackageSync(readFileSync, pkgfile); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000..7177e0f --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,71 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.22.1", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "bin": { + "resolve": "./bin/resolve" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "array.prototype.map": "^1.0.4", + "aud": "^2.0.0", + "copy-dir": "^1.3.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", + "object-keys": "^1.1.1", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tap": "0.4.13", + "tape": "^5.5.3", + "tmp": "^0.0.31" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml" + ] + } +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000..ad34d60 --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,301 @@ +# resolve [![Version Badge][2]][1] + +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve/async'); // or, require('resolve') +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file + * readFile - the passed `opts.readFile` or `fs.readFile` if not specified + * pkgfile - path to package.json + * cb - callback + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory that contains package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + readPackage: function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFileSync - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a file exists and is a directory + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.readPackageSync(readFileSync, pkgfile)` - function to synchronously read and parse a package.json file + * readFileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified + * pkgfile - path to package.json + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + readPackageSync: function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 0000000..cd0ee04 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000..a477adc --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,88 @@ +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); + +var resolve = require('../'); + +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + + st.ok(!resolve.isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(resolve.core); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + t.comment(mod + ': ' + resolve.core[mod]); + if (resolve.core[mod]) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); + } else { + st.throws(requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + var blacklist = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (blacklist.indexOf(mod) === -1) { + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + } + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..3080665 --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..643f9fc --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000..5f2141a --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var path = require('path'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(!!err, true); + }); +}); + +test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { + t.plan(2); + + var opts = { + basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), + preserveSymlinks: false + }; + + var module = './dotdot/abc'; + + resolve(module, opts, function (err, res) { + t.equal(err.code, 'MODULE_NOT_FOUND'); + t.equal(res, undefined); + }); +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000..8f8cccd --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,34 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg, pkgfile) { + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = [pkg, pkgfile]; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + var packageFile = packageFilterArgs[1]; + t.equal( + packageFile, + path.join(dir, 'baz/package.json'), + 'second packageFilter argument is "pkgfile"' + ); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000..8a43b98 --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,33 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + var res = resolve.sync('./baz', { + basedir: dir, + // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility + packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef + return pkg; + } + }); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + if (!'is 1.x') { // eslint-disable-line no-constant-condition + var packageFile = packageFilterArgs[1]; + t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); + } + + var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition + // eslint-disable-next-line no-constant-condition + t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); + + t.end(); +}); diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 0000000..3b8c9b3 --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 0000000..5d2c56f --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000..6116275 --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,315 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('symlinked', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + cb(null, resolved); + return; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + cb(null, path.join(dir, 'symlinked', base)); + } else { + cb(null, path.join(resolved, 'symlinked')); + } + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); +}); + +test('readPackage', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + t.test('with readFile', function (st) { + st.plan(3); + + resolve('bar', opts('/foo'), function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + st.equal(pkg && pkg.main, './baz.js'); + }); + }); + + var readPackage = function (readFile, file, cb) { + var barPackage = path.join('bar', 'package.json'); + if (file.slice(-barPackage.length) === barPackage) { + cb(null, { main: './something-else.js' }); + } else { + cb(null, JSON.parse(files[path.resolve(file)])); + } + }; + + t.test('with readPackage', function (st) { + st.plan(3); + + var options = opts('/foo'); + delete options.readFile; + options.readPackage = readPackage; + resolve('bar', options, function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js')); + st.equal(pkg && pkg.main, './something-else.js'); + }); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackage = readPackage; + resolve('bar', options, function (err) { + st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided'); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000..c5a7e2a --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,214 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); + +test('symlinked', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + return resolved; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + return path.join(dir, 'symlinked', base); + } + return path.join(resolved, 'symlinked'); + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); +}); + +test('readPackageSync', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir, useReadPackage) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: useReadPackage ? null : function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + t.test('with readFile', function (st) { + st.plan(1); + + st.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); + }); + + var readPackageSync = function (readFileSync, file) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { + return { main: './something-else.js' }; + } + return JSON.parse(files[path.resolve(file)]); + }; + + t.test('with readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + delete options.readFileSync; + options.readPackageSync = readPackageSync; + + st.equal( + resolve.sync('bar', options), + path.resolve('/foo/node_modules/bar/something-else.js') + ); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackageSync = readPackageSync; + st.throws( + function () { resolve.sync('bar', options); }, + TypeError, + 'errors when both readFile and readPackage are provided' + ); + }); +}); + diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000..b50e5bb --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000..dd7cf7b --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000..ef2d4d4 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000..e8ba629 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000..c13b8cf --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000..675441d --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,143 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + if (paths) { + for (var k = 0; k < paths.length; ++k) { + moduleDirs.push(path.basename(paths[k])); + } + } + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths=array option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with paths=function option', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); + }; + + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); + + verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); + + t.end(); + }); + + t.test('with paths=function skipping node modules resolution', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return []; + }; + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }); + t.deepEqual(dirs, [], 'no node_modules was computed'); + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); + + t.test('combine paths correctly on Windows', function (t) { + var start = 'C:\\Users\\username\\myProject\\src'; + var paths = []; + var moduleDirectories = ['node_modules', start]; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); + + t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { + var start = '/Users/username/git/myProject/src'; + var paths = []; + var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000..e463d6c --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,70 @@ +var fs = require('fs'); +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(8); + + var isDir = function (dir, cb) { + if (dir === '/node_path' || dir === 'node_path/x') { + return cb(null, true); + } + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); + }); + + // ensure that relative paths still resolve against the regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: path.join(__dirname, 'node_path/x'), + isDirectory: isDir + }, function (err, res) { + var root = require('tap/package.json').main; // eslint-disable-line global-require + t.error(err); + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000..ad70d0b --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000..a64132e --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000..4d0f32e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000..793315e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..ef63c40 --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000..16519ae --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,75 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + +var pathFilterFactory = function (t) { + return function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; +}; + +test('#62: deep module references and the pathFilter', function (t) { + t.test('deep/ref.js', function (st) { + st.plan(3); + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) st.fail(err); + + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + var res = resolve.sync('deep/ref', { basedir: resolverDir }); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + t.test('deep/deeper/ref', function (st) { + st.plan(4); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + st.notEqual(pkg, undefined); + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + var res = resolve.sync( + 'deep/deeper/ref', + { basedir: resolverDir } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + }); + + t.test('deep/ref alt', function (st) { + st.plan(8); + + var pathFilter = pathFilterFactory(st); + + var res = resolve.sync( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) st.fail(err); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + st.end(); + } + ); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000..2febb59 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000..b83a3e7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000..e0f8f6a --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000..93542a9 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000..2298f47 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000..716b81d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000..4903165 --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,595 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); + +test('async foo', function (t) { + t.plan(12); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg.main, 'bar'); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, 'grux'); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'tiv'); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(5); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('path iterator', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'baz/quux.js')); + t.equal(pkg && pkg.name, 'baz'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); + + resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #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.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); + +test('async dot main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('async dot slash main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_slash_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('not a directory', function (t) { + t.plan(6); + var path = './foo'; + resolve(path, { basedir: __filename }, function (err, res, pkg) { + t.ok(err, 'a non-directory errors'); + t.equal(arguments.length, 1); + t.equal(res, undefined); + t.equal(pkg, undefined); + + t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + 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.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + 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.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('browser field in package.json', function (t) { + t.plan(3); + + var dir = path.join(__dirname, 'resolver'); + resolve( + './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; + } + }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.equal(pkg && pkg.main, 'b'); + t.equal(pkg && pkg.browser, undefined); + } + ); +}); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +test('malformed package.json', function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000..2f77720 --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,4 @@ +{ + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json new file mode 100644 index 0000000..bf406f0 --- /dev/null +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -0,0 +1,5 @@ +{ + "name": "browser_field", + "main": "a", + "browser": "b" +} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json new file mode 100644 index 0000000..d7f4fc8 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json new file mode 100644 index 0000000..f51287b --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 0000000..a7416c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000..bc1fb0a --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000..b718804 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json new file mode 100644 index 0000000..0590748 --- /dev/null +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -0,0 +1,7 @@ +{ + "name": "invalid_main", + "main": [ + "why is this a thing", + "srsly omg wtf" + ] +} diff --git a/node_modules/resolve/test/resolver/malformed_package_json/index.js b/node_modules/resolve/test/resolver/malformed_package_json/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/malformed_package_json/package.json b/node_modules/resolve/test/resolver/malformed_package_json/package.json new file mode 100644 index 0000000..98232c6 --- /dev/null +++ b/node_modules/resolve/test/resolver/malformed_package_json/package.json @@ -0,0 +1 @@ +{ diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json new file mode 100644 index 0000000..d6707ca --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json new file mode 100644 index 0000000..8508f9d --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -0,0 +1,20 @@ +{ + "name": "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/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js new file mode 100644 index 0000000..8875a32 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js @@ -0,0 +1,35 @@ +'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/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json new file mode 100644 index 0000000..204de51 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -0,0 +1,14 @@ +{ + "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/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json new file mode 100644 index 0000000..f57c3b5 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -0,0 +1,14 @@ +{ + "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/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 0000000..9b4846a --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +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/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 0000000..acfe9e9 --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "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/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 0000000..3283efc --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +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/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000..888cae3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 0000000..cb1c2c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 0000000..8e1b585 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000..5b31975 --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000..53453d6 --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,726 @@ +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 + +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 (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 (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 (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(); +}); + +test('malformed package.json', function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + 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/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js new file mode 100644 index 0000000..3a5f4fc --- /dev/null +++ b/node_modules/resolve/test/shadowed_core.js @@ -0,0 +1,54 @@ +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/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000..b7b8450 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +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/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js new file mode 100644 index 0000000..35f881a --- /dev/null +++ b/node_modules/resolve/test/symlinks.js @@ -0,0 +1,176 @@ +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/node_modules/ret/LICENSE b/node_modules/ret/LICENSE new file mode 100644 index 0000000..b351ee8 --- /dev/null +++ b/node_modules/ret/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 by Roly Fentanes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ret/README.md b/node_modules/ret/README.md new file mode 100644 index 0000000..28563e1 --- /dev/null +++ b/node_modules/ret/README.md @@ -0,0 +1,183 @@ +# Regular Expression Tokenizer + +Tokenizes strings that represent a regular expressions. + +[![Build Status](https://secure.travis-ci.org/fent/ret.js.svg)](http://travis-ci.org/fent/ret.js) +[![Dependency Status](https://david-dm.org/fent/ret.js.svg)](https://david-dm.org/fent/ret.js) +[![codecov](https://codecov.io/gh/fent/ret.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/ret.js) + +# Usage + +```js +var ret = require('ret'); + +var tokens = ret(/foo|bar/.source); +``` + +`tokens` will contain the following object + +```js +{ + "type": ret.types.ROOT + "options": [ + [ { "type": ret.types.CHAR, "value", 102 }, + { "type": ret.types.CHAR, "value", 111 }, + { "type": ret.types.CHAR, "value", 111 } ], + [ { "type": ret.types.CHAR, "value", 98 }, + { "type": ret.types.CHAR, "value", 97 }, + { "type": ret.types.CHAR, "value", 114 } ] + ] +} +``` + +# Token Types + +`ret.types` is a collection of the various token types exported by ret. + +### ROOT + +Only used in the root of the regexp. This is needed due to the posibility of the root containing a pipe `|` character. In that case, the token will have an `options` key that will be an array of arrays of tokens. If not, it will contain a `stack` key that is an array of tokens. + +```js +{ + "type": ret.types.ROOT, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.ROOT, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### GROUP + +Groups contain tokens that are inside of a parenthesis. If the group begins with `?` followed by another character, it's a special type of group. A ':' tells the group not to be remembered when `exec` is used. '=' means the previous token matches only if followed by this group, and '!' means the previous token matches only if NOT followed. + +Like root, it can contain an `options` key instead of `stack` if there is a pipe. + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### POSITION + +`\b`, `\B`, `^`, and `$` specify positions in the regexp. + +```js +{ + "type": ret.types.POSITION, + "value": "^", +} +``` + +### SET + +Contains a key `set` specifying what tokens are allowed and a key `not` specifying if the set should be negated. A set can contain other sets, ranges, and characters. + +```js +{ + "type": ret.types.SET, + "set": [token1, token2...], + "not": false, +} +``` + +### RANGE + +Used in set tokens to specify a character range. `from` and `to` are character codes. + +```js +{ + "type": ret.types.RANGE, + "from": 97, + "to": 122, +} +``` + +### REPETITION + +```js +{ + "type": ret.types.REPETITION, + "min": 0, + "max": Infinity, + "value": token, +} +``` + +### REFERENCE + +References a group token. `value` is 1-9. + +```js +{ + "type": ret.types.REFERENCE, + "value": 1, +} +``` + +### CHAR + +Represents a single character token. `value` is the character code. This might seem a bit cluttering instead of concatenating characters together. But since repetition tokens only repeat the last token and not the last clause like the pipe, it's simpler to do it this way. + +```js +{ + "type": ret.types.CHAR, + "value": 123, +} +``` + +## Errors + +ret.js will throw errors if given a string with an invalid regular expression. All possible errors are + +* Invalid group. When a group with an immediate `?` character is followed by an invalid character. It can only be followed by `!`, `=`, or `:`. Example: `/(?_abc)/` +* Nothing to repeat. Thrown when a repetitional token is used as the first token in the current clause, as in right in the beginning of the regexp or group, or right after a pipe. Example: `/foo|?bar/`, `/{1,3}foo|bar/`, `/foo(+bar)/` +* Unmatched ). A group was not opened, but was closed. Example: `/hello)2u/` +* Unterminated group. A group was not closed. Example: `/(1(23)4/` +* Unterminated character class. A custom character set was not closed. Example: `/[abc/` + + +# Install + + npm install ret + + +# Tests + +Tests are written with [vows](http://vowsjs.org/) + +```bash +npm test +``` + +# License + +MIT diff --git a/node_modules/ret/lib/index.js b/node_modules/ret/lib/index.js new file mode 100644 index 0000000..0e151c3 --- /dev/null +++ b/node_modules/ret/lib/index.js @@ -0,0 +1,282 @@ +var util = require('./util'); +var types = require('./types'); +var sets = require('./sets'); +var positions = require('./positions'); + + +module.exports = function(regexpStr) { + var i = 0, l, c, + start = { type: types.ROOT, stack: []}, + + // Keep track of last clause/group and stack. + lastGroup = start, + last = start.stack, + groupStack = []; + + + var repeatErr = function(i) { + util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1)); + }; + + // Decode a few escaped characters. + var str = util.strToChars(regexpStr); + l = str.length; + + // Iterate through each character in string. + while (i < l) { + c = str[i++]; + + switch (c) { + // Handle escaped characters, inclues a few sets. + case '\\': + c = str[i++]; + + switch (c) { + case 'b': + last.push(positions.wordBoundary()); + break; + + case 'B': + last.push(positions.nonWordBoundary()); + break; + + case 'w': + last.push(sets.words()); + break; + + case 'W': + last.push(sets.notWords()); + break; + + case 'd': + last.push(sets.ints()); + break; + + case 'D': + last.push(sets.notInts()); + break; + + case 's': + last.push(sets.whitespace()); + break; + + case 'S': + last.push(sets.notWhitespace()); + break; + + default: + // Check if c is integer. + // In which case it's a reference. + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + + // Escaped character. + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + + break; + + + // Positionals. + case '^': + last.push(positions.begin()); + break; + + case '$': + last.push(positions.end()); + break; + + + // Handle custom sets. + case '[': + // Check if this class is 'anti' i.e. [^abc]. + var not; + if (str[i] === '^') { + not = true; + i++; + } else { + not = false; + } + + // Get all the characters in class. + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + + // Increase index by length of class. + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not: not, + }); + + break; + + + // Class of any character except \n. + case '.': + last.push(sets.anyChar()); + break; + + + // Push group onto stack. + case '(': + // Create group. + var group = { + type: types.GROUP, + stack: [], + remember: true, + }; + + c = str[i]; + + // If if this is a special kind of group. + if (c === '?') { + c = str[i + 1]; + i += 2; + + // Match if followed by. + if (c === '=') { + group.followedBy = true; + + // Match if not followed by. + } else if (c === '!') { + group.notFollowedBy = true; + + } else if (c !== ':') { + util.error(regexpStr, + 'Invalid group, character \'' + c + + '\' after \'?\' at column ' + (i - 1)); + } + + group.remember = false; + } + + // Insert subgroup into current group stack. + last.push(group); + + // Remember the current group for when the group closes. + groupStack.push(lastGroup); + + // Make this new group the current group. + lastGroup = group; + last = group.stack; + break; + + + // Pop group out of stack. + case ')': + if (groupStack.length === 0) { + util.error(regexpStr, 'Unmatched ) at column ' + (i - 1)); + } + lastGroup = groupStack.pop(); + + // Check if this group has a PIPE. + // To get back the correct last stack. + last = lastGroup.options ? + lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + + + // Use pipe character to give more choices. + case '|': + // Create array where options are if this is the first PIPE + // in this clause. + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + + // Create a new stack and add to options for rest of clause. + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + + + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case '{': + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + + last.push({ + type: types.REPETITION, + min: min, + max: max, + value: last.pop(), + }); + } else { + last.push({ + type: types.CHAR, + value: 123, + }); + } + break; + + case '?': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop(), + }); + break; + + case '+': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop(), + }); + break; + + case '*': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop(), + }); + break; + + + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + } + + } + + // Check if any groups have not been closed. + if (groupStack.length !== 0) { + util.error(regexpStr, 'Unterminated group'); + } + + return start; +}; + +module.exports.types = types; diff --git a/node_modules/ret/lib/positions.js b/node_modules/ret/lib/positions.js new file mode 100644 index 0000000..80677ee --- /dev/null +++ b/node_modules/ret/lib/positions.js @@ -0,0 +1,17 @@ +var types = require('./types'); + +exports.wordBoundary = function() { + return { type: types.POSITION, value: 'b' }; +}; + +exports.nonWordBoundary = function() { + return { type: types.POSITION, value: 'B' }; +}; + +exports.begin = function() { + return { type: types.POSITION, value: '^' }; +}; + +exports.end = function() { + return { type: types.POSITION, value: '$' }; +}; diff --git a/node_modules/ret/lib/sets.js b/node_modules/ret/lib/sets.js new file mode 100644 index 0000000..5fb6be5 --- /dev/null +++ b/node_modules/ret/lib/sets.js @@ -0,0 +1,82 @@ +var types = require('./types'); + +var INTS = function() { + return [{ type: types.RANGE , from: 48, to: 57 }]; +}; + +var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); +}; + +var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; +}; + +var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + ]; +}; + +// Predefined class objects. +exports.words = function() { + return { type: types.SET, set: WORDS(), not: false }; +}; + +exports.notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; +}; + +exports.ints = function() { + return { type: types.SET, set: INTS(), not: false }; +}; + +exports.notInts = function() { + return { type: types.SET, set: INTS(), not: true }; +}; + +exports.whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; +}; + +exports.notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; +}; + +exports.anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; +}; diff --git a/node_modules/ret/lib/types.js b/node_modules/ret/lib/types.js new file mode 100644 index 0000000..9484145 --- /dev/null +++ b/node_modules/ret/lib/types.js @@ -0,0 +1,10 @@ +module.exports = { + ROOT : 0, + GROUP : 1, + POSITION : 2, + SET : 3, + RANGE : 4, + REPETITION : 5, + REFERENCE : 6, + CHAR : 7, +}; diff --git a/node_modules/ret/lib/util.js b/node_modules/ret/lib/util.js new file mode 100644 index 0000000..97d8cf5 --- /dev/null +++ b/node_modules/ret/lib/util.js @@ -0,0 +1,111 @@ +var types = require('./types'); +var sets = require('./sets'); + + +// All of these are private and only used by randexp. +// It's assumed that they will always be called with the correct input. + +var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?'; +var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 }; + +/** + * Finds character representations in str and convert all to + * their respective characters + * + * @param {String} str + * @return {String} + */ +exports.strToChars = function(str) { + /* jshint maxlen: false */ + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + + var code = b ? 8 : + a16 ? parseInt(a16, 16) : + b16 ? parseInt(b16, 16) : + c8 ? parseInt(c8, 8) : + dctrl ? CTRL.indexOf(dctrl) : + SLSH[eslsh]; + + var c = String.fromCharCode(code); + + // Escape special regex characters. + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = '\\' + c; + } + + return c; + }); + + return str; +}; + + +/** + * turns class into tokens + * reads str until it encounters a ] not preceeded by a \ + * + * @param {String} str + * @param {String} regexpStr + * @return {Array., Number>} + */ +exports.tokenizeClass = function(str, regexpStr) { + /* jshint maxlen: false */ + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + + + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + + } else if (rs[2]) { + tokens.push(sets.ints()); + + } else if (rs[3]) { + tokens.push(sets.whitespace()); + + } else if (rs[4]) { + tokens.push(sets.notWords()); + + } else if (rs[5]) { + tokens.push(sets.notInts()); + + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0), + }); + + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + + } else { + return [tokens, regexp.lastIndex]; + } + } + + exports.error(regexpStr, 'Unterminated character class'); +}; + + +/** + * Shortcut to throw errors. + * + * @param {String} regexp + * @param {String} msg + */ +exports.error = function(regexp, msg) { + throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg); +}; diff --git a/node_modules/ret/package.json b/node_modules/ret/package.json new file mode 100644 index 0000000..2fde9a4 --- /dev/null +++ b/node_modules/ret/package.json @@ -0,0 +1,35 @@ +{ + "name": "ret", + "description": "Tokenizes a string that represents a regular expression.", + "keywords": [ + "regex", + "regexp", + "regular expression", + "parser", + "tokenizer" + ], + "version": "0.1.15", + "repository": { + "type": "git", + "url": "git://github.com/fent/ret.js.git" + }, + "author": "Roly Fentanes (https://github.com/fent)", + "main": "./lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "test": "istanbul cover vows -- --spec test/*-test.js" + }, + "directories": { + "lib": "./lib" + }, + "devDependencies": { + "istanbul": "*", + "vows": "*" + }, + "engines": { + "node": ">=0.12" + }, + "license": "MIT" +} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +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/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md new file mode 100644 index 0000000..e9a81af --- /dev/null +++ b/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# 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/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000..e9fed80 --- /dev/null +++ b/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..22438da --- /dev/null +++ b/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* 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/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..623fbc3 --- /dev/null +++ b/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "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/node_modules/safe-regex/.travis.yml b/node_modules/safe-regex/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/safe-regex/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/safe-regex/LICENSE b/node_modules/safe-regex/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/safe-regex/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/safe-regex/example/safe.js b/node_modules/safe-regex/example/safe.js new file mode 100644 index 0000000..f486f59 --- /dev/null +++ b/node_modules/safe-regex/example/safe.js @@ -0,0 +1,3 @@ +var safe = require('../'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); diff --git a/node_modules/safe-regex/index.js b/node_modules/safe-regex/index.js new file mode 100644 index 0000000..488f501 --- /dev/null +++ b/node_modules/safe-regex/index.js @@ -0,0 +1,43 @@ +var parse = require('ret'); +var types = parse.types; + +module.exports = function (re, opts) { + if (!opts) opts = {}; + var replimit = opts.limit === undefined ? 25 : opts.limit; + + if (isRegExp(re)) re = re.source; + else if (typeof re !== 'string') re = String(re); + + try { re = parse(re) } + catch (err) { return false } + + var reps = 0; + return (function walk (node, starHeight) { + if (node.type === types.REPETITION) { + starHeight ++; + reps ++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + + if (node.options) { + for (var i = 0, len = node.options.length; i < len; i++) { + var ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + var stack = node.stack || (node.value && node.value.stack); + if (!stack) return true; + + for (var i = 0; i < stack.length; i++) { + var ok = walk(stack[i], starHeight); + if (!ok) return false; + } + + return true; + })(re, 0); +}; + +function isRegExp (x) { + return {}.toString.call(x) === '[object RegExp]'; +} diff --git a/node_modules/safe-regex/package.json b/node_modules/safe-regex/package.json new file mode 100644 index 0000000..0dd631b --- /dev/null +++ b/node_modules/safe-regex/package.json @@ -0,0 +1,43 @@ +{ + "name": "safe-regex", + "version": "1.1.0", + "description": "detect possibly catastrophic, exponential-time regular expressions", + "main": "index.js", + "dependencies": { + "ret": "~0.1.10" + }, + "devDependencies": { + "tape": "^3.5.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8", "ie/9", "ie/10", + "firefox/latest", + "chrome/latest", + "opera/latest", + "safari/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/safe-regex.git" + }, + "homepage": "https://github.com/substack/safe-regex", + "keywords": [ + "catastrophic", + "exponential", + "regex", + "safe", + "sandbox" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/safe-regex/readme.markdown b/node_modules/safe-regex/readme.markdown new file mode 100644 index 0000000..83673ac --- /dev/null +++ b/node_modules/safe-regex/readme.markdown @@ -0,0 +1,65 @@ +# safe-regex + +detect potentially +[catastrophic](http://regular-expressions.mobi/catastrophic.html) +[exponential-time](http://perlgeek.de/blog-en/perl-tips/in-search-of-an-exponetial-regexp.html) +regular expressions by limiting the +[star height](https://en.wikipedia.org/wiki/Star_height) to 1 + +WARNING: This module merely *seems* to work given all the catastrophic regular +expressions I could find scouring the internet, but I don't have enough of a +background in automata to be absolutely sure that this module will catch all +exponential-time cases. + +[![browser support](https://ci.testling.com/substack/safe-regex.png)](https://ci.testling.com/substack/safe-regex) + +[![build status](https://secure.travis-ci.org/substack/safe-regex.png)](http://travis-ci.org/substack/safe-regex) + +# example + +``` js +var safe = require('safe-regex'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); +``` + +``` +$ node safe.js '(x+x+)+y' +false +$ node safe.js '(beep|boop)*' +true +$ node safe.js '(a+){10}' +false +$ node safe.js '\blocation\s*:[^:\n]+\b(Oakland|San Francisco)\b' +true +``` + +# methods + +``` js +var safe = require('safe-regex') +``` + +## var ok = safe(re, opts={}) + +Return a boolean `ok` whether or not the regex `re` is safe and not possibly +catastrophic. + +`re` can be a `RegExp` object or just a string. + +If the `re` is a string and is an invalid regex, returns `false`. + +* `opts.limit` - maximum number of allowed repetitions in the entire regex. +Default: `25`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install safe-regex +``` + +# license + +MIT diff --git a/node_modules/safe-regex/test/regex.js b/node_modules/safe-regex/test/regex.js new file mode 100644 index 0000000..0bda850 --- /dev/null +++ b/node_modules/safe-regex/test/regex.js @@ -0,0 +1,50 @@ +var safe = require('../'); +var test = require('tape'); + +var good = [ + /\bOakland\b/, + /\b(Oakland|San Francisco)\b/i, + /^\d+1337\d+$/i, + /^\d+(1337|404)\d+$/i, + /^\d+(1337|404)*\d+$/i, + RegExp(Array(26).join('a?') + Array(26).join('a')), +]; + +test('safe regex', function (t) { + t.plan(good.length); + good.forEach(function (re) { + t.equal(safe(re), true); + }); +}); + + +var bad = [ + /^(a?){25}(a){25}$/, + RegExp(Array(27).join('a?') + Array(27).join('a')), + /(x+x+)+y/, + /foo|(x+x+)+y/, + /(a+){10}y/, + /(a+){2}y/, + /(.*){1,32000}[bc]/ +]; + +test('unsafe regex', function (t) { + t.plan(bad.length); + bad.forEach(function (re) { + t.equal(safe(re), false); + }); +}); + +var invalid = [ + '*Oakland*', + 'hey(yoo))', + 'abcde(?>hellow)', + '[abc' +]; + +test('invalid regex', function (t) { + t.plan(invalid.length); + invalid.forEach(function (re) { + t.equal(safe(re), false); + }); +}); diff --git a/node_modules/sass/LICENSE b/node_modules/sass/LICENSE new file mode 100644 index 0000000..b630934 --- /dev/null +++ b/node_modules/sass/LICENSE @@ -0,0 +1,1619 @@ +Dart Sass license: + +Copyright (c) 2016, Google 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. + + +-------------------------------------------------------------------------------- + +Dart SDK license: + +Copyright 2012, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +_fe_analyzer_shared license: + +Copyright 2019, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +analyzer license: + +Copyright 2013, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +archive license: + +The MIT License + +Copyright (c) 2013-2021 Brendan Duncan. +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. + +-------------------------------------------------------------------------------- + +args, csslib and logging license: + +Copyright 2013, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +async, cli_util, collection, mime, stream_channel and typed_data license: + +Copyright 2015, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +boolean_selector and test_descriptor license: + +Copyright 2016, the Dart project 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. + + +-------------------------------------------------------------------------------- + +charcode, oauth2, source_maps and stack_trace license: + +Copyright 2014, the Dart project 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. + + +-------------------------------------------------------------------------------- + +checked_yaml license: + +Copyright 2019, the Dart project 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. + + +-------------------------------------------------------------------------------- + +cli_pkg license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------------------------------------------------------------------- + +cli_repl license: + +Copyright (c) 2018, Jennifer Thakar. +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 the project 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 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. + + +-------------------------------------------------------------------------------- + +convert, crypto, shelf_static and vm_service license: + +Copyright 2015, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +coverage, dart_style, dartdoc, glob, http, http_parser, matcher, path, pool, +pub_semver, source_span, string_scanner, test and watcher license: + +Copyright 2014, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +file license: + +Copyright 2017, the Dart project 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. + +-------------------------------------------------------------------------------- + +freezed_annotation license: + +MIT License + +Copyright (c) 2020 Remi Rousselet + +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. + +-------------------------------------------------------------------------------- + +frontend_server_client license: + +Copyright 2020, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +grinder and webkit_inspection_protocol license: + +Copyright 2013, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * 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. + + +-------------------------------------------------------------------------------- + +html license: + +Copyright (c) 2006-2012 The Authors + +Contributors: +James Graham - jg307@cam.ac.uk +Anne van Kesteren - annevankesteren@gmail.com +Lachlan Hunt - lachlan.hunt@lachy.id.au +Matt McDonald - kanashii@kanashii.ca +Sam Ruby - rubys@intertwingly.net +Ian Hickson (Google) - ian@hixie.ch +Thomas Broyer - t.broyer@ltgt.net +Jacques Distler - distler@golem.ph.utexas.edu +Henri Sivonen - hsivonen@iki.fi +Adam Barth - abarth@webkit.org +Eric Seidel - eric@webkit.org +The Mozilla Foundation (contributions from Henri Sivonen since 2008) +David Flanagan (Mozilla) - dflanagan@mozilla.com +Google Inc. (contributed the Dart port) - misc@dartlang.org + +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_multi_server, shelf and shelf_web_socket license: + +Copyright 2014, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +io and term_glyph license: + +Copyright 2017, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +js license: + +Copyright 2012, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +json_annotation and stream_transform license: + +Copyright 2017, the Dart project 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. + + +-------------------------------------------------------------------------------- + +lints license: + +Copyright 2021, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +markdown license: + +Copyright 2012, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +meta and shelf_packages_handler license: + +Copyright 2016, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +node_interop license: + +Copyright (c) 2017, Anatoly Pulyaevskiy. +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 the 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 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. + + +-------------------------------------------------------------------------------- + +node_preamble license: + +The MIT License (MIT) + +Copyright (c) 2015 Michael Bullington + +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 2012, the Dart project 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. + + +-------------------------------------------------------------------------------- + +package_config license: + +Copyright 2019, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +petitparser and xml license: + +The MIT License + +Copyright (c) 2006-2022 Lukas Renggli. +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. + + +-------------------------------------------------------------------------------- + +pub_api_client license: + +MIT License + +Copyright (c) 2020 Leo Farias + +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. + + +-------------------------------------------------------------------------------- + +pubspec license: + +Copyright (c) 2015, Anders Holmgren. +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 the 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 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. + + +-------------------------------------------------------------------------------- + +pubspec_parse, test_api and test_core license: + +Copyright 2018, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +quiver license: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------------------------------------- + +source_map_stack_trace license: + +Copyright 2015, the Dart project 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. + + +-------------------------------------------------------------------------------- + +test_process license: + +Copyright 2017, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +tuple license: + +Copyright (c) 2014, the tuple project 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. + +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 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. + +-------------------------------------------------------------------------------- + +uri license: + +Copyright 2013, the Dart project 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. + + +-------------------------------------------------------------------------------- + +web_socket_channel license: + +Copyright 2016, the Dart project authors. + +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 LLC 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. + + +-------------------------------------------------------------------------------- + +yaml license: + +Copyright (c) 2014, the Dart project authors. +Copyright (c) 2006, Kirill Simonov. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/sass/README.md b/node_modules/sass/README.md new file mode 100644 index 0000000..e3e9b69 --- /dev/null +++ b/node_modules/sass/README.md @@ -0,0 +1,173 @@ +A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**. + + + + + + + +
+ Sass logo + + npm statistics + + GitHub actions build status +
+ Appveyor build status +
+ +[sass]: https://sass-lang.com/ + +This package is a distribution of [Dart Sass][], compiled to pure JavaScript +with no native code or external dependencies. It provides a command-line `sass` +executable and a Node.js API. + +[Dart Sass]: https://github.com/sass/dart-sass + +* [Usage](#usage) +* [See Also](#see-also) +* [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass) + +## Usage + +You can install Sass globally using `npm install -g sass` which will provide +access to the `sass` executable. You can also add it to your project using +`npm install --save-dev sass`. This provides the executable as well as a +library: + +[npm]: https://www.npmjs.com/package/sass + +```js +const sass = require('sass'); + +const result = sass.compile(scssFilename); + +// OR + +// Note that `compileAsync()` is substantially slower than `compile()`. +const result = await sass.compileAsync(scssFilename); +``` + +See [the Sass website][js api] for full API documentation. + +[js api]: https://sass-lang.com/documentation/js-api + +### Legacy API + +Dart Sass also supports an older JavaScript API that's fully compatible with +[Node Sass] (with a few exceptions listed below), with support for both the +[`render()`] and [`renderSync()`] functions. This API is considered deprecated +and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects. + +[Node Sass]: https://github.com/sass/node-sass +[`render()`]: https://sass-lang.com/documentation/js-api/modules#render +[`renderSync()`]: https://sass-lang.com/documentation/js-api/modules#renderSync + +Sass's support for the legacy JavaScript API has the following limitations: + +* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are + supported. + +* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a + sufficiently high precision for all existing browsers, and making this + customizable would make the code substantially less efficient. + +* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the + recommended way of locating the origin of generated selectors. + +[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle +[`precision`]: https://github.com/sass/node-sass#precision +[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments + +## See Also + +* [Dart Sass][], from which this package is compiled, can be used either as a + stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM + is substantially faster than running the pure JavaScript version, so this may + be appropriate for performance-sensitive applications. The Dart API is also + (currently) more user-friendly than the JavaScript API. See + [the Dart Sass README][Using Dart Sass] for details on how to use it. + +* [Node Sass][], which is a wrapper around [LibSass][], the C++ implementation + of Sass. Node Sass supports the same API as this package and is also faster + (although it's usually a little slower than Dart Sass). However, it requires a + native library which may be difficult to install, and it's generally slower to + add features and fix bugs. + +[Using Dart Sass]: https://github.com/sass/dart-sass#using-dart-sass +[Node Sass]: https://www.npmjs.com/package/node-sass +[LibSass]: https://sass-lang.com/libsass + +## Behavioral Differences from Ruby Sass + +There are a few intentional behavioral differences between Dart Sass and Ruby +Sass. These are generally places where Ruby Sass has an undesired behavior, and +it's substantially easier to implement the correct behavior than it would be to +implement compatible behavior. These should all have tracking bugs against Ruby +Sass to update the reference behavior. + +1. `@extend` only accepts simple selectors, as does the second argument of + `selector-extend()`. See [issue 1599][]. + +2. Subject selectors are not supported. See [issue 1126][]. + +3. Pseudo selector arguments are parsed as ``s rather than + having a more limited custom parsing. See [issue 2120][]. + +4. The numeric precision is set to 10. See [issue 1122][]. + +5. The indented syntax parser is more flexible: it doesn't require consistent + indentation across the whole document. See [issue 2176][]. + +6. Colors do not support channel-by-channel arithmetic. See [issue 2144][]. + +7. Unitless numbers aren't `==` to unit numbers with the same value. In + addition, map keys follow the same logic as `==`-equality. See + [issue 1496][]. + +8. `rgba()` and `hsla()` alpha values with percentage units are interpreted as + percentages. Other units are forbidden. See [issue 1525][]. + +9. Too many variable arguments passed to a function is an error. See + [issue 1408][]. + +10. Allow `@extend` to reach outside a media query if there's an identical + `@extend` defined outside that query. This isn't tracked explicitly, because + it'll be irrelevant when [issue 1050][] is fixed. + +11. Some selector pseudos containing placeholder selectors will be compiled + where they wouldn't be in Ruby Sass. This better matches the semantics of + the selectors in question, and is more efficient. See [issue 2228][]. + +12. The old-style `:property value` syntax is not supported in the indented + syntax. See [issue 2245][]. + +13. The reference combinator is not supported. See [issue 303][]. + +14. Universal selector unification is symmetrical. See [issue 2247][]. + +15. `@extend` doesn't produce an error if it matches but fails to unify. See + [issue 2250][]. + +16. Dart Sass currently only supports UTF-8 documents. We'd like to support + more, but Dart currently doesn't support them. See [dart-lang/sdk#11744][], + for example. + +[issue 1599]: https://github.com/sass/sass/issues/1599 +[issue 1126]: https://github.com/sass/sass/issues/1126 +[issue 2120]: https://github.com/sass/sass/issues/2120 +[issue 1122]: https://github.com/sass/sass/issues/1122 +[issue 2176]: https://github.com/sass/sass/issues/2176 +[issue 2144]: https://github.com/sass/sass/issues/2144 +[issue 1496]: https://github.com/sass/sass/issues/1496 +[issue 1525]: https://github.com/sass/sass/issues/1525 +[issue 1408]: https://github.com/sass/sass/issues/1408 +[issue 1050]: https://github.com/sass/sass/issues/1050 +[issue 2228]: https://github.com/sass/sass/issues/2228 +[issue 2245]: https://github.com/sass/sass/issues/2245 +[issue 303]: https://github.com/sass/sass/issues/303 +[issue 2247]: https://github.com/sass/sass/issues/2247 +[issue 2250]: https://github.com/sass/sass/issues/2250 +[dart-lang/sdk#11744]: https://github.com/dart-lang/sdk/issues/11744 + +Disclaimer: this is not an official Google product. diff --git a/node_modules/sass/node_modules/anymatch/LICENSE b/node_modules/sass/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..491766c --- /dev/null +++ b/node_modules/sass/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +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. diff --git a/node_modules/sass/node_modules/anymatch/README.md b/node_modules/sass/node_modules/anymatch/README.md new file mode 100644 index 0000000..1dd67f5 --- /dev/null +++ b/node_modules/sass/node_modules/anymatch/README.md @@ -0,0 +1,87 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + + +Usage +----- +```sh +npm install anymatch +``` + +#### anymatch(matchers, testString, [returnIndex], [options]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options. + * __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. + +```js +const anymatch = require('anymatch'); + +const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', {returnIndex: true}); // 2 +anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1 + +// any picomatc + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true + +const matcher = anymatch(matchers); +['foo.js', 'bar.js'].filter(matcher); // [ 'foo.js' ] +anymatch master* ❯ + +``` + +#### anymatch(matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array#filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Changelog +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +- **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only. +- **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). +- **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/node_modules/sass/node_modules/anymatch/index.d.ts b/node_modules/sass/node_modules/anymatch/index.d.ts new file mode 100644 index 0000000..196d061 --- /dev/null +++ b/node_modules/sass/node_modules/anymatch/index.d.ts @@ -0,0 +1,19 @@ +type AnymatchFn = (testString: string) => boolean; +type AnymatchPattern = string|RegExp|AnymatchFn; +type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] +type AnymatchTester = { + (testString: string|any[], returnIndex: true): number; + (testString: string|any[]): boolean; +} + +type PicomatchOptions = {dot: boolean}; + +declare const anymatch: { + (matchers: AnymatchMatcher): AnymatchTester; + (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; + (matchers: AnymatchMatcher, testString: string|any[]): boolean; +} + +export {AnymatchMatcher as Matcher} +export {AnymatchTester as Tester} +export default anymatch diff --git a/node_modules/sass/node_modules/anymatch/index.js b/node_modules/sass/node_modules/anymatch/index.js new file mode 100644 index 0000000..9fb3ebb --- /dev/null +++ b/node_modules/sass/node_modules/anymatch/index.js @@ -0,0 +1,104 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { value: true }); + +const picomatch = require('picomatch'); +const normalizePath = require('normalize-path'); + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch(item, opts)); + const patterns = mtchers + .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG)) + .map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; diff --git a/node_modules/sass/node_modules/anymatch/package.json b/node_modules/sass/node_modules/anymatch/package.json new file mode 100644 index 0000000..f9b5284 --- /dev/null +++ b/node_modules/sass/node_modules/anymatch/package.json @@ -0,0 +1,48 @@ +{ + "name": "anymatch", + "version": "3.1.2", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js", + "index.d.ts" + ], + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "author": { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/micromatch/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/micromatch/anymatch" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "nyc mocha", + "mocha": "mocha" + }, + "devDependencies": { + "mocha": "^6.1.3", + "nyc": "^14.0.0" + }, + "engines": { + "node": ">= 8" + } +} diff --git a/node_modules/sass/node_modules/binary-extensions/binary-extensions.json b/node_modules/sass/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000..4aab383 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,260 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "appimage", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "flatpak", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "odp", + "ods", + "odt", + "oga", + "ogg", + "ogv", + "otf", + "ott", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rpm", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "snap", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/node_modules/sass/node_modules/binary-extensions/binary-extensions.json.d.ts b/node_modules/sass/node_modules/binary-extensions/binary-extensions.json.d.ts new file mode 100644 index 0000000..94a248c --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/binary-extensions.json.d.ts @@ -0,0 +1,3 @@ +declare const binaryExtensionsJson: readonly string[]; + +export = binaryExtensionsJson; diff --git a/node_modules/sass/node_modules/binary-extensions/index.d.ts b/node_modules/sass/node_modules/binary-extensions/index.d.ts new file mode 100644 index 0000000..f469ac5 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/index.d.ts @@ -0,0 +1,14 @@ +/** +List of binary file extensions. + +@example +``` +import binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` +*/ +declare const binaryExtensions: readonly string[]; + +export = binaryExtensions; diff --git a/node_modules/sass/node_modules/binary-extensions/index.js b/node_modules/sass/node_modules/binary-extensions/index.js new file mode 100644 index 0000000..d46e468 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/index.js @@ -0,0 +1 @@ +module.exports = require('./binary-extensions.json'); diff --git a/node_modules/sass/node_modules/binary-extensions/license b/node_modules/sass/node_modules/binary-extensions/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/license @@ -0,0 +1,9 @@ +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. diff --git a/node_modules/sass/node_modules/binary-extensions/package.json b/node_modules/sass/node_modules/binary-extensions/package.json new file mode 100644 index 0000000..c4d3641 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/package.json @@ -0,0 +1,38 @@ +{ + "name": "binary-extensions", + "version": "2.2.0", + "description": "List of binary file extensions", + "license": "MIT", + "repository": "sindresorhus/binary-extensions", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "binary-extensions.json", + "binary-extensions.json.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/sass/node_modules/binary-extensions/readme.md b/node_modules/sass/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000..3e25dd8 --- /dev/null +++ b/node_modules/sass/node_modules/binary-extensions/readme.md @@ -0,0 +1,41 @@ +# binary-extensions + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + + +## Install + +``` +$ npm install binary-extensions +``` + + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions + + +--- + +
+ + 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/node_modules/sass/node_modules/braces/CHANGELOG.md b/node_modules/sass/node_modules/braces/CHANGELOG.md new file mode 100644 index 0000000..36f798b --- /dev/null +++ b/node_modules/sass/node_modules/braces/CHANGELOG.md @@ -0,0 +1,184 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [3.0.0] - 2018-04-08 + +v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. + +**Breaking Changes** + +- The undocumented `.makeRe` method was removed + +**Non-breaking changes** + +- Caching was removed + +## [2.3.2] - 2018-04-08 + +- start refactoring +- cover sets +- better range handling + +## [2.3.1] - 2018-02-17 + +- Remove unnecessary escape in Regex. (#14) + +## [2.3.0] - 2017-10-19 + +- minor code reorganization +- optimize regex +- expose `maxLength` option + +## [2.2.1] - 2017-05-30 + +- don't condense when braces contain extglobs + +## [2.2.0] - 2017-05-28 + +- ensure word boundaries are preserved +- fixes edge case where extglob characters precede a brace pattern + +## [2.1.1] - 2017-04-27 + +- use snapdragon-node +- handle edge case +- optimizations, lint + +## [2.0.4] - 2017-04-11 + +- pass opts to compiler +- minor optimization in create method +- re-write parser handlers to remove negation regex + +## [2.0.3] - 2016-12-10 + +- use split-string +- clear queue at the end +- adds sequences example +- add unit tests + +## [2.0.2] - 2016-10-21 + +- fix comma handling in nested extglobs + +## [2.0.1] - 2016-10-20 + +- add comments +- more tests, ensure quotes are stripped + +## [2.0.0] - 2016-10-19 + +- don't expand braces inside character classes +- add quantifier pattern + +## [1.8.5] - 2016-05-21 + +- Refactor (#10) + +## [1.8.4] - 2016-04-20 + +- fixes https://github.com/jonschlinkert/micromatch/issues/66 + +## [1.8.0] - 2015-03-18 + +- adds exponent examples, tests +- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38 + +## [1.6.0] - 2015-01-30 + +- optimizations, `bash` mode: +- improve path escaping + +## [1.5.0] - 2015-01-28 + +- Merge pull request #5 from eush77/lib-files + +## [1.4.0] - 2015-01-24 + +- add extglob tests +- externalize exponent function +- better whitespace handling + +## [1.3.0] - 2015-01-24 + +- make regex patterns explicity + +## [1.1.0] - 2015-01-11 + +- don't create a match group with `makeRe` + +## [1.0.0] - 2014-12-23 + +- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e' +- support empty brace syntax +- better bash coverage +- better support for regex strings + +## [0.1.4] - 2014-11-14 + +- improve recognition of bad args, recognize mismatched argument types +- support escaping +- remove pathname-expansion +- support whitespace in patterns + +## [0.1.0] + +- first commit + +[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2 +[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1 +[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0 +[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1 +[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0 +[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0 +[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0 +[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5 +[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4 +[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0 +[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0 +[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4 + +[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/sass/node_modules/braces/LICENSE b/node_modules/sass/node_modules/braces/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/sass/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/braces/README.md b/node_modules/sass/node_modules/braces/README.md new file mode 100644 index 0000000..cba2f60 --- /dev/null +++ b/node_modules/sass/node_modules/braces/README.md @@ -0,0 +1,593 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + } +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + } +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)| N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +# range (expanded) + braces x 29,040 ops/sec ±3.69% (91 runs sampled)) + minimatch x 4,735 ops/sec ±1.28% (90 runs sampled) + +# range (optimized for regex) + braces x 382,878 ops/sec ±0.56% (94 runs sampled) + minimatch x 1,040 ops/sec ±0.44% (93 runs sampled) + +# nested ranges (expanded) + braces x 19,744 ops/sec ±2.27% (92 runs sampled)) + minimatch x 4,579 ops/sec ±0.50% (93 runs sampled) + +# nested ranges (optimized for regex) + braces x 246,019 ops/sec ±2.02% (93 runs sampled) + minimatch x 1,028 ops/sec ±0.39% (94 runs sampled) + +# set (expanded) + braces x 138,641 ops/sec ±0.53% (95 runs sampled) + minimatch x 219,582 ops/sec ±0.98% (94 runs sampled) + +# set (optimized for regex) + braces x 388,408 ops/sec ±0.41% (95 runs sampled) + minimatch x 44,724 ops/sec ±0.91% (89 runs sampled) + +# nested sets (expanded) + braces x 84,966 ops/sec ±0.48% (94 runs sampled) + minimatch x 140,720 ops/sec ±0.37% (95 runs sampled) + +# nested sets (optimized for regex) + braces x 263,340 ops/sec ±2.06% (92 runs sampled) + minimatch x 28,714 ops/sec ±0.40% (90 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/sass/node_modules/braces/index.js b/node_modules/sass/node_modules/braces/index.js new file mode 100644 index 0000000..0eee0f5 --- /dev/null +++ b/node_modules/sass/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/node_modules/sass/node_modules/braces/lib/compile.js b/node_modules/sass/node_modules/braces/lib/compile.js new file mode 100644 index 0000000..3e984a4 --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/compile.js @@ -0,0 +1,57 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + let range = fill(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/node_modules/sass/node_modules/braces/lib/constants.js b/node_modules/sass/node_modules/braces/lib/constants.js new file mode 100644 index 0000000..a937943 --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/node_modules/sass/node_modules/braces/lib/expand.js b/node_modules/sass/node_modules/braces/lib/expand.js new file mode 100644 index 0000000..376c748 --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/node_modules/sass/node_modules/braces/lib/parse.js b/node_modules/sass/node_modules/braces/lib/parse.js new file mode 100644 index 0000000..145ea26 --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/parse.js @@ -0,0 +1,333 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let closed = true; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/node_modules/sass/node_modules/braces/lib/stringify.js b/node_modules/sass/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000..414b7bc --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/node_modules/sass/node_modules/braces/lib/utils.js b/node_modules/sass/node_modules/braces/lib/utils.js new file mode 100644 index 0000000..e3551a6 --- /dev/null +++ b/node_modules/sass/node_modules/braces/lib/utils.js @@ -0,0 +1,112 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; diff --git a/node_modules/sass/node_modules/braces/package.json b/node_modules/sass/node_modules/braces/package.json new file mode 100644 index 0000000..3f52e34 --- /dev/null +++ b/node_modules/sass/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.2", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.0.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/node_modules/sass/node_modules/chokidar/LICENSE b/node_modules/sass/node_modules/chokidar/LICENSE new file mode 100644 index 0000000..fa9162b --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/chokidar/README.md b/node_modules/sass/node_modules/chokidar/README.md new file mode 100644 index 0000000..d6a57fd --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/README.md @@ -0,0 +1,308 @@ +# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar) + +> Minimal and efficient cross-platform file watching library + +[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar) + +## Why? + +Node.js `fs.watch`: + +* Doesn't report filenames on MacOS. +* Doesn't report events at all when using editors like Sublime on MacOS. +* Often reports events twice. +* Emits most changes as `rename`. +* Does not provide an easy way to recursively watch file trees. +* Does not support recursive watching on Linux. + +Node.js `fs.watchFile`: + +* Almost as bad at event handling. +* Also does not provide any recursive watching. +* Results in high CPU utilization. + +Chokidar resolves these problems. + +Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in +[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), +[gulp](https://github.com/gulpjs/gulp/), +[karma](https://karma-runner.github.io/), +[PM2](https://github.com/Unitech/PM2), +[browserify](http://browserify.org/), +[webpack](https://webpack.github.io/), +[BrowserSync](https://www.browsersync.io/), +and [many others](https://www.npmjs.com/browse/depended/chokidar). +It has proven itself in production environments. + +Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/) + +## How? + +Chokidar does still rely on the Node.js core `fs` module, but when using +`fs.watch` and `fs.watchFile` for watching, it normalizes the events it +receives, often checking for truth by getting file stats and/or dir contents. + +On MacOS, chokidar by default uses a native extension exposing the Darwin +`FSEvents` API. This provides very efficient recursive watching compared with +implementations like `kqueue` available on most \*nix platforms. Chokidar still +does have to do some work to normalize the events received that way as well. + +On most other platforms, the `fs.watch`-based implementation is the default, which +avoids polling and keeps CPU usage down. Be advised that chokidar will initiate +watchers recursively for everything within scope of the paths that have been +specified, so be judicious about not wasting system resources by watching much +more than needed. + +## Getting started + +Install with npm: + +```sh +npm install chokidar +``` + +Then `require` and use it in your code: + +```javascript +const chokidar = require('chokidar'); + +// One-liner for current directory +chokidar.watch('.').on('all', (event, path) => { + console.log(event, path); +}); +``` + +## API + +```javascript +// Example of a more typical implementation structure + +// Initialize watcher. +const watcher = chokidar.watch('file, dir, glob, or array', { + ignored: /(^|[\/\\])\../, // ignore dotfiles + persistent: true +}); + +// Something to use when events are received. +const log = console.log.bind(console); +// Add event listeners. +watcher + .on('add', path => log(`File ${path} has been added`)) + .on('change', path => log(`File ${path} has been changed`)) + .on('unlink', path => log(`File ${path} has been removed`)); + +// More possible events. +watcher + .on('addDir', path => log(`Directory ${path} has been added`)) + .on('unlinkDir', path => log(`Directory ${path} has been removed`)) + .on('error', error => log(`Watcher error: ${error}`)) + .on('ready', () => log('Initial scan complete. Ready for changes')) + .on('raw', (event, path, details) => { // internal + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path, stats) => { + if (stats) console.log(`File ${path} changed size to ${stats.size}`); +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Get list of actual paths being watched on the filesystem +var watchedPaths = watcher.getWatched(); + +// Un-watch some files. +await watcher.unwatch('new-file*'); + +// Stop watching. +// The method is async! +watcher.close().then(() => console.log('closed')); + +// Full list of options. See below for descriptions. +// Do not use this example! +chokidar.watch('file', { + persistent: true, + + ignored: '*.txt', + ignoreInitial: false, + followSymlinks: true, + cwd: '.', + disableGlobbing: false, + + usePolling: false, + interval: 100, + binaryInterval: 300, + alwaysStat: false, + depth: 99, + awaitWriteFinish: { + stabilityThreshold: 2000, + pollInterval: 100 + }, + + ignorePermissionErrors: false, + atomic: true // or a custom 'atomicity delay', in milliseconds (default 100) +}); + +``` + +`chokidar.watch(paths, [options])` + +* `paths` (string or array of strings). Paths to files, dirs to be watched +recursively, or glob patterns. + - Note: globs must not contain windows separators (`\`), + because that's how they work by the standard — + you'll need to replace them with forward slashes (`/`). + - Note 2: for additional glob documentation, check out low-level + library: [picomatch](https://github.com/micromatch/picomatch). +* `options` (object) Options object as defined below: + +#### Persistence + +* `persistent` (default: `true`). Indicates whether the process +should continue to run as long as files are being watched. If set to +`false` when using `fsevents` to watch, no more events will be emitted +after `ready`, even if the process continues to run. + +#### Path filtering + +* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition) +Defines files/paths to be ignored. The whole relative or absolute path is +tested, not just filename. If a function with two arguments is provided, it +gets called twice per path - once with a single argument (the path), second +time with two arguments (the path and the +[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +object of that path). +* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while +instantiating the watching as chokidar discovers these file paths (before the `ready` event). +* `followSymlinks` (default: `true`). When `false`, only the +symlinks themselves will be watched for changes instead of following +the link references and bubbling events through the link's path. +* `cwd` (no default). The base directory from which watch `paths` are to be +derived. Paths emitted with events will be relative to this. +* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as +literal path names, even if they look like globs. + +#### Performance + +* `usePolling` (default: `false`). +Whether to use fs.watchFile (backed by polling), or fs.watch. If polling +leads to high CPU utilization, consider setting this to `false`. It is +typically necessary to **set this to `true` to successfully watch files over +a network**, and it may be necessary to successfully watch files in other +non-standard situations. Setting to `true` explicitly on MacOS overrides the +`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable +to true (1) or false (0) in order to override this option. +* _Polling-specific settings_ (effective when `usePolling: true`) + * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also + set the CHOKIDAR_INTERVAL env variable to override this option. + * `binaryInterval` (default: `300`). Interval of file system + polling for binary files. + ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) +* `useFsEvents` (default: `true` on MacOS). Whether to use the +`fsevents` watching interface if available. When set to `true` explicitly +and `fsevents` is available this supercedes the `usePolling` setting. When +set to `false` on MacOS, `usePolling: true` becomes the default. +* `alwaysStat` (default: `false`). If relying upon the +[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +object that may get passed with `add`, `addDir`, and `change` events, set +this to `true` to ensure it is provided even in cases where it wasn't +already available from the underlying watch events. +* `depth` (default: `undefined`). If set, limits how many levels of +subdirectories will be traversed. +* `awaitWriteFinish` (default: `false`). +By default, the `add` event will fire when a file first appears on disk, before +the entire file has been written. Furthermore, in some cases some `change` +events will be emitted while the file is being written. In some cases, +especially when watching for large files there will be a need to wait for the +write operation to finish before responding to a file creation or modification. +Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, +holding its `add` and `change` events until the size does not change for a +configurable amount of time. The appropriate duration setting is heavily +dependent on the OS and hardware. For accurate detection this parameter should +be relatively high, making file watching much less responsive. +Use with caution. + * *`options.awaitWriteFinish` can be set to an object in order to adjust + timing params:* + * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in + milliseconds for a file size to remain constant before emitting its event. + * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds. + +#### Errors + +* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files +that don't have read permissions if possible. If watching fails due to `EPERM` +or `EACCES` with this set to `true`, the errors will be suppressed silently. +* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). +Automatically filters out artifacts that occur when using editors that use +"atomic writes" instead of writing directly to the source file. If a file is +re-added within 100 ms of being deleted, Chokidar emits a `change` event +rather than `unlink` then `add`. If the default of 100 ms does not work well +for you, you can override it by setting `atomic` to a custom value, in +milliseconds. + +### Methods & Events + +`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: + +* `.add(path / paths)`: Add files, directories, or glob patterns for tracking. +Takes an array of strings or just one string. +* `.on(event, callback)`: Listen for an FS event. +Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, +`raw`, `error`. +Additionally `all` is available which gets emitted with the underlying event +name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. +* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. +Takes an array of strings or just one string. +* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen. +* `.getWatched()`: Returns an object representing all the paths on the file +system being watched by this `FSWatcher` instance. The object's keys are all the +directories (using absolute paths unless the `cwd` option was used), and the +values are arrays of the names of the items contained in each directory. + +## CLI + +If you need a CLI interface for your file watching, check out +[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to +execute a command on each change, or get a stdio stream of change events. + +## Install Troubleshooting + +* `npm WARN optional dep failed, continuing fsevents@n.n.n` + * This message is normal part of how `npm` handles optional dependencies and is + not indicative of a problem. Even if accompanied by other related error messages, + Chokidar should function properly. + +* `TypeError: fsevents is not a constructor` + * Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar. + +* Chokidar is producing `ENOSP` error on Linux, like this: + * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell` + `Error: watch /home/ ENOSPC` + * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal: + `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p` + +## Changelog + +For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md). +- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks. +- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement. +- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method. +- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions. +- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%. +- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher. +- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes. +- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported +- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66) + +## Also + +Why was chokidar named this way? What's the meaning behind it? + +>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). + +## License + +MIT (c) Paul Miller (), see [LICENSE](LICENSE) file. diff --git a/node_modules/sass/node_modules/chokidar/index.js b/node_modules/sass/node_modules/chokidar/index.js new file mode 100644 index 0000000..ed4b6d5 --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/index.js @@ -0,0 +1,973 @@ +'use strict'; + +const { EventEmitter } = require('events'); +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); +const readdirp = require('readdirp'); +const anymatch = require('anymatch').default; +const globParent = require('glob-parent'); +const isGlob = require('is-glob'); +const braces = require('braces'); +const normalizePath = require('normalize-path'); + +const NodeFsHandler = require('./lib/nodefs-handler'); +const FsEventsHandler = require('./lib/fsevents-handler'); +const { + EV_ALL, + EV_READY, + EV_ADD, + EV_CHANGE, + EV_UNLINK, + EV_ADD_DIR, + EV_UNLINK_DIR, + EV_RAW, + EV_ERROR, + + STR_CLOSE, + STR_END, + + BACK_SLASH_RE, + DOUBLE_SLASH_RE, + SLASH_OR_BACK_SLASH_RE, + DOT_RE, + REPLACER_RE, + + SLASH, + SLASH_SLASH, + BRACE_START, + BANG, + ONE_DOT, + TWO_DOTS, + GLOBSTAR, + SLASH_GLOBSTAR, + ANYMATCH_OPTS, + STRING_TYPE, + FUNCTION_TYPE, + EMPTY_STR, + EMPTY_FN, + + isWindows, + isMacos, + isIBMi +} = require('./lib/constants'); + +const stat = promisify(fs.stat); +const readdir = promisify(fs.readdir); + +/** + * @typedef {String} Path + * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName + * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType + */ + +/** + * + * @typedef {Object} WatchHelpers + * @property {Boolean} followSymlinks + * @property {'stat'|'lstat'} statMethod + * @property {Path} path + * @property {Path} watchPath + * @property {Function} entryPath + * @property {Boolean} hasGlob + * @property {Object} globFilter + * @property {Function} filterPath + * @property {Function} filterDir + */ + +const arrify = (value = []) => Array.isArray(value) ? value : [value]; +const flatten = (list, result = []) => { + list.forEach(item => { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +const unifyPaths = (paths_) => { + /** + * @type {Array} + */ + const paths = flatten(arrify(paths_)); + if (!paths.every(p => typeof p === STRING_TYPE)) { + throw new TypeError(`Non-string provided as watch path: ${paths}`); + } + return paths.map(normalizePathToUnix); +}; + +// If SLASH_SLASH occurs at the beginning of path, it is not replaced +// because "//StoragePC/DrivePool/Movies" is a valid network path +const toUnix = (string) => { + let str = string.replace(BACK_SLASH_RE, SLASH); + let prepend = false; + if (str.startsWith(SLASH_SLASH)) { + prepend = true; + } + while (str.match(DOUBLE_SLASH_RE)) { + str = str.replace(DOUBLE_SLASH_RE, SLASH); + } + if (prepend) { + str = SLASH + str; + } + return str; +}; + +// Our version of upath.normalize +// TODO: this is not equal to path-normalize module - investigate why +const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); + +const normalizeIgnored = (cwd = EMPTY_STR) => (path) => { + if (typeof path !== STRING_TYPE) return path; + return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); +}; + +const getAbsolutePath = (path, cwd) => { + if (sysPath.isAbsolute(path)) { + return path; + } + if (path.startsWith(BANG)) { + return BANG + sysPath.join(cwd, path.slice(1)); + } + return sysPath.join(cwd, path); +}; + +const undef = (opts, key) => opts[key] === undefined; + +/** + * Directory entry. + * @property {Path} path + * @property {Set} items + */ +class DirEntry { + /** + * @param {Path} dir + * @param {Function} removeWatcher + */ + constructor(dir, removeWatcher) { + this.path = dir; + this._removeWatcher = removeWatcher; + /** @type {Set} */ + this.items = new Set(); + } + + add(item) { + const {items} = this; + if (!items) return; + if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); + } + + async remove(item) { + const {items} = this; + if (!items) return; + items.delete(item); + if (items.size > 0) return; + + const dir = this.path; + try { + await readdir(dir); + } catch (err) { + if (this._removeWatcher) { + this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); + } + } + } + + has(item) { + const {items} = this; + if (!items) return; + return items.has(item); + } + + /** + * @returns {Array} + */ + getChildren() { + const {items} = this; + if (!items) return; + return [...items.values()]; + } + + dispose() { + this.items.clear(); + delete this.path; + delete this._removeWatcher; + delete this.items; + Object.freeze(this); + } +} + +const STAT_METHOD_F = 'stat'; +const STAT_METHOD_L = 'lstat'; +class WatchHelper { + constructor(path, watchPath, follow, fsw) { + this.fsw = fsw; + this.path = path = path.replace(REPLACER_RE, EMPTY_STR); + this.watchPath = watchPath; + this.fullWatchPath = sysPath.resolve(watchPath); + this.hasGlob = watchPath !== path; + /** @type {object|boolean} */ + if (path === EMPTY_STR) this.hasGlob = false; + this.globSymlink = this.hasGlob && follow ? undefined : false; + this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; + this.dirParts = this.getDirParts(path); + this.dirParts.forEach((parts) => { + if (parts.length > 1) parts.pop(); + }); + this.followSymlinks = follow; + this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; + } + + checkGlobSymlink(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === EMPTY_STR + if (this.globSymlink === undefined) { + this.globSymlink = entry.fullParentDir === this.fullWatchPath ? + false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; + } + + if (this.globSymlink) { + return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); + } + + return entry.fullPath; + } + + entryPath(entry) { + return sysPath.join(this.watchPath, + sysPath.relative(this.watchPath, this.checkGlobSymlink(entry)) + ); + } + + filterPath(entry) { + const {stats} = entry; + if (stats && stats.isSymbolicLink()) return this.filterDir(entry); + const resolvedPath = this.entryPath(entry); + const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? + this.globFilter(resolvedPath) : true; + return matchesGlob && + this.fsw._isntIgnored(resolvedPath, stats) && + this.fsw._hasReadPermissions(stats); + } + + getDirParts(path) { + if (!this.hasGlob) return []; + const parts = []; + const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path]; + expandedPath.forEach((path) => { + parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); + }); + return parts; + } + + filterDir(entry) { + if (this.hasGlob) { + const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); + let globstar = false; + this.unmatchedGlob = !this.dirParts.some((parts) => { + return parts.every((part, i) => { + if (part === GLOBSTAR) globstar = true; + return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); + }); + }); + } + return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); + } +} + +/** + * Watches files & directories for changes. Emitted events: + * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` + * + * new FSWatcher() + * .add(directories) + * .on('add', path => log('File', path, 'was added')) + */ +class FSWatcher extends EventEmitter { +// Not indenting methods for history sake; for now. +constructor(_opts) { + super(); + + const opts = {}; + if (_opts) Object.assign(opts, _opts); // for frozen objects + + /** @type {Map} */ + this._watched = new Map(); + /** @type {Map} */ + this._closers = new Map(); + /** @type {Set} */ + this._ignoredPaths = new Set(); + + /** @type {Map} */ + this._throttled = new Map(); + + /** @type {Map} */ + this._symlinkPaths = new Map(); + + this._streams = new Set(); + this.closed = false; + + // Set up default options. + if (undef(opts, 'persistent')) opts.persistent = true; + if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; + if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef(opts, 'interval')) opts.interval = 100; + if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; + if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; + opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + const canUseFsEvents = FsEventsHandler.canUse(); + if (!canUseFsEvents) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs_watch. + if (undef(opts, 'usePolling') && !opts.useFsEvents) { + opts.usePolling = isMacos; + } + + // Always default to polling on IBM i because fs.watch() is not available on IBM i. + if(isIBMi) { + opts.usePolling = true; + } + + // Global override (useful for end-developers that need to force polling for all + // instances of chokidar, regardless of usage/dependency depth) + const envPoll = process.env.CHOKIDAR_USEPOLLING; + if (envPoll !== undefined) { + const envLower = envPoll.toLowerCase(); + + if (envLower === 'false' || envLower === '0') { + opts.usePolling = false; + } else if (envLower === 'true' || envLower === '1') { + opts.usePolling = true; + } else { + opts.usePolling = !!envLower; + } + } + const envInterval = process.env.CHOKIDAR_INTERVAL; + if (envInterval) { + opts.interval = Number.parseInt(envInterval, 10); + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = new Map(); + + if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; + + if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + const awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + this._pendingWrites = new Map(); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + let readyCalls = 0; + this._emitReady = () => { + readyCalls++; + if (readyCalls >= this._readyCount) { + this._emitReady = EMPTY_FN; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(() => this.emit(EV_READY)); + } + }; + this._emitRaw = (...args) => this.emit(EV_RAW, ...args); + this._readyEmitted = false; + this.options = opts; + + // Initialize with proper watcher. + if (opts.useFsEvents) { + this._fsEventsHandler = new FsEventsHandler(this); + } else { + this._nodeFsHandler = new NodeFsHandler(this); + } + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +// Public methods + +/** + * Adds paths to be watched on an existing FSWatcher instance + * @param {Path|Array} paths_ + * @param {String=} _origAdd private; for handling non-existent paths to be watched + * @param {Boolean=} _internal private; indicates a non-user add + * @returns {FSWatcher} for chaining + */ +add(paths_, _origAdd, _internal) { + const {cwd, disableGlobbing} = this.options; + this.closed = false; + let paths = unifyPaths(paths_); + if (cwd) { + paths = paths.map((path) => { + const absPath = getAbsolutePath(path, cwd); + + // Check `path` instead of `absPath` because the cwd portion can't be a glob + if (disableGlobbing || !isGlob(path)) { + return absPath; + } + return normalizePath(absPath); + }); + } + + // set aside negated glob strings + paths = paths.filter((path) => { + if (path.startsWith(BANG)) { + this._ignoredPaths.add(path.slice(1)); + return false; + } + + // if a path is being added that was previously ignored, stop ignoring it + this._ignoredPaths.delete(path); + this._ignoredPaths.delete(path + SLASH_GLOBSTAR); + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + + return true; + }); + + if (this.options.useFsEvents && this._fsEventsHandler) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount *= 2; + paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + Promise.all( + paths.map(async path => { + const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); + if (res) this._emitReady(); + return res; + }) + ).then(results => { + if (this.closed) return; + results.filter(item => item).forEach(item => { + this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + }); + }); + } + + return this; +} + +/** + * Close watchers or start ignoring events from specified paths. + * @param {Path|Array} paths_ - string or array of strings, file/directory paths and/or globs + * @returns {FSWatcher} for chaining +*/ +unwatch(paths_) { + if (this.closed) return this; + const paths = unifyPaths(paths_); + const {cwd} = this.options; + + paths.forEach((path) => { + // convert to absolute path unless relative path already matches + if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { + if (cwd) path = sysPath.join(cwd, path); + path = sysPath.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths.add(path); + if (this._watched.has(path)) { + this._ignoredPaths.add(path + SLASH_GLOBSTAR); + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + }); + + return this; +} + +/** + * Close watchers and remove all listeners from watched paths. + * @returns {Promise}. +*/ +close() { + if (this.closed) return this._closePromise; + this.closed = true; + + // Memory management. + this.removeAllListeners(); + const closers = []; + this._closers.forEach(closerList => closerList.forEach(closer => { + const promise = closer(); + if (promise instanceof Promise) closers.push(promise); + })); + this._streams.forEach(stream => stream.destroy()); + this._userIgnored = undefined; + this._readyCount = 0; + this._readyEmitted = false; + this._watched.forEach(dirent => dirent.dispose()); + ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { + this[`_${key}`].clear(); + }); + + this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); + return this._closePromise; +} + +/** + * Expose list of watched paths + * @returns {Object} for chaining +*/ +getWatched() { + const watchList = {}; + this._watched.forEach((entry, dir) => { + const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || ONE_DOT] = entry.getChildren().sort(); + }); + return watchList; +} + +emitWithAll(event, args) { + this.emit(...args); + if (event !== EV_ERROR) this.emit(EV_ALL, ...args); +} + +// Common helpers +// -------------- + +/** + * Normalize and emit events. + * Calling _emit DOES NOT MEAN emit() would be called! + * @param {EventName} event Type of event + * @param {Path} path File or directory path + * @param {*=} val1 arguments to be passed with event + * @param {*=} val2 + * @param {*=} val3 + * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +async _emit(event, path, val1, val2, val3) { + if (this.closed) return; + + const opts = this.options; + if (isWindows) path = sysPath.normalize(path); + if (opts.cwd) path = sysPath.relative(opts.cwd, path); + /** @type Array */ + const args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + const awf = opts.awaitWriteFinish; + let pw; + if (awf && (pw = this._pendingWrites.get(path))) { + pw.lastChange = new Date(); + return this; + } + + if (opts.atomic) { + if (event === EV_UNLINK) { + this._pendingUnlinks.set(path, args); + setTimeout(() => { + this._pendingUnlinks.forEach((entry, path) => { + this.emit(...entry); + this.emit(EV_ALL, ...entry); + this._pendingUnlinks.delete(path); + }); + }, typeof opts.atomic === 'number' ? opts.atomic : 100); + return this; + } + if (event === EV_ADD && this._pendingUnlinks.has(path)) { + event = args[0] = EV_CHANGE; + this._pendingUnlinks.delete(path); + } + } + + if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) { + const awfEmit = (err, stats) => { + if (err) { + event = args[0] = EV_ERROR; + args[1] = err; + this.emitWithAll(event, args); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + this.emitWithAll(event, args); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); + return this; + } + + if (event === EV_CHANGE) { + const isThrottled = !this._throttle(EV_CHANGE, path, 50); + if (isThrottled) return this; + } + + if (opts.alwaysStat && val1 === undefined && + (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) + ) { + const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; + let stats; + try { + stats = await stat(fullPath); + } catch (err) {} + // Suppress event when fs_stat fails, to avoid sending undefined 'stat' + if (!stats || this.closed) return; + args.push(stats); + } + this.emitWithAll(event, args); + + return this; +} + +/** + * Common handler for errors + * @param {Error} error + * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +_handleError(error) { + const code = error && error.code; + if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && + (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) + ) { + this.emit(EV_ERROR, error); + } + return error || this.closed; +} + +/** + * Helper utility for throttling + * @param {ThrottleType} actionType type being throttled + * @param {Path} path being acted upon + * @param {Number} timeout duration of time to suppress duplicate actions + * @returns {Object|false} tracking object or false if action should be suppressed + */ +_throttle(actionType, path, timeout) { + if (!this._throttled.has(actionType)) { + this._throttled.set(actionType, new Map()); + } + + /** @type {Map} */ + const action = this._throttled.get(actionType); + /** @type {Object} */ + const actionPath = action.get(path); + + if (actionPath) { + actionPath.count++; + return false; + } + + let timeoutObject; + const clear = () => { + const item = action.get(path); + const count = item ? item.count : 0; + action.delete(path); + clearTimeout(timeoutObject); + if (item) clearTimeout(item.timeoutObject); + return count; + }; + timeoutObject = setTimeout(clear, timeout); + const thr = {timeoutObject, clear, count: 0}; + action.set(path, thr); + return thr; +} + +_incrReadyCount() { + return this._readyCount++; +} + +/** + * Awaits write operation to finish. + * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. + * @param {Path} path being acted upon + * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished + * @param {EventName} event + * @param {Function} awfEmit Callback to be called when ready for event to be emitted. + */ +_awaitWriteFinish(path, threshold, event, awfEmit) { + let timeoutHandler; + + let fullPath = path; + if (this.options.cwd && !sysPath.isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + const now = new Date(); + + const awaitWriteFinish = (prevStat) => { + fs.stat(fullPath, (err, curStat) => { + if (err || !this._pendingWrites.has(path)) { + if (err && err.code !== 'ENOENT') awfEmit(err); + return; + } + + const now = Number(new Date()); + + if (prevStat && curStat.size !== prevStat.size) { + this._pendingWrites.get(path).lastChange = now; + } + const pw = this._pendingWrites.get(path); + const df = now - pw.lastChange; + + if (df >= threshold) { + this._pendingWrites.delete(path); + awfEmit(undefined, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval, + curStat + ); + } + }); + }; + + if (!this._pendingWrites.has(path)) { + this._pendingWrites.set(path, { + lastChange: now, + cancelWait: () => { + this._pendingWrites.delete(path); + clearTimeout(timeoutHandler); + return event; + } + }); + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval + ); + } +} + +_getGlobIgnored() { + return [...this._ignoredPaths.values()]; +} + +/** + * Determines whether user has asked to ignore this path. + * @param {Path} path filepath or dir + * @param {fs.Stats=} stats result of fs.stat + * @returns {Boolean} + */ +_isIgnored(path, stats) { + if (this.options.atomic && DOT_RE.test(path)) return true; + if (!this._userIgnored) { + const {cwd} = this.options; + const ign = this.options.ignored; + + const ignored = ign && ign.map(normalizeIgnored(cwd)); + const paths = arrify(ignored) + .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) + .map((path) => path + SLASH_GLOBSTAR); + const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); + this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); + } + + return this._userIgnored([path, stats]); +} + +_isntIgnored(path, stat) { + return !this._isIgnored(path, stat); +} + +/** + * Provides a set of common helpers and properties relating to symlink and glob handling. + * @param {Path} path file, directory, or glob pattern being watched + * @param {Number=} depth at any depth > 0, this isn't a glob + * @returns {WatchHelper} object containing helpers for this path + */ +_getWatchHelpers(path, depth) { + const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); + const follow = this.options.followSymlinks; + + return new WatchHelper(path, watchPath, follow, this); +} + +// Directory helpers +// ----------------- + +/** + * Provides directory tracking objects + * @param {String} directory path of the directory + * @returns {DirEntry} the directory's tracking object + */ +_getWatchedDir(directory) { + if (!this._boundRemove) this._boundRemove = this._remove.bind(this); + const dir = sysPath.resolve(directory); + if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); + return this._watched.get(dir); +} + +// File helpers +// ------------ + +/** + * Check for read permissions. + * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 + * @param {fs.Stats} stats - object, result of fs_stat + * @returns {Boolean} indicates whether the file can be read +*/ +_hasReadPermissions(stats) { + if (this.options.ignorePermissionErrors) return true; + + // stats.mode may be bigint + const md = stats && Number.parseInt(stats.mode, 10); + const st = md & 0o777; + const it = Number.parseInt(st.toString(8)[0], 10); + return Boolean(4 & it); +} + +/** + * Handles emitting unlink events for + * files and directories, and via recursion, for + * files and directories within directories that are unlinked + * @param {String} directory within which the following item is located + * @param {String} item base path of item/directory + * @returns {void} +*/ +_remove(directory, item, isDirectory) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + const path = sysPath.join(directory, item); + const fullPath = sysPath.resolve(path); + isDirectory = isDirectory != null + ? isDirectory + : this._watched.has(path) || this._watched.has(fullPath); + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + const wp = this._getWatchedDir(path); + const nestedDirectoryChildren = wp.getChildren(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); + + // Check if item was on the watched list and remove it + const parent = this._getWatchedDir(directory); + const wasTracked = parent.has(item); + parent.remove(item); + + // Fixes issue #1042 -> Relative paths were detected and added as symlinks + // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612), + // but never removed from the map in case the path was deleted. + // This leads to an incorrect state if the path was recreated: + // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553 + if (this._symlinkPaths.has(fullPath)) { + this._symlinkPaths.delete(fullPath); + } + + // If we wait for this file to be fully written, cancel the wait. + let relPath = path; + if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); + if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { + const event = this._pendingWrites.get(relPath).cancelWait(); + if (event === EV_ADD) return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + this._watched.delete(path); + this._watched.delete(fullPath); + const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +} + +/** + * Closes all watchers for a path + * @param {Path} path + */ +_closePath(path) { + this._closeFile(path) + const dir = sysPath.dirname(path); + this._getWatchedDir(dir).remove(sysPath.basename(path)); +} + +/** + * Closes only file-specific watchers + * @param {Path} path + */ +_closeFile(path) { + const closers = this._closers.get(path); + if (!closers) return; + closers.forEach(closer => closer()); + this._closers.delete(path); +} + +/** + * + * @param {Path} path + * @param {Function} closer + */ +_addPathCloser(path, closer) { + if (!closer) return; + let list = this._closers.get(path); + if (!list) { + list = []; + this._closers.set(path, list); + } + list.push(closer); +} + +_readdirp(root, opts) { + if (this.closed) return; + const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; + let stream = readdirp(root, options); + this._streams.add(stream); + stream.once(STR_CLOSE, () => { + stream = undefined; + }); + stream.once(STR_END, () => { + if (stream) { + this._streams.delete(stream); + stream = undefined; + } + }); + return stream; +} + +} + +// Export FSWatcher class +exports.FSWatcher = FSWatcher; + +/** + * Instantiates watcher with paths to be tracked. + * @param {String|Array} paths file/directory paths and/or globs + * @param {Object=} options chokidar opts + * @returns an instance of FSWatcher for chaining. + */ +const watch = (paths, options) => { + const watcher = new FSWatcher(options); + watcher.add(paths); + return watcher; +}; + +exports.watch = watch; diff --git a/node_modules/sass/node_modules/chokidar/lib/constants.js b/node_modules/sass/node_modules/chokidar/lib/constants.js new file mode 100644 index 0000000..1454f85 --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/lib/constants.js @@ -0,0 +1,65 @@ +'use strict'; + +const {sep} = require('path'); +const {platform} = process; +const os = require('os'); + +exports.EV_ALL = 'all'; +exports.EV_READY = 'ready'; +exports.EV_ADD = 'add'; +exports.EV_CHANGE = 'change'; +exports.EV_ADD_DIR = 'addDir'; +exports.EV_UNLINK = 'unlink'; +exports.EV_UNLINK_DIR = 'unlinkDir'; +exports.EV_RAW = 'raw'; +exports.EV_ERROR = 'error'; + +exports.STR_DATA = 'data'; +exports.STR_END = 'end'; +exports.STR_CLOSE = 'close'; + +exports.FSEVENT_CREATED = 'created'; +exports.FSEVENT_MODIFIED = 'modified'; +exports.FSEVENT_DELETED = 'deleted'; +exports.FSEVENT_MOVED = 'moved'; +exports.FSEVENT_CLONED = 'cloned'; +exports.FSEVENT_UNKNOWN = 'unknown'; +exports.FSEVENT_TYPE_FILE = 'file'; +exports.FSEVENT_TYPE_DIRECTORY = 'directory'; +exports.FSEVENT_TYPE_SYMLINK = 'symlink'; + +exports.KEY_LISTENERS = 'listeners'; +exports.KEY_ERR = 'errHandlers'; +exports.KEY_RAW = 'rawEmitters'; +exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW]; + +exports.DOT_SLASH = `.${sep}`; + +exports.BACK_SLASH_RE = /\\/g; +exports.DOUBLE_SLASH_RE = /\/\//; +exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/; +exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; +exports.REPLACER_RE = /^\.[/\\]/; + +exports.SLASH = '/'; +exports.SLASH_SLASH = '//'; +exports.BRACE_START = '{'; +exports.BANG = '!'; +exports.ONE_DOT = '.'; +exports.TWO_DOTS = '..'; +exports.STAR = '*'; +exports.GLOBSTAR = '**'; +exports.ROOT_GLOBSTAR = '/**/*'; +exports.SLASH_GLOBSTAR = '/**'; +exports.DIR_SUFFIX = 'Dir'; +exports.ANYMATCH_OPTS = {dot: true}; +exports.STRING_TYPE = 'string'; +exports.FUNCTION_TYPE = 'function'; +exports.EMPTY_STR = ''; +exports.EMPTY_FN = () => {}; +exports.IDENTITY_FN = val => val; + +exports.isWindows = platform === 'win32'; +exports.isMacos = platform === 'darwin'; +exports.isLinux = platform === 'linux'; +exports.isIBMi = os.type() === 'OS400'; diff --git a/node_modules/sass/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/sass/node_modules/chokidar/lib/fsevents-handler.js new file mode 100644 index 0000000..0f7f2cb --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/lib/fsevents-handler.js @@ -0,0 +1,524 @@ +'use strict'; + +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); + +let fsevents; +try { + fsevents = require('fsevents'); +} catch (error) { + if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); +} + +if (fsevents) { + // TODO: real check + const mtch = process.version.match(/v(\d+)\.(\d+)/); + if (mtch && mtch[1] && mtch[2]) { + const maj = Number.parseInt(mtch[1], 10); + const min = Number.parseInt(mtch[2], 10); + if (maj === 8 && min < 16) { + fsevents = undefined; + } + } +} + +const { + EV_ADD, + EV_CHANGE, + EV_ADD_DIR, + EV_UNLINK, + EV_ERROR, + STR_DATA, + STR_END, + FSEVENT_CREATED, + FSEVENT_MODIFIED, + FSEVENT_DELETED, + FSEVENT_MOVED, + // FSEVENT_CLONED, + FSEVENT_UNKNOWN, + FSEVENT_TYPE_FILE, + FSEVENT_TYPE_DIRECTORY, + FSEVENT_TYPE_SYMLINK, + + ROOT_GLOBSTAR, + DIR_SUFFIX, + DOT_SLASH, + FUNCTION_TYPE, + EMPTY_FN, + IDENTITY_FN +} = require('./constants'); + +const Depth = (value) => isNaN(value) ? {} : {depth: value}; + +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +const statMethods = { stat, lstat }; + +/** + * @typedef {String} Path + */ + +/** + * @typedef {Object} FsEventsWatchContainer + * @property {Set} listeners + * @property {Function} rawEmitter + * @property {{stop: Function}} watcher + */ + +// fsevents instance helper functions +/** + * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) + * @type {Map} + */ +const FSEventsWatchers = new Map(); + +// Threshold of duplicate path prefixes at which to start +// consolidating going forward +const consolidateThreshhold = 10; + +const wrongEventFlags = new Set([ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 +]); + +/** + * Instantiates the fsevents interface + * @param {Path} path path to be watched + * @param {Function} callback called when fsevents is bound and ready + * @returns {{stop: Function}} new fsevents instance + */ +const createFSEventsInstance = (path, callback) => { + const stop = fsevents.watch(path, callback); + return {stop}; +}; + +/** + * Instantiates the fsevents interface or binds listeners to an existing one covering + * the same file tree. + * @param {Path} path - to be watched + * @param {Path} realPath - real path for symlinks + * @param {Function} listener - called when fsevents emits events + * @param {Function} rawEmitter - passes data to listeners of the 'raw' event + * @returns {Function} closer + */ +function setFSEventsListener(path, realPath, listener, rawEmitter) { + let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath; + + const parentPath = sysPath.dirname(watchPath); + let cont = FSEventsWatchers.get(watchPath); + + // If we've accumulated a substantial number of paths that + // could have been consolidated by watching one directory + // above the current one, create a watcher on the parent + // path instead, so that we do consolidate going forward. + if (couldConsolidate(parentPath)) { + watchPath = parentPath; + } + + const resolvedPath = sysPath.resolve(path); + const hasSymlink = resolvedPath !== realPath; + + const filteredListener = (fullPath, flags, info) => { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + sysPath.sep) + ) listener(fullPath, flags, info); + }; + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + let watchedParent = false; + for (const watchedPath of FSEventsWatchers.keys()) { + if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) { + watchPath = watchedPath; + cont = FSEventsWatchers.get(watchPath); + watchedParent = true; + break; + } + } + + if (cont || watchedParent) { + cont.listeners.add(filteredListener); + } else { + cont = { + listeners: new Set([filteredListener]), + rawEmitter, + watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { + if (!cont.listeners.size) return; + const info = fsevents.getInfo(fullPath, flags); + cont.listeners.forEach(list => { + list(fullPath, flags, info); + }); + + cont.rawEmitter(info.event, fullPath, info); + }) + }; + FSEventsWatchers.set(watchPath, cont); + } + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return () => { + const lst = cont.listeners; + + lst.delete(filteredListener); + if (!lst.size) { + FSEventsWatchers.delete(watchPath); + if (cont.watcher) return cont.watcher.stop().then(() => { + cont.rawEmitter = cont.watcher = undefined; + Object.freeze(cont); + }); + } + }; +} + +// Decide whether or not we should start a new higher-level +// parent watcher +const couldConsolidate = (path) => { + let count = 0; + for (const watchPath of FSEventsWatchers.keys()) { + if (watchPath.indexOf(path) === 0) { + count++; + if (count >= consolidateThreshhold) { + return true; + } + } + } + + return false; +}; + +// returns boolean indicating whether fsevents can be used +const canUse = () => fsevents && FSEventsWatchers.size < 128; + +// determines subdirectory traversal levels from root to path +const calcDepth = (path, root) => { + let i = 0; + while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; + return i; +}; + +// returns boolean indicating whether the fsevents' event info has the same type +// as the one returned by fs.stat +const sameTypes = (info, stats) => ( + info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || + info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || + info.type === FSEVENT_TYPE_FILE && stats.isFile() +) + +/** + * @mixin + */ +class FsEventsHandler { + +/** + * @param {import('../index').FSWatcher} fsw + */ +constructor(fsw) { + this.fsw = fsw; +} +checkIgnored(path, stats) { + const ipaths = this.fsw._ignoredPaths; + if (this.fsw._isIgnored(path, stats)) { + ipaths.add(path); + if (stats && stats.isDirectory()) { + ipaths.add(path + ROOT_GLOBSTAR); + } + return true; + } + + ipaths.delete(path); + ipaths.delete(path + ROOT_GLOBSTAR); +} + +addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD; + this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); +} + +async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + try { + const stats = await stat(path) + if (this.fsw.closed) return; + if (sameTypes(info, stats)) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } catch (error) { + if (error.code === 'EACCES') { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } +} + +handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { + if (this.fsw.closed || this.checkIgnored(path)) return; + + if (event === EV_UNLINK) { + const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY + // suppress unlink events on never before seen files + if (isDirectory || watchedDir.has(item)) { + this.fsw._remove(parent, item, isDirectory); + } + } else { + if (event === EV_ADD) { + // track new directories + if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); + + if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { + // push symlinks back to the top of the stack to get handled + const curDepth = opts.depth === undefined ? + undefined : calcDepth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } + + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this.fsw._getWatchedDir(parent).add(item); + } + /** + * @type {'add'|'addDir'|'unlink'|'unlinkDir'} + */ + const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; + this.fsw._emit(eventName, path); + if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true); + } +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} watchPath - file/dir path to be watched with fsevents + * @param {String} realPath - real path (in case of symlinks) + * @param {Function} transform - path transformer + * @param {Function} globFilter - path filter in case a glob pattern was provided + * @returns {Function} closer for the watcher instance +*/ +_watchWithFsEvents(watchPath, realPath, transform, globFilter) { + if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return; + const opts = this.fsw.options; + const watchCallback = async (fullPath, flags, info) => { + if (this.fsw.closed) return; + if ( + opts.depth !== undefined && + calcDepth(fullPath, realPath) > opts.depth + ) return; + const path = transform(sysPath.join( + watchPath, sysPath.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + const parent = sysPath.dirname(path); + const item = sysPath.basename(path); + const watchedDir = this.fsw._getWatchedDir( + info.type === FSEVENT_TYPE_DIRECTORY ? path : parent + ); + + // correct for wrong events emitted + if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { + if (typeof opts.ignored === FUNCTION_TYPE) { + let stats; + try { + stats = await stat(path); + } catch (error) {} + if (this.fsw.closed) return; + if (this.checkIgnored(path, stats)) return; + if (sameTypes(info, stats)) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + switch (info.event) { + case FSEVENT_CREATED: + case FSEVENT_MODIFIED: + return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + case FSEVENT_DELETED: + case FSEVENT_MOVED: + return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } + }; + + const closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.fsw._emitRaw + ); + + this.fsw._emitReady(); + return closer; +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} linkPath path to symlink + * @param {String} fullPath absolute path to the symlink + * @param {Function} transform pre-existing path transformer + * @param {Number} curDepth level of subdirectories traversed to where symlink is + * @returns {Promise} + */ +async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; + + this.fsw._symlinkPaths.set(fullPath, true); + this.fsw._incrReadyCount(); + + try { + const linkTarget = await realpath(linkPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(linkTarget)) { + return this.fsw._emitReady(); + } + + this.fsw._incrReadyCount(); + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, (path) => { + let aliasedPath = linkPath; + if (linkTarget && linkTarget !== DOT_SLASH) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== DOT_SLASH) { + aliasedPath = sysPath.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + } catch(error) { + if (this.fsw._handleError(error)) { + return this.fsw._emitReady(); + } + } +} + +/** + * + * @param {Path} newPath + * @param {fs.Stats} stats + */ +emitAdd(newPath, stats, processPath, opts, forceAdd) { + const pp = processPath(newPath); + const isDir = stats.isDirectory(); + const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp)); + const base = sysPath.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this.fsw._getWatchedDir(pp); + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!opts.ignoreInitial || forceAdd === true) { + this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats); + } +} + +initWatch(realPath, path, wh, processPath) { + if (this.fsw.closed) return; + const closer = this._watchWithFsEvents( + wh.watchPath, + sysPath.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + this.fsw._addPathCloser(path, closer); +} + +/** + * Handle added path with fsevents + * @param {String} path file/dir path or glob pattern + * @param {Function|Boolean=} transform converts working path to what the user expects + * @param {Boolean=} forceAdd ensure add is emitted + * @param {Number=} priorDepth Level of subdirectories already traversed. + * @returns {Promise} + */ +async _addToFsEvents(path, transform, forceAdd, priorDepth) { + if (this.fsw.closed) { + return; + } + const opts = this.fsw.options; + const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; + + const wh = this.fsw._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + throw null; + } + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > opts.depth) return; + + // scan the contents of the dir + this.fsw._readdirp(wh.watchPath, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + ...Depth(opts.depth - (priorDepth || 0)) + }).on(STR_DATA, (entry) => { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (this.fsw.closed) { + return; + } + if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; + + const joinedPath = sysPath.join(wh.watchPath, entry.path); + const {fullPath} = entry; + + if (wh.followSymlinks && entry.stats.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + const curDepth = opts.depth === undefined ? + undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; + + this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); + } + }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => { + this.fsw._emitReady(); + }); + } else { + this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); + this.fsw._emitReady(); + } + } catch (error) { + if (!error || this.fsw._handleError(error)) { + // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- + this.fsw._emitReady(); + this.fsw._emitReady(); + } + } + + if (opts.persistent && forceAdd !== true) { + if (typeof transform === FUNCTION_TYPE) { + // realpath has already been resolved + this.initWatch(undefined, path, wh, processPath); + } else { + let realPath; + try { + realPath = await realpath(wh.watchPath); + } catch (e) {} + this.initWatch(realPath, path, wh, processPath); + } + } +} + +} + +module.exports = FsEventsHandler; +module.exports.canUse = canUse; diff --git a/node_modules/sass/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/sass/node_modules/chokidar/lib/nodefs-handler.js new file mode 100644 index 0000000..199cfe9 --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/lib/nodefs-handler.js @@ -0,0 +1,654 @@ +'use strict'; + +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); +const isBinaryPath = require('is-binary-path'); +const { + isWindows, + isLinux, + EMPTY_FN, + EMPTY_STR, + KEY_LISTENERS, + KEY_ERR, + KEY_RAW, + HANDLER_KEYS, + EV_CHANGE, + EV_ADD, + EV_ADD_DIR, + EV_ERROR, + STR_DATA, + STR_END, + BRACE_START, + STAR +} = require('./constants'); + +const THROTTLE_MODE_WATCH = 'watch'; + +const open = promisify(fs.open); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const close = promisify(fs.close); +const fsrealpath = promisify(fs.realpath); + +const statMethods = { lstat, stat }; + +// TODO: emit errors properly. Example: EMFILE on Macos. +const foreach = (val, fn) => { + if (val instanceof Set) { + val.forEach(fn); + } else { + fn(val); + } +}; + +const addAndConvert = (main, prop, item) => { + let container = main[prop]; + if (!(container instanceof Set)) { + main[prop] = container = new Set([container]); + } + container.add(item); +}; + +const clearItem = cont => key => { + const set = cont[key]; + if (set instanceof Set) { + set.clear(); + } else { + delete cont[key]; + } +}; + +const delFromSet = (main, prop, item) => { + const container = main[prop]; + if (container instanceof Set) { + container.delete(item); + } else if (container === item) { + delete main[prop]; + } +}; + +const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; + +/** + * @typedef {String} Path + */ + +// fs_watch helpers + +// object to hold per-process fs_watch instances +// (may be shared across chokidar FSWatcher instances) + +/** + * @typedef {Object} FsWatchContainer + * @property {Set} listeners + * @property {Set} errHandlers + * @property {Set} rawEmitters + * @property {fs.FSWatcher=} watcher + * @property {Boolean=} watcherUnusable + */ + +/** + * @type {Map} + */ +const FsWatchInstances = new Map(); + +/** + * Instantiates the fs_watch interface + * @param {String} path to be watched + * @param {Object} options to be passed to fs_watch + * @param {Function} listener main event handler + * @param {Function} errHandler emits info about errors + * @param {Function} emitRaw emits raw event data + * @returns {fs.FSWatcher} new fsevents instance + */ +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + const handleEvent = (rawEvent, evPath) => { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occurring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath) + ); + } + }; + try { + return fs.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +/** + * Helper for passing fs_watch event data to a collection of listeners + * @param {Path} fullPath absolute path bound to fs_watch instance + * @param {String} type listener type + * @param {*=} val1 arguments to be passed to listeners + * @param {*=} val2 + * @param {*=} val3 + */ +const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { + const cont = FsWatchInstances.get(fullPath); + if (!cont) return; + foreach(cont[type], (listener) => { + listener(val1, val2, val3); + }); +}; + +/** + * Instantiates the fs_watch interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path + * @param {String} fullPath absolute path + * @param {Object} options to be passed to fs_watch + * @param {Object} handlers container for event listener functions + */ +const setFsWatchListener = (path, fullPath, options, handlers) => { + const {listener, errHandler, rawEmitter} = handlers; + let cont = FsWatchInstances.get(fullPath); + + /** @type {fs.FSWatcher=} */ + let watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_ERR, errHandler); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, KEY_RAW) + ); + if (!watcher) return; + watcher.on(EV_ERROR, async (error) => { + const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); + cont.watcherUnusable = true; // documented since Node 10.4.1 + // Workaround for https://github.com/joyent/node/issues/4337 + if (isWindows && error.code === 'EPERM') { + try { + const fd = await open(path, 'r'); + await close(fd); + broadcastErr(error); + } catch (err) {} + } else { + broadcastErr(error); + } + }); + cont = { + listeners: listener, + errHandlers: errHandler, + rawEmitters: rawEmitter, + watcher + }; + FsWatchInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // removes this instance's listeners and closes the underlying fs_watch + // instance if there are no more listeners left + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_ERR, errHandler); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + // Check to protect against issue gh-730. + // if (cont.watcherUnusable) { + cont.watcher.close(); + // } + FsWatchInstances.delete(fullPath); + HANDLER_KEYS.forEach(clearItem(cont)); + cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +// fs_watchFile helpers + +// object to hold per-process fs_watchFile instances +// (may be shared across chokidar FSWatcher instances) +const FsWatchFileInstances = new Map(); + +/** + * Instantiates the fs_watchFile interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path to be watched + * @param {String} fullPath absolute path + * @param {Object} options options to be passed to fs_watchFile + * @param {Object} handlers container for event listener functions + * @returns {Function} closer + */ +const setFsWatchFileListener = (path, fullPath, options, handlers) => { + const {listener, rawEmitter} = handlers; + let cont = FsWatchFileInstances.get(fullPath); + + /* eslint-disable no-unused-vars, prefer-destructuring */ + let listeners = new Set(); + let rawEmitters = new Set(); + + const copts = cont && cont.options; + if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = cont.listeners; + rawEmitters = cont.rawEmitters; + fs.unwatchFile(fullPath); + cont = undefined; + } + + /* eslint-enable no-unused-vars, prefer-destructuring */ + + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + // TODO + // listeners.add(listener); + // rawEmitters.add(rawEmitter); + cont = { + listeners: listener, + rawEmitters: rawEmitter, + options, + watcher: fs.watchFile(fullPath, options, (curr, prev) => { + foreach(cont.rawEmitters, (rawEmitter) => { + rawEmitter(EV_CHANGE, fullPath, {curr, prev}); + }); + const currmtime = curr.mtimeMs; + if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { + foreach(cont.listeners, (listener) => listener(path, curr)); + } + }) + }; + FsWatchFileInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // Removes this instance's listeners and closes the underlying fs_watchFile + // instance if there are no more listeners left. + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + FsWatchFileInstances.delete(fullPath); + fs.unwatchFile(fullPath); + cont.options = cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +/** + * @mixin + */ +class NodeFsHandler { + +/** + * @param {import("../index").FSWatcher} fsW + */ +constructor(fsW) { + this.fsw = fsW; + this._boundHandleError = (error) => fsW._handleError(error); +} + +/** + * Watch file for changes with fs_watchFile or fs_watch. + * @param {String} path to file or dir + * @param {Function} listener on fs change + * @returns {Function} closer for the watcher instance + */ +_watchWithNodeFs(path, listener) { + const opts = this.fsw.options; + const directory = sysPath.dirname(path); + const basename = sysPath.basename(path); + const parent = this.fsw._getWatchedDir(directory); + parent.add(basename); + const absolutePath = sysPath.resolve(path); + const options = {persistent: opts.persistent}; + if (!listener) listener = EMPTY_FN; + + let closer; + if (opts.usePolling) { + options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? + opts.binaryInterval : opts.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener, + rawEmitter: this.fsw._emitRaw + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener, + errHandler: this._boundHandleError, + rawEmitter: this.fsw._emitRaw + }); + } + return closer; +} + +/** + * Watch a file and emit add event if warranted. + * @param {Path} file Path + * @param {fs.Stats} stats result of fs_stat + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @returns {Function} closer for the watcher instance + */ +_handleFile(file, stats, initialAdd) { + if (this.fsw.closed) { + return; + } + const dirname = sysPath.dirname(file); + const basename = sysPath.basename(file); + const parent = this.fsw._getWatchedDir(dirname); + // stats is always present + let prevStats = stats; + + // if the file is already being watched, do nothing + if (parent.has(basename)) return; + + const listener = async (path, newStats) => { + if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; + if (!newStats || newStats.mtimeMs === 0) { + try { + const newStats = await stat(file); + if (this.fsw.closed) return; + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + if (isLinux && prevStats.ino !== newStats.ino) { + this.fsw._closeFile(path) + prevStats = newStats; + this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener)); + } else { + prevStats = newStats; + } + } catch (error) { + // Fix issues where mtime is null but file is still present + this.fsw._remove(dirname, basename); + } + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } + } + // kick off the watcher + const closer = this._watchWithNodeFs(file, listener); + + // emit an add event if we're supposed to + if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { + if (!this.fsw._throttle(EV_ADD, file, 0)) return; + this.fsw._emit(EV_ADD, file, stats); + } + + return closer; +} + +/** + * Handle symlinks encountered while reading a dir. + * @param {Object} entry returned by readdirp + * @param {String} directory path of dir being read + * @param {String} path of this item + * @param {String} item basename of this item + * @returns {Promise} true if no more processing is needed for this entry. + */ +async _handleSymlink(entry, directory, path, item) { + if (this.fsw.closed) { + return; + } + const full = entry.fullPath; + const dir = this.fsw._getWatchedDir(directory); + + if (!this.fsw.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this.fsw._incrReadyCount(); + + let linkPath; + try { + linkPath = await fsrealpath(path); + } catch (e) { + this.fsw._emitReady(); + return true; + } + + if (this.fsw.closed) return; + if (dir.has(item)) { + if (this.fsw._symlinkPaths.get(full) !== linkPath) { + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_CHANGE, path, entry.stats); + } + } else { + dir.add(item); + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_ADD, path, entry.stats); + } + this.fsw._emitReady(); + return true; + } + + // don't follow the same symlink more than once + if (this.fsw._symlinkPaths.has(full)) { + return true; + } + + this.fsw._symlinkPaths.set(full, true); +} + +_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { + // Normalize the directory name on Windows + directory = sysPath.join(directory, EMPTY_STR); + + if (!wh.hasGlob) { + throttler = this.fsw._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + const previous = this.fsw._getWatchedDir(wh.path); + const current = new Set(); + + let stream = this.fsw._readdirp(directory, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + depth: 0 + }).on(STR_DATA, async (entry) => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const item = entry.path; + let path = sysPath.join(directory, item); + current.add(item); + + if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { + return; + } + + if (this.fsw.closed) { + stream = undefined; + return; + } + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this.fsw._incrReadyCount(); + + // ensure relativeness of path is preserved in case of watcher reuse + path = sysPath.join(dir, sysPath.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }).on(EV_ERROR, this._boundHandleError); + + return new Promise(resolve => + stream.once(STR_END, () => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const wasThrottled = throttler ? throttler.clear() : false; + + resolve(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.getChildren().filter((item) => { + return item !== directory && + !current.has(item) && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: sysPath.resolve(directory, item) + })); + }).forEach((item) => { + this.fsw._remove(directory, item); + }); + + stream = undefined; + + // one more time for any missed in case changes came in extremely quickly + if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); + }) + ); +} + +/** + * Read directory to add / remove files from `@watched` list and re-read it on change. + * @param {String} dir fs path + * @param {fs.Stats} stats + * @param {Boolean} initialAdd + * @param {Number} depth relative to user-supplied path + * @param {String} target child path targeted for watch + * @param {Object} wh Common watch helpers for this path + * @param {String} realpath + * @returns {Promise} closer for the watcher instance. + */ +async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { + const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); + const tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); + this.fsw._getWatchedDir(dir); + let throttler; + let closer; + + const oDepth = this.fsw.options.depth; + if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { + if (!target) { + await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); + if (this.fsw.closed) return; + } + + closer = this._watchWithNodeFs(dir, (dirPath, stats) => { + // if current directory is removed, do nothing + if (stats && stats.mtimeMs === 0) return; + + this._handleRead(dirPath, false, wh, target, dir, depth, throttler); + }); + } + return closer; +} + +/** + * Handle added file, directory, or glob pattern. + * Delegates call to _handleFile / _handleDir after checks. + * @param {String} path to file or ir + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @param {Object} priorWh depth relative to user-supplied path + * @param {Number} depth Child path actually targeted for watch + * @param {String=} target Child path actually targeted for watch + * @returns {Promise} + */ +async _addToNodeFs(path, initialAdd, priorWh, depth, target) { + const ready = this.fsw._emitReady; + if (this.fsw._isIgnored(path) || this.fsw.closed) { + ready(); + return false; + } + + const wh = this.fsw._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = entry => priorWh.filterPath(entry); + wh.filterDir = entry => priorWh.filterDir(entry); + } + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + ready(); + return false; + } + + const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); + let closer; + if (stats.isDirectory()) { + const absPath = sysPath.resolve(path); + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); + if (this.fsw.closed) return; + // preserve this symlink's target path + if (absPath !== targetPath && targetPath !== undefined) { + this.fsw._symlinkPaths.set(absPath, targetPath); + } + } else if (stats.isSymbolicLink()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + const parent = sysPath.dirname(wh.watchPath); + this.fsw._getWatchedDir(parent).add(wh.watchPath); + this.fsw._emit(EV_ADD, wh.watchPath, stats); + closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); + if (this.fsw.closed) return; + + // preserve this symlink's target path + if (targetPath !== undefined) { + this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); + } + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd); + } + ready(); + + this.fsw._addPathCloser(path, closer); + return false; + + } catch (error) { + if (this.fsw._handleError(error)) { + ready(); + return path; + } + } +} + +} + +module.exports = NodeFsHandler; diff --git a/node_modules/sass/node_modules/chokidar/package.json b/node_modules/sass/node_modules/chokidar/package.json new file mode 100644 index 0000000..6c3cd27 --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/package.json @@ -0,0 +1,85 @@ +{ + "name": "chokidar", + "description": "Minimal and efficient cross-platform file watching library", + "version": "3.5.3", + "homepage": "https://github.com/paulmillr/chokidar", + "author": "Paul Miller (https://paulmillr.com)", + "contributors": [ + "Paul Miller (https://paulmillr.com)", + "Elan Shanker" + ], + "engines": { + "node": ">= 8.10.0" + }, + "main": "index.js", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "devDependencies": { + "@types/node": "^14", + "chai": "^4.3", + "dtslint": "^3.3.0", + "eslint": "^7.0.0", + "mocha": "^7.0.0", + "nyc": "^15.0.0", + "rimraf": "^3.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.3.0", + "typescript": "~4.4.3", + "upath": "^1.2.0" + }, + "files": [ + "index.js", + "lib/*.js", + "types/index.d.ts" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/paulmillr/chokidar.git" + }, + "bugs": { + "url": "https://github.com/paulmillr/chokidar/issues" + }, + "license": "MIT", + "scripts": { + "dtslint": "dtslint types", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --exit --timeout 90000", + "test": "npm run lint && npm run mocha" + }, + "keywords": [ + "fs", + "watch", + "watchFile", + "watcher", + "watching", + "file", + "fsevents" + ], + "types": "./types/index.d.ts", + "nyc": { + "include": [ + "index.js", + "lib/*.js" + ], + "reporter": [ + "html", + "text" + ] + }, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] +} diff --git a/node_modules/sass/node_modules/chokidar/types/index.d.ts b/node_modules/sass/node_modules/chokidar/types/index.d.ts new file mode 100644 index 0000000..aab8e33 --- /dev/null +++ b/node_modules/sass/node_modules/chokidar/types/index.d.ts @@ -0,0 +1,188 @@ +// TypeScript Version: 3.0 + +/// + +import * as fs from "fs"; +import { EventEmitter } from "events"; +import { Matcher } from 'anymatch'; + +export class FSWatcher extends EventEmitter implements fs.FSWatcher { + options: WatchOptions; + + /** + * Constructs a new FSWatcher instance with optional WatchOptions parameter. + */ + constructor(options?: WatchOptions); + + /** + * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one + * string. + */ + add(paths: string | ReadonlyArray): this; + + /** + * Stop watching files, directories, or glob patterns. Takes an array of strings or just one + * string. + */ + unwatch(paths: string | ReadonlyArray): this; + + /** + * Returns an object representing all the paths on the file system being watched by this + * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless + * the `cwd` option was used), and the values are arrays of the names of the items contained in + * each directory. + */ + getWatched(): { + [directory: string]: string[]; + }; + + /** + * Removes all listeners from watched files. + */ + close(): Promise; + + on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this; + + on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this; + + /** + * Error occurred + */ + on(event: 'error', listener: (error: Error) => void): this; + + /** + * Exposes the native Node `fs.FSWatcher events` + */ + on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this; + + /** + * Fires when the initial scan is complete + */ + on(event: 'ready', listener: () => void): this; + + on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; +} + +export interface WatchOptions { + /** + * Indicates whether the process should continue to run as long as files are being watched. If + * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, + * even if the process continues to run. + */ + persistent?: boolean; + + /** + * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to + * be ignored. The whole relative or absolute path is tested, not just filename. If a function + * with two arguments is provided, it gets called twice per path - once with a single argument + * (the path), second time with two arguments (the path and the + * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). + */ + ignored?: Matcher; + + /** + * If set to `false` then `add`/`addDir` events are also emitted for matching paths while + * instantiating the watching as chokidar discovers these file paths (before the `ready` event). + */ + ignoreInitial?: boolean; + + /** + * When `false`, only the symlinks themselves will be watched for changes instead of following + * the link references and bubbling events through the link's path. + */ + followSymlinks?: boolean; + + /** + * The base directory from which watch `paths` are to be derived. Paths emitted with events will + * be relative to this. + */ + cwd?: string; + + /** + * If set to true then the strings passed to .watch() and .add() are treated as literal path + * names, even if they look like globs. Default: false. + */ + disableGlobbing?: boolean; + + /** + * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU + * utilization, consider setting this to `false`. It is typically necessary to **set this to + * `true` to successfully watch files over a network**, and it may be necessary to successfully + * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides + * the `useFsEvents` default. + */ + usePolling?: boolean; + + /** + * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * OS X, `usePolling: true` becomes the default. + */ + useFsEvents?: boolean; + + /** + * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that + * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is + * provided even in cases where it wasn't already available from the underlying watch events. + */ + alwaysStat?: boolean; + + /** + * If set, limits how many levels of subdirectories will be traversed. + */ + depth?: number; + + /** + * Interval of file system polling. + */ + interval?: number; + + /** + * Interval of file system polling for binary files. ([see list of binary extensions](https://gi + * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) + */ + binaryInterval?: number; + + /** + * Indicates whether to watch files that don't have read permissions if possible. If watching + * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed + * silently. + */ + ignorePermissionErrors?: boolean; + + /** + * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * that occur when using editors that use "atomic writes" instead of writing directly to the + * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` + * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, + * you can override it by setting `atomic` to a custom value, in milliseconds. + */ + atomic?: boolean | number; + + /** + * can be set to an object in order to adjust timing params: + */ + awaitWriteFinish?: AwaitWriteFinishOptions | boolean; +} + +export interface AwaitWriteFinishOptions { + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number; + + /** + * File size polling interval. + */ + pollInterval?: number; +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch( + paths: string | ReadonlyArray, + options?: WatchOptions +): FSWatcher; diff --git a/node_modules/sass/node_modules/fill-range/LICENSE b/node_modules/sass/node_modules/fill-range/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/sass/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/fill-range/README.md b/node_modules/sass/node_modules/fill-range/README.md new file mode 100644 index 0000000..8d756fe --- /dev/null +++ b/node_modules/sass/node_modules/fill-range/README.md @@ -0,0 +1,237 @@ +# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fill-range +``` + +## Usage + +Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. + +```js +const fill = require('fill-range'); +// fill(from, to[, step, options]); + +console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] +console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10 +``` + +**Params** + +* `from`: **{String|Number}** the number or letter to start with +* `to`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. +* `options`: **{Object|Function}**: See all available [options](#options) + +## Examples + +By default, an array of values is returned. + +**Alphabetical ranges** + +```js +console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] +console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] +``` + +**Numerical ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] +``` + +**Negative ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] +console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] +``` + +**Steps (increments)** + +```js +// numerical ranges with increments +console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] +console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] +console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] + +// alphabetical ranges with increments +console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] +``` + +## Options + +### options.step + +**Type**: `number` (formatted as a string or number) + +**Default**: `undefined` + +**Description**: The increment to use for the range. Can be used with letters or numbers. + +**Example(s)** + +```js +// numbers +console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] +console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] +console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] + +// letters +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] +console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] +``` + +### options.strictRanges + +**Type**: `boolean` + +**Default**: `false` + +**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. + +**Example(s)** + +The following are all invalid: + +```js +fill('1.1', '2'); // decimals not supported in ranges +fill('a', '2'); // incompatible range values +fill(1, 10, 'foo'); // invalid "step" argument +``` + +### options.stringify + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Cast all returned values to strings. By default, integers are returned as numbers. + +**Example(s)** + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ] +``` + +### options.toRegex + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Create a regex-compatible source string, instead of expanding values to an array. + +**Example(s)** + +```js +// alphabetical range +console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]' +// alphabetical with step +console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y' +// numerical range +console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100' +// numerical range with zero padding +console.log(fill('000001', '100000', { toRegex: true })); +//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' +``` + +### options.transform + +**Type**: `function` + +**Default**: `undefined` + +**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. + +**Example(s)** + +```js +// add zero padding +console.log(fill(1, 5, value => String(value).padStart(4, '0'))); +//=> ['0001', '0002', '0003', '0004', '0005'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 116 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [paulmillr](https://github.com/paulmillr) | +| 2 | [realityking](https://github.com/realityking) | +| 2 | [bluelovers](https://github.com/bluelovers) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/sass/node_modules/fill-range/index.js b/node_modules/sass/node_modules/fill-range/index.js new file mode 100644 index 0000000..97ce35a --- /dev/null +++ b/node_modules/sass/node_modules/fill-range/index.js @@ -0,0 +1,249 @@ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +const util = require('util'); +const toRegexRange = require('to-regex-range'); + +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); + +const transform = toNumber => { + return value => toNumber === true ? Number(value) : String(value); +}; + +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +module.exports = fill; diff --git a/node_modules/sass/node_modules/fill-range/package.json b/node_modules/sass/node_modules/fill-range/package.json new file mode 100644 index 0000000..07d3076 --- /dev/null +++ b/node_modules/sass/node_modules/fill-range/package.json @@ -0,0 +1,69 @@ +{ + "name": "fill-range", + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", + "version": "7.0.1", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Edo Rivai (edo.rivai.nl)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)", + "Rouven Weßling (www.rouvenwessling.de)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "devDependencies": { + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/sass/node_modules/glob-parent/CHANGELOG.md b/node_modules/sass/node_modules/glob-parent/CHANGELOG.md new file mode 100644 index 0000000..fb9de96 --- /dev/null +++ b/node_modules/sass/node_modules/glob-parent/CHANGELOG.md @@ -0,0 +1,110 @@ +### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06) + + +### Bug Fixes + +* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366)) + +### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27) + + +### Bug Fixes + +* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb)) + +## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27) + + +### Features + +* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3)) + +## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* Drop support for node <6 & bump dependencies + +### Miscellaneous Chores + +* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a)) + +## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* question marks are valid path characters on Windows so avoid flagging as a glob when alone +* Update is-glob dependency + +### Features + +* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e)) +* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841)) +* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281)) + +## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27) + + +### Features + +* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b)) +* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd)) +* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be)) +* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388)) +* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76)) + + +### Bug Fixes + +* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf)) + +### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27) + + +### Features + +* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc)) + + +### Bug Fixes + +* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030)) + +## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* update is-glob dependency + +### Features + +* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd)) + +## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27) + + +### Features + +* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2)) + +## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27) + +## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27) + + +### Reverts + +* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0)) + +## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27) + + +### Features + +* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233)) + +## 1.0.0 (2021-01-27) + diff --git a/node_modules/sass/node_modules/glob-parent/LICENSE b/node_modules/sass/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..63222d7 --- /dev/null +++ b/node_modules/sass/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +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. diff --git a/node_modules/sass/node_modules/glob-parent/README.md b/node_modules/sass/node_modules/glob-parent/README.md new file mode 100644 index 0000000..36a2793 --- /dev/null +++ b/node_modules/sass/node_modules/glob-parent/README.md @@ -0,0 +1,137 @@ +

+ + + +

+ +# glob-parent + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Extract the non-magic parent path from a glob string. + +## Usage + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## API + +### `globParent(maybeGlobString, [options])` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + +#### options + +```js +{ + // Disables the automatic conversion of slashes for Windows + flipBackslashes: true +} +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' +``` + +## Limitations + +### Braces & Brackets +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +### Windows +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]') // 'foo ' +globParent('foo \\[bar]*') // 'foo ' + +// GOOD +globParent('./foo \\[bar]') // 'foo [bar]' +globParent('./foo \\[bar]*') // '.' +``` + +## License + +ISC + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/glob-parent +[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/sass/node_modules/glob-parent/index.js b/node_modules/sass/node_modules/glob-parent/index.js new file mode 100644 index 0000000..09e257e --- /dev/null +++ b/node_modules/sass/node_modules/glob-parent/index.js @@ -0,0 +1,42 @@ +'use strict'; + +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; +var isWin32 = require('os').platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} + */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; diff --git a/node_modules/sass/node_modules/glob-parent/package.json b/node_modules/sass/node_modules/glob-parent/package.json new file mode 100644 index 0000000..125c971 --- /dev/null +++ b/node_modules/sass/node_modules/glob-parent/package.json @@ -0,0 +1,48 @@ +{ + "name": "glob-parent", + "version": "5.1.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-parent", + "license": "ISC", + "engines": { + "node": ">= 6" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": { + "is-glob": "^4.0.1" + }, + "devDependencies": { + "coveralls": "^3.0.11", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^6.0.2", + "nyc": "^13.3.0" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ] +} diff --git a/node_modules/sass/node_modules/is-binary-path/index.d.ts b/node_modules/sass/node_modules/is-binary-path/index.d.ts new file mode 100644 index 0000000..19dcd43 --- /dev/null +++ b/node_modules/sass/node_modules/is-binary-path/index.d.ts @@ -0,0 +1,17 @@ +/** +Check if a file path is a binary file. + +@example +``` +import isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` +*/ +declare function isBinaryPath(filePath: string): boolean; + +export = isBinaryPath; diff --git a/node_modules/sass/node_modules/is-binary-path/index.js b/node_modules/sass/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..ef7548c --- /dev/null +++ b/node_modules/sass/node_modules/is-binary-path/index.js @@ -0,0 +1,7 @@ +'use strict'; +const path = require('path'); +const binaryExtensions = require('binary-extensions'); + +const extensions = new Set(binaryExtensions); + +module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); diff --git a/node_modules/sass/node_modules/is-binary-path/license b/node_modules/sass/node_modules/is-binary-path/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/node_modules/sass/node_modules/is-binary-path/license @@ -0,0 +1,9 @@ +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. diff --git a/node_modules/sass/node_modules/is-binary-path/package.json b/node_modules/sass/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..a8d005a --- /dev/null +++ b/node_modules/sass/node_modules/is-binary-path/package.json @@ -0,0 +1,40 @@ +{ + "name": "is-binary-path", + "version": "2.1.0", + "description": "Check if a file path is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/sass/node_modules/is-binary-path/readme.md b/node_modules/sass/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..b4ab025 --- /dev/null +++ b/node_modules/sass/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a file path is a binary file + + +## Install + +``` +$ npm install is-binary-path +``` + + +## Usage + +```js +const isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` + + +## Related + +- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) diff --git a/node_modules/sass/node_modules/is-number/LICENSE b/node_modules/sass/node_modules/is-number/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/sass/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/is-number/README.md b/node_modules/sass/node_modules/is-number/README.md new file mode 100644 index 0000000..eb8149e --- /dev/null +++ b/node_modules/sass/node_modules/is-number/README.md @@ -0,0 +1,187 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a finite number. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Why is this needed? + +In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: + +```js +console.log(+[]); //=> 0 +console.log(+''); //=> 0 +console.log(+' '); //=> 0 +console.log(typeof NaN); //=> 'number' +``` + +This library offers a performant way to smooth out edge cases like these. + +## Usage + +```js +const isNumber = require('is-number'); +``` + +See the [tests](./test.js) for more examples. + +### true + +```js +isNumber(5e3); // true +isNumber(0xff); // true +isNumber(-1.1); // true +isNumber(0); // true +isNumber(1); // true +isNumber(1.1); // true +isNumber(10); // true +isNumber(10.10); // true +isNumber(100); // true +isNumber('-1.1'); // true +isNumber('0'); // true +isNumber('012'); // true +isNumber('0xff'); // true +isNumber('1'); // true +isNumber('1.1'); // true +isNumber('10'); // true +isNumber('10.10'); // true +isNumber('100'); // true +isNumber('5e3'); // true +isNumber(parseInt('012')); // true +isNumber(parseFloat('012')); // true +``` + +### False + +Everything else is false, as you would expect: + +```js +isNumber(Infinity); // false +isNumber(NaN); // false +isNumber(null); // false +isNumber(undefined); // false +isNumber(''); // false +isNumber(' '); // false +isNumber('foo'); // false +isNumber([1]); // false +isNumber([]); // false +isNumber(function () {}); // false +isNumber({}); // false +``` + +## Release history + +### 7.0.0 + +* Refactor. Now uses `.isFinite` if it exists. +* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. + +### 6.0.0 + +* Optimizations, thanks to @benaadams. + +### 5.0.0 + +**Breaking changes** + +* removed support for `instanceof Number` and `instanceof String` + +## Benchmarks + +As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. + +``` +# all +v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) +v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) +parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) +fastest is 'v7.0' + +# string +v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) +v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) +parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) +fastest is 'parseFloat,v7.0' + +# number +v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) +v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) +parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) +fastest is 'v6.0' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike-old](https://github.com/charlike-old) | +| 1 | [benaadams](https://github.com/benaadams) | +| 1 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/sass/node_modules/is-number/index.js b/node_modules/sass/node_modules/is-number/index.js new file mode 100644 index 0000000..27f19b7 --- /dev/null +++ b/node_modules/sass/node_modules/is-number/index.js @@ -0,0 +1,18 @@ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; +}; diff --git a/node_modules/sass/node_modules/is-number/package.json b/node_modules/sass/node_modules/is-number/package.json new file mode 100644 index 0000000..3715072 --- /dev/null +++ b/node_modules/sass/node_modules/is-number/package.json @@ -0,0 +1,82 @@ +{ + "name": "is-number", + "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", + "version": "7.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.12.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "cast", + "check", + "coerce", + "coercion", + "finite", + "integer", + "is", + "isnan", + "is-nan", + "is-num", + "is-number", + "isnumber", + "isfinite", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "parseFloat", + "parseInt", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "is-plain-object", + "is-primitive", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/sass/node_modules/readdirp/LICENSE b/node_modules/sass/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..037cbb4 --- /dev/null +++ b/node_modules/sass/node_modules/readdirp/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/readdirp/README.md b/node_modules/sass/node_modules/readdirp/README.md new file mode 100644 index 0000000..465593c --- /dev/null +++ b/node_modules/sass/node_modules/readdirp/README.md @@ -0,0 +1,122 @@ +# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp) + +Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. + + +```sh +npm install readdirp +``` + +```javascript +const readdirp = require('readdirp'); + +// Use streams to achieve small RAM & CPU footprint. +// 1) Streams example with for-await. +for await (const entry of readdirp('.')) { + const {path} = entry; + console.log(`${JSON.stringify({path})}`); +} + +// 2) Streams example, non for-await. +// Print out all JS files along with their size within the current folder & subfolders. +readdirp('.', {fileFilter: '*.js', alwaysStat: true}) + .on('data', (entry) => { + const {path, stats: {size}} = entry; + console.log(`${JSON.stringify({path, size})}`); + }) + // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted + .on('warn', error => console.error('non-fatal error', error)) + .on('error', error => console.error('fatal error', error)) + .on('end', () => console.log('done')); + +// 3) Promise example. More RAM and CPU than streams / for-await. +const files = await readdirp.promise('.'); +console.log(files.map(file => file.path)); + +// Other options. +readdirp('test', { + fileFilter: '*.js', + directoryFilter: ['!.git', '!*modules'] + // directoryFilter: (di) => di.basename.length === 9 + type: 'files_directories', + depth: 1 +}); +``` + +For more examples, check out `examples` directory. + +## API + +`const stream = readdirp(root[, options])` — **Stream API** + +- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) +- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). +- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. +- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. +- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. +- `on('end')` — we are done. Called when all entries were found and no more will be emitted. +- `on('close')` — stream is destroyed via `stream.destroy()`. + Could be useful if you want to manually abort even on a non fatal error. + At that point the stream is no longer `readable` and no more entries, warning or errors are emitted +- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) + or the [stream-handbook](https://github.com/substack/stream-handbook) + +`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). + +First argument is awalys `root`, path in which to start reading and recursing into subdirectories. + +### options + +- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings. + - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more + information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + `['*.json', '*.js']` includes all JavaScript and Json files. + `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'. + - Directories that do not pass a filter will not be recursed into. +- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. +- `depth: 5`: depth at which to stop recursing even if more subdirectories are found +- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. +- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. +- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` + +### `EntryInfo` + +Has the following properties: + +- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) +- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found +- `basename: 'react.js'`: name of the file/directory +- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` +- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` + +## Changelog + +- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. + Before, it could have entered infinite loop. +- 3.4 (Mar 19, 2020) adds support for directory-based symlinks. +- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. +- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. +- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". +- 3.0 brings huge performance improvements and stream backpressure support. +- Upgrading 2.x to 3.x: + - Signature changed from `readdirp(options)` to `readdirp(root, options)` + - Replaced callback API with promise API. + - Renamed `entryType` option to `type` + - Renamed `entryType: 'both'` to `'files_directories'` + - `EntryInfo` + - Renamed `stat` to `stats` + - Emitted only when `alwaysStat: true` + - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` + - Renamed `name` to `basename` + - Removed `parentDir` and `fullParentDir` properties +- Supported node.js versions: + - 3.x: node 8+ + - 2.x: node 0.6+ + +## License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller () + +MIT License, see [LICENSE](LICENSE) file. diff --git a/node_modules/sass/node_modules/readdirp/index.d.ts b/node_modules/sass/node_modules/readdirp/index.d.ts new file mode 100644 index 0000000..cbbd76c --- /dev/null +++ b/node_modules/sass/node_modules/readdirp/index.d.ts @@ -0,0 +1,43 @@ +// TypeScript Version: 3.2 + +/// + +import * as fs from 'fs'; +import { Readable } from 'stream'; + +declare namespace readdir { + interface EntryInfo { + path: string; + fullPath: string; + basename: string; + stats?: fs.Stats; + dirent?: fs.Dirent; + } + + interface ReaddirpOptions { + root?: string; + fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); + directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); + type?: 'files' | 'directories' | 'files_directories' | 'all'; + lstat?: boolean; + depth?: number; + alwaysStat?: boolean; + } + + interface ReaddirpStream extends Readable, AsyncIterable { + read(): EntryInfo; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + function promise( + root: string, + options?: ReaddirpOptions + ): Promise; +} + +declare function readdir( + root: string, + options?: readdir.ReaddirpOptions +): readdir.ReaddirpStream; + +export = readdir; diff --git a/node_modules/sass/node_modules/readdirp/index.js b/node_modules/sass/node_modules/readdirp/index.js new file mode 100644 index 0000000..cf739b2 --- /dev/null +++ b/node_modules/sass/node_modules/readdirp/index.js @@ -0,0 +1,287 @@ +'use strict'; + +const fs = require('fs'); +const { Readable } = require('stream'); +const sysPath = require('path'); +const { promisify } = require('util'); +const picomatch = require('picomatch'); + +const readdir = promisify(fs.readdir); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +/** + * @typedef {Object} EntryInfo + * @property {String} path + * @property {String} fullPath + * @property {fs.Stats=} stats + * @property {fs.Dirent=} dirent + * @property {String} basename + */ + +const BANG = '!'; +const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; + +const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); +const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10)); +const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5)); + +const normalizeFilter = filter => { + if (filter === undefined) return; + if (typeof filter === 'function') return filter; + + if (typeof filter === 'string') { + const glob = picomatch(filter.trim()); + return entry => glob(entry.basename); + } + + if (Array.isArray(filter)) { + const positive = []; + const negative = []; + for (const item of filter) { + const trimmed = item.trim(); + if (trimmed.charAt(0) === BANG) { + negative.push(picomatch(trimmed.slice(1))); + } else { + positive.push(picomatch(trimmed)); + } + } + + if (negative.length > 0) { + if (positive.length > 0) { + return entry => + positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); + } + return entry => !negative.some(f => f(entry.basename)); + } + return entry => positive.some(f => f(entry.basename)); + } +}; + +class ReaddirpStream extends Readable { + static get defaultOptions() { + return { + root: '.', + /* eslint-disable no-unused-vars */ + fileFilter: (path) => true, + directoryFilter: (path) => true, + /* eslint-enable no-unused-vars */ + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false + }; + } + + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark || 4096 + }); + const opts = { ...ReaddirpStream.defaultOptions, ...options }; + const { root, type } = opts; + + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + + const statMethod = opts.lstat ? lstat : stat; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (wantBigintFsStats) { + this._stat = path => statMethod(path, { bigint: true }); + } else { + this._stat = statMethod; + } + + this._maxDepth = opts.depth; + this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = sysPath.resolve(root); + this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + + // Launch stream with one parent, the root dir. + this.parents = [this._exploreDir(root, 1)]; + this.reading = false; + this.parent = undefined; + } + + async _read(batch) { + if (this.reading) return; + this.reading = true; + + try { + while (!this.destroyed && batch > 0) { + const { path, depth, files = [] } = this.parent || {}; + + if (files.length > 0) { + const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); + for (const entry of await Promise.all(slice)) { + if (this.destroyed) return; + + const entryType = await this._getEntryType(entry); + if (entryType === 'directory' && this._directoryFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + + if (this._wantsDir) { + this.push(entry); + batch--; + } + } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + if (this.destroyed) return; + } + } + } catch (error) { + this.destroy(error); + } finally { + this.reading = false; + } + } + + async _exploreDir(path, depth) { + let files; + try { + files = await readdir(path, this._rdOptions); + } catch (error) { + this._onError(error); + } + return { files, depth, path }; + } + + async _formatEntry(dirent, path) { + let entry; + try { + const basename = this._isDirent ? dirent.name : dirent; + const fullPath = sysPath.resolve(sysPath.join(path, basename)); + entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename }; + entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); + } catch (err) { + this._onError(err); + } + return entry; + } + + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } else { + this.destroy(err); + } + } + + async _getEntryType(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + const stats = entry && entry[this._statsProp]; + if (!stats) { + return; + } + if (stats.isFile()) { + return 'file'; + } + if (stats.isDirectory()) { + return 'directory'; + } + if (stats && stats.isSymbolicLink()) { + const full = entry.fullPath; + try { + const entryRealPath = await realpath(full); + const entryRealPathStats = await lstat(entryRealPath); + if (entryRealPathStats.isFile()) { + return 'file'; + } + if (entryRealPathStats.isDirectory()) { + const len = entryRealPath.length; + if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) { + const recursiveError = new Error( + `Circular symlink detected: "${full}" points to "${entryRealPath}"` + ); + recursiveError.code = RECURSIVE_ERROR_CODE; + return this._onError(recursiveError); + } + return 'directory'; + } + } catch (error) { + this._onError(error); + } + } + } + + _includeAsFile(entry) { + const stats = entry && entry[this._statsProp]; + + return stats && this._wantsEverything && !stats.isDirectory(); + } +} + +/** + * @typedef {Object} ReaddirpArguments + * @property {Function=} fileFilter + * @property {Function=} directoryFilter + * @property {String=} type + * @property {Number=} depth + * @property {String=} root + * @property {Boolean=} lstat + * @property {Boolean=} bigint + */ + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param {String} root Root directory + * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + let type = options.entryType || options.type; + if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility + if (type) options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + + options.root = root; + return new ReaddirpStream(options); +}; + +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', entry => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', error => reject(error)); + }); +}; + +readdirp.promise = readdirpPromise; +readdirp.ReaddirpStream = ReaddirpStream; +readdirp.default = readdirp; + +module.exports = readdirp; diff --git a/node_modules/sass/node_modules/readdirp/package.json b/node_modules/sass/node_modules/readdirp/package.json new file mode 100644 index 0000000..dba5388 --- /dev/null +++ b/node_modules/sass/node_modules/readdirp/package.json @@ -0,0 +1,122 @@ +{ + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming API.", + "version": "3.6.0", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/paulmillr/readdirp/issues" + }, + "author": "Thorsten Lorenz (thlorenz.com)", + "contributors": [ + "Thorsten Lorenz (thlorenz.com)", + "Paul Miller (https://paulmillr.com)" + ], + "main": "index.js", + "engines": { + "node": ">=8.10.0" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "scripts": { + "dtslint": "dtslint", + "nyc": "nyc", + "mocha": "mocha --exit", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "test": "npm run lint && nyc npm run mocha" + }, + "dependencies": { + "picomatch": "^2.2.1" + }, + "devDependencies": { + "@types/node": "^14", + "chai": "^4.2", + "chai-subset": "^1.6", + "dtslint": "^3.3.0", + "eslint": "^7.0.0", + "mocha": "^7.1.1", + "nyc": "^15.0.0", + "rimraf": "^3.0.0", + "typescript": "^4.0.3" + }, + "nyc": { + "reporter": [ + "html", + "text" + ] + }, + "eslintConfig": { + "root": true, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "script" + }, + "env": { + "node": true, + "es6": true + }, + "rules": { + "array-callback-return": "error", + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-else-return": [ + "error", + { + "allowElseIf": false + } + ], + "no-lonely-if": "error", + "no-var": "error", + "object-shorthand": "error", + "prefer-arrow-callback": [ + "error", + { + "allowNamedFunctions": true + } + ], + "prefer-const": [ + "error", + { + "ignoreReadBeforeAssign": true + } + ], + "prefer-destructuring": [ + "error", + { + "object": true, + "array": false + } + ], + "prefer-spread": "error", + "prefer-template": "error", + "radix": "error", + "semi": "error", + "strict": "error", + "quotes": [ + "error", + "single" + ] + } + } +} diff --git a/node_modules/sass/node_modules/to-regex-range/LICENSE b/node_modules/sass/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/node_modules/sass/node_modules/to-regex-range/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/sass/node_modules/to-regex-range/README.md b/node_modules/sass/node_modules/to-regex-range/README.md new file mode 100644 index 0000000..38887da --- /dev/null +++ b/node_modules/sass/node_modules/to-regex-range/README.md @@ -0,0 +1,305 @@ +# to-regex-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) + +> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex-range +``` + +
+What does this do? + +
+ +This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. + +**Example** + +```js +const toRegexRange = require('to-regex-range'); +const regex = new RegExp(toRegexRange('15', '95')); +``` + +A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). + +
+ +
+ +
+Why use this library? + +
+ +### Convenience + +Creating regular expressions for matching numbers gets deceptively complicated pretty fast. + +For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: + +* regex for matching `1` => `/1/` (easy enough) +* regex for matching `1` through `5` => `/[1-5]/` (not bad...) +* regex for matching `1` or `5` => `/(1|5)/` (still easy...) +* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) +* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) +* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) +* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) + +The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. + +**Learn more** + +If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. + +### Heavily tested + +As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct. + +Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7. + +### Optimized + +Generated regular expressions are optimized: + +* duplicate sequences and character classes are reduced using quantifiers +* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative +* uses fragment caching to avoid processing the same exact string more than once + +
+ +
+ +## Usage + +Add this library to your javascript application with the following line of code + +```js +const toRegexRange = require('to-regex-range'); +``` + +The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). + +```js +const source = toRegexRange('15', '95'); +//=> 1[5-9]|[2-8][0-9]|9[0-5] + +const regex = new RegExp(`^${source}$`); +console.log(regex.test('14')); //=> false +console.log(regex.test('50')); //=> true +console.log(regex.test('94')); //=> true +console.log(regex.test('96')); //=> false +``` + +## Options + +### options.capture + +**Type**: `boolean` + +**Deafault**: `undefined` + +Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. + +```js +console.log(toRegexRange('-10', '10')); +//=> -[1-9]|-?10|[0-9] + +console.log(toRegexRange('-10', '10', { capture: true })); +//=> (-[1-9]|-?10|[0-9]) +``` + +### options.shorthand + +**Type**: `boolean` + +**Deafault**: `undefined` + +Use the regex shorthand for `[0-9]`: + +```js +console.log(toRegexRange('0', '999999')); +//=> [0-9]|[1-9][0-9]{1,5} + +console.log(toRegexRange('0', '999999', { shorthand: true })); +//=> \d|[1-9]\d{1,5} +``` + +### options.relaxZeros + +**Type**: `boolean` + +**Default**: `true` + +This option relaxes matching for leading zeros when when ranges are zero-padded. + +```js +const source = toRegexRange('-0010', '0010'); +const regex = new RegExp(`^${source}$`); +console.log(regex.test('-10')); //=> true +console.log(regex.test('-010')); //=> true +console.log(regex.test('-0010')); //=> true +console.log(regex.test('10')); //=> true +console.log(regex.test('010')); //=> true +console.log(regex.test('0010')); //=> true +``` + +When `relaxZeros` is false, matching is strict: + +```js +const source = toRegexRange('-0010', '0010', { relaxZeros: false }); +const regex = new RegExp(`^${source}$`); +console.log(regex.test('-10')); //=> false +console.log(regex.test('-010')); //=> false +console.log(regex.test('-0010')); //=> true +console.log(regex.test('10')); //=> false +console.log(regex.test('010')); //=> false +console.log(regex.test('0010')); //=> true +``` + +## Examples + +| **Range** | **Result** | **Compile time** | +| --- | --- | --- | +| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ | +| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ | +| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ | +| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ | +| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ | +| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ | +| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ | +| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ | +| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ | +| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ | +| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ | +| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ | +| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ | +| `toRegexRange(5, 5)` | `5` | _8μs_ | +| `toRegexRange(5, 6)` | `5\|6` | _11μs_ | +| `toRegexRange(1, 2)` | `1\|2` | _6μs_ | +| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ | +| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ | +| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ | +| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ | +| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ | +| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ | +| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ | +| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ | + +## Heads up! + +**Order of arguments** + +When the `min` is larger than the `max`, values will be flipped to create a valid range: + +```js +toRegexRange('51', '29'); +``` + +Is effectively flipped to: + +```js +toRegexRange('29', '51'); +//=> 29|[3-4][0-9]|5[0-1] +``` + +**Steps / increments** + +This library does not support steps (increments). A pr to add support would be welcome. + +## History + +### v2.0.0 - 2017-04-21 + +**New features** + +Adds support for zero-padding! + +### v1.0.0 + +**Optimizations** + +Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. + +## Attribution + +Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 63 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [doowb](https://github.com/doowb) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._ \ No newline at end of file diff --git a/node_modules/sass/node_modules/to-regex-range/index.js b/node_modules/sass/node_modules/to-regex-range/index.js new file mode 100644 index 0000000..77fbace --- /dev/null +++ b/node_modules/sass/node_modules/to-regex-range/index.js @@ -0,0 +1,288 @@ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +const isNumber = require('is-number'); + +const toRegexRange = (min, max, options) => { + if (isNumber(min) === false) { + throw new TypeError('toRegexRange: expected the first argument to be a number'); + } + + if (max === void 0 || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new TypeError('toRegexRange: expected the second argument to be a number.'); + } + + let opts = { relaxZeros: true, ...options }; + if (typeof opts.strictZeros === 'boolean') { + opts.relaxZeros = opts.strictZeros === false; + } + + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; + + if (toRegexRange.cache.hasOwnProperty(cacheKey)) { + return toRegexRange.cache[cacheKey].result; + } + + let a = Math.min(min, max); + let b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + let result = min + '|' + max; + if (opts.capture) { + return `(${result})`; + } + if (opts.wrap === false) { + return result; + } + return `(?:${result})`; + } + + let isPadded = hasPadding(min) || hasPadding(max); + let state = { min, max, a, b }; + let positives = []; + let negatives = []; + + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + + if (a < 0) { + let newMin = b < 0 ? Math.abs(b) : 1; + negatives = splitToPatterns(newMin, Math.abs(a), state, opts); + a = state.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, state, opts); + } + + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + + if (opts.capture === true) { + state.result = `(${state.result})`; + } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { + state.result = `(?:${state.result})`; + } + + toRegexRange.cache[cacheKey] = state; + return state.result; +}; + +function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + let intersected = filterPatterns(neg, pos, '-?', true, options) || []; + let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + + let stop = countNines(min, nines); + let stops = new Set([max]); + + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops = [...stops]; + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return { pattern: start, count: [], digits: 0 }; + } + + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ''; + let count = 0; + + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit, options); + + } else { + count++; + } + } + + if (count) { + pattern += options.shorthand === true ? '\\d' : '[0-9]'; + } + + return { pattern, count: [count], digits }; +} + +function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + + for (let i = 0; i < ranges.length; i++) { + let max = ranges[i]; + let obj = rangeToPattern(String(start), String(max), options); + let zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) { + prev.count.pop(); + } + + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(max, tok, options); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + + for (let ele of arr) { + let { string } = ele; + + // only push if _both_ are negative... + if (!intersection && !contains(comparison, 'string', string)) { + result.push(prefix + string); + } + + // or _both_ are positive + if (intersection && contains(comparison, 'string', string)) { + result.push(prefix + string); + } + } + return result; +} + +/** + * Zip strings + */ + +function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function contains(arr, key, val) { + return arr.some(ele => ele[key] === val); +} + +function countNines(min, len) { + return Number(String(min).slice(0, -len) + '9'.repeat(len)); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + let [start = 0, stop = ''] = digits; + if (stop || start > 1) { + return `{${start + (stop ? ',' + stop : '')}}`; + } + return ''; +} + +function toCharacterClass(a, b, options) { + return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; +} + +function hasPadding(str) { + return /^-?(0+)\d/.test(str); +} + +function padZeros(value, tok, options) { + if (!tok.isPadded) { + return value; + } + + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + + switch (diff) { + case 0: + return ''; + case 1: + return relax ? '0?' : '0'; + case 2: + return relax ? '0{0,2}' : '00'; + default: { + return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } +} + +/** + * Cache + */ + +toRegexRange.cache = {}; +toRegexRange.clearCache = () => (toRegexRange.cache = {}); + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; diff --git a/node_modules/sass/node_modules/to-regex-range/package.json b/node_modules/sass/node_modules/to-regex-range/package.json new file mode 100644 index 0000000..4ef194f --- /dev/null +++ b/node_modules/sass/node_modules/to-regex-range/package.json @@ -0,0 +1,88 @@ +{ + "name": "to-regex-range", + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "version": "5.0.1", + "homepage": "https://github.com/micromatch/to-regex-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "micromatch/to-regex-range", + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^7.0.0" + }, + "devDependencies": { + "fill-range": "^6.0.0", + "gulp-format-md": "^2.0.0", + "mocha": "^6.0.2", + "text-table": "^0.2.0", + "time-diff": "^0.3.1" + }, + "keywords": [ + "bash", + "date", + "expand", + "expansion", + "expression", + "glob", + "match", + "match date", + "match number", + "match numbers", + "match year", + "matches", + "matching", + "number", + "numbers", + "numerical", + "range", + "ranges", + "regex", + "regexp", + "regular", + "regular expression", + "sequence" + ], + "verb": { + "layout": "default", + "toc": false, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "helpers": { + "examples": { + "displayName": "examples" + } + }, + "related": { + "list": [ + "expand-range", + "fill-range", + "micromatch", + "repeat-element", + "repeat-string" + ] + } + } +} diff --git a/node_modules/sass/package.json b/node_modules/sass/package.json new file mode 100644 index 0000000..517a197 --- /dev/null +++ b/node_modules/sass/package.json @@ -0,0 +1 @@ +{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=12.0.0"},"dependencies":{"chokidar":">=3.0.0 <4.0.0","immutable":"^4.0.0","source-map-js":">=0.6.2 <2.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","exports":{"types":"./types/index.d.ts","default":"./sass.default.dart.js"},"version":"1.55.0","bin":{"sass":"sass.js"},"main":"sass.default.dart.js"} \ No newline at end of file diff --git a/node_modules/sass/sass.dart.js b/node_modules/sass/sass.dart.js new file mode 100644 index 0000000..3169a6d --- /dev/null +++ b/node_modules/sass/sass.dart.js @@ -0,0 +1,101326 @@ +exports.load = function(_cli_pkg_requires) { +// make sure to keep this as 'var' +// we don't want block scoping + +var dartNodePreambleSelf = typeof global !== "undefined" ? global : window; + +var self = Object.create(dartNodePreambleSelf); + +self.scheduleImmediate = typeof setImmediate !== "undefined" + ? function (cb) { + setImmediate(cb); + } + : function(cb) { + setTimeout(cb, 0); + }; + +// CommonJS globals. +self.exports = exports; + +// Node.js specific exports, check to see if they exist & or polyfilled + +if (typeof process !== "undefined") { + self.process = process; +} + +if (typeof __dirname !== "undefined") { + self.__dirname = __dirname; +} + +if (typeof __filename !== "undefined") { + self.__filename = __filename; +} + +if (typeof Buffer !== "undefined") { + self.Buffer = Buffer; +} + +// if we're running in a browser, Dart supports most of this out of box +// make sure we only run these in Node.js environment + +var dartNodeIsActuallyNode = !dartNodePreambleSelf.window + +try { + // Check if we're in a Web Worker instead. + if ("undefined" !== typeof WorkerGlobalScope && dartNodePreambleSelf instanceof WorkerGlobalScope) { + dartNodeIsActuallyNode = false; + } + + // Check if we're in Electron, with Node.js integration, and override if true. + if ("undefined" !== typeof process && process.versions && process.versions.hasOwnProperty('electron') && process.versions.hasOwnProperty('node')) { + dartNodeIsActuallyNode = true; + } +} catch(e) {} + +if (dartNodeIsActuallyNode) { + // This line is to: + // 1) Prevent Webpack from bundling. + // 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__ + // https://github.com/mbullington/node_preamble.dart/issues/18#issuecomment-527305561 + var url = ("undefined" !== typeof __webpack_require__ ? __non_webpack_require__ : require)("url"); + + // Setting `self.location=` in Electron throws a `TypeError`, so we define it + // as a property instead to be safe. + Object.defineProperty(self, "location", { + value: { + get href() { + if (url.pathToFileURL) { + return url.pathToFileURL(process.cwd()).href + "/"; + } else { + // This isn't really a correct transformation, but it's the best we have + // for versions of Node <10.12.0 which introduced `url.pathToFileURL()`. + // For example, it will fail for paths that contain characters that need + // to be escaped in URLs. + return "file://" + (function() { + var cwd = process.cwd(); + if (process.platform != "win32") return cwd; + return "/" + cwd.replace(/\\/g, "/"); + })() + "/" + } + } + } + }); + + (function() { + function computeCurrentScript() { + try { + throw new Error(); + } catch(e) { + var stack = e.stack; + var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg"); + var lastMatch = null; + do { + var match = re.exec(stack); + if (match != null) lastMatch = match; + } while (match != null); + return lastMatch[1]; + } + } + + // Setting `self.document=` isn't known to throw an error anywhere like + // `self.location=` does on Electron, but it's better to be future-proof + // just in case.. + var cachedCurrentScript = null; + Object.defineProperty(self, "document", { + value: { + get currentScript() { + if (cachedCurrentScript == null) { + cachedCurrentScript = {src: computeCurrentScript()}; + } + return cachedCurrentScript; + } + } + }); + })(); + + self.dartDeferredLibraryLoader = function(uri, successCallback, errorCallback) { + try { + load(uri); + successCallback(); + } catch (error) { + errorCallback(error); + } + }; +} + +self.util = require("util"); +self.immutable = require("immutable"); +self.fs = require("fs"); +self.chokidar = _cli_pkg_requires.chokidar; +self.readline = _cli_pkg_requires.readline; +// Generated by dart2js (NullSafetyMode.sound, trust primitives, omit checks, lax runtime type, deferred-serialization, csp), the Dart to JavaScript compiler version: 2.18.1. +// The code supports the following hooks: +// dartPrint(message): +// if this function is defined it is called instead of the Dart [print] +// method. +// +// dartMainRunner(main, args): +// if this function is defined, the Dart [main] method will not be invoked +// directly. Instead, a closure that will invoke [main], and its arguments +// [args] is passed to [dartMainRunner]. +// +// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of `uri`, and call +// successCallback. If it fails to do so, it should call errorCallback with +// an error. The loadId argument is the deferred import that resulted in +// this uri being loaded. +// +// dartCallInstrumentation(id, qualifiedName): +// if this function is defined, it will be called at each entry of a +// method or constructor. Used only when compiling programs with +// --experiment-call-instrumentation. +(function dartProgram() { + function copyProperties(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + to[key] = from[key]; + } + } + function mixinPropertiesHard(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) + to[key] = from[key]; + } + } + function mixinPropertiesEasy(from, to) { + Object.assign(to, from); + } + var supportsDirectProtoAccess = function() { + var cls = function() { + }; + cls.prototype = {p: {}}; + var object = new cls(); + if (!(object.__proto__ && object.__proto__.p === cls.prototype.p)) + return false; + try { + if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) + return true; + if (typeof version == "function" && version.length == 0) { + var v = version(); + if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) + return true; + } + } catch (_) { + } + return false; + }(); + function inherit(cls, sup) { + cls.prototype.constructor = cls; + cls.prototype["$is" + cls.name] = cls; + if (sup != null) { + if (supportsDirectProtoAccess) { + cls.prototype.__proto__ = sup.prototype; + return; + } + var clsPrototype = Object.create(sup.prototype); + copyProperties(cls.prototype, clsPrototype); + cls.prototype = clsPrototype; + } + } + function inheritMany(sup, classes) { + for (var i = 0; i < classes.length; i++) + inherit(classes[i], sup); + } + function mixinEasy(cls, mixin) { + mixinPropertiesEasy(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function mixinHard(cls, mixin) { + mixinPropertiesHard(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function lazyOld(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + holder[getterName] = function() { + A.throwCyclicInit(name); + }; + var result; + var sentinelInProgress = initializer; + try { + if (holder[name] === uninitializedSentinel) { + result = holder[name] = sentinelInProgress; + result = holder[name] = initializer(); + } else + result = holder[name]; + } finally { + if (result === sentinelInProgress) + holder[name] = null; + holder[getterName] = function() { + return this[name]; + }; + } + return result; + }; + } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) + holder[name] = initializer(); + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } + function lazyFinal(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + var value = initializer(); + if (holder[name] !== uninitializedSentinel) + A.throwLateFieldADI(name); + holder[name] = value; + } + var finalValue = holder[name]; + holder[getterName] = function() { + return finalValue; + }; + return finalValue; + }; + } + function makeConstList(list) { + list.immutable$list = Array; + list.fixed$length = Array; + return list; + } + function convertToFastObject(properties) { + function t() { + } + t.prototype = properties; + new t(); + return properties; + } + function convertAllToFastObject(arrayOfObjects) { + for (var i = 0; i < arrayOfObjects.length; ++i) + convertToFastObject(arrayOfObjects[i]); + } + var functionCounter = 0; + function instanceTearOffGetter(isIntercepted, parameters) { + var cache = null; + return isIntercepted ? function(receiver) { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(receiver, this); + } : function() { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(this, null); + }; + } + function staticTearOffGetter(parameters) { + var cache = null; + return function() { + if (cache === null) + cache = A.closureFromTearOff(parameters).prototype; + return cache; + }; + } + var typesOffset = 0; + function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + if (typeof funType == "number") + funType += typesOffset; + return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; + } + function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); + var getterFunction = staticTearOffGetter(parameters); + holder[getterName] = getterFunction; + } + function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + isIntercepted = !!isIntercepted; + var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); + var getterFunction = instanceTearOffGetter(isIntercepted, parameters); + prototype[getterName] = getterFunction; + } + function setOrUpdateInterceptorsByTag(newTags) { + var tags = init.interceptorsByTag; + if (!tags) { + init.interceptorsByTag = newTags; + return; + } + copyProperties(newTags, tags); + } + function setOrUpdateLeafTags(newTags) { + var tags = init.leafTags; + if (!tags) { + init.leafTags = newTags; + return; + } + copyProperties(newTags, tags); + } + function updateTypes(newTypes) { + var types = init.types; + var length = types.length; + types.push.apply(types, newTypes); + return length; + } + function updateHolder(holder, newHolder) { + copyProperties(newHolder, holder); + return holder; + } + var hunkHelpers = function() { + var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); + }; + }, + mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + }; + }; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + }(); + function initializeDeferredHunk(hunk) { + typesOffset = init.types.length; + hunk(hunkHelpers, init, holders, $); + } + var A = {JS_CONST: function JS_CONST() { + }, + CastIterable_CastIterable(source, $S, $T) { + if ($S._eval$1("EfficientLengthIterable<0>")._is(source)) + return new A._EfficientLengthCastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("_EfficientLengthCastIterable<1,2>")); + return new A.CastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastIterable<1,2>")); + }, + LateError$fieldADI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has been assigned during initialization."); + }, + LateError$fieldNI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has not been initialized."); + }, + LateError$localNI(localName) { + return new A.LateError("Local '" + localName + "' has not been initialized."); + }, + LateError$fieldAI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has already been initialized."); + }, + hexDigitValue(char) { + var letter, + digit = char ^ 48; + if (digit <= 9) + return digit; + letter = char | 32; + if (97 <= letter && letter <= 102) + return letter - 87; + return -1; + }, + SystemHash_combine(hash, value) { + hash = hash + value & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + return hash ^ hash >>> 6; + }, + SystemHash_finish(hash) { + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >>> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + checkNotNullable(value, $name, $T) { + return value; + }, + SubListIterable$(_iterable, _start, _endOrLength, $E) { + A.RangeError_checkNotNegative(_start, "start"); + if (_endOrLength != null) { + A.RangeError_checkNotNegative(_endOrLength, "end"); + if (_start > _endOrLength) + A.throwExpression(A.RangeError$range(_start, 0, _endOrLength, "start", null)); + } + return new A.SubListIterable(_iterable, _start, _endOrLength, $E._eval$1("SubListIterable<0>")); + }, + MappedIterable_MappedIterable(iterable, $function, $S, $T) { + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + return new A.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + }, + TakeIterable_TakeIterable(iterable, takeCount, $E) { + var _s9_ = "takeCount"; + A.ArgumentError_checkNotNull(takeCount, _s9_); + A.RangeError_checkNotNegative(takeCount, _s9_); + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthTakeIterable(iterable, takeCount, $E._eval$1("EfficientLengthTakeIterable<0>")); + return new A.TakeIterable(iterable, takeCount, $E._eval$1("TakeIterable<0>")); + }, + SkipIterable_SkipIterable(iterable, count, $E) { + var _s5_ = "count"; + if (type$.EfficientLengthIterable_dynamic._is(iterable)) { + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.EfficientLengthSkipIterable(iterable, count, $E._eval$1("EfficientLengthSkipIterable<0>")); + } + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.SkipIterable(iterable, count, $E._eval$1("SkipIterable<0>")); + }, + FollowedByIterable_FollowedByIterable$firstEfficient(first, second, $E) { + if ($E._eval$1("EfficientLengthIterable<0>")._is(second)) + return new A.EfficientLengthFollowedByIterable(first, second, $E._eval$1("EfficientLengthFollowedByIterable<0>")); + return new A.FollowedByIterable(first, second, $E._eval$1("FollowedByIterable<0>")); + }, + IterableElementError_noElement() { + return new A.StateError("No element"); + }, + IterableElementError_tooMany() { + return new A.StateError("Too many elements"); + }, + IterableElementError_tooFew() { + return new A.StateError("Too few elements"); + }, + Sort_sort(a, compare) { + A.Sort__doSort(a, 0, J.get$length$asx(a) - 1, compare); + }, + Sort__doSort(a, left, right, compare) { + if (right - left <= 32) + A.Sort__insertionSort(a, left, right, compare); + else + A.Sort__dualPivotQuicksort(a, left, right, compare); + }, + Sort__insertionSort(a, left, right, compare) { + var i, t1, el, j, j0; + for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { + el = t1.$index(a, i); + j = i; + while (true) { + if (!(j > left && compare.call$2(t1.$index(a, j - 1), el) > 0)) + break; + j0 = j - 1; + t1.$indexSet(a, j, t1.$index(a, j0)); + j = j0; + } + t1.$indexSet(a, j, el); + } + }, + Sort__dualPivotQuicksort(a, left, right, compare) { + var t0, less, great, k, ak, comp, great0, less0, pivots_are_equal, t2, + sixth = B.JSInt_methods._tdivFast$1(right - left + 1, 6), + index1 = left + sixth, + index5 = right - sixth, + index3 = B.JSInt_methods._tdivFast$1(left + right, 2), + index2 = index3 - sixth, + index4 = index3 + sixth, + t1 = J.getInterceptor$asx(a), + el1 = t1.$index(a, index1), + el2 = t1.$index(a, index2), + el3 = t1.$index(a, index3), + el4 = t1.$index(a, index4), + el5 = t1.$index(a, index5); + if (compare.call$2(el1, el2) > 0) { + t0 = el2; + el2 = el1; + el1 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + if (compare.call$2(el1, el3) > 0) { + t0 = el3; + el3 = el1; + el1 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el1, el4) > 0) { + t0 = el4; + el4 = el1; + el1 = t0; + } + if (compare.call$2(el3, el4) > 0) { + t0 = el4; + el4 = el3; + el3 = t0; + } + if (compare.call$2(el2, el5) > 0) { + t0 = el5; + el5 = el2; + el2 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + t1.$indexSet(a, index1, el1); + t1.$indexSet(a, index3, el3); + t1.$indexSet(a, index5, el5); + t1.$indexSet(a, index2, t1.$index(a, left)); + t1.$indexSet(a, index4, t1.$index(a, right)); + less = left + 1; + great = right - 1; + if (J.$eq$(compare.call$2(el2, el4), 0)) { + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + comp = compare.call$2(ak, el2); + if (comp === 0) + continue; + if (comp < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else + for (; true;) { + comp = compare.call$2(t1.$index(a, great), el2); + if (comp > 0) { + --great; + continue; + } else { + great0 = great - 1; + if (comp < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + less = less0; + break; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + break; + } + } + } + } + pivots_are_equal = true; + } else { + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) > 0) + for (; true;) + if (compare.call$2(t1.$index(a, great), el4) > 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + pivots_are_equal = false; + } + t2 = less - 1; + t1.$indexSet(a, left, t1.$index(a, t2)); + t1.$indexSet(a, t2, el2); + t2 = great + 1; + t1.$indexSet(a, right, t1.$index(a, t2)); + t1.$indexSet(a, t2, el4); + A.Sort__doSort(a, left, less - 2, compare); + A.Sort__doSort(a, great + 2, right, compare); + if (pivots_are_equal) + return; + if (less < index1 && great > index5) { + for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);) + ++less; + for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);) + --great; + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) === 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) === 0) + for (; true;) + if (compare.call$2(t1.$index(a, great), el4) === 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + A.Sort__doSort(a, less, great, compare); + } else + A.Sort__doSort(a, less, great, compare); + }, + _CastIterableBase: function _CastIterableBase() { + }, + CastIterator: function CastIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastIterable: function CastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _EfficientLengthCastIterable: function _EfficientLengthCastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _CastListBase: function _CastListBase() { + }, + _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) { + this.$this = t0; + this.compare = t1; + }, + CastList: function CastList(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastSet: function CastSet(t0, t1, t2) { + this._source = t0; + this._emptySet = t1; + this.$ti = t2; + }, + CastMap: function CastMap(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastMap_forEach_closure: function CastMap_forEach_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + CastMap_entries_closure: function CastMap_entries_closure(t0) { + this.$this = t0; + }, + LateError: function LateError(t0) { + this._message = t0; + }, + CodeUnits: function CodeUnits(t0) { + this.__internal$_string = t0; + }, + nullFuture_closure: function nullFuture_closure() { + }, + SentinelValue: function SentinelValue() { + }, + EfficientLengthIterable: function EfficientLengthIterable() { + }, + ListIterable: function ListIterable() { + }, + SubListIterable: function SubListIterable(t0, t1, t2, t3) { + var _ = this; + _.__internal$_iterable = t0; + _.__internal$_start = t1; + _._endOrLength = t2; + _.$ti = t3; + }, + ListIterator: function ListIterator(t0, t1) { + var _ = this; + _.__internal$_iterable = t0; + _.__internal$_length = t1; + _.__internal$_index = 0; + _.__internal$_current = null; + }, + MappedIterable: function MappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + EfficientLengthMappedIterable: function EfficientLengthMappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + MappedIterator: function MappedIterator(t0, t1) { + this.__internal$_current = null; + this._iterator = t0; + this._f = t1; + }, + MappedListIterable: function MappedListIterable(t0, t1, t2) { + this._source = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterable: function WhereIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterator: function WhereIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + }, + ExpandIterable: function ExpandIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + ExpandIterator: function ExpandIterator(t0, t1, t2) { + var _ = this; + _._iterator = t0; + _._f = t1; + _._currentExpansion = t2; + _.__internal$_current = null; + }, + TakeIterable: function TakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + EfficientLengthTakeIterable: function EfficientLengthTakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + TakeIterator: function TakeIterator(t0, t1) { + this._iterator = t0; + this._remaining = t1; + }, + SkipIterable: function SkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + EfficientLengthSkipIterable: function EfficientLengthSkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + SkipIterator: function SkipIterator(t0, t1) { + this._iterator = t0; + this._skipCount = t1; + }, + SkipWhileIterable: function SkipWhileIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + SkipWhileIterator: function SkipWhileIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + this._hasSkipped = false; + }, + EmptyIterable: function EmptyIterable(t0) { + this.$ti = t0; + }, + EmptyIterator: function EmptyIterator() { + }, + FollowedByIterable: function FollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + EfficientLengthFollowedByIterable: function EfficientLengthFollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + FollowedByIterator: function FollowedByIterator(t0, t1) { + this._currentIterator = t0; + this._nextIterable = t1; + }, + WhereTypeIterable: function WhereTypeIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + WhereTypeIterator: function WhereTypeIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + FixedLengthListMixin: function FixedLengthListMixin() { + }, + UnmodifiableListMixin: function UnmodifiableListMixin() { + }, + UnmodifiableListBase: function UnmodifiableListBase() { + }, + ReversedListIterable: function ReversedListIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + Symbol: function Symbol(t0) { + this.__internal$_name = t0; + }, + __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() { + }, + ConstantMap_ConstantMap$from(other, $K, $V) { + var allStrings, k, object, t2, + keys = A.List_List$from(other.get$keys(other), true, $K), + t1 = keys.length, + _i = 0; + while (true) { + if (!(_i < t1)) { + allStrings = true; + break; + } + k = keys[_i]; + if (typeof k != "string" || "__proto__" === k) { + allStrings = false; + break; + } + ++_i; + } + if (allStrings) { + object = {}; + for (_i = 0; t2 = keys.length, _i < t2; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + k = keys[_i]; + object[k] = other.$index(0, k); + } + return new A.ConstantStringMap(t2, object, keys, $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantStringMap<1,2>")); + } + return new A.ConstantMapView(A.LinkedHashMap_LinkedHashMap$from(other, $K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantMapView<1,2>")); + }, + ConstantMap__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable Map")); + }, + GeneralConstantMap__constantMapHashCode(key) { + if (typeof key == "number") + return B.JSNumber_methods.get$hashCode(key); + if (type$.Symbol._is(key)) + return key.get$hashCode(key); + if (type$.Type._is(key)) + return A.Primitives_objectHashCode(key); + return A.objectHashCode(key); + }, + GeneralConstantMap__typeTest($T) { + return new A.GeneralConstantMap__typeTest_closure($T); + }, + instantiate1(f, T1) { + var t1 = new A.Instantiation1(f, T1._eval$1("Instantiation1<0>")); + t1.Instantiation$1(f); + return t1; + }, + unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + isJsIndexable(object, record) { + var result; + if (record != null) { + result = record.x; + if (result != null) + return result; + } + return type$.JavaScriptIndexingBehavior_dynamic._is(object); + }, + S(value) { + var result; + if (typeof value == "string") + return value; + if (typeof value == "number") { + if (value !== 0) + return "" + value; + } else if (true === value) + return "true"; + else if (false === value) + return "false"; + else if (value == null) + return "null"; + result = J.toString$0$(value); + return result; + }, + Primitives_objectHashCode(object) { + var hash, + property = $.Primitives__identityHashCodeProperty; + if (property == null) + property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); + hash = object[property]; + if (hash == null) { + hash = Math.random() * 0x3fffffff | 0; + object[property] = hash; + } + return hash; + }, + Primitives_parseInt(source, radix) { + var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + if (match == null) + return _null; + decimalMatch = match[3]; + if (radix == null) { + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return _null; + } + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); + if (radix === 10 && decimalMatch != null) + return parseInt(source, 10); + if (radix < 10 || decimalMatch == null) { + maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; + digitsPart = match[1]; + for (t1 = digitsPart.length, i = 0; i < t1; ++i) + if ((B.JSString_methods._codeUnitAt$1(digitsPart, i) | 32) > maxCharCode) + return _null; + } + return parseInt(source, radix); + }, + Primitives_parseDouble(source) { + var result, trimmed; + if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) + return null; + result = parseFloat(source); + if (isNaN(result)) { + trimmed = B.JSString_methods.trim$0(source); + if (trimmed === "NaN" || trimmed === "+NaN" || trimmed === "-NaN") + return result; + return null; + } + return result; + }, + Primitives_objectTypeName(object) { + return A.Primitives__objectTypeNameNewRti(object); + }, + Primitives__objectTypeNameNewRti(object) { + var interceptor, dispatchName, $constructor, constructorName; + if (object instanceof A.Object) + return A._rtiToString(A.instanceType(object), null); + interceptor = J.getInterceptor$(object); + if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { + dispatchName = B.C_JS_CONST(object); + if (dispatchName !== "Object" && dispatchName !== "") + return dispatchName; + $constructor = object.constructor; + if (typeof $constructor == "function") { + constructorName = $constructor.name; + if (typeof constructorName == "string" && constructorName !== "Object" && constructorName !== "") + return constructorName; + } + } + return A._rtiToString(A.instanceType(object), null); + }, + Primitives_currentUri() { + if (!!self.location) + return self.location.href; + return null; + }, + Primitives__fromCharCodeApply(array) { + var result, i, i0, chunkEnd, + end = array.length; + if (end <= 500) + return String.fromCharCode.apply(null, array); + for (result = "", i = 0; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCodePoints(codePoints) { + var t1, _i, i, + a = A._setArrayType([], type$.JSArray_int); + for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, A.throwConcurrentModificationError)(codePoints), ++_i) { + i = codePoints[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i <= 65535) + a.push(i); + else if (i <= 1114111) { + a.push(55296 + (B.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); + a.push(56320 + (i & 1023)); + } else + throw A.wrapException(A.argumentErrorValue(i)); + } + return A.Primitives__fromCharCodeApply(a); + }, + Primitives_stringFromCharCodes(charCodes) { + var t1, _i, i; + for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) { + i = charCodes[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i < 0) + throw A.wrapException(A.argumentErrorValue(i)); + if (i > 65535) + return A.Primitives_stringFromCodePoints(charCodes); + } + return A.Primitives__fromCharCodeApply(charCodes); + }, + Primitives_stringFromNativeUint8List(charCodes, start, end) { + var i, result, i0, chunkEnd; + if (end <= 500 && start === 0 && end === charCodes.length) + return String.fromCharCode.apply(null, charCodes); + for (i = start, result = ""; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCharCode(charCode) { + var bits; + if (0 <= charCode) { + if (charCode <= 65535) + return String.fromCharCode(charCode); + if (charCode <= 1114111) { + bits = charCode - 65536; + return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + } + } + throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); + }, + Primitives_lazyAsJsDate(receiver) { + if (receiver.date === void 0) + receiver.date = new Date(receiver._core$_value); + return receiver.date; + }, + Primitives_getYear(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; + return t1; + }, + Primitives_getMonth(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMonth() + 1; + return t1; + }, + Primitives_getDay(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getDate() + 0; + return t1; + }, + Primitives_getHours(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getHours() + 0; + return t1; + }, + Primitives_getMinutes(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; + return t1; + }, + Primitives_getSeconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; + return t1; + }, + Primitives_getMilliseconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; + return t1; + }, + Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; + t1.argumentCount = 0; + $arguments = []; + namedArgumentList = []; + t1.argumentCount = positionalArguments.length; + B.JSArray_methods.addAll$1($arguments, positionalArguments); + t1.names = ""; + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction($function, positionalArguments, namedArguments) { + var t1, argumentCount, jsStub; + if (Array.isArray(positionalArguments)) + t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; + else + t1 = false; + if (t1) { + argumentCount = positionalArguments.length; + if (argumentCount === 0) { + if (!!$function.call$0) + return $function.call$0(); + } else if (argumentCount === 1) { + if (!!$function.call$1) + return $function.call$1(positionalArguments[0]); + } else if (argumentCount === 2) { + if (!!$function.call$2) + return $function.call$2(positionalArguments[0], positionalArguments[1]); + } else if (argumentCount === 3) { + if (!!$function.call$3) + return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); + } else if (argumentCount === 4) { + if (!!$function.call$4) + return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); + } else if (argumentCount === 5) + if (!!$function.call$5) + return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); + jsStub = $function["call" + "$" + argumentCount]; + if (jsStub != null) + return jsStub.apply($function, positionalArguments); + } + return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); + }, + Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { + var defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, t2, + $arguments = Array.isArray(positionalArguments) ? positionalArguments : A.List_List$of(positionalArguments, true, type$.dynamic), + argumentCount = $arguments.length, + requiredParameterCount = $function.$requiredArgCount; + if (argumentCount < requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + defaultValuesClosure = $function.$defaultValues; + t1 = defaultValuesClosure == null; + defaultValues = !t1 ? defaultValuesClosure() : null; + interceptor = J.getInterceptor$($function); + jsFunction = interceptor["call*"]; + if (typeof jsFunction == "string") + jsFunction = interceptor[jsFunction]; + if (t1) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount === requiredParameterCount) + return jsFunction.apply($function, $arguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + if (Array.isArray(defaultValues)) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + maxArguments = requiredParameterCount + defaultValues.length; + if (argumentCount > maxArguments) + return A.Primitives_functionNoSuchMethod($function, $arguments, null); + if (argumentCount < maxArguments) { + missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + B.JSArray_methods.addAll$1($arguments, missingDefaults); + } + return jsFunction.apply($function, $arguments); + } else { + if (argumentCount > requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + keys = Object.keys(defaultValues); + if (namedArguments == null) + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[keys[_i]]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + else { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + t2 = keys[_i]; + if (namedArguments.containsKey$1(t2)) { + ++used; + B.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); + } else { + defaultValue = defaultValues[t2]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + } + if (used !== namedArguments.__js_helper$_length) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + return jsFunction.apply($function, $arguments); + } + }, + diagnoseIndexError(indexable, index) { + var $length, _s5_ = "index"; + if (!A._isInt(index)) + return new A.ArgumentError(true, index, _s5_, null); + $length = J.get$length$asx(indexable); + if (index < 0 || index >= $length) + return A.IndexError$(index, indexable, _s5_, null, $length); + return A.RangeError$value(index, _s5_, null); + }, + diagnoseRangeError(start, end, $length) { + if (start < 0 || start > $length) + return A.RangeError$range(start, 0, $length, "start", null); + if (end != null) + if (end < start || end > $length) + return A.RangeError$range(end, start, $length, "end", null); + return new A.ArgumentError(true, end, "end", null); + }, + argumentErrorValue(object) { + return new A.ArgumentError(true, object, null, null); + }, + checkNum(value) { + return value; + }, + wrapException(ex) { + var wrapper, t1; + if (ex == null) + ex = new A.NullThrownError(); + wrapper = new Error(); + wrapper.dartException = ex; + t1 = A.toStringWrapper; + if ("defineProperty" in Object) { + Object.defineProperty(wrapper, "message", {get: t1}); + wrapper.name = ""; + } else + wrapper.toString = t1; + return wrapper; + }, + toStringWrapper() { + return J.toString$0$(this.dartException); + }, + throwExpression(ex) { + throw A.wrapException(ex); + }, + throwConcurrentModificationError(collection) { + throw A.wrapException(A.ConcurrentModificationError$(collection)); + }, + TypeErrorDecoder_extractPattern(message) { + var match, $arguments, argumentsExpr, expr, method, receiver; + message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); + match = message.match(/\\\$[a-zA-Z]+\\\$/g); + if (match == null) + match = A._setArrayType([], type$.JSArray_String); + $arguments = match.indexOf("\\$arguments\\$"); + argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); + expr = match.indexOf("\\$expr\\$"); + method = match.indexOf("\\$method\\$"); + receiver = match.indexOf("\\$receiver\\$"); + return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); + }, + TypeErrorDecoder_provokeCallErrorOn(expression) { + return function($expr$) { + var $argumentsExpr$ = "$arguments$"; + try { + $expr$.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }(expression); + }, + TypeErrorDecoder_provokePropertyErrorOn(expression) { + return function($expr$) { + try { + $expr$.$method$; + } catch (e) { + return e.message; + } + }(expression); + }, + JsNoSuchMethodError$(_message, match) { + var t1 = match == null, + t2 = t1 ? null : match.method; + return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + }, + unwrapException(ex) { + if (ex == null) + return new A.NullThrownFromJavaScriptException(ex); + if (ex instanceof A.ExceptionAndStackTrace) + return A.saveStackTrace(ex, ex.dartException); + if (typeof ex !== "object") + return ex; + if ("dartException" in ex) + return A.saveStackTrace(ex, ex.dartException); + return A._unwrapNonDartException(ex); + }, + saveStackTrace(ex, error) { + if (type$.Error._is(error)) + if (error.$thrownJsError == null) + error.$thrownJsError = ex; + return error; + }, + _unwrapNonDartException(ex) { + var message, number, ieErrorCode, t1, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, _null = null; + if (!("message" in ex)) + return ex; + message = ex.message; + if ("number" in ex && typeof ex.number == "number") { + number = ex.number; + ieErrorCode = number & 65535; + if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + switch (ieErrorCode) { + case 438: + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", _null)); + case 445: + case 5007: + t1 = A.S(message); + return A.saveStackTrace(ex, new A.NullError(t1 + " (Error " + ieErrorCode + ")", _null)); + } + } + if (ex instanceof TypeError) { + nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); + notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); + nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); + nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); + undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); + undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); + nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); + $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); + undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); + undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); + match = nsme.matchTypeError$1(message); + if (match != null) + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + else { + match = notClosure.matchTypeError$1(message); + if (match != null) { + match.method = "call"; + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + } else { + match = nullCall.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefCall.matchTypeError$1(message); + if (match == null) { + match = undefLiteralCall.matchTypeError$1(message); + if (match == null) { + match = nullProperty.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefProperty.matchTypeError$1(message); + if (match == null) { + match = undefLiteralProperty.matchTypeError$1(message); + t1 = match != null; + } else + t1 = true; + } else + t1 = true; + } else + t1 = true; + } else + t1 = true; + } else + t1 = true; + } else + t1 = true; + } else + t1 = true; + if (t1) + return A.saveStackTrace(ex, new A.NullError(message, match == null ? _null : match.method)); + } + } + return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); + } + if (ex instanceof RangeError) { + if (typeof message == "string" && message.indexOf("call stack") !== -1) + return new A.StackOverflowError(); + message = function(ex) { + try { + return String(ex); + } catch (e) { + } + return null; + }(ex); + return A.saveStackTrace(ex, new A.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); + } + if (typeof InternalError == "function" && ex instanceof InternalError) + if (typeof message == "string" && message === "too much recursion") + return new A.StackOverflowError(); + return ex; + }, + getTraceFromException(exception) { + var trace; + if (exception instanceof A.ExceptionAndStackTrace) + return exception.stackTrace; + if (exception == null) + return new A._StackTrace(exception); + trace = exception.$cachedTrace; + if (trace != null) + return trace; + return exception.$cachedTrace = new A._StackTrace(exception); + }, + objectHashCode(object) { + if (object == null || typeof object != "object") + return J.get$hashCode$(object); + else + return A.Primitives_objectHashCode(object); + }, + fillLiteralMap(keyValuePairs, result) { + var index, index0, index1, + $length = keyValuePairs.length; + for (index = 0; index < $length; index = index1) { + index0 = index + 1; + index1 = index0 + 1; + result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); + } + return result; + }, + fillLiteralSet(values, result) { + var index, + $length = values.length; + for (index = 0; index < $length; ++index) + result.add$1(0, values[index]); + return result; + }, + invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + switch (numberOfArguments) { + case 0: + return closure.call$0(); + case 1: + return closure.call$1(arg1); + case 2: + return closure.call$2(arg1, arg2); + case 3: + return closure.call$3(arg1, arg2, arg3); + case 4: + return closure.call$4(arg1, arg2, arg3, arg4); + } + throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); + }, + convertDartClosureToJS(closure, arity) { + var $function; + if (closure == null) + return null; + $function = closure.$identity; + if (!!$function) + return $function; + $function = function(closure, arity, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, arity, a1, a2, a3, a4); + }; + }(closure, arity, A.invokeClosure); + closure.$identity = $function; + return $function; + }, + Closure_fromTearOff(parameters) { + var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, + container = parameters.co, + isStatic = parameters.iS, + isIntercepted = parameters.iI, + needsDirectAccess = parameters.nDA, + applyTrampolineIndex = parameters.aI, + funsOrNames = parameters.fs, + callNames = parameters.cs, + $name = funsOrNames[0], + callName = callNames[0], + $function = container[$name], + t1 = parameters.fT; + t1.toString; + $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); + $prototype.$initialize = $prototype.constructor; + if (isStatic) + $constructor = function static_tear_off() { + this.$initialize(); + }; + else + $constructor = function tear_off(a, b) { + this.$initialize(a, b); + }; + $prototype.constructor = $constructor; + $constructor.prototype = $prototype; + $prototype.$_name = $name; + $prototype.$_target = $function; + t2 = !isStatic; + if (t2) + trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); + else { + $prototype.$static_name = $name; + trampoline = $function; + } + $prototype.$signature = A.Closure__computeSignatureFunctionNewRti(t1, isStatic, isIntercepted); + $prototype[callName] = trampoline; + for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { + stub = funsOrNames[i]; + if (typeof stub == "string") { + stub0 = container[stub]; + stubName = stub; + stub = stub0; + } else + stubName = ""; + stubCallName = callNames[i]; + if (stubCallName != null) { + if (t2) + stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); + $prototype[stubCallName] = stub; + } + if (i === applyTrampolineIndex) + applyTrampoline = stub; + } + $prototype["call*"] = applyTrampoline; + $prototype.$requiredArgCount = parameters.rC; + $prototype.$defaultValues = parameters.dV; + return $constructor; + }, + Closure__computeSignatureFunctionNewRti(functionType, isStatic, isIntercepted) { + if (typeof functionType == "number") + return functionType; + if (typeof functionType == "string") { + if (isStatic) + throw A.wrapException("Cannot compute signature for static tearoff."); + return function(recipe, evalOnReceiver) { + return function() { + return evalOnReceiver(this, recipe); + }; + }(functionType, A.BoundClosure_evalRecipe); + } + throw A.wrapException("Error in functionType of tearoff"); + }, + Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + return function(entry, receiverOf) { + return function() { + return receiverOf(this)[entry](); + }; + }(stubName, getReceiver); + case 1: + return function(entry, receiverOf) { + return function(a) { + return receiverOf(this)[entry](a); + }; + }(stubName, getReceiver); + case 2: + return function(entry, receiverOf) { + return function(a, b) { + return receiverOf(this)[entry](a, b); + }; + }(stubName, getReceiver); + case 3: + return function(entry, receiverOf) { + return function(a, b, c) { + return receiverOf(this)[entry](a, b, c); + }; + }(stubName, getReceiver); + case 4: + return function(entry, receiverOf) { + return function(a, b, c, d) { + return receiverOf(this)[entry](a, b, c, d); + }; + }(stubName, getReceiver); + case 5: + return function(entry, receiverOf) { + return function(a, b, c, d, e) { + return receiverOf(this)[entry](a, b, c, d, e); + }; + }(stubName, getReceiver); + default: + return function(f, receiverOf) { + return function() { + return f.apply(receiverOf(this), arguments); + }; + }($function, getReceiver); + } + }, + Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { + var arity, t1; + if (isIntercepted) + return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); + arity = $function.length; + t1 = A.Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf, + getInterceptor = A.BoundClosure_interceptorOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); + case 1: + return function(entry, interceptorOf, receiverOf) { + return function() { + return interceptorOf(this)[entry](receiverOf(this)); + }; + }(stubName, getInterceptor, getReceiver); + case 2: + return function(entry, interceptorOf, receiverOf) { + return function(a) { + return interceptorOf(this)[entry](receiverOf(this), a); + }; + }(stubName, getInterceptor, getReceiver); + case 3: + return function(entry, interceptorOf, receiverOf) { + return function(a, b) { + return interceptorOf(this)[entry](receiverOf(this), a, b); + }; + }(stubName, getInterceptor, getReceiver); + case 4: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c); + }; + }(stubName, getInterceptor, getReceiver); + case 5: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); + }; + }(stubName, getInterceptor, getReceiver); + case 6: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d, e) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); + }; + }(stubName, getInterceptor, getReceiver); + default: + return function(f, interceptorOf, receiverOf) { + return function() { + var a = [receiverOf(this)]; + Array.prototype.push.apply(a, arguments); + return f.apply(interceptorOf(this), a); + }; + }($function, getInterceptor, getReceiver); + } + }, + Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { + var arity, t1; + if ($.BoundClosure__interceptorFieldNameCache == null) + $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); + if ($.BoundClosure__receiverFieldNameCache == null) + $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); + arity = $function.length; + t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + closureFromTearOff(parameters) { + return A.Closure_fromTearOff(parameters); + }, + BoundClosure_evalRecipe(closure, recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); + }, + BoundClosure_receiverOf(closure) { + return closure._receiver; + }, + BoundClosure_interceptorOf(closure) { + return closure._interceptor; + }, + BoundClosure__computeFieldNamed(fieldName) { + var t1, i, $name, + template = new A.BoundClosure("receiver", "interceptor"), + names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (template[$name] === fieldName) + return $name; + } + throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); + }, + throwCyclicInit(staticName) { + throw A.wrapException(new A.CyclicInitializationError(staticName)); + }, + getIsolateAffinityTag($name) { + return init.getIsolateTag($name); + }, + LinkedHashMapKeyIterator$(_map, _modifications) { + var t1 = new A.LinkedHashMapKeyIterator(_map, _modifications); + t1._cell = _map._first; + return t1; + }, + defineProperty(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); + }, + lookupAndCacheInterceptor(obj) { + var interceptor, interceptorClass, altTag, mark, t1, + tag = $.getTagFunction.call$1(obj), + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + altTag = $.alternateTagFunction.call$2(obj, tag); + if (altTag != null) { + record = $.dispatchRecordsForInstanceTags[altTag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[altTag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[altTag]; + tag = altTag; + } + } + if (interceptorClass == null) + return null; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = A.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return A.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw A.wrapException(A.UnimplementedError$(tag)); + if (init.leafTags[tag] === true) { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return A.patchInteriorProto(obj, interceptor); + }, + patchInteriorProto(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; + }, + makeLeafDispatchRecord(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + }, + makeDefaultDispatchRecord(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return A.makeLeafDispatchRecord(interceptor); + else + return J.makeDispatchRecord(interceptor, proto, null, null); + }, + initNativeDispatch() { + if (true === $.initNativeDispatchFlag) + return; + $.initNativeDispatchFlag = true; + A.initNativeDispatchContinue(); + }, + initNativeDispatchContinue() { + var map, tags, fun, i, tag, proto, record, interceptorClass; + $.dispatchRecordsForInstanceTags = Object.create(null); + $.interceptorsForUncacheableTags = Object.create(null); + A.initHooks(); + map = init.interceptorsByTag; + tags = Object.getOwnPropertyNames(map); + if (typeof window != "undefined") { + window; + fun = function() { + }; + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + proto = $.prototypeForTagFunction.call$1(tag); + if (proto != null) { + record = A.makeDefaultDispatchRecord(tag, map[tag], proto); + if (record != null) { + Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + fun.prototype = proto; + } + } + } + } + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + if (/^[A-Za-z_]/.test(tag)) { + interceptorClass = map[tag]; + map["!" + tag] = interceptorClass; + map["~" + tag] = interceptorClass; + map["-" + tag] = interceptorClass; + map["+" + tag] = interceptorClass; + map["*" + tag] = interceptorClass; + } + } + }, + initHooks() { + var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, + hooks = B.C_JS_CONST0(); + hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); + if (typeof dartNativeDispatchHooksTransformer != "undefined") { + transformers = dartNativeDispatchHooksTransformer; + if (typeof transformers == "function") + transformers = [transformers]; + if (transformers.constructor == Array) + for (i = 0; i < transformers.length; ++i) { + transformer = transformers[i]; + if (typeof transformer == "function") + hooks = transformer(hooks) || hooks; + } + } + getTag = hooks.getTag; + getUnknownTag = hooks.getUnknownTag; + prototypeForTag = hooks.prototypeForTag; + $.getTagFunction = new A.initHooks_closure(getTag); + $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); + }, + applyHooksTransformer(transformer, hooks) { + return transformer(hooks) || hooks; + }, + JSSyntaxRegExp_makeNative(source, multiLine, caseSensitive, unicode, dotAll, global) { + var m = multiLine ? "m" : "", + i = caseSensitive ? "" : "i", + u = unicode ? "u" : "", + s = dotAll ? "s" : "", + g = global ? "g" : "", + regexp = function(source, modifiers) { + try { + return new RegExp(source, modifiers); + } catch (e) { + return e; + } + }(source, m + i + u + s + g); + if (regexp instanceof RegExp) + return regexp; + throw A.wrapException(A.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); + }, + stringContainsUnchecked(receiver, other, startIndex) { + var t1; + if (typeof other == "string") + return receiver.indexOf(other, startIndex) >= 0; + else if (other instanceof A.JSSyntaxRegExp) { + t1 = B.JSString_methods.substring$1(receiver, startIndex); + return other._nativeRegExp.test(t1); + } else { + t1 = J.allMatches$1$s(other, B.JSString_methods.substring$1(receiver, startIndex)); + return !t1.get$isEmpty(t1); + } + }, + escapeReplacement(replacement) { + if (replacement.indexOf("$", 0) >= 0) + return replacement.replace(/\$/g, "$$$$"); + return replacement; + }, + stringReplaceFirstRE(receiver, regexp, replacement, startIndex) { + var match = regexp._execGlobal$2(receiver, startIndex); + if (match == null) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(match), replacement); + }, + quoteStringForRegExp(string) { + if (/[[\]{}()*+?.\\^$|]/.test(string)) + return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + return string; + }, + stringReplaceAllUnchecked(receiver, pattern, replacement) { + var nativeRegexp; + if (typeof pattern == "string") + return A.stringReplaceAllUncheckedString(receiver, pattern, replacement); + if (pattern instanceof A.JSSyntaxRegExp) { + nativeRegexp = pattern.get$_nativeGlobalVersion(); + nativeRegexp.lastIndex = 0; + return receiver.replace(nativeRegexp, A.escapeReplacement(replacement)); + } + return A.stringReplaceAllGeneral(receiver, pattern, replacement); + }, + stringReplaceAllGeneral(receiver, pattern, replacement) { + var t1, startIndex, t2, match; + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), startIndex = 0, t2 = ""; t1.moveNext$0();) { + match = t1.get$current(t1); + t2 = t2 + receiver.substring(startIndex, match.get$start(match)) + replacement; + startIndex = match.get$end(match); + } + t1 = t2 + receiver.substring(startIndex); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + stringReplaceAllUncheckedString(receiver, pattern, replacement) { + var $length, t1, i, index; + if (pattern === "") { + if (receiver === "") + return replacement; + $length = receiver.length; + t1 = "" + replacement; + for (i = 0; i < $length; ++i) + t1 = t1 + receiver[i] + replacement; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + index = receiver.indexOf(pattern, 0); + if (index < 0) + return receiver; + if (receiver.length < 500 || replacement.indexOf("$", 0) >= 0) + return receiver.split(pattern).join(replacement); + return receiver.replace(new RegExp(A.quoteStringForRegExp(pattern), "g"), A.escapeReplacement(replacement)); + }, + stringReplaceFirstUnchecked(receiver, pattern, replacement, startIndex) { + var index, t1, matches, match; + if (typeof pattern == "string") { + index = receiver.indexOf(pattern, startIndex); + if (index < 0) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); + } + if (pattern instanceof A.JSSyntaxRegExp) + return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, A.escapeReplacement(replacement)) : A.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); + t1 = J.allMatches$2$s(pattern, receiver, startIndex); + matches = t1.get$iterator(t1); + if (!matches.moveNext$0()) + return receiver; + match = matches.get$current(matches); + return B.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(match), replacement); + }, + stringReplaceRangeUnchecked(receiver, start, end, replacement) { + return receiver.substring(0, start) + replacement + receiver.substring(end); + }, + ConstantMapView: function ConstantMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ConstantMap: function ConstantMap() { + }, + ConstantStringMap: function ConstantStringMap(t0, t1, t2, t3) { + var _ = this; + _.__js_helper$_length = t0; + _._jsObject = t1; + _.__js_helper$_keys = t2; + _.$ti = t3; + }, + ConstantStringMap_values_closure: function ConstantStringMap_values_closure(t0) { + this.$this = t0; + }, + _ConstantMapKeyIterable: function _ConstantMapKeyIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + GeneralConstantMap: function GeneralConstantMap(t0, t1) { + this._jsData = t0; + this.$ti = t1; + }, + GeneralConstantMap__typeTest_closure: function GeneralConstantMap__typeTest_closure(t0) { + this.T = t0; + }, + Instantiation: function Instantiation() { + }, + Instantiation1: function Instantiation1(t0, t1) { + this._genericClosure = t0; + this.$ti = t1; + }, + JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { + var _ = this; + _.__js_helper$_memberName = t0; + _.__js_helper$_kind = t1; + _._arguments = t2; + _._namedArgumentNames = t3; + _._typeArgumentCount = t4; + }, + Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { + this._box_0 = t0; + this.namedArgumentList = t1; + this.$arguments = t2; + }, + TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._pattern = t0; + _._arguments = t1; + _._argumentsExpr = t2; + _._expr = t3; + _._method = t4; + _._receiver = t5; + }, + NullError: function NullError(t0, t1) { + this.__js_helper$_message = t0; + this._method = t1; + }, + JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { + this.__js_helper$_message = t0; + this._method = t1; + this._receiver = t2; + }, + UnknownJsTypeError: function UnknownJsTypeError(t0) { + this.__js_helper$_message = t0; + }, + NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { + this._irritant = t0; + }, + ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { + this.dartException = t0; + this.stackTrace = t1; + }, + _StackTrace: function _StackTrace(t0) { + this._exception = t0; + this._trace = null; + }, + Closure: function Closure() { + }, + Closure0Args: function Closure0Args() { + }, + Closure2Args: function Closure2Args() { + }, + TearOffClosure: function TearOffClosure() { + }, + StaticClosure: function StaticClosure() { + }, + BoundClosure: function BoundClosure(t0, t1) { + this._receiver = t0; + this._interceptor = t1; + }, + RuntimeError: function RuntimeError(t0) { + this.message = t0; + }, + _Required: function _Required() { + }, + JsLinkedHashMap: function JsLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + JsLinkedHashMap_values_closure: function JsLinkedHashMap_values_closure(t0) { + this.$this = t0; + }, + JsLinkedHashMap_addAll_closure: function JsLinkedHashMap_addAll_closure(t0) { + this.$this = t0; + }, + LinkedHashMapCell: function LinkedHashMapCell(t0, t1) { + var _ = this; + _.hashMapCellKey = t0; + _.hashMapCellValue = t1; + _._previous = _._next = null; + }, + LinkedHashMapKeyIterable: function LinkedHashMapKeyIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1) { + var _ = this; + _.__js_helper$_map = t0; + _._modifications = t1; + _.__js_helper$_current = _._cell = null; + }, + initHooks_closure: function initHooks_closure(t0) { + this.getTag = t0; + }, + initHooks_closure0: function initHooks_closure0(t0) { + this.getUnknownTag = t0; + }, + initHooks_closure1: function initHooks_closure1(t0) { + this.prototypeForTag = t0; + }, + JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { + var _ = this; + _.pattern = t0; + _._nativeRegExp = t1; + _._nativeAnchoredRegExp = _._nativeGlobalRegExp = null; + }, + _MatchImplementation: function _MatchImplementation(t0) { + this._match = t0; + }, + _AllMatchesIterable: function _AllMatchesIterable(t0, t1, t2) { + this._re = t0; + this._string = t1; + this._start = t2; + }, + _AllMatchesIterator: function _AllMatchesIterator(t0, t1, t2) { + var _ = this; + _._regExp = t0; + _._string = t1; + _._nextIndex = t2; + _.__js_helper$_current = null; + }, + StringMatch: function StringMatch(t0, t1) { + this.start = t0; + this.pattern = t1; + }, + _StringAllMatchesIterable: function _StringAllMatchesIterable(t0, t1, t2) { + this._input = t0; + this._pattern = t1; + this.__js_helper$_index = t2; + }, + _StringAllMatchesIterator: function _StringAllMatchesIterator(t0, t1, t2) { + var _ = this; + _._input = t0; + _._pattern = t1; + _.__js_helper$_index = t2; + _.__js_helper$_current = null; + }, + throwLateFieldADI(fieldName) { + return A.throwExpression(A.LateError$fieldADI(fieldName)); + }, + throwUnnamedLateFieldNI() { + return A.throwExpression(A.LateError$fieldNI("")); + }, + throwUnnamedLateFieldAI() { + return A.throwExpression(A.LateError$fieldAI("")); + }, + throwUnnamedLateFieldADI() { + return A.throwExpression(A.LateError$fieldADI("")); + }, + _Cell$() { + var t1 = new A._Cell(""); + return t1._value = t1; + }, + _Cell$named(_name) { + var t1 = new A._Cell(_name); + return t1._value = t1; + }, + _Cell: function _Cell(t0) { + this.__late_helper$_name = t0; + this._value = null; + }, + _ensureNativeList(list) { + return list; + }, + NativeInt8List__create1(arg) { + return new Int8Array(arg); + }, + _checkValidIndex(index, list, $length) { + if (index >>> 0 !== index || index >= $length) + throw A.wrapException(A.diagnoseIndexError(list, index)); + }, + _checkValidRange(start, end, $length) { + var t1; + if (!(start >>> 0 !== start)) + if (end == null) + t1 = start > $length; + else + t1 = end >>> 0 !== end || start > end || end > $length; + else + t1 = true; + if (t1) + throw A.wrapException(A.diagnoseRangeError(start, end, $length)); + if (end == null) + return $length; + return end; + }, + NativeTypedData: function NativeTypedData() { + }, + NativeTypedArray: function NativeTypedArray() { + }, + NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { + }, + NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { + }, + NativeInt16List: function NativeInt16List() { + }, + NativeInt32List: function NativeInt32List() { + }, + NativeInt8List: function NativeInt8List() { + }, + NativeUint16List: function NativeUint16List() { + }, + NativeUint32List: function NativeUint32List() { + }, + NativeUint8ClampedList: function NativeUint8ClampedList() { + }, + NativeUint8List: function NativeUint8List() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + Rti__getQuestionFromStar(universe, rti) { + var question = rti._precomputed1; + return question == null ? rti._precomputed1 = A._Universe__lookupQuestionRti(universe, rti._primary, true) : question; + }, + Rti__getFutureFromFutureOr(universe, rti) { + var future = rti._precomputed1; + return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + }, + Rti__isUnionOfFunctionType(rti) { + var kind = rti._kind; + if (kind === 6 || kind === 7 || kind === 8) + return A.Rti__isUnionOfFunctionType(rti._primary); + return kind === 11 || kind === 12; + }, + Rti__getCanonicalRecipe(rti) { + return rti._canonicalRecipe; + }, + findType(recipe) { + return A._Universe_eval(init.typeUniverse, recipe, false); + }, + instantiatedGenericFunctionType(genericFunctionRti, instantiationRti) { + var t1, cache, key, probe, rti; + if (genericFunctionRti == null) + return null; + t1 = instantiationRti._rest; + cache = genericFunctionRti._bindCache; + if (cache == null) + cache = genericFunctionRti._bindCache = new Map(); + key = instantiationRti._canonicalRecipe; + probe = cache.get(key); + if (probe != null) + return probe; + rti = A._substitute(init.typeUniverse, genericFunctionRti._primary, t1, 0); + cache.set(key, rti); + return rti; + }, + _substitute(universe, rti, typeArguments, depth) { + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + kind = rti._kind; + switch (kind) { + case 5: + case 1: + case 2: + case 3: + case 4: + return rti; + case 6: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupStarRti(universe, substitutedBaseType, true); + case 7: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + case 8: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + case 9: + interfaceTypeArguments = rti._rest; + substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + if (substitutedInterfaceTypeArguments === interfaceTypeArguments) + return rti; + return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + case 10: + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + $arguments = rti._rest; + substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); + if (substitutedBase === base && substitutedArguments === $arguments) + return rti; + return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 11: + returnType = rti._primary; + substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); + functionParameters = rti._rest; + substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) + return rti; + return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 12: + bounds = rti._rest; + depth += bounds.length; + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + if (substitutedBounds === bounds && substitutedBase === base) + return rti; + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 13: + index = rti._primary; + if (index < depth) + return rti; + argument = typeArguments[index - depth]; + if (argument == null) + return rti; + return argument; + default: + throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + } + }, + _substituteArray(universe, rtiArray, typeArguments, depth) { + var changed, i, rti, substitutedRti, + $length = rtiArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; ++i) { + rti = rtiArray[i]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result[i] = substitutedRti; + } + return changed ? result : rtiArray; + }, + _substituteNamed(universe, namedArray, typeArguments, depth) { + var changed, i, t1, t2, rti, substitutedRti, + $length = namedArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; i += 3) { + t1 = namedArray[i]; + t2 = namedArray[i + 1]; + rti = namedArray[i + 2]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.splice(i, 3, t1, t2, substitutedRti); + } + return changed ? result : namedArray; + }, + _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { + var result, + requiredPositional = functionParameters._requiredPositional, + substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), + optionalPositional = functionParameters._optionalPositional, + substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), + named = functionParameters._named, + substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); + if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) + return functionParameters; + result = new A._FunctionParameters(); + result._requiredPositional = substitutedRequiredPositional; + result._optionalPositional = substitutedOptionalPositional; + result._named = substitutedNamed; + return result; + }, + _setArrayType(target, rti) { + target[init.arrayRti] = rti; + return target; + }, + closureFunctionType(closure) { + var signature = closure.$signature; + if (signature != null) { + if (typeof signature == "number") + return A.getTypeFromTypesTable(signature); + return closure.$signature(); + } + return null; + }, + instanceOrFunctionType(object, testRti) { + var rti; + if (A.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof A.Closure) { + rti = A.closureFunctionType(object); + if (rti != null) + return rti; + } + return A.instanceType(object); + }, + instanceType(object) { + var rti; + if (object instanceof A.Object) { + rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); + } + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A._instanceTypeFromConstructor(J.getInterceptor$(object)); + }, + _arrayInstanceType(object) { + var rti = object[init.arrayRti], + defaultRti = type$.JSArray_dynamic; + if (rti == null) + return defaultRti; + if (rti.constructor !== defaultRti.constructor) + return defaultRti; + return rti; + }, + _instanceType(object) { + var rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); + }, + _instanceTypeFromConstructor(instance) { + var $constructor = instance.constructor, + probe = $constructor.$ccache; + if (probe != null) + return probe; + return A._instanceTypeFromConstructorMiss(instance, $constructor); + }, + _instanceTypeFromConstructorMiss(instance, $constructor) { + var effectiveConstructor = instance instanceof A.Closure ? instance.__proto__.__proto__.constructor : $constructor, + rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + $constructor.$ccache = rti; + return rti; + }, + getTypeFromTypesTable(index) { + var rti, + table = init.types, + type = table[index]; + if (typeof type == "string") { + rti = A._Universe_eval(init.typeUniverse, type, false); + table[index] = rti; + return rti; + } + return type; + }, + getRuntimeType(object) { + var rti = object instanceof A.Closure ? A.closureFunctionType(object) : null; + return A.createRuntimeType(rti == null ? A.instanceType(object) : rti); + }, + createRuntimeType(rti) { + var recipe, starErasedRecipe, starErasedRti, + type = rti._cachedRuntimeType; + if (type != null) + return type; + recipe = rti._canonicalRecipe; + starErasedRecipe = recipe.replace(/\*/g, ""); + if (starErasedRecipe === recipe) + return rti._cachedRuntimeType = new A._Type(rti); + starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); + type = starErasedRti._cachedRuntimeType; + return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new A._Type(starErasedRti) : type; + }, + typeLiteral(recipe) { + return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); + }, + _installSpecializedIsTest(object) { + var t1, unstarred, isFn, $name, testRti = this; + if (testRti === type$.Object) + return A._finishIsFn(testRti, object, A._isObject); + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + return A._finishIsFn(testRti, object, A._isTop); + t1 = testRti._kind; + unstarred = t1 === 6 ? testRti._primary : testRti; + if (unstarred === type$.int) + isFn = A._isInt; + else if (unstarred === type$.double || unstarred === type$.num) + isFn = A._isNum; + else if (unstarred === type$.String) + isFn = A._isString; + else + isFn = unstarred === type$.bool ? A._isBool : null; + if (isFn != null) + return A._finishIsFn(testRti, object, isFn); + if (unstarred._kind === 9) { + $name = unstarred._primary; + if (unstarred._rest.every(A.isTopType)) { + testRti._specializedTestResource = "$is" + $name; + if ($name === "List") + return A._finishIsFn(testRti, object, A._isListTestViaProperty); + return A._finishIsFn(testRti, object, A._isTestViaProperty); + } + } else if (t1 === 7) + return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + return A._finishIsFn(testRti, object, A._generalIsTestImplementation); + }, + _finishIsFn(testRti, object, isFn) { + testRti._is = isFn; + return testRti._is(object); + }, + _installSpecializedAsCheck(object) { + var t1, testRti = this, + asFn = A._generalAsCheckImplementation; + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + asFn = A._asTop; + else if (testRti === type$.Object) + asFn = A._asObject; + else { + t1 = A.isNullable(testRti); + if (t1) + asFn = A._generalNullableAsCheckImplementation; + } + testRti._as = asFn; + return testRti._as(object); + }, + _nullIs(testRti) { + var t1, + kind = testRti._kind; + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + if (!(testRti === type$.legacy_Never)) + if (kind !== 7) + t1 = kind === 8 && A._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + _generalIsTestImplementation(object) { + var testRti = this; + if (object == null) + return A._nullIs(testRti); + return A._isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), null, testRti, null); + }, + _generalNullableIsTestImplementation(object) { + if (object == null) + return true; + return this._primary._is(object); + }, + _isTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isListTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + if (typeof object != "object") + return false; + if (Array.isArray(object)) + return true; + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _generalAsCheckImplementation(object) { + var t1, testRti = this; + if (object == null) { + t1 = A.isNullable(testRti); + if (t1) + return object; + } else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); + }, + _generalNullableAsCheckImplementation(object) { + var testRti = this; + if (object == null) + return object; + else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); + }, + _failedAsCheck(object, testRti) { + throw A.wrapException(A._TypeError$fromMessage(A._Error_compose(object, A.instanceOrFunctionType(object, testRti), A._rtiToString(testRti, null)))); + }, + _Error_compose(object, objectRti, checkedTypeDescription) { + var objectDescription = A.Error_safeToString(object); + return objectDescription + ": type '" + A._rtiToString(objectRti == null ? A.instanceType(object) : objectRti, null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; + }, + _TypeError$fromMessage(message) { + return new A._TypeError("TypeError: " + message); + }, + _TypeError__TypeError$forType(object, type) { + return new A._TypeError("TypeError: " + A._Error_compose(object, null, type)); + }, + _isObject(object) { + return object != null; + }, + _asObject(object) { + if (object != null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "Object")); + }, + _isTop(object) { + return true; + }, + _asTop(object) { + return object; + }, + _isBool(object) { + return true === object || false === object; + }, + _asBool(object) { + if (true === object) + return true; + if (false === object) + return false; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolS(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolQ(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool?")); + }, + _asDouble(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double?")); + }, + _isInt(object) { + return typeof object == "number" && Math.floor(object) === object; + }, + _asInt(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); + }, + _asIntS(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); + }, + _asIntQ(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int?")); + }, + _isNum(object) { + return typeof object == "number"; + }, + _asNum(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); + }, + _asNumS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); + }, + _asNumQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num?")); + }, + _isString(object) { + return typeof object == "string"; + }, + _asString(object) { + if (typeof object == "string") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); + }, + _asStringS(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); + }, + _asStringQ(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String?")); + }, + _rtiArrayToString(array, genericContext) { + var s, sep, i; + for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") + s += sep + A._rtiToString(array[i], genericContext); + return s; + }, + _functionRtiToString(functionType, genericContext, bounds) { + var boundsLength, outerContextLength, offset, i, t1, t2, typeParametersText, typeSep, boundRti, kind, t3, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; + if (bounds != null) { + boundsLength = bounds.length; + if (genericContext == null) { + genericContext = A._setArrayType([], type$.JSArray_String); + outerContextLength = null; + } else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsLength; i > 0; --i) + genericContext.push("T" + (offset + i)); + for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + typeParametersText = B.JSString_methods.$add(typeParametersText + typeSep, genericContext[genericContext.length - 1 - i]); + boundRti = bounds[i]; + kind = boundRti._kind; + if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) + if (!(boundRti === t2)) + t3 = false; + else + t3 = true; + else + t3 = true; + if (!t3) + typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); + } + typeParametersText += ">"; + } else { + typeParametersText = ""; + outerContextLength = null; + } + t1 = functionType._primary; + parameters = functionType._rest; + requiredPositional = parameters._requiredPositional; + requiredPositionalLength = requiredPositional.length; + optionalPositional = parameters._optionalPositional; + optionalPositionalLength = optionalPositional.length; + named = parameters._named; + namedLength = named.length; + returnTypeText = A._rtiToString(t1, genericContext); + for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); + if (optionalPositionalLength > 0) { + argumentsText += sep + "["; + for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); + argumentsText += "]"; + } + if (namedLength > 0) { + argumentsText += sep + "{"; + for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { + argumentsText += sep; + if (named[i + 1]) + argumentsText += "required "; + argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; + } + argumentsText += "}"; + } + if (outerContextLength != null) { + genericContext.toString; + genericContext.length = outerContextLength; + } + return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; + }, + _rtiToString(rti, genericContext) { + var s, questionArgument, argumentKind, $name, $arguments, t1, + kind = rti._kind; + if (kind === 5) + return "erased"; + if (kind === 2) + return "dynamic"; + if (kind === 3) + return "void"; + if (kind === 1) + return "Never"; + if (kind === 4) + return "any"; + if (kind === 6) { + s = A._rtiToString(rti._primary, genericContext); + return s; + } + if (kind === 7) { + questionArgument = rti._primary; + s = A._rtiToString(questionArgument, genericContext); + argumentKind = questionArgument._kind; + return (argumentKind === 11 || argumentKind === 12 ? "(" + s + ")" : s) + "?"; + } + if (kind === 8) + return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; + if (kind === 9) { + $name = A._unminifyOrTag(rti._primary); + $arguments = rti._rest; + return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; + } + if (kind === 11) + return A._functionRtiToString(rti, genericContext, null); + if (kind === 12) + return A._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 13) { + t1 = rti._primary; + return genericContext[genericContext.length - 1 - t1]; + } + return "?"; + }, + _unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + _Universe_findRule(universe, targetType) { + var rule = universe.tR[targetType]; + for (; typeof rule == "string";) + rule = universe.tR[rule]; + return rule; + }, + _Universe_findErasedType(universe, cls) { + var $length, erased, $arguments, i, $interface, + t1 = universe.eT, + probe = t1[cls]; + if (probe == null) + return A._Universe_eval(universe, cls, false); + else if (typeof probe == "number") { + $length = probe; + erased = A._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = A._Utils_newArrayOrEmpty($length); + for (i = 0; i < $length; ++i) + $arguments[i] = erased; + $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); + t1[cls] = $interface; + return $interface; + } else + return probe; + }, + _Universe_addRules(universe, rules) { + return A._Utils_objectAssign(universe.tR, rules); + }, + _Universe_addErasedTypes(universe, types) { + return A._Utils_objectAssign(universe.eT, types); + }, + _Universe_eval(universe, recipe, normalize) { + var rti, + t1 = universe.eC, + probe = t1.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, null, recipe, normalize)); + t1.set(recipe, rti); + return rti; + }, + _Universe_evalInEnvironment(universe, environment, recipe) { + var probe, rti, + cache = environment._evalCache; + if (cache == null) + cache = environment._evalCache = new Map(); + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); + cache.set(recipe, rti); + return rti; + }, + _Universe_bind(universe, environment, argumentsRti) { + var argumentsRecipe, probe, rti, + cache = environment._bindCache; + if (cache == null) + cache = environment._bindCache = new Map(); + argumentsRecipe = argumentsRti._canonicalRecipe; + probe = cache.get(argumentsRecipe); + if (probe != null) + return probe; + rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); + cache.set(argumentsRecipe, rti); + return rti; + }, + _Universe__installTypeTests(universe, rti) { + rti._as = A._installSpecializedAsCheck; + rti._is = A._installSpecializedIsTest; + return rti; + }, + _Universe__lookupTerminalRti(universe, kind, key) { + var rti, t1, + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = kind; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupStarRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "*", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createStarRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createStarRti(universe, baseType, key, normalize) { + var baseKind, t1, rti; + if (normalize) { + baseKind = baseType._kind; + if (!A.isStrongTopType(baseType)) + t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; + else + t1 = true; + if (t1) + return baseType; + } + rti = new A.Rti(null, null); + rti._kind = 6; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupQuestionRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "?", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createQuestionRti(universe, baseType, key, normalize) { + var baseKind, t1, starArgument, rti; + if (normalize) { + baseKind = baseType._kind; + if (!A.isStrongTopType(baseType)) + if (!(baseType === type$.Null || baseType === type$.JSNull)) + if (baseKind !== 7) + t1 = baseKind === 8 && A.isNullable(baseType._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + if (t1) + return baseType; + else if (baseKind === 1 || baseType === type$.legacy_Never) + return type$.Null; + else if (baseKind === 6) { + starArgument = baseType._primary; + if (starArgument._kind === 8 && A.isNullable(starArgument._primary)) + return starArgument; + else + return A.Rti__getQuestionFromStar(universe, baseType); + } + } + rti = new A.Rti(null, null); + rti._kind = 7; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupFutureOrRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "/", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createFutureOrRti(universe, baseType, key, normalize) { + var t1, t2, rti; + if (normalize) { + t1 = baseType._kind; + if (!A.isStrongTopType(baseType)) + if (!(baseType === type$.legacy_Object)) + t2 = false; + else + t2 = true; + else + t2 = true; + if (t2 || baseType === type$.Object) + return baseType; + else if (t1 === 1) + return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + else if (baseType === type$.Null || baseType === type$.JSNull) + return type$.nullable_Future_Null; + } + rti = new A.Rti(null, null); + rti._kind = 8; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupGenericFunctionParameterRti(universe, index) { + var rti, t1, + key = "" + index + "^", + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 13; + rti._primary = index; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__canonicalRecipeJoin($arguments) { + var s, sep, i, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") + s += sep + $arguments[i]._canonicalRecipe; + return s; + }, + _Universe__canonicalRecipeJoinNamed($arguments) { + var s, sep, i, t1, nameSep, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { + t1 = $arguments[i]; + nameSep = $arguments[i + 1] ? "!" : ":"; + s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; + } + return s; + }, + _Universe__lookupInterfaceRti(universe, $name, $arguments) { + var probe, rti, t1, + s = $name; + if ($arguments.length > 0) + s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; + probe = universe.eC.get(s); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 9; + rti._primary = $name; + rti._rest = $arguments; + if ($arguments.length > 0) + rti._precomputed1 = $arguments[0]; + rti._canonicalRecipe = s; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(s, t1); + return t1; + }, + _Universe__lookupBindingRti(universe, base, $arguments) { + var newBase, newArguments, key, probe, rti, t1; + if (base._kind === 10) { + newBase = base._primary; + newArguments = base._rest.concat($arguments); + } else { + newArguments = $arguments; + newBase = base; + } + key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 10; + rti._primary = newBase; + rti._rest = newArguments; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupFunctionRti(universe, returnType, parameters) { + var sep, key, probe, rti, t1, + s = returnType._canonicalRecipe, + requiredPositional = parameters._requiredPositional, + requiredPositionalLength = requiredPositional.length, + optionalPositional = parameters._optionalPositional, + optionalPositionalLength = optionalPositional.length, + named = parameters._named, + namedLength = named.length, + recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); + if (optionalPositionalLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; + } + if (namedLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; + } + key = s + (recipe + ")"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 11; + rti._primary = returnType; + rti._rest = parameters; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { + var t1, + key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { + var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; + if (normalize) { + $length = bounds.length; + typeArguments = A._Utils_newArrayOrEmpty($length); + for (count = 0, i = 0; i < $length; ++i) { + bound = bounds[i]; + if (bound._kind === 1) { + typeArguments[i] = bound; + ++count; + } + } + if (count > 0) { + substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + } + } + rti = new A.Rti(null, null); + rti._kind = 12; + rti._primary = baseFunctionType; + rti._rest = bounds; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Parser_create(universe, environment, recipe, normalize) { + return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; + }, + _Parser_parse(parser) { + var t2, i, ch, t3, array, head, base, parameters, optionalPositional, named, item, + source = parser.r, + t1 = parser.s; + for (t2 = source.length, i = 0; i < t2;) { + ch = source.charCodeAt(i); + if (ch >= 48 && ch <= 57) + i = A._Parser_handleDigit(i + 1, ch, source, t1); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36) + i = A._Parser_handleIdentifier(parser, i, source, t1, false); + else if (ch === 46) + i = A._Parser_handleIdentifier(parser, i, source, t1, true); + else { + ++i; + switch (ch) { + case 44: + break; + case 58: + t1.push(false); + break; + case 33: + t1.push(true); + break; + case 59: + t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); + break; + case 94: + t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + break; + case 35: + t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + break; + case 64: + t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + break; + case 126: + t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + break; + case 60: + t1.push(parser.p); + parser.p = t1.length; + break; + case 62: + t3 = parser.u; + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + head = t1.pop(); + if (typeof head == "string") + t1.push(A._Universe__lookupInterfaceRti(t3, head, array)); + else { + base = A._Parser_toType(t3, parser.e, head); + switch (base._kind) { + case 11: + t1.push(A._Universe__lookupGenericFunctionRti(t3, base, array, parser.n)); + break; + default: + t1.push(A._Universe__lookupBindingRti(t3, base, array)); + break; + } + } + break; + case 38: + A._Parser_handleExtendedOperations(parser, t1); + break; + case 42: + t3 = parser.u; + t1.push(A._Universe__lookupStarRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 63: + t3 = parser.u; + t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 47: + t3 = parser.u; + t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 40: + t1.push(parser.p); + parser.p = t1.length; + break; + case 41: + t3 = parser.u; + parameters = new A._FunctionParameters(); + optionalPositional = t3.sEA; + named = t3.sEA; + head = t1.pop(); + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = t1.pop(); + break; + case -2: + named = t1.pop(); + break; + default: + t1.push(head); + break; + } + else + t1.push(head); + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + parameters._requiredPositional = array; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + t1.push(A._Universe__lookupFunctionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parameters)); + break; + case 91: + t1.push(parser.p); + parser.p = t1.length; + break; + case 93: + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-1); + break; + case 123: + t1.push(parser.p); + parser.p = t1.length; + break; + case 125: + array = t1.splice(parser.p); + A._Parser_toTypesNamed(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-2); + break; + default: + throw "Bad character " + ch; + } + } + } + item = t1.pop(); + return A._Parser_toType(parser.u, parser.e, item); + }, + _Parser_handleDigit(i, digit, source, stack) { + var t1, ch, + value = digit - 48; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (!(ch >= 48 && ch <= 57)) + break; + value = value * 10 + (ch - 48); + } + stack.push(value); + return i; + }, + _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { + var t1, ch, t2, string, environment, recipe, + i = start + 1; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (ch === 46) { + if (hasPeriod) + break; + hasPeriod = true; + } else { + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)) + t2 = ch >= 48 && ch <= 57; + else + t2 = true; + if (!t2) + break; + } + } + string = source.substring(start, i); + if (hasPeriod) { + t1 = parser.u; + environment = parser.e; + if (environment._kind === 10) + environment = environment._primary; + recipe = A._Universe_findRule(t1, environment._primary)[string]; + if (recipe == null) + A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); + } else + stack.push(string); + return i; + }, + _Parser_handleExtendedOperations(parser, stack) { + var $top = stack.pop(); + if (0 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); + return; + } + if (1 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); + return; + } + throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); + }, + _Parser_toType(universe, environment, item) { + if (typeof item == "string") + return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") + return A._Parser_indexToType(universe, environment, item); + else + return item; + }, + _Parser_toTypes(universe, environment, items) { + var i, + $length = items.length; + for (i = 0; i < $length; ++i) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_toTypesNamed(universe, environment, items) { + var i, + $length = items.length; + for (i = 2; i < $length; i += 3) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_indexToType(universe, environment, index) { + var typeArguments, len, + kind = environment._kind; + if (kind === 10) { + if (index === 0) + return environment._primary; + typeArguments = environment._rest; + len = typeArguments.length; + if (index <= len) + return typeArguments[index - 1]; + index -= len; + environment = environment._primary; + kind = environment._kind; + } else if (index === 0) + return environment; + if (kind !== 9) + throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); + typeArguments = environment._rest; + if (index <= typeArguments.length) + return typeArguments[index - 1]; + throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + _isSubtype(universe, s, sEnv, t, tEnv) { + var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound; + if (s === t) + return true; + if (!A.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + return true; + sKind = s._kind; + if (sKind === 4) + return true; + if (A.isStrongTopType(s)) + return false; + if (s._kind !== 1) + t1 = false; + else + t1 = true; + if (t1) + return true; + leftTypeVariable = sKind === 13; + if (leftTypeVariable) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + return true; + tKind = t._kind; + t1 = s === type$.Null || s === type$.JSNull; + if (t1) { + if (tKind === 8) + return A._isSubtype(universe, s, sEnv, t._primary, tEnv); + return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; + } + if (t === type$.Object) { + if (sKind === 8) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return sKind !== 7; + } + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (tKind === 6) { + t1 = A.Rti__getQuestionFromStar(universe, t); + return A._isSubtype(universe, s, sEnv, t1, tEnv); + } + if (sKind === 8) { + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv)) + return false; + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + } + if (sKind === 7) { + t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv); + return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv); + } + if (tKind === 8) { + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv)) + return true; + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv); + } + if (tKind === 7) { + t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv); + return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv); + } + if (leftTypeVariable) + return false; + t1 = sKind !== 11; + if ((!t1 || sKind === 12) && t === type$.Function) + return true; + if (tKind === 12) { + if (s === type$.JavaScriptFunction) + return true; + if (sKind !== 12) + return false; + sBounds = s._rest; + tBounds = t._rest; + sLength = sBounds.length; + if (sLength !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + for (i = 0; i < sLength; ++i) { + sBound = sBounds[i]; + tBound = tBounds[i]; + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + return false; + } + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + } + if (tKind === 11) { + if (s === type$.JavaScriptFunction) + return true; + if (t1) + return false; + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv); + } + if (sKind === 9) { + if (tKind !== 9) + return false; + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + } + return false; + }, + _isFunctionSubtype(universe, s, sEnv, t, tEnv) { + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + return false; + sParameters = s._rest; + tParameters = t._rest; + sRequiredPositional = sParameters._requiredPositional; + tRequiredPositional = tParameters._requiredPositional; + sRequiredPositionalLength = sRequiredPositional.length; + tRequiredPositionalLength = tRequiredPositional.length; + if (sRequiredPositionalLength > tRequiredPositionalLength) + return false; + requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; + sOptionalPositional = sParameters._optionalPositional; + tOptionalPositional = tParameters._optionalPositional; + sOptionalPositionalLength = sOptionalPositional.length; + tOptionalPositionalLength = tOptionalPositional.length; + if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) + return false; + for (i = 0; i < sRequiredPositionalLength; ++i) { + t1 = sRequiredPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < requiredPositionalDelta; ++i) { + t1 = sOptionalPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < tOptionalPositionalLength; ++i) { + t1 = sOptionalPositional[requiredPositionalDelta + i]; + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + return false; + } + sNamed = sParameters._named; + tNamed = tParameters._named; + sNamedLength = sNamed.length; + tNamedLength = tNamed.length; + for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { + tName = tNamed[tIndex]; + for (; true;) { + if (sIndex >= sNamedLength) + return false; + sName = sNamed[sIndex]; + sIndex += 3; + if (tName < sName) + return false; + sIsRequired = sNamed[sIndex - 2]; + if (sName < tName) { + if (sIsRequired) + return false; + continue; + } + t1 = tNamed[tIndex + 1]; + if (sIsRequired && !t1) + return false; + t1 = sNamed[sIndex - 1]; + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + return false; + break; + } + } + for (; sIndex < sNamedLength;) { + if (sNamed[sIndex + 1]) + return false; + sIndex += 3; + } + return true; + }, + _isInterfaceSubtype(universe, s, sEnv, t, tEnv) { + var rule, recipes, $length, supertypeArgs, i, t1, t2, + sName = s._primary, + tName = t._primary; + for (; sName !== tName;) { + rule = universe.tR[sName]; + if (rule == null) + return false; + if (typeof rule == "string") { + sName = rule; + continue; + } + recipes = rule[tName]; + if (recipes == null) + return false; + $length = recipes.length; + supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; + for (i = 0; i < $length; ++i) + supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv); + } + t1 = s._rest; + t2 = t._rest; + return A._areArgumentsSubtypes(universe, t1, null, sEnv, t2, tEnv); + }, + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv) { + var i, t1, t2, + $length = sArgs.length; + for (i = 0; i < $length; ++i) { + t1 = sArgs[i]; + t2 = tArgs[i]; + if (!A._isSubtype(universe, t1, sEnv, t2, tEnv)) + return false; + } + return true; + }, + isNullable(t) { + var t1, + kind = t._kind; + if (!(t === type$.Null || t === type$.JSNull)) + if (!A.isStrongTopType(t)) + if (kind !== 7) + if (!(kind === 6 && A.isNullable(t._primary))) + t1 = kind === 8 && A.isNullable(t._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + isTopType(t) { + var t1; + if (!A.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + return t1; + }, + isStrongTopType(t) { + var kind = t._kind; + return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; + }, + _Utils_objectAssign(o, other) { + var i, key, + keys = Object.keys(other), + $length = keys.length; + for (i = 0; i < $length; ++i) { + key = keys[i]; + o[key] = other[key]; + } + }, + _Utils_newArrayOrEmpty($length) { + return $length > 0 ? new Array($length) : init.typeUniverse.sEA; + }, + Rti: function Rti(t0, t1) { + var _ = this; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; + }, + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; + }, + _Type: function _Type(t0) { + this._rti = t0; + }, + _Error: function _Error() { + }, + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; + }, + _AsyncRun__initializeScheduleImmediate() { + var div, span, t1 = {}; + if (self.scheduleImmediate != null) + return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); + if (self.MutationObserver != null && self.document != null) { + div = self.document.createElement("div"); + span = self.document.createElement("span"); + t1.storedCallback = null; + new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + } else if (self.setImmediate != null) + return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); + }, + _AsyncRun__scheduleImmediateJsOverride(callback) { + self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithSetImmediate(callback) { + self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithTimer(callback) { + A.Timer__createTimer(B.Duration_0, callback); + }, + Timer__createTimer(duration, callback) { + var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _TimerImpl$(milliseconds, callback) { + var t1 = new A._TimerImpl(true); + t1._TimerImpl$2(milliseconds, callback); + return t1; + }, + _TimerImpl$periodic(milliseconds, callback) { + var t1 = new A._TimerImpl(false); + t1._TimerImpl$periodic$2(milliseconds, callback); + return t1; + }, + _makeAsyncAwaitCompleter($T) { + return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); + }, + _asyncStartSync(bodyFunction, completer) { + bodyFunction.call$2(0, null); + completer.isSync = true; + return completer._future; + }, + _asyncAwait(object, bodyFunction) { + A._awaitOnObject(object, bodyFunction); + }, + _asyncReturn(object, completer) { + completer.complete$1(object); + }, + _asyncRethrow(object, completer) { + completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); + }, + _awaitOnObject(object, bodyFunction) { + var t1, future, + thenCallback = new A._awaitOnObject_closure(bodyFunction), + errorCallback = new A._awaitOnObject_closure0(bodyFunction); + if (object instanceof A._Future) + object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); + else { + t1 = type$.dynamic; + if (type$.Future_dynamic._is(object)) + object.then$1$2$onError(0, thenCallback, errorCallback, t1); + else { + future = new A._Future($.Zone__current, type$._Future_dynamic); + future._state = 8; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, errorCallback, t1); + } + } + }, + _wrapJsFunctionForAsync($function) { + var $protected = function(fn, ERROR) { + return function(errorCode, result) { + while (true) + try { + fn(errorCode, result); + break; + } catch (error) { + result = error; + errorCode = ERROR; + } + }; + }($function, 1); + return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); + }, + _IterationMarker_yieldStar(values) { + return new A._IterationMarker(values, 1); + }, + _IterationMarker_endOfIteration() { + return B._IterationMarker_null_2; + }, + _IterationMarker_uncaughtError(error) { + return new A._IterationMarker(error, 3); + }, + _makeSyncStarIterable(body, $T) { + return new A._SyncStarIterable(body, $T._eval$1("_SyncStarIterable<0>")); + }, + AsyncError$(error, stackTrace) { + var t1 = A.checkNotNullable(error, "error", type$.Object); + return new A.AsyncError(t1, stackTrace == null ? A.AsyncError_defaultStackTrace(error) : stackTrace); + }, + AsyncError_defaultStackTrace(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; + } + return B._StringStackTrace_3uE; + }, + Future_Future$value(value, $T) { + var t1, t2; + $T._as(value); + t1 = value; + t2 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t2._asyncComplete$1(t1); + return t2; + }, + Future_Future$error(error, stackTrace, $T) { + var t1, replacement; + A.checkNotNullable(error, "error", type$.Object); + t1 = $.Zone__current; + if (t1 !== B.C__RootZone) { + replacement = t1.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } + } + if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._asyncCompleteError$2(error, stackTrace); + return t1; + }, + Future_wait(futures, $T) { + var error, stackTrace, handleError, future, pos, e, st, t1, t2, exception, _box_0 = {}, cleanUp = null, + eagerError = false, + _future = new A._Future($.Zone__current, $T._eval$1("_Future>")); + _box_0.values = null; + _box_0.remaining = 0; + error = A._Cell$named("error"); + stackTrace = A._Cell$named("stackTrace"); + handleError = new A.Future_wait_handleError(_box_0, cleanUp, eagerError, _future, error, stackTrace); + try { + for (t1 = J.get$iterator$ax(futures), t2 = type$.Null; t1.moveNext$0();) { + future = t1.get$current(t1); + pos = _box_0.remaining; + J.then$1$2$onError$x(future, new A.Future_wait_closure(_box_0, pos, _future, cleanUp, eagerError, error, stackTrace, $T), handleError, t2); + ++_box_0.remaining; + } + t1 = _box_0.remaining; + if (t1 === 0) { + t1 = _future; + t1._completeWithValue$1(A._setArrayType([], $T._eval$1("JSArray<0>"))); + return t1; + } + _box_0.values = A.List_List$filled(t1, null, false, $T._eval$1("0?")); + } catch (exception) { + e = A.unwrapException(exception); + st = A.getTraceFromException(exception); + if (_box_0.remaining === 0 || eagerError) + return A.Future_Future$error(e, st, $T._eval$1("List<0>")); + else { + error._value = e; + stackTrace._value = st; + } + } + return _future; + }, + _Future$zoneValue(value, _zone, $T) { + var t1 = new A._Future(_zone, $T._eval$1("_Future<0>")); + t1._state = 8; + t1._resultOrListeners = value; + return t1; + }, + _Future__chainCoreFuture(source, target) { + var t1, listeners; + for (; t1 = source._state, (t1 & 4) !== 0;) + source = source._resultOrListeners; + if ((t1 & 24) !== 0) { + listeners = target._removeListeners$0(); + target._cloneResult$1(source); + A._Future__propagateToListeners(target, listeners); + } else { + listeners = target._resultOrListeners; + target._state = target._state & 1 | 4; + target._resultOrListeners = source; + source._prependListeners$1(listeners); + } + }, + _Future__propagateToListeners(source, listeners) { + var t2, _box_0, t3, t4, hasError, nextListener, nextListener0, sourceResult, t5, zone, oldZone, result, current, _box_1 = {}, + t1 = _box_1.source = source; + for (t2 = type$.Future_dynamic; true;) { + _box_0 = {}; + t3 = t1._state; + t4 = (t3 & 16) === 0; + hasError = !t4; + if (listeners == null) { + if (hasError && (t3 & 1) === 0) { + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + } + return; + } + _box_0.listener = listeners; + nextListener = listeners._nextListener; + for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { + t1._nextListener = null; + A._Future__propagateToListeners(_box_1.source, t1); + _box_0.listener = nextListener; + nextListener0 = nextListener._nextListener; + } + t3 = _box_1.source; + sourceResult = t3._resultOrListeners; + _box_0.listenerHasError = hasError; + _box_0.listenerValueOrError = sourceResult; + if (t4) { + t5 = t1.state; + t5 = (t5 & 1) !== 0 || (t5 & 15) === 8; + } else + t5 = true; + if (t5) { + zone = t1.result._zone; + if (hasError) { + t1 = t3._zone; + t1 = !(t1 === zone || t1.get$errorZone() === zone.get$errorZone()); + } else + t1 = false; + if (t1) { + t1 = _box_1.source; + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + return; + } + oldZone = $.Zone__current; + if (oldZone !== zone) + $.Zone__current = zone; + else + oldZone = null; + t1 = _box_0.listener.state; + if ((t1 & 15) === 8) + new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + else if (t4) { + if ((t1 & 1) !== 0) + new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); + } else if ((t1 & 2) !== 0) + new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); + if (oldZone != null) + $.Zone__current = oldZone; + t1 = _box_0.listenerValueOrError; + if (t2._is(t1)) { + t3 = _box_0.listener.$ti; + t3 = t3._eval$1("Future<2>")._is(t1) || !t3._rest[1]._is(t1); + } else + t3 = false; + if (t3) { + result = _box_0.listener.result; + if ((t1._state & 24) !== 0) { + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state & 30 | result._state & 1; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + A._Future__chainCoreFuture(t1, result); + return; + } + } + result = _box_0.listener.result; + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + t1 = _box_0.listenerHasError; + t3 = _box_0.listenerValueOrError; + if (!t1) { + result._state = 8; + result._resultOrListeners = t3; + } else { + result._state = result._state & 1 | 16; + result._resultOrListeners = t3; + } + _box_1.source = result; + t1 = result; + } + }, + _registerErrorHandler(errorHandler, zone) { + if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) + return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.dynamic_Function_Object._is(errorHandler)) + return zone.registerUnaryCallback$2$1(errorHandler, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); + }, + _microtaskLoop() { + var entry, next; + for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { + $._lastPriorityCallback = null; + next = entry.next; + $._nextCallback = next; + if (next == null) + $._lastCallback = null; + entry.callback.call$0(); + } + }, + _startMicrotaskLoop() { + $._isInCallbackLoop = true; + try { + A._microtaskLoop(); + } finally { + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + if ($._nextCallback != null) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } + }, + _scheduleAsyncCallback(callback) { + var newEntry = new A._AsyncCallbackEntry(callback), + lastCallback = $._lastCallback; + if (lastCallback == null) { + $._nextCallback = $._lastCallback = newEntry; + if (!$._isInCallbackLoop) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } else + $._lastCallback = lastCallback.next = newEntry; + }, + _schedulePriorityAsyncCallback(callback) { + var entry, lastPriorityCallback, next, + t1 = $._nextCallback; + if (t1 == null) { + A._scheduleAsyncCallback(callback); + $._lastPriorityCallback = $._lastCallback; + return; + } + entry = new A._AsyncCallbackEntry(callback); + lastPriorityCallback = $._lastPriorityCallback; + if (lastPriorityCallback == null) { + entry.next = t1; + $._nextCallback = $._lastPriorityCallback = entry; + } else { + next = lastPriorityCallback.next; + entry.next = next; + $._lastPriorityCallback = lastPriorityCallback.next = entry; + if (next == null) + $._lastCallback = entry; + } + }, + scheduleMicrotask(callback) { + var t1, _null = null, + currentZone = $.Zone__current; + if (B.C__RootZone === currentZone) { + A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); + return; + } + if (B.C__RootZone === currentZone.get$_scheduleMicrotask().zone) + t1 = B.C__RootZone.get$errorZone() === currentZone.get$errorZone(); + else + t1 = false; + if (t1) { + A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback$1$1(callback, type$.void)); + return; + } + t1 = $.Zone__current; + t1.scheduleMicrotask$1(t1.bindCallbackGuarded$1(callback)); + }, + Stream_Stream$fromFuture(future, $T) { + var _null = null, + t1 = $T._eval$1("_SyncStreamController<0>"), + controller = new A._SyncStreamController(_null, _null, _null, _null, t1); + future.then$1$2$onError(0, new A.Stream_Stream$fromFuture_closure(controller, $T), new A.Stream_Stream$fromFuture_closure0(controller), type$.Null); + return new A._ControllerStream(controller, t1._eval$1("_ControllerStream<1>")); + }, + StreamIterator_StreamIterator(stream) { + return new A._StreamIterator(A.checkNotNullable(stream, "stream", type$.Object)); + }, + StreamController_StreamController(onCancel, onListen, onPause, onResume, sync, $T) { + return sync ? new A._SyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_SyncStreamController<0>")) : new A._AsyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_AsyncStreamController<0>")); + }, + _runGuarded(notificationHandler) { + var e, s, exception; + if (notificationHandler == null) + return; + try { + notificationHandler.call$0(); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current.handleUncaughtError$2(e, s); + } + }, + _ControllerSubscription$(_controller, onData, onError, onDone, cancelOnError, $T) { + var t1 = $.Zone__current, + t2 = cancelOnError ? 1 : 0, + t3 = A._BufferingStreamSubscription__registerDataHandler(t1, onData, $T), + t4 = A._BufferingStreamSubscription__registerErrorHandler(t1, onError), + t5 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + return new A._ControllerSubscription(_controller, t3, t4, t1.registerCallback$1$1(t5, type$.void), t1, t2, $T._eval$1("_ControllerSubscription<0>")); + }, + _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { + var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; + return zone.registerUnaryCallback$2$1(t1, type$.void, $T); + }, + _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { + if (handleError == null) + handleError = A.async___nullErrorHandler$closure(); + if (type$.void_Function_Object_StackTrace._is(handleError)) + return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.void_Function_Object._is(handleError)) + return zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.", null)); + }, + _nullDataHandler(value) { + }, + _nullErrorHandler(error, stackTrace) { + $.Zone__current.handleUncaughtError$2(error, stackTrace); + }, + _nullDoneHandler() { + }, + Timer_Timer(duration, callback) { + var t1 = $.Zone__current; + if (t1 === B.C__RootZone) + return t1.createTimer$2(duration, callback); + return t1.createTimer$2(duration, t1.bindCallbackGuarded$1(callback)); + }, + _rootHandleUncaughtError($self, $parent, zone, error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + _rootHandleError(error, stackTrace) { + A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); + }, + _rootRun($self, $parent, zone, f) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$0(); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$0(); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunUnary($self, $parent, zone, f, arg) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$1(arg); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$1(arg); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunBinary($self, $parent, zone, f, arg1, arg2) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$2(arg1, arg2); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$2(arg1, arg2); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRegisterCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterUnaryCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterBinaryCallback($self, $parent, zone, f) { + return f; + }, + _rootErrorCallback($self, $parent, zone, error, stackTrace) { + return null; + }, + _rootScheduleMicrotask($self, $parent, zone, f) { + var t1, t2; + if (B.C__RootZone !== zone) { + t1 = B.C__RootZone.get$errorZone(); + t2 = zone.get$errorZone(); + f = t1 !== t2 ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); + } + A._scheduleAsyncCallback(f); + }, + _rootCreateTimer($self, $parent, zone, duration, callback) { + return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback$1$1(callback, type$.void) : callback); + }, + _rootCreatePeriodicTimer($self, $parent, zone, duration, callback) { + var milliseconds; + if (B.C__RootZone !== zone) + callback = zone.bindUnaryCallback$2$1(callback, type$.void, type$.Timer); + milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _rootPrint($self, $parent, zone, line) { + A.printString(line); + }, + _printToZone(line) { + $.Zone__current.print$1(line); + }, + _rootFork($self, $parent, zone, specification, zoneValues) { + var valueMap, t1, handleUncaughtError; + $.printToZone = A.async___printToZone$closure(); + if (specification == null) + specification = B._ZoneSpecification_ALf; + if (zoneValues == null) + valueMap = zone.get$_async$_map(); + else { + t1 = type$.nullable_Object; + valueMap = A.HashMap_HashMap$from(zoneValues, t1, t1); + } + t1 = new A._CustomZone(zone.get$_run(), zone.get$_runUnary(), zone.get$_runBinary(), zone.get$_registerCallback(), zone.get$_registerUnaryCallback(), zone.get$_registerBinaryCallback(), zone.get$_errorCallback(), zone.get$_scheduleMicrotask(), zone.get$_createTimer(), zone.get$_createPeriodicTimer(), zone.get$_print(), zone.get$_fork(), zone.get$_handleUncaughtError(), zone, valueMap); + handleUncaughtError = specification.handleUncaughtError; + if (handleUncaughtError != null) + t1._handleUncaughtError = new A._ZoneFunction(t1, handleUncaughtError); + return t1; + }, + runZoned(body, zoneValues, $R) { + A.checkNotNullable(body, "body", $R._eval$1("0()")); + return A._runZoned(body, zoneValues, null, $R); + }, + _runZoned(body, zoneValues, specification, $R) { + return $.Zone__current.fork$2$specification$zoneValues(specification, zoneValues).run$1$1(0, body, $R); + }, + _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { + this._box_0 = t0; + }, + _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) { + this._box_0 = t0; + this.div = t1; + this.span = t2; + }, + _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) { + this.callback = t0; + }, + _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) { + this.callback = t0; + }, + _TimerImpl: function _TimerImpl(t0) { + this._once = t0; + this._handle = null; + this._tick = 0; + }, + _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) { + this.$this = t0; + this.callback = t1; + }, + _TimerImpl$periodic_closure: function _TimerImpl$periodic_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.milliseconds = t1; + _.start = t2; + _.callback = t3; + }, + _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { + this._future = t0; + this.isSync = false; + this.$ti = t1; + }, + _awaitOnObject_closure: function _awaitOnObject_closure(t0) { + this.bodyFunction = t0; + }, + _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) { + this.bodyFunction = t0; + }, + _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { + this.$protected = t0; + }, + _IterationMarker: function _IterationMarker(t0, t1) { + this.value = t0; + this.state = t1; + }, + _SyncStarIterator: function _SyncStarIterator(t0) { + var _ = this; + _._body = t0; + _._suspendedBodies = _._nestedIterator = _._async$_current = null; + }, + _SyncStarIterable: function _SyncStarIterable(t0, t1) { + this._outerHelper = t0; + this.$ti = t1; + }, + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + Future_wait_handleError: function Future_wait_handleError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.cleanUp = t1; + _.eagerError = t2; + _._future = t3; + _.error = t4; + _.stackTrace = t5; + }, + Future_wait_closure: function Future_wait_closure(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._box_0 = t0; + _.pos = t1; + _._future = t2; + _.cleanUp = t3; + _.eagerError = t4; + _.error = t5; + _.stackTrace = t6; + _.T = t7; + }, + _Completer: function _Completer() { + }, + _AsyncCompleter: function _AsyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _SyncCompleter: function _SyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { + var _ = this; + _._nextListener = null; + _.result = t0; + _.state = t1; + _.callback = t2; + _.errorCallback = t3; + _.$ti = t4; + }, + _Future: function _Future(t0, t1) { + var _ = this; + _._state = 0; + _._zone = t0; + _._resultOrListeners = null; + _.$ti = t1; + }, + _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { + this.$this = t0; + this.listener = t1; + }, + _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { + this.$this = t0; + }, + _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { + this.$this = t0; + }, + _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { + this.$this = t0; + this.e = t1; + this.s = t2; + }, + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__chainFuture_closure: function _Future__chainFuture_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__asyncCompleteError_closure: function _Future__asyncCompleteError_closure(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { + this._box_0 = t0; + this._box_1 = t1; + this.hasError = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { + this.originalSource = t0; + }, + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { + this._box_0 = t0; + this.sourceResult = t1; + }, + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { + this.callback = t0; + this.next = null; + }, + Stream: function Stream() { + }, + Stream_Stream$fromFuture_closure: function Stream_Stream$fromFuture_closure(t0, t1) { + this.controller = t0; + this.T = t1; + }, + Stream_Stream$fromFuture_closure0: function Stream_Stream$fromFuture_closure0(t0) { + this.controller = t0; + }, + Stream_length_closure: function Stream_length_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Stream_length_closure0: function Stream_length_closure0(t0, t1) { + this._box_0 = t0; + this.future = t1; + }, + StreamTransformerBase: function StreamTransformerBase() { + }, + _StreamController: function _StreamController() { + }, + _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { + this.$this = t0; + }, + _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) { + this.$this = t0; + }, + _SyncStreamControllerDispatch: function _SyncStreamControllerDispatch() { + }, + _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() { + }, + _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _ControllerStream: function _ControllerStream(t0, t1) { + this._controller = t0; + this.$ti = t1; + }, + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._controller = t0; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _AddStreamState: function _AddStreamState() { + }, + _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) { + this.$this = t0; + }, + _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2) { + this.varData = t0; + this.addStreamFuture = t1; + this.addSubscription = t2; + }, + _BufferingStreamSubscription: function _BufferingStreamSubscription() { + }, + _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) { + this.$this = t0; + }, + _StreamImpl: function _StreamImpl() { + }, + _DelayedEvent: function _DelayedEvent() { + }, + _DelayedData: function _DelayedData(t0) { + this.value = t0; + this.next = null; + }, + _DelayedError: function _DelayedError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + this.next = null; + }, + _DelayedDone: function _DelayedDone() { + }, + _PendingEvents: function _PendingEvents() { + this._state = 0; + this.lastPendingEvent = this.firstPendingEvent = null; + }, + _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { + this.$this = t0; + this.dispatch = t1; + }, + _StreamIterator: function _StreamIterator(t0) { + this._subscription = null; + this._stateData = t0; + this._async$_hasValue = false; + }, + _ForwardingStream: function _ForwardingStream() { + }, + _ForwardingStreamSubscription: function _ForwardingStreamSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._stream = t0; + _._subscription = null; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _ExpandStream: function _ExpandStream(t0, t1, t2) { + this._expand = t0; + this._async$_source = t1; + this.$ti = t2; + }, + _ZoneFunction: function _ZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { + var _ = this; + _.handleUncaughtError = t0; + _.run = t1; + _.runUnary = t2; + _.runBinary = t3; + _.registerCallback = t4; + _.registerUnaryCallback = t5; + _.registerBinaryCallback = t6; + _.errorCallback = t7; + _.scheduleMicrotask = t8; + _.createTimer = t9; + _.createPeriodicTimer = t10; + _.print = t11; + _.fork = t12; + }, + _ZoneDelegate: function _ZoneDelegate(t0) { + this._delegationTarget = t0; + }, + _Zone: function _Zone() { + }, + _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._run = t0; + _._runUnary = t1; + _._runBinary = t2; + _._registerCallback = t3; + _._registerUnaryCallback = t4; + _._registerBinaryCallback = t5; + _._errorCallback = t6; + _._scheduleMicrotask = t7; + _._createTimer = t8; + _._createPeriodicTimer = t9; + _._print = t10; + _._fork = t11; + _._handleUncaughtError = t12; + _._delegateCache = null; + _.parent = t13; + _._async$_map = t14; + }, + _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.registered = t1; + this.R = t2; + }, + _CustomZone_bindUnaryCallback_closure: function _CustomZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.registered = t1; + _.T = t2; + _.R = t3; + }, + _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.registered = t1; + }, + _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + _RootZone: function _RootZone() { + }, + _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.f = t1; + this.R = t2; + }, + _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.f = t1; + _.T = t2; + _.R = t3; + }, + _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + HashMap_HashMap($K, $V) { + return new A._HashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_HashMap<1,2>")); + }, + _HashMap__getTableEntry(table, key) { + var entry = table[key]; + return entry === table ? null : entry; + }, + _HashMap__setTableEntry(table, key, value) { + if (value == null) + table[key] = table; + else + table[key] = value; + }, + _HashMap__newHashTable() { + var table = Object.create(null); + A._HashMap__setTableEntry(table, "", table); + delete table[""]; + return table; + }, + LinkedHashMap_LinkedHashMap(equals, hashCode, isValidKey, $K, $V) { + if (isValidKey == null) + if (hashCode == null) { + if (equals == null) + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + hashCode = A.collection___defaultHashCode$closure(); + } else { + if (A.core__identityHashCode$closure() === hashCode && A.core__identical$closure() === equals) + return new A._LinkedIdentityHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_LinkedIdentityHashMap<1,2>")); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + else { + if (hashCode == null) + hashCode = A.collection___defaultHashCode$closure(); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + return A._LinkedCustomHashMap$(equals, hashCode, isValidKey, $K, $V); + }, + LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { + return A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))); + }, + LinkedHashMap_LinkedHashMap$_empty($K, $V) { + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + }, + _LinkedCustomHashMap$(_equals, _hashCode, validKey, $K, $V) { + var t1 = validKey != null ? validKey : new A._LinkedCustomHashMap_closure($K); + return new A._LinkedCustomHashMap(_equals, _hashCode, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("_LinkedCustomHashMap<1,2>")); + }, + LinkedHashSet_LinkedHashSet($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_empty($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_literal(values, $E) { + return A.fillLiteralSet(values, new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>"))); + }, + _LinkedHashSet__newHashTable() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + }, + _LinkedHashSetIterator$(_set, _modifications) { + var t1 = new A._LinkedHashSetIterator(_set, _modifications); + t1._collection$_cell = _set._collection$_first; + return t1; + }, + UnmodifiableListView$(source, $E) { + return new A.UnmodifiableListView(source, $E._eval$1("UnmodifiableListView<0>")); + }, + _defaultEquals(a, b) { + return J.$eq$(a, b); + }, + _defaultHashCode(a) { + return J.get$hashCode$(a); + }, + HashMap_HashMap$from(other, $K, $V) { + var result = A.HashMap_HashMap($K, $V); + other.forEach$1(0, new A.HashMap_HashMap$from_closure(result, $K, $V)); + return result; + }, + IterableBase_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (A._isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = A._setArrayType([], type$.JSArray_String); + $._toStringVisiting.push(iterable); + try { + A._iterablePartsToStrings(iterable, parts); + } finally { + $._toStringVisiting.pop(); + } + t1 = A.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + IterableBase_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (A._isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new A.StringBuffer(leftDelimiter); + $._toStringVisiting.push(iterable); + try { + t1 = buffer; + t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); + } finally { + $._toStringVisiting.pop(); + } + buffer._contents += rightDelimiter; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _isToStringVisiting(o) { + var t1, i; + for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i) + if (o === $._toStringVisiting[i]) + return true; + return false; + }, + _iterablePartsToStrings(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; + while (true) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = A.S(it.get$current(it)); + parts.push(next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + ultimateString = parts.pop(); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(it); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + parts.push(A.S(penultimate)); + return; + } + ultimateString = A.S(penultimate); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(it); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(it); + ++count; + if (count > 100) { + while (true) { + if (!($length > 75 && count > 3)) + break; + $length -= parts.pop().length + 2; + --count; + } + parts.push("..."); + return; + } + } + penultimateString = A.S(penultimate); + ultimateString = A.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } + } + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + while (true) { + if (!($length > 80 && parts.length > 3)) + break; + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } + } + if (elision != null) + parts.push(elision); + parts.push(penultimateString); + parts.push(ultimateString); + }, + LinkedHashMap_LinkedHashMap$from(other, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + other.forEach$1(0, new A.LinkedHashMap_LinkedHashMap$from_closure(result, $K, $V)); + return result; + }, + LinkedHashMap_LinkedHashMap$of(other, $K, $V) { + var t1 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + t1.addAll$1(0, other); + return t1; + }, + LinkedHashSet_LinkedHashSet$from(elements, $E) { + var t1, _i, + result = A.LinkedHashSet_LinkedHashSet($E); + for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) + result.add$1(0, $E._as(elements[_i])); + return result; + }, + LinkedHashSet_LinkedHashSet$of(elements, $E) { + var t1 = A.LinkedHashSet_LinkedHashSet($E); + t1.addAll$1(0, elements); + return t1; + }, + ListMixin__compareAny(a, b) { + var t1 = type$.Comparable_dynamic; + return J.compareTo$1$ns(t1._as(a), t1._as(b)); + }, + MapBase_mapToString(m) { + var result, t1 = {}; + if (A._isToStringVisiting(m)) + return "{...}"; + result = new A.StringBuffer(""); + try { + $._toStringVisiting.push(m); + result._contents += "{"; + t1.first = true; + m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); + result._contents += "}"; + } finally { + $._toStringVisiting.pop(); + } + t1 = result._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + MapBase__fillMapWithIterables(map, keys, values) { + var keyIterator = keys.get$iterator(keys), + valueIterator = values.get$iterator(values), + hasNextKey = keyIterator.moveNext$0(), + hasNextValue = valueIterator.moveNext$0(); + while (true) { + if (!(hasNextKey && hasNextValue)) + break; + map.$indexSet(0, keyIterator.get$current(keyIterator), valueIterator.get$current(valueIterator)); + hasNextKey = keyIterator.moveNext$0(); + hasNextValue = valueIterator.moveNext$0(); + } + if (hasNextKey || hasNextValue) + throw A.wrapException(A.ArgumentError$("Iterables do not have same length.", null)); + }, + ListQueue$($E) { + return new A.ListQueue(A.List_List$filled(A.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); + }, + ListQueue__calculateCapacity(initialCapacity) { + return 8; + }, + ListQueue_ListQueue$of(elements, $E) { + var t1 = A.ListQueue$($E); + t1.addAll$1(0, elements); + return t1; + }, + ListQueue__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (; true; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + _ListQueueIterator$(queue) { + return new A._ListQueueIterator(queue, queue._collection$_tail, queue._modificationCount, queue._collection$_head); + }, + _UnmodifiableSetMixin__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot change an unmodifiable set")); + }, + _HashMap: function _HashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _.$ti = t0; + }, + _HashMap_values_closure: function _HashMap_values_closure(t0) { + this.$this = t0; + }, + _HashMap_addAll_closure: function _HashMap_addAll_closure(t0) { + this.$this = t0; + }, + _IdentityHashMap: function _IdentityHashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _.$ti = t0; + }, + _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1) { + var _ = this; + _._map = t0; + _._keys = t1; + _._offset = 0; + _._collection$_current = null; + }, + _LinkedIdentityHashMap: function _LinkedIdentityHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + _LinkedCustomHashMap: function _LinkedCustomHashMap(t0, t1, t2, t3) { + var _ = this; + _._equals = t0; + _._hashCode = t1; + _._validKey = t2; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t3; + }, + _LinkedCustomHashMap_closure: function _LinkedCustomHashMap_closure(t0) { + this.K = t0; + }, + _LinkedHashSet: function _LinkedHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._collection$_modifications = 0; + _.$ti = t0; + }, + _LinkedIdentityHashSet: function _LinkedIdentityHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._collection$_modifications = 0; + _.$ti = t0; + }, + _LinkedHashSetCell: function _LinkedHashSetCell(t0) { + this._element = t0; + this._collection$_previous = this._collection$_next = null; + }, + _LinkedHashSetIterator: function _LinkedHashSetIterator(t0, t1) { + var _ = this; + _._set = t0; + _._collection$_modifications = t1; + _._collection$_current = _._collection$_cell = null; + }, + UnmodifiableListView: function UnmodifiableListView(t0, t1) { + this._collection$_source = t0; + this.$ti = t1; + }, + HashMap_HashMap$from_closure: function HashMap_HashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + IterableBase: function IterableBase() { + }, + LinkedHashMap_LinkedHashMap$from_closure: function LinkedHashMap_LinkedHashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + ListBase: function ListBase() { + }, + ListMixin: function ListMixin() { + }, + MapBase: function MapBase() { + }, + MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) { + this._box_0 = t0; + this.result = t1; + }, + MapMixin: function MapMixin() { + }, + MapMixin_addAll_closure: function MapMixin_addAll_closure(t0) { + this.$this = t0; + }, + MapMixin_entries_closure: function MapMixin_entries_closure(t0) { + this.$this = t0; + }, + UnmodifiableMapBase: function UnmodifiableMapBase() { + }, + _MapBaseValueIterable: function _MapBaseValueIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _MapBaseValueIterator: function _MapBaseValueIterator(t0, t1) { + this._keys = t0; + this._map = t1; + this._collection$_current = null; + }, + _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { + }, + MapView: function MapView() { + }, + UnmodifiableMapView: function UnmodifiableMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ListQueue: function ListQueue(t0, t1) { + var _ = this; + _._collection$_table = t0; + _._modificationCount = _._collection$_tail = _._collection$_head = 0; + _.$ti = t1; + }, + _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3) { + var _ = this; + _._queue = t0; + _._collection$_end = t1; + _._modificationCount = t2; + _._collection$_position = t3; + _._collection$_current = null; + }, + SetMixin: function SetMixin() { + }, + _SetBase: function _SetBase() { + }, + _UnmodifiableSetMixin: function _UnmodifiableSetMixin() { + }, + _UnmodifiableSet: function _UnmodifiableSet(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _ListBase_Object_ListMixin: function _ListBase_Object_ListMixin() { + }, + _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { + }, + __SetBase_Object_SetMixin: function __SetBase_Object_SetMixin() { + }, + __UnmodifiableSet__SetBase__UnmodifiableSetMixin: function __UnmodifiableSet__SetBase__UnmodifiableSetMixin() { + }, + Utf8Decoder__convertIntercepted(allowMalformed, codeUnits, start, end) { + var casted, result; + if (codeUnits instanceof Uint8Array) { + casted = codeUnits; + end = casted.length; + if (end - start < 15) + return null; + result = A.Utf8Decoder__convertInterceptedUint8List(allowMalformed, casted, start, end); + if (result != null && allowMalformed) + if (result.indexOf("\ufffd") >= 0) + return null; + return result; + } + return null; + }, + Utf8Decoder__convertInterceptedUint8List(allowMalformed, codeUnits, start, end) { + var decoder = allowMalformed ? $.$get$Utf8Decoder__decoderNonfatal() : $.$get$Utf8Decoder__decoder(); + if (decoder == null) + return null; + if (0 === start && end === codeUnits.length) + return A.Utf8Decoder__useTextDecoder(decoder, codeUnits); + return A.Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, A.RangeError_checkValidRange(start, end, codeUnits.length))); + }, + Utf8Decoder__useTextDecoder(decoder, codeUnits) { + var t1, exception; + try { + t1 = decoder.decode(codeUnits); + return t1; + } catch (exception) { + } + return null; + }, + Base64Codec__checkPadding(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { + if (B.JSInt_methods.$mod($length, 4) !== 0) + throw A.wrapException(A.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); + if (firstPadding + paddingCount !== $length) + throw A.wrapException(A.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); + if (paddingCount > 2) + throw A.wrapException(A.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); + }, + _Base64Encoder_encodeChunk(alphabet, bytes, start, end, isLast, output, outputIndex, state) { + var t1, i, byteOr, byte, outputIndex0, outputIndex1, + bits = state >>> 2, + expectedChars = 3 - (state & 3); + for (t1 = J.getInterceptor$asx(bytes), i = start, byteOr = 0; i < end; ++i) { + byte = t1.$index(bytes, i); + byteOr = (byteOr | byte) >>> 0; + bits = (bits << 8 | byte) & 16777215; + --expectedChars; + if (expectedChars === 0) { + outputIndex0 = outputIndex + 1; + output[outputIndex] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 18 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 12 & 63); + outputIndex0 = outputIndex + 1; + output[outputIndex] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 6 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = B.JSString_methods._codeUnitAt$1(alphabet, bits & 63); + bits = 0; + expectedChars = 3; + } + } + if (byteOr >= 0 && byteOr <= 255) { + if (isLast && expectedChars < 3) { + outputIndex0 = outputIndex + 1; + outputIndex1 = outputIndex0 + 1; + if (3 - expectedChars === 1) { + output[outputIndex] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 2 & 63); + output[outputIndex0] = B.JSString_methods._codeUnitAt$1(alphabet, bits << 4 & 63); + output[outputIndex1] = 61; + output[outputIndex1 + 1] = 61; + } else { + output[outputIndex] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 10 & 63); + output[outputIndex0] = B.JSString_methods._codeUnitAt$1(alphabet, bits >>> 4 & 63); + output[outputIndex1] = B.JSString_methods._codeUnitAt$1(alphabet, bits << 2 & 63); + output[outputIndex1 + 1] = 61; + } + return 0; + } + return (bits << 2 | 3 - expectedChars) >>> 0; + } + for (i = start; i < end;) { + byte = t1.$index(bytes, i); + if (byte < 0 || byte > 255) + break; + ++i; + } + throw A.wrapException(A.ArgumentError$value(bytes, "Not a byte value at index " + i + ": 0x" + J.toRadixString$1$n(t1.$index(bytes, i), 16), null)); + }, + JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { + return new A.JsonUnsupportedObjectError(unsupportedObject, cause); + }, + _defaultToEncodable(object) { + return object.toJson$0(); + }, + _JsonStringStringifier$(_sink, _toEncodable) { + return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); + }, + _JsonStringStringifier_stringify(object, toEncodable, indent) { + var t1, + output = new A.StringBuffer(""), + stringifier = A._JsonStringStringifier$(output, toEncodable); + stringifier.writeObject$1(object); + t1 = output._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Utf8Decoder_errorDescription(state) { + switch (state) { + case 65: + return "Missing extension byte"; + case 67: + return "Unexpected extension byte"; + case 69: + return "Invalid UTF-8 byte"; + case 71: + return "Overlong encoding"; + case 73: + return "Out of unicode range"; + case 75: + return "Encoded surrogate"; + case 77: + return "Unfinished UTF-8 octet sequence"; + default: + return ""; + } + }, + _Utf8Decoder__makeUint8List(codeUnits, start, end) { + var t1, i, b, + $length = end - start, + bytes = new Uint8Array($length); + for (t1 = J.getInterceptor$asx(codeUnits), i = 0; i < $length; ++i) { + b = t1.$index(codeUnits, start + i); + bytes[i] = (b & 4294967040) >>> 0 !== 0 ? 255 : b; + } + return bytes; + }, + Utf8Decoder__decoder_closure: function Utf8Decoder__decoder_closure() { + }, + Utf8Decoder__decoderNonfatal_closure: function Utf8Decoder__decoderNonfatal_closure() { + }, + AsciiCodec: function AsciiCodec() { + }, + _UnicodeSubsetEncoder: function _UnicodeSubsetEncoder() { + }, + AsciiEncoder: function AsciiEncoder(t0) { + this._subsetMask = t0; + }, + Base64Codec: function Base64Codec() { + }, + Base64Encoder: function Base64Encoder() { + }, + _Base64Encoder: function _Base64Encoder(t0) { + this._convert$_state = 0; + this._alphabet = t0; + }, + _Base64EncoderSink: function _Base64EncoderSink() { + }, + _Utf8Base64EncoderSink: function _Utf8Base64EncoderSink(t0, t1) { + this._sink = t0; + this._encoder = t1; + }, + ByteConversionSink: function ByteConversionSink() { + }, + ByteConversionSinkBase: function ByteConversionSinkBase() { + }, + ChunkedConversionSink: function ChunkedConversionSink() { + }, + Codec: function Codec() { + }, + Converter: function Converter() { + }, + Encoding: function Encoding() { + }, + JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCyclicError: function JsonCyclicError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCodec: function JsonCodec() { + }, + JsonEncoder: function JsonEncoder(t0) { + this._toEncodable = t0; + }, + _JsonStringifier: function _JsonStringifier() { + }, + _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) { + this._box_0 = t0; + this.keyValueList = t1; + }, + _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { + this._sink = t0; + this._seen = t1; + this._toEncodable = t2; + }, + StringConversionSinkBase: function StringConversionSinkBase() { + }, + StringConversionSinkMixin: function StringConversionSinkMixin() { + }, + _StringSinkConversionSink: function _StringSinkConversionSink(t0) { + this._stringSink = t0; + }, + _StringCallbackSink: function _StringCallbackSink(t0, t1) { + this._convert$_callback = t0; + this._stringSink = t1; + }, + _Utf8StringSinkAdapter: function _Utf8StringSinkAdapter(t0, t1, t2) { + this._decoder = t0; + this._sink = t1; + this._stringSink = t2; + }, + Utf8Codec: function Utf8Codec() { + }, + Utf8Encoder: function Utf8Encoder() { + }, + _Utf8Encoder: function _Utf8Encoder(t0) { + this._bufferIndex = 0; + this._convert$_buffer = t0; + }, + Utf8Decoder: function Utf8Decoder(t0) { + this._allowMalformed = t0; + }, + _Utf8Decoder: function _Utf8Decoder(t0) { + this.allowMalformed = t0; + this._convert$_state = 16; + this._charOrIndex = 0; + }, + identityHashCode(object) { + return A.objectHashCode(object); + }, + Function_apply($function, positionalArguments) { + return A.Primitives_applyFunction($function, positionalArguments, null); + }, + Expando$() { + return new A.Expando(new WeakMap()); + }, + Expando__checkType(object) { + if (A._isBool(object) || typeof object == "number" || typeof object == "string") + throw A.wrapException(A.ArgumentError$value(object, string$.Expand, null)); + }, + int_parse(source, radix) { + var value = A.Primitives_parseInt(source, radix); + if (value != null) + return value; + throw A.wrapException(A.FormatException$(source, null, null)); + }, + double_parse(source) { + var value = A.Primitives_parseDouble(source); + if (value != null) + return value; + throw A.wrapException(A.FormatException$("Invalid double", source, null)); + }, + Error__objectToString(object) { + if (object instanceof A.Closure) + return object.toString$0(0); + return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; + }, + Error__throw(error, stackTrace) { + error = A.wrapException(error); + error.stack = stackTrace.toString$0(0); + throw error; + throw A.wrapException("unreachable"); + }, + List_List$filled($length, fill, growable, $E) { + var i, + result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) + for (i = 0; i < result.length; ++i) + result[i] = fill; + return result; + }, + List_List$from(elements, growable, $E) { + var t1, + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + if (growable) + return list; + return J.JSArray_markFixedList(list); + }, + List_List$of(elements, growable, $E) { + var t1; + if (growable) + return A.List_List$_of(elements, $E); + t1 = J.JSArray_markFixedList(A.List_List$_of(elements, $E)); + return t1; + }, + List_List$_of(elements, $E) { + var list, t1; + if (Array.isArray(elements)) + return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + return list; + }, + List_List$unmodifiable(elements, $E) { + return J.JSArray_markUnmodifiableList(A.List_List$from(elements, false, $E)); + }, + String_String$fromCharCodes(charCodes, start, end) { + var array, len; + if (Array.isArray(charCodes)) { + array = charCodes; + len = array.length; + end = A.RangeError_checkValidRange(start, end, len); + return A.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array); + } + if (type$.NativeUint8List._is(charCodes)) + return A.Primitives_stringFromNativeUint8List(charCodes, start, A.RangeError_checkValidRange(start, end, charCodes.length)); + return A.String__stringFromIterable(charCodes, start, end); + }, + String_String$fromCharCode(charCode) { + return A.Primitives_stringFromCharCode(charCode); + }, + String__stringFromIterable(charCodes, start, end) { + var t1, it, i, list, _null = null; + if (start < 0) + throw A.wrapException(A.RangeError$range(start, 0, J.get$length$asx(charCodes), _null, _null)); + t1 = end == null; + if (!t1 && end < start) + throw A.wrapException(A.RangeError$range(end, start, J.get$length$asx(charCodes), _null, _null)); + it = J.get$iterator$ax(charCodes); + for (i = 0; i < start; ++i) + if (!it.moveNext$0()) + throw A.wrapException(A.RangeError$range(start, 0, i, _null, _null)); + list = []; + if (t1) + for (; it.moveNext$0();) + list.push(it.get$current(it)); + else + for (i = start; i < end; ++i) { + if (!it.moveNext$0()) + throw A.wrapException(A.RangeError$range(end, start, i, _null, _null)); + list.push(it.get$current(it)); + } + return A.Primitives_stringFromCharCodes(list); + }, + RegExp_RegExp(source, multiLine) { + return new A.JSSyntaxRegExp(source, A.JSSyntaxRegExp_makeNative(source, multiLine, true, false, false, false)); + }, + identical(a, b) { + return a == null ? b == null : a === b; + }, + StringBuffer__writeAll(string, objects, separator) { + var iterator = J.get$iterator$ax(objects); + if (!iterator.moveNext$0()) + return string; + if (separator.length === 0) { + do + string += A.S(iterator.get$current(iterator)); + while (iterator.moveNext$0()); + } else { + string += A.S(iterator.get$current(iterator)); + for (; iterator.moveNext$0();) + string = string + separator + A.S(iterator.get$current(iterator)); + } + return string; + }, + NoSuchMethodError$(receiver, memberName, positionalArguments, namedArguments) { + return new A.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments); + }, + Uri_base() { + var uri = A.Primitives_currentUri(); + if (uri != null) + return A.Uri_parse(uri); + throw A.wrapException(A.UnsupportedError$("'Uri.base' is not supported")); + }, + _Uri__uriEncode(canonicalTable, text, encoding, spaceToPlus) { + var t1, bytes, i, t2, byte, + _s16_ = "0123456789ABCDEF"; + if (encoding === B.C_Utf8Codec) { + t1 = $.$get$_Uri__needsNoEncoding()._nativeRegExp; + t1 = t1.test(text); + } else + t1 = false; + if (t1) + return text; + bytes = encoding.get$encoder().convert$1(text); + for (t1 = bytes.length, i = 0, t2 = ""; i < t1; ++i) { + byte = bytes[i]; + if (byte < 128 && (canonicalTable[byte >>> 4] & 1 << (byte & 15)) !== 0) + t2 += A.Primitives_stringFromCharCode(byte); + else + t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + _s16_[byte >>> 4 & 15] + _s16_[byte & 15]; + } + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + StackTrace_current() { + var stackTrace, exception; + if ($.$get$_hasErrorStackProperty()) + return A.getTraceFromException(new Error()); + try { + throw A.wrapException(""); + } catch (exception) { + stackTrace = A.getTraceFromException(exception); + return stackTrace; + } + }, + DateTime$_withValue(_value, isUtc) { + var t1; + if (Math.abs(_value) <= 864e13) + t1 = false; + else + t1 = true; + if (t1) + A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + _value, null)); + A.checkNotNullable(false, "isUtc", type$.bool); + return new A.DateTime(_value, false); + }, + DateTime__fourDigits(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; + if (absN >= 1000) + return "" + n; + if (absN >= 100) + return sign + "0" + absN; + if (absN >= 10) + return sign + "00" + absN; + return sign + "000" + absN; + }, + DateTime__threeDigits(n) { + if (n >= 100) + return "" + n; + if (n >= 10) + return "0" + n; + return "00" + n; + }, + DateTime__twoDigits(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + Duration$(milliseconds) { + return new A.Duration(1000 * milliseconds); + }, + Error_safeToString(object) { + if (typeof object == "number" || A._isBool(object) || object == null) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + return A.Error__objectToString(object); + }, + AssertionError$(message) { + return new A.AssertionError(message); + }, + ArgumentError$(message, $name) { + return new A.ArgumentError(false, null, $name, message); + }, + ArgumentError$value(value, $name, message) { + return new A.ArgumentError(true, value, $name, message); + }, + ArgumentError_checkNotNull(argument, $name) { + return argument; + }, + RangeError$(message) { + var _null = null; + return new A.RangeError(_null, _null, false, _null, _null, message); + }, + RangeError$value(value, $name, message) { + return new A.RangeError(null, null, true, value, $name, message == null ? "Value not in range" : message); + }, + RangeError$range(invalidValue, minValue, maxValue, $name, message) { + return new A.RangeError(minValue, maxValue, true, invalidValue, $name, message == null ? "Invalid value" : message); + }, + RangeError_checkValueInInterval(value, minValue, maxValue, $name) { + if (value < minValue || value > maxValue) + throw A.wrapException(A.RangeError$range(value, minValue, maxValue, $name, null)); + return value; + }, + RangeError_checkValidIndex(index, indexable, $name) { + var $length = indexable.get$length(indexable); + if (0 > index || index >= $length) + throw A.wrapException(A.IndexError$(index, indexable, $name == null ? "index" : $name, null, $length)); + return index; + }, + RangeError_checkValidRange(start, end, $length) { + if (0 > start || start > $length) + throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative(value, $name) { + if (value < 0) + throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); + return value; + }, + IndexError$(invalidValue, indexable, $name, message, $length) { + var t1 = $length == null ? J.get$length$asx(indexable) : $length; + return new A.IndexError(t1, true, invalidValue, $name, "Index out of range"); + }, + UnsupportedError$(message) { + return new A.UnsupportedError(message); + }, + UnimplementedError$(message) { + return new A.UnimplementedError(message); + }, + StateError$(message) { + return new A.StateError(message); + }, + ConcurrentModificationError$(modifiedObject) { + return new A.ConcurrentModificationError(modifiedObject); + }, + FormatException$(message, source, offset) { + return new A.FormatException(message, source, offset); + }, + Iterable_Iterable$generate(count, generator, $E) { + if (count <= 0) + return new A.EmptyIterable($E._eval$1("EmptyIterable<0>")); + return new A._GeneratorIterable(count, generator, $E._eval$1("_GeneratorIterable<0>")); + }, + Map_castFrom(source, $K, $V, K2, V2) { + return new A.CastMap(source, $K._eval$1("@<0>")._bind$1($V)._bind$1(K2)._bind$1(V2)._eval$1("CastMap<1,2,3,4>")); + }, + Object_hash(object1, object2, object3) { + var t1, t2; + if (B.C_SentinelValue === object3) { + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2)); + } + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + object3 = J.get$hashCode$(object3); + t2 = $.$get$_hashSeed(); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine(t2, t1), object2), object3)); + }, + print(object) { + var line = A.S(object), + toZone = $.printToZone; + if (toZone == null) + A.printString(line); + else + toZone.call$1(line); + }, + Set_castFrom(source, newSet, $S, $T) { + return new A.CastSet(source, newSet, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastSet<1,2>")); + }, + _combineSurrogatePair(start, end) { + return 65536 + ((start & 1023) << 10) + (end & 1023); + }, + Uri_Uri$dataFromString($content, encoding, mimeType) { + var encodingName, t1, + buffer = new A.StringBuffer(""), + indices = A._setArrayType([-1], type$.JSArray_int); + if (encoding == null) + encodingName = null; + else + encodingName = "utf-8"; + if (encoding == null) + encoding = B.C_AsciiCodec; + A.UriData__writeUri(mimeType, encodingName, null, buffer, indices); + indices.push(buffer._contents.length); + buffer._contents += ","; + A.UriData__uriEncodeBytes(B.List_CVk, encoding.encode$1($content), buffer); + t1 = buffer._contents; + return new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, null).get$uri(); + }, + Uri_parse(uri) { + var delta, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t1, t2, schemeAuth, queryStart0, pathStart0, userInfoStart, userInfo, host, portNumber, port, path, query, _null = null, + end = uri.length; + if (end >= 5) { + delta = ((B.JSString_methods._codeUnitAt$1(uri, 4) ^ 58) * 3 | B.JSString_methods._codeUnitAt$1(uri, 0) ^ 100 | B.JSString_methods._codeUnitAt$1(uri, 1) ^ 97 | B.JSString_methods._codeUnitAt$1(uri, 2) ^ 116 | B.JSString_methods._codeUnitAt$1(uri, 3) ^ 97) >>> 0; + if (delta === 0) + return A.UriData__parse(end < end ? B.JSString_methods.substring$2(uri, 0, end) : uri, 5, _null).get$uri(); + else if (delta === 32) + return A.UriData__parse(B.JSString_methods.substring$2(uri, 5, end), 0, _null).get$uri(); + } + indices = A.List_List$filled(8, 0, false, type$.int); + indices[0] = 0; + indices[1] = -1; + indices[2] = -1; + indices[7] = -1; + indices[3] = 0; + indices[4] = 0; + indices[5] = end; + indices[6] = end; + if (A._scan(uri, 0, end, 0, indices) >= 14) + indices[7] = end; + schemeEnd = indices[1]; + if (schemeEnd >= 0) + if (A._scan(uri, 0, schemeEnd, 20, indices) === 20) + indices[7] = schemeEnd; + hostStart = indices[2] + 1; + portStart = indices[3]; + pathStart = indices[4]; + queryStart = indices[5]; + fragmentStart = indices[6]; + if (fragmentStart < queryStart) + queryStart = fragmentStart; + if (pathStart < hostStart) + pathStart = queryStart; + else if (pathStart <= schemeEnd) + pathStart = schemeEnd + 1; + if (portStart < hostStart) + portStart = pathStart; + isSimple = indices[7] < 0; + if (isSimple) + if (hostStart > schemeEnd + 3) { + scheme = _null; + isSimple = false; + } else { + t1 = portStart > 0; + if (t1 && portStart + 1 === pathStart) { + scheme = _null; + isSimple = false; + } else { + if (!(queryStart < end && queryStart === pathStart + 2 && B.JSString_methods.startsWith$2(uri, "..", pathStart))) + t2 = queryStart > pathStart + 2 && B.JSString_methods.startsWith$2(uri, "/..", queryStart - 3); + else + t2 = true; + if (t2) { + scheme = _null; + isSimple = false; + } else { + if (schemeEnd === 4) + if (B.JSString_methods.startsWith$2(uri, "file", 0)) { + if (hostStart <= 0) { + if (!B.JSString_methods.startsWith$2(uri, "/", pathStart)) { + schemeAuth = "file:///"; + delta = 3; + } else { + schemeAuth = "file://"; + delta = 2; + } + uri = schemeAuth + B.JSString_methods.substring$2(uri, pathStart, end); + schemeEnd -= 0; + t1 = delta - 0; + queryStart += t1; + fragmentStart += t1; + end = uri.length; + hostStart = 7; + portStart = 7; + pathStart = 7; + } else if (pathStart === queryStart) { + ++fragmentStart; + queryStart0 = queryStart + 1; + uri = B.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); + ++end; + queryStart = queryStart0; + } + scheme = "file"; + } else if (B.JSString_methods.startsWith$2(uri, "http", 0)) { + if (t1 && portStart + 3 === pathStart && B.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { + fragmentStart -= 3; + pathStart0 = pathStart - 3; + queryStart -= 3; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "http"; + } else + scheme = _null; + else if (schemeEnd === 5 && B.JSString_methods.startsWith$2(uri, "https", 0)) { + if (t1 && portStart + 4 === pathStart && B.JSString_methods.startsWith$2(uri, "443", portStart + 1)) { + fragmentStart -= 4; + pathStart0 = pathStart - 4; + queryStart -= 4; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "https"; + } else + scheme = _null; + isSimple = true; + } + } + } + else + scheme = _null; + if (isSimple) { + if (end < uri.length) { + uri = B.JSString_methods.substring$2(uri, 0, end); + schemeEnd -= 0; + hostStart -= 0; + portStart -= 0; + pathStart -= 0; + queryStart -= 0; + fragmentStart -= 0; + } + return new A._SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); + } + if (scheme == null) + if (schemeEnd > 0) + scheme = A._Uri__makeScheme(uri, 0, schemeEnd); + else { + if (schemeEnd === 0) + A._Uri__fail(uri, 0, "Invalid empty scheme"); + scheme = ""; + } + if (hostStart > 0) { + userInfoStart = schemeEnd + 3; + userInfo = userInfoStart < hostStart ? A._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; + host = A._Uri__makeHost(uri, hostStart, portStart, false); + t1 = portStart + 1; + if (t1 < pathStart) { + portNumber = A.Primitives_parseInt(B.JSString_methods.substring$2(uri, t1, pathStart), _null); + port = A._Uri__makePort(portNumber == null ? A.throwExpression(A.FormatException$("Invalid port", uri, t1)) : portNumber, scheme); + } else + port = _null; + } else { + port = _null; + host = port; + userInfo = ""; + } + path = A._Uri__makePath(uri, pathStart, queryStart, _null, scheme, host != null); + query = queryStart < fragmentStart ? A._Uri__makeQuery(uri, queryStart + 1, fragmentStart, _null) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragmentStart < end ? A._Uri__makeFragment(uri, fragmentStart + 1, end) : _null); + }, + Uri_decodeComponent(encodedComponent) { + return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); + }, + Uri__parseIPv4Address(host, start, end) { + var i, partStart, partIndex, char, part, partIndex0, + _s43_ = "IPv4 address should contain exactly 4 parts", + _s37_ = "each part must be in the range 0..255", + error = new A.Uri__parseIPv4Address_error(host), + result = new Uint8Array(4); + for (i = start, partStart = i, partIndex = 0; i < end; ++i) { + char = B.JSString_methods.codeUnitAt$1(host, i); + if (char !== 46) { + if ((char ^ 48) > 9) + error.call$2("invalid character", i); + } else { + if (partIndex === 3) + error.call$2(_s43_, i); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); + if (part > 255) + error.call$2(_s37_, partStart); + partIndex0 = partIndex + 1; + result[partIndex] = part; + partStart = i + 1; + partIndex = partIndex0; + } + } + if (partIndex !== 3) + error.call$2(_s43_, end); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); + if (part > 255) + error.call$2(_s37_, partStart); + result[partIndex] = part; + return result; + }, + Uri_parseIPv6Address(host, start, end) { + var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, t1, last, bytes, wildCardLength, index, value, j, _null = null, + error = new A.Uri_parseIPv6Address_error(host), + parseHex = new A.Uri_parseIPv6Address_parseHex(error, host); + if (host.length < 2) + error.call$2("address is too short", _null); + parts = A._setArrayType([], type$.JSArray_int); + for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { + char = B.JSString_methods.codeUnitAt$1(host, i); + if (char === 58) { + if (i === start) { + ++i; + if (B.JSString_methods.codeUnitAt$1(host, i) !== 58) + error.call$2("invalid start colon.", i); + partStart = i; + } + if (i === partStart) { + if (wildcardSeen) + error.call$2("only one wildcard `::` is allowed", i); + parts.push(-1); + wildcardSeen = true; + } else + parts.push(parseHex.call$2(partStart, i)); + partStart = i + 1; + } else if (char === 46) + seenDot = true; + } + if (parts.length === 0) + error.call$2("too few parts", _null); + atEnd = partStart === end; + t1 = B.JSArray_methods.get$last(parts); + if (atEnd && t1 !== -1) + error.call$2("expected a part after last `:`", end); + if (!atEnd) + if (!seenDot) + parts.push(parseHex.call$2(partStart, end)); + else { + last = A.Uri__parseIPv4Address(host, partStart, end); + parts.push((last[0] << 8 | last[1]) >>> 0); + parts.push((last[2] << 8 | last[3]) >>> 0); + } + if (wildcardSeen) { + if (parts.length > 7) + error.call$2("an address with a wildcard must have less than 7 parts", _null); + } else if (parts.length !== 8) + error.call$2("an address without a wildcard must contain exactly 8 parts", _null); + bytes = new Uint8Array(16); + for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { + value = parts[i]; + if (value === -1) + for (j = 0; j < wildCardLength; ++j) { + bytes[index] = 0; + bytes[index + 1] = 0; + index += 2; + } + else { + bytes[index] = B.JSInt_methods._shrOtherPositive$1(value, 8); + bytes[index + 1] = value & 255; + index += 2; + } + } + return bytes; + }, + _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { + return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); + }, + _Uri__Uri(host, path, pathSegments, scheme) { + var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2, _null = null; + scheme = scheme == null ? "" : A._Uri__makeScheme(scheme, 0, scheme.length); + userInfo = A._Uri__makeUserInfo(_null, 0, 0); + host = A._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); + query = A._Uri__makeQuery(_null, 0, 0, _null); + fragment = A._Uri__makeFragment(_null, 0, 0); + port = A._Uri__makePort(_null, scheme); + isFile = scheme === "file"; + if (host == null) + t1 = userInfo.length !== 0 || port != null || isFile; + else + t1 = false; + if (t1) + host = ""; + t1 = host == null; + hasAuthority = !t1; + path = A._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); + t2 = scheme.length === 0; + if (t2 && t1 && !B.JSString_methods.startsWith$1(path, "/")) + path = A._Uri__normalizeRelativePath(path, !t2 || hasAuthority); + else + path = A._Uri__removeDotSegments(path); + return A._Uri$_internal(scheme, userInfo, t1 && B.JSString_methods.startsWith$1(path, "//") ? "" : host, port, path, query, fragment); + }, + _Uri__defaultPort(scheme) { + if (scheme === "http") + return 80; + if (scheme === "https") + return 443; + return 0; + }, + _Uri__fail(uri, index, message) { + throw A.wrapException(A.FormatException$(message, uri, index)); + }, + _Uri__Uri$file(path, windows) { + return windows ? A._Uri__makeWindowsFileUrl(path, false) : A._Uri__makeFileUri(path, false); + }, + _Uri__checkNonWindowsPathReservedCharacters(segments, argumentError) { + var t1, _i, segment, t2, t3; + for (t1 = segments.length, _i = 0; _i < t1; ++_i) { + segment = segments[_i]; + t2 = J.getInterceptor$asx(segment); + t3 = t2.get$length(segment); + if (0 > t3) + A.throwExpression(A.RangeError$range(0, 0, t2.get$length(segment), null, null)); + if (A.stringContainsUnchecked(segment, "/", 0)) { + t1 = A.UnsupportedError$("Illegal path character " + A.S(segment)); + throw A.wrapException(t1); + } + } + }, + _Uri__checkWindowsPathReservedCharacters(segments, argumentError, firstSegment) { + var t1, t2, t3, t4, t5, _null = null; + for (t1 = A.SubListIterable$(segments, firstSegment, _null, A._arrayInstanceType(segments)._precomputed1), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t4 = A.RegExp_RegExp('["*/:<>?\\\\|]', false); + t5 = t3.length; + if (A.stringContainsUnchecked(t3, t4, 0)) + if (argumentError) + throw A.wrapException(A.ArgumentError$("Illegal character in path", _null)); + else + throw A.wrapException(A.UnsupportedError$("Illegal character in path: " + t3)); + } + }, + _Uri__checkWindowsDriveLetter(charCode, argumentError) { + var t1, + _s21_ = "Illegal drive letter "; + if (!(65 <= charCode && charCode <= 90)) + t1 = 97 <= charCode && charCode <= 122; + else + t1 = true; + if (t1) + return; + if (argumentError) + throw A.wrapException(A.ArgumentError$(_s21_ + A.String_String$fromCharCode(charCode), null)); + else + throw A.wrapException(A.UnsupportedError$(_s21_ + A.String_String$fromCharCode(charCode))); + }, + _Uri__makeFileUri(path, slashTerminated) { + var _null = null, + segments = A._setArrayType(path.split("/"), type$.JSArray_String); + if (B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__Uri(_null, _null, segments, "file"); + else + return A._Uri__Uri(_null, _null, segments, _null); + }, + _Uri__makeWindowsFileUrl(path, slashTerminated) { + var t1, pathSegments, pathStart, hostPart, _s1_ = "\\", _null = null, _s4_ = "file"; + if (B.JSString_methods.startsWith$1(path, "\\\\?\\")) + if (B.JSString_methods.startsWith$2(path, "UNC\\", 4)) + path = B.JSString_methods.replaceRange$3(path, 0, 7, _s1_); + else { + path = B.JSString_methods.substring$1(path, 4); + if (path.length < 3 || B.JSString_methods._codeUnitAt$1(path, 1) !== 58 || B.JSString_methods._codeUnitAt$1(path, 2) !== 92) + throw A.wrapException(A.ArgumentError$("Windows paths with \\\\?\\ prefix must be absolute", _null)); + } + else + path = A.stringReplaceAllUnchecked(path, "/", _s1_); + t1 = path.length; + if (t1 > 1 && B.JSString_methods._codeUnitAt$1(path, 1) === 58) { + A._Uri__checkWindowsDriveLetter(B.JSString_methods._codeUnitAt$1(path, 0), true); + if (t1 === 2 || B.JSString_methods._codeUnitAt$1(path, 2) !== 92) + throw A.wrapException(A.ArgumentError$("Windows paths with drive letter must be absolute", _null)); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + if (B.JSString_methods.startsWith$1(path, _s1_)) + if (B.JSString_methods.startsWith$2(path, _s1_, 1)) { + pathStart = B.JSString_methods.indexOf$2(path, _s1_, 2); + t1 = pathStart < 0; + hostPart = t1 ? B.JSString_methods.substring$1(path, 2) : B.JSString_methods.substring$2(path, 2, pathStart); + pathSegments = A._setArrayType((t1 ? "" : B.JSString_methods.substring$1(path, pathStart + 1)).split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(hostPart, _null, pathSegments, _s4_); + } else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _null); + } + }, + _Uri__makePort(port, scheme) { + if (port != null && port === A._Uri__defaultPort(scheme)) + return null; + return port; + }, + _Uri__makeHost(host, start, end, strictIPv6) { + var t1, t2, index, zoneIDstart, zoneID, i; + if (host == null) + return null; + if (start === end) + return ""; + if (B.JSString_methods.codeUnitAt$1(host, start) === 91) { + t1 = end - 1; + if (B.JSString_methods.codeUnitAt$1(host, t1) !== 93) + A._Uri__fail(host, start, "Missing end `]` to match `[` in host"); + t2 = start + 1; + index = A._Uri__checkZoneID(host, t2, t1); + if (index < t1) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, t1, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, t2, index); + return B.JSString_methods.substring$2(host, start, index).toLowerCase() + zoneID + "]"; + } + for (i = start; i < end; ++i) + if (B.JSString_methods.codeUnitAt$1(host, i) === 58) { + index = B.JSString_methods.indexOf$2(host, "%", start); + index = index >= start && index < end ? index : end; + if (index < end) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, end, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, start, index); + return "[" + B.JSString_methods.substring$2(host, start, index) + zoneID + "]"; + } + return A._Uri__normalizeRegName(host, start, end); + }, + _Uri__checkZoneID(host, start, end) { + var index = B.JSString_methods.indexOf$2(host, "%", start); + return index >= start && index < end ? index : end; + }, + _Uri__normalizeZoneID(host, start, end, prefix) { + var index, sectionStart, isNormalized, char, replacement, t1, t2, tail, sourceLength, slice, + buffer = prefix !== "" ? new A.StringBuffer(prefix) : null; + for (index = start, sectionStart = index, isNormalized = true; index < end;) { + char = B.JSString_methods.codeUnitAt$1(host, index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + t2 = buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") + A._Uri__fail(host, index, "ZoneID should not contain % anymore"); + buffer._contents = t2 + replacement; + index += 3; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (B.List_nxB[char >>> 4] & 1 << (char & 15)) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else { + if ((char & 64512) === 55296 && index + 1 < end) { + tail = B.JSString_methods.codeUnitAt$1(host, index + 1); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } else + sourceLength = 1; + } else + sourceLength = 1; + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t1._contents += A._Uri__escapeChar(char); + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, end); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__normalizeRegName(host, start, end) { + var index, sectionStart, buffer, isNormalized, char, replacement, t1, slice, t2, sourceLength, tail; + for (index = start, sectionStart = index, buffer = null, isNormalized = true; index < end;) { + char = B.JSString_methods.codeUnitAt$1(host, index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + slice = B.JSString_methods.substring$2(host, sectionStart, index); + t2 = buffer._contents += !isNormalized ? slice.toLowerCase() : slice; + if (t1) { + replacement = B.JSString_methods.substring$2(host, index, index + 3); + sourceLength = 3; + } else if (replacement === "%") { + replacement = "%25"; + sourceLength = 1; + } else + sourceLength = 3; + buffer._contents = t2 + replacement; + index += sourceLength; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (B.List_qNA[char >>> 4] & 1 << (char & 15)) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else if (char <= 93 && (B.List_2Vk[char >>> 4] & 1 << (char & 15)) !== 0) + A._Uri__fail(host, index, "Invalid character"); + else { + if ((char & 64512) === 55296 && index + 1 < end) { + tail = B.JSString_methods.codeUnitAt$1(host, index + 1); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } else + sourceLength = 1; + } else + sourceLength = 1; + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t1._contents += A._Uri__escapeChar(char); + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) { + slice = B.JSString_methods.substring$2(host, sectionStart, end); + buffer._contents += !isNormalized ? slice.toLowerCase() : slice; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__makeScheme(scheme, start, end) { + var i, containsUpperCase, codeUnit; + if (start === end) + return ""; + if (!A._Uri__isAlphabeticCharacter(B.JSString_methods._codeUnitAt$1(scheme, start))) + A._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); + for (i = start, containsUpperCase = false; i < end; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(scheme, i); + if (!(codeUnit < 128 && (B.List_JYB[codeUnit >>> 4] & 1 << (codeUnit & 15)) !== 0)) + A._Uri__fail(scheme, i, "Illegal scheme character"); + if (65 <= codeUnit && codeUnit <= 90) + containsUpperCase = true; + } + scheme = B.JSString_methods.substring$2(scheme, start, end); + return A._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); + }, + _Uri__canonicalizeScheme(scheme) { + if (scheme === "http") + return "http"; + if (scheme === "file") + return "file"; + if (scheme === "https") + return "https"; + if (scheme === "package") + return "package"; + return scheme; + }, + _Uri__makeUserInfo(userInfo, start, end) { + if (userInfo == null) + return ""; + return A._Uri__normalizeOrSubstring(userInfo, start, end, B.List_gRj, false); + }, + _Uri__makePath(path, start, end, pathSegments, scheme, hasAuthority) { + var result, + isFile = scheme === "file", + ensureLeadingSlash = isFile || hasAuthority; + if (path == null) { + if (pathSegments == null) + return isFile ? "/" : ""; + result = new A.MappedListIterable(pathSegments, new A._Uri__makePath_closure(), A._arrayInstanceType(pathSegments)._eval$1("MappedListIterable<1,String>")).join$1(0, "/"); + } else if (pathSegments != null) + throw A.wrapException(A.ArgumentError$("Both path and pathSegments specified", null)); + else + result = A._Uri__normalizeOrSubstring(path, start, end, B.List_qg4, true); + if (result.length === 0) { + if (isFile) + return "/"; + } else if (ensureLeadingSlash && !B.JSString_methods.startsWith$1(result, "/")) + result = "/" + result; + return A._Uri__normalizePath(result, scheme, hasAuthority); + }, + _Uri__normalizePath(path, scheme, hasAuthority) { + var t1 = scheme.length === 0; + if (t1 && !hasAuthority && !B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__normalizeRelativePath(path, !t1 || hasAuthority); + return A._Uri__removeDotSegments(path); + }, + _Uri__makeQuery(query, start, end, queryParameters) { + if (query != null) + return A._Uri__normalizeOrSubstring(query, start, end, B.List_CVk, true); + return null; + }, + _Uri__makeFragment(fragment, start, end) { + if (fragment == null) + return null; + return A._Uri__normalizeOrSubstring(fragment, start, end, B.List_CVk, true); + }, + _Uri__normalizeEscape(source, index, lowerCase) { + var firstDigit, secondDigit, firstDigitValue, secondDigitValue, value, + t1 = index + 2; + if (t1 >= source.length) + return "%"; + firstDigit = B.JSString_methods.codeUnitAt$1(source, index + 1); + secondDigit = B.JSString_methods.codeUnitAt$1(source, t1); + firstDigitValue = A.hexDigitValue(firstDigit); + secondDigitValue = A.hexDigitValue(secondDigit); + if (firstDigitValue < 0 || secondDigitValue < 0) + return "%"; + value = firstDigitValue * 16 + secondDigitValue; + if (value < 127 && (B.List_nxB[B.JSInt_methods._shrOtherPositive$1(value, 4)] & 1 << (value & 15)) !== 0) + return A.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); + if (firstDigit >= 97 || secondDigit >= 97) + return B.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); + return null; + }, + _Uri__escapeChar(char) { + var codeUnits, flag, encodedBytes, index, byte, + _s16_ = "0123456789ABCDEF"; + if (char < 128) { + codeUnits = new Uint8Array(3); + codeUnits[0] = 37; + codeUnits[1] = B.JSString_methods._codeUnitAt$1(_s16_, char >>> 4); + codeUnits[2] = B.JSString_methods._codeUnitAt$1(_s16_, char & 15); + } else { + if (char > 2047) + if (char > 65535) { + flag = 240; + encodedBytes = 4; + } else { + flag = 224; + encodedBytes = 3; + } + else { + flag = 192; + encodedBytes = 2; + } + codeUnits = new Uint8Array(3 * encodedBytes); + for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { + byte = B.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; + codeUnits[index] = 37; + codeUnits[index + 1] = B.JSString_methods._codeUnitAt$1(_s16_, byte >>> 4); + codeUnits[index + 2] = B.JSString_methods._codeUnitAt$1(_s16_, byte & 15); + index += 3; + } + } + return A.String_String$fromCharCodes(codeUnits, 0, null); + }, + _Uri__normalizeOrSubstring(component, start, end, charTable, escapeDelimiters) { + var t1 = A._Uri__normalize(component, start, end, charTable, escapeDelimiters); + return t1 == null ? B.JSString_methods.substring$2(component, start, end) : t1; + }, + _Uri__normalize(component, start, end, charTable, escapeDelimiters) { + var t1, index, sectionStart, buffer, char, replacement, sourceLength, t2, tail, t3, _null = null; + for (t1 = !escapeDelimiters, index = start, sectionStart = index, buffer = _null; index < end;) { + char = B.JSString_methods.codeUnitAt$1(component, index); + if (char < 127 && (charTable[char >>> 4] & 1 << (char & 15)) !== 0) + ++index; + else { + if (char === 37) { + replacement = A._Uri__normalizeEscape(component, index, false); + if (replacement == null) { + index += 3; + continue; + } + if ("%" === replacement) { + replacement = "%25"; + sourceLength = 1; + } else + sourceLength = 3; + } else if (t1 && char <= 93 && (B.List_2Vk[char >>> 4] & 1 << (char & 15)) !== 0) { + A._Uri__fail(component, index, "Invalid character"); + sourceLength = _null; + replacement = sourceLength; + } else { + if ((char & 64512) === 55296) { + t2 = index + 1; + if (t2 < end) { + tail = B.JSString_methods.codeUnitAt$1(component, t2); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } else + sourceLength = 1; + } else + sourceLength = 1; + } else + sourceLength = 1; + replacement = A._Uri__escapeChar(char); + } + if (buffer == null) { + buffer = new A.StringBuffer(""); + t2 = buffer; + } else + t2 = buffer; + t3 = t2._contents += B.JSString_methods.substring$2(component, sectionStart, index); + t2._contents = t3 + A.S(replacement); + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return _null; + if (sectionStart < end) + buffer._contents += B.JSString_methods.substring$2(component, sectionStart, end); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__mayContainDotSegments(path) { + if (B.JSString_methods.startsWith$1(path, ".")) + return true; + return B.JSString_methods.indexOf$1(path, "/.") !== -1; + }, + _Uri__removeDotSegments(path) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (J.$eq$(segment, "..")) { + if (output.length !== 0) { + output.pop(); + if (output.length === 0) + output.push(""); + } + appendSlash = true; + } else if ("." === segment) + appendSlash = true; + else { + output.push(segment); + appendSlash = false; + } + } + if (appendSlash) + output.push(""); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__normalizeRelativePath(path, allowScheme) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return !allowScheme ? A._Uri__escapeScheme(path) : path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (".." === segment) + if (output.length !== 0 && B.JSArray_methods.get$last(output) !== "..") { + output.pop(); + appendSlash = true; + } else { + output.push(".."); + appendSlash = false; + } + else if ("." === segment) + appendSlash = true; + else { + output.push(segment); + appendSlash = false; + } + } + t1 = output.length; + if (t1 !== 0) + t1 = t1 === 1 && output[0].length === 0; + else + t1 = true; + if (t1) + return "./"; + if (appendSlash || B.JSArray_methods.get$last(output) === "..") + output.push(""); + if (!allowScheme) + output[0] = A._Uri__escapeScheme(output[0]); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__escapeScheme(path) { + var i, char, + t1 = path.length; + if (t1 >= 2 && A._Uri__isAlphabeticCharacter(B.JSString_methods._codeUnitAt$1(path, 0))) + for (i = 1; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(path, i); + if (char === 58) + return B.JSString_methods.substring$2(path, 0, i) + "%3A" + B.JSString_methods.substring$1(path, i + 1); + if (char > 127 || (B.List_JYB[char >>> 4] & 1 << (char & 15)) === 0) + break; + } + return path; + }, + _Uri__packageNameEnd(uri, path) { + if (uri.isScheme$1("package") && uri._host == null) + return A._skipPackageNameChars(path, 0, path.length); + return -1; + }, + _Uri__toWindowsFilePath(uri) { + var hasDriveLetter, t2, host, + segments = uri.get$pathSegments(), + t1 = segments.length; + if (t1 > 0 && J.get$length$asx(segments[0]) === 2 && J.codeUnitAt$1$s(segments[0], 1) === 58) { + A._Uri__checkWindowsDriveLetter(J.codeUnitAt$1$s(segments[0], 0), false); + A._Uri__checkWindowsPathReservedCharacters(segments, false, 1); + hasDriveLetter = true; + } else { + A._Uri__checkWindowsPathReservedCharacters(segments, false, 0); + hasDriveLetter = false; + } + t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "" + "\\" : ""; + if (uri.get$hasAuthority()) { + host = uri.get$host(); + if (host.length !== 0) + t2 = t2 + "\\" + host + "\\"; + } + t2 = A.StringBuffer__writeAll(t2, segments, "\\"); + t1 = hasDriveLetter && t1 === 1 ? t2 + "\\" : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__hexCharPairToByte(s, pos) { + var byte, i, charCode; + for (byte = 0, i = 0; i < 2; ++i) { + charCode = B.JSString_methods._codeUnitAt$1(s, pos + i); + if (48 <= charCode && charCode <= 57) + byte = byte * 16 + charCode - 48; + else { + charCode |= 32; + if (97 <= charCode && charCode <= 102) + byte = byte * 16 + charCode - 87; + else + throw A.wrapException(A.ArgumentError$("Invalid URL encoding", null)); + } + } + return byte; + }, + _Uri__uriDecode(text, start, end, encoding, plusToSpace) { + var simple, codeUnit, t1, bytes, + i = start; + while (true) { + if (!(i < end)) { + simple = true; + break; + } + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); + if (codeUnit <= 127) + if (codeUnit !== 37) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) { + simple = false; + break; + } + ++i; + } + if (simple) { + if (B.C_Utf8Codec !== encoding) + t1 = false; + else + t1 = true; + if (t1) + return B.JSString_methods.substring$2(text, start, end); + else + bytes = new A.CodeUnits(B.JSString_methods.substring$2(text, start, end)); + } else { + bytes = A._setArrayType([], type$.JSArray_int); + for (t1 = text.length, i = start; i < end; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); + if (codeUnit > 127) + throw A.wrapException(A.ArgumentError$("Illegal percent encoding in URI", null)); + if (codeUnit === 37) { + if (i + 3 > t1) + throw A.wrapException(A.ArgumentError$("Truncated URI", null)); + bytes.push(A._Uri__hexCharPairToByte(text, i + 1)); + i += 2; + } else + bytes.push(codeUnit); + } + } + return B.Utf8Decoder_false.convert$1(bytes); + }, + _Uri__isAlphabeticCharacter(codeUnit) { + var lowerCase = codeUnit | 32; + return 97 <= lowerCase && lowerCase <= 122; + }, + UriData__writeUri(mimeType, charsetName, parameters, buffer, indices) { + var t1, slashIndex; + if (mimeType != null) + t1 = 10 === mimeType.length && A._caseInsensitiveCompareStart("text/plain", mimeType, 0) >= 0; + else + t1 = true; + if (t1) + mimeType = ""; + if (mimeType.length === 0 || mimeType === "application/octet-stream") + t1 = buffer._contents += mimeType; + else { + slashIndex = A.UriData__validateMimeType(mimeType); + if (slashIndex < 0) + throw A.wrapException(A.ArgumentError$value(mimeType, "mimeType", "Invalid MIME type")); + t1 = buffer._contents += A._Uri__uriEncode(B.List_qFt, B.JSString_methods.substring$2(mimeType, 0, slashIndex), B.C_Utf8Codec, false); + buffer._contents = t1 + "/"; + t1 = buffer._contents += A._Uri__uriEncode(B.List_qFt, B.JSString_methods.substring$1(mimeType, slashIndex + 1), B.C_Utf8Codec, false); + } + if (charsetName != null) { + indices.push(t1.length); + indices.push(buffer._contents.length + 8); + buffer._contents += ";charset="; + buffer._contents += A._Uri__uriEncode(B.List_qFt, charsetName, B.C_Utf8Codec, false); + } + }, + UriData__validateMimeType(mimeType) { + var t1, slashIndex, i; + for (t1 = mimeType.length, slashIndex = -1, i = 0; i < t1; ++i) { + if (B.JSString_methods._codeUnitAt$1(mimeType, i) !== 47) + continue; + if (slashIndex < 0) { + slashIndex = i; + continue; + } + return -1; + } + return slashIndex; + }, + UriData__parse(text, start, sourceUri) { + var t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data, + _s17_ = "Invalid MIME type", + indices = A._setArrayType([start - 1], type$.JSArray_int); + for (t1 = text.length, i = start, slashIndex = -1, char = null; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(text, i); + if (char === 44 || char === 59) + break; + if (char === 47) { + if (slashIndex < 0) { + slashIndex = i; + continue; + } + throw A.wrapException(A.FormatException$(_s17_, text, i)); + } + } + if (slashIndex < 0 && i > start) + throw A.wrapException(A.FormatException$(_s17_, text, i)); + for (; char !== 44;) { + indices.push(i); + ++i; + for (equalsIndex = -1; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(text, i); + if (char === 61) { + if (equalsIndex < 0) + equalsIndex = i; + } else if (char === 59 || char === 44) + break; + } + if (equalsIndex >= 0) + indices.push(equalsIndex); + else { + lastSeparator = B.JSArray_methods.get$last(indices); + if (char !== 44 || i !== lastSeparator + 7 || !B.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) + throw A.wrapException(A.FormatException$("Expecting '='", text, i)); + break; + } + } + indices.push(i); + t2 = i + 1; + if ((indices.length & 1) === 1) + text = B.C_Base64Codec.normalize$3(text, t2, t1); + else { + data = A._Uri__normalize(text, t2, t1, B.List_CVk, true); + if (data != null) + text = B.JSString_methods.replaceRange$3(text, t2, t1, data); + } + return new A.UriData(text, indices, sourceUri); + }, + UriData__uriEncodeBytes(canonicalTable, bytes, buffer) { + var t1, byteOr, i, byte, t2, t3, + _s16_ = "0123456789ABCDEF"; + for (t1 = J.getInterceptor$asx(bytes), byteOr = 0, i = 0; i < t1.get$length(bytes); ++i) { + byte = t1.$index(bytes, i); + byteOr |= byte; + t2 = byte < 128 && (canonicalTable[B.JSInt_methods._shrOtherPositive$1(byte, 4)] & 1 << (byte & 15)) !== 0; + t3 = buffer._contents; + if (t2) + buffer._contents = t3 + A.Primitives_stringFromCharCode(byte); + else { + t2 = t3 + A.Primitives_stringFromCharCode(37); + buffer._contents = t2; + t2 += A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(_s16_, B.JSInt_methods._shrOtherPositive$1(byte, 4))); + buffer._contents = t2; + buffer._contents = t2 + A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(_s16_, byte & 15)); + } + } + if ((byteOr & 4294967040) >>> 0 !== 0) + for (i = 0; i < t1.get$length(bytes); ++i) { + byte = t1.$index(bytes, i); + if (byte < 0 || byte > 255) + throw A.wrapException(A.ArgumentError$value(byte, "non-byte value", null)); + } + }, + _createTables() { + var _i, t1, t2, t3, b, + _s77_ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", + _s1_ = ".", _s1_0 = ":", _s1_1 = "/", _s1_2 = "?", _s1_3 = "#", + tables = J.JSArray_JSArray$allocateGrowable(22, type$.Uint8List); + for (_i = 0; _i < 22; ++_i) + tables[_i] = new Uint8Array(96); + t1 = new A._createTables_build(tables); + t2 = new A._createTables_setChars(); + t3 = new A._createTables_setRange(); + b = t1.call$2(0, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_, 14); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 3); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(14, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_, 15); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(15, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, "%", 225); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 9); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(1, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 10); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(2, 235); + t2.call$3(b, _s77_, 139); + t2.call$3(b, _s1_1, 131); + t2.call$3(b, _s1_, 146); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(3, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 68); + t2.call$3(b, _s1_, 18); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(4, 229); + t2.call$3(b, _s77_, 5); + t3.call$3(b, "AZ", 229); + t2.call$3(b, _s1_0, 102); + t2.call$3(b, "@", 68); + t2.call$3(b, "[", 232); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(5, 229); + t2.call$3(b, _s77_, 5); + t3.call$3(b, "AZ", 229); + t2.call$3(b, _s1_0, 102); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(6, 231); + t3.call$3(b, "19", 7); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(7, 231); + t3.call$3(b, "09", 7); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + t2.call$3(t1.call$2(8, 8), "]", 5); + b = t1.call$2(9, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 16); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(16, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 17); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(17, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 9); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(10, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 18); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(18, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 19); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(19, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 234); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(11, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 10); + t2.call$3(b, _s1_2, 172); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(12, 236); + t2.call$3(b, _s77_, 12); + t2.call$3(b, _s1_2, 12); + t2.call$3(b, _s1_3, 205); + b = t1.call$2(13, 237); + t2.call$3(b, _s77_, 13); + t2.call$3(b, _s1_2, 13); + t3.call$3(t1.call$2(20, 245), "az", 21); + b = t1.call$2(21, 245); + t3.call$3(b, "az", 21); + t3.call$3(b, "09", 21); + t2.call$3(b, "+-.", 21); + return tables; + }, + _scan(uri, start, end, state, indices) { + var i, table, char, transition, + tables = $.$get$_scannerTables(); + for (i = start; i < end; ++i) { + table = tables[state]; + char = B.JSString_methods._codeUnitAt$1(uri, i) ^ 96; + transition = table[char > 95 ? 31 : char]; + state = transition & 31; + indices[transition >>> 5] = i; + } + return state; + }, + _SimpleUri__packageNameEnd(uri) { + if (uri._schemeEnd === 7 && B.JSString_methods.startsWith$1(uri._uri, "package") && uri._hostStart <= 0) + return A._skipPackageNameChars(uri._uri, uri._pathStart, uri._queryStart); + return -1; + }, + _skipPackageNameChars(source, start, end) { + var i, dots, char; + for (i = start, dots = 0; i < end; ++i) { + char = B.JSString_methods.codeUnitAt$1(source, i); + if (char === 47) + return dots !== 0 ? i : -1; + if (char === 37 || char === 58) + return -1; + dots |= char ^ 46; + } + return -1; + }, + _caseInsensitiveCompareStart(prefix, string, start) { + var t1, result, i, prefixChar, stringChar, delta, lowerChar; + for (t1 = prefix.length, result = 0, i = 0; i < t1; ++i) { + prefixChar = B.JSString_methods._codeUnitAt$1(prefix, i); + stringChar = B.JSString_methods._codeUnitAt$1(string, start + i); + delta = prefixChar ^ stringChar; + if (delta !== 0) { + if (delta === 32) { + lowerChar = stringChar | delta; + if (97 <= lowerChar && lowerChar <= 122) { + result = 32; + continue; + } + } + return -1; + } + } + return result; + }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, + DateTime: function DateTime(t0, t1) { + this._core$_value = t0; + this.isUtc = t1; + }, + Duration: function Duration(t0) { + this._duration = t0; + }, + _Enum: function _Enum() { + }, + Error: function Error() { + }, + AssertionError: function AssertionError(t0) { + this.message = t0; + }, + TypeError: function TypeError() { + }, + NullThrownError: function NullThrownError() { + }, + ArgumentError: function ArgumentError(t0, t1, t2, t3) { + var _ = this; + _._hasValue = t0; + _.invalidValue = t1; + _.name = t2; + _.message = t3; + }, + RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.start = t0; + _.end = t1; + _._hasValue = t2; + _.invalidValue = t3; + _.name = t4; + _.message = t5; + }, + IndexError: function IndexError(t0, t1, t2, t3, t4) { + var _ = this; + _.length = t0; + _._hasValue = t1; + _.invalidValue = t2; + _.name = t3; + _.message = t4; + }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, + UnsupportedError: function UnsupportedError(t0) { + this.message = t0; + }, + UnimplementedError: function UnimplementedError(t0) { + this.message = t0; + }, + StateError: function StateError(t0) { + this.message = t0; + }, + ConcurrentModificationError: function ConcurrentModificationError(t0) { + this.modifiedObject = t0; + }, + OutOfMemoryError: function OutOfMemoryError() { + }, + StackOverflowError: function StackOverflowError() { + }, + CyclicInitializationError: function CyclicInitializationError(t0) { + this.variableName = t0; + }, + _Exception: function _Exception(t0) { + this.message = t0; + }, + FormatException: function FormatException(t0, t1, t2) { + this.message = t0; + this.source = t1; + this.offset = t2; + }, + Iterable: function Iterable() { + }, + _GeneratorIterable: function _GeneratorIterable(t0, t1, t2) { + this.length = t0; + this._generator = t1; + this.$ti = t2; + }, + Iterator: function Iterator() { + }, + MapEntry: function MapEntry(t0, t1, t2) { + this.key = t0; + this.value = t1; + this.$ti = t2; + }, + Null: function Null() { + }, + Object: function Object() { + }, + _StringStackTrace: function _StringStackTrace(t0) { + this._stackTrace = t0; + }, + Runes: function Runes(t0) { + this.string = t0; + }, + RuneIterator: function RuneIterator(t0) { + var _ = this; + _.string = t0; + _._nextPosition = _._position = 0; + _._currentCodePoint = -1; + }, + StringBuffer: function StringBuffer(t0) { + this._contents = t0; + }, + Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { + this.error = t0; + this.host = t1; + }, + _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + _Uri__makePath_closure: function _Uri__makePath_closure() { + }, + UriData: function UriData(t0, t1, t2) { + this._text = t0; + this._separatorIndices = t1; + this._uriCache = t2; + }, + _createTables_build: function _createTables_build(t0) { + this.tables = t0; + }, + _createTables_setChars: function _createTables_setChars() { + }, + _createTables_setRange: function _createTables_setRange() { + }, + _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._uri = t0; + _._schemeEnd = t1; + _._hostStart = t2; + _._portStart = t3; + _._pathStart = t4; + _._queryStart = t5; + _._fragmentStart = t6; + _._schemeCache = t7; + _._hashCodeCache = null; + }, + _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + Expando: function Expando(t0) { + this._jsWeakMap = t0; + }, + _convertDataTree(data) { + var t1 = new A._convertDataTree__convert(new A._IdentityHashMap(type$._IdentityHashMap_dynamic_dynamic)).call$1(data); + t1.toString; + return t1; + }, + callConstructor(constr, $arguments) { + var args, factoryFunction; + if ($arguments instanceof Array) + switch ($arguments.length) { + case 0: + return new constr(); + case 1: + return new constr($arguments[0]); + case 2: + return new constr($arguments[0], $arguments[1]); + case 3: + return new constr($arguments[0], $arguments[1], $arguments[2]); + case 4: + return new constr($arguments[0], $arguments[1], $arguments[2], $arguments[3]); + } + args = [null]; + B.JSArray_methods.addAll$1(args, $arguments); + factoryFunction = constr.bind.apply(constr, args); + String(factoryFunction); + return new factoryFunction(); + }, + _convertDataTree__convert: function _convertDataTree__convert(t0) { + this._convertedObjects = t0; + }, + max(a, b) { + return Math.max(A.checkNum(a), A.checkNum(b)); + }, + pow(x, exponent) { + return Math.pow(x, exponent); + }, + Random_Random() { + return B.C__JSRandom; + }, + _JSRandom: function _JSRandom() { + }, + ArgParser: function ArgParser(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._arg_parser$_options = t0; + _._aliases = t1; + _.options = t2; + _.commands = t3; + _._optionsAndSeparators = t4; + _.allowTrailingOptions = t5; + _.usageLineLength = t6; + }, + ArgParser__addOption_closure: function ArgParser__addOption_closure(t0) { + this.$this = t0; + }, + ArgParserException$(message, commands) { + return new A.ArgParserException(commands == null ? B.List_empty : A.List_List$unmodifiable(commands, type$.String), message, null, null); + }, + ArgParserException: function ArgParserException(t0, t1, t2, t3) { + var _ = this; + _.commands = t0; + _.message = t1; + _.source = t2; + _.offset = t3; + }, + ArgResults: function ArgResults(t0, t1, t2, t3) { + var _ = this; + _._parser = t0; + _._parsed = t1; + _.name = t2; + _.rest = t3; + }, + Option: function Option(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { + var _ = this; + _.name = t0; + _.abbr = t1; + _.help = t2; + _.valueHelp = t3; + _.allowed = t4; + _.allowedHelp = t5; + _.defaultsTo = t6; + _.negatable = t7; + _.callback = t8; + _.type = t9; + _.splitCommas = t10; + _.mandatory = t11; + _.hide = t12; + }, + OptionType: function OptionType(t0) { + this.name = t0; + }, + Parser$(_commandName, _grammar, _args, _parent, rest) { + var t1 = A._setArrayType([], type$.JSArray_String); + if (rest != null) + B.JSArray_methods.addAll$1(t1, rest); + return new A.Parser0(_commandName, _parent, _grammar, _args, t1, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + }, + _isLetterOrDigit(codeUnit) { + var t1; + if (!(codeUnit >= 65 && codeUnit <= 90)) + if (!(codeUnit >= 97 && codeUnit <= 122)) + t1 = codeUnit >= 48 && codeUnit <= 57; + else + t1 = true; + else + t1 = true; + return t1; + }, + Parser0: function Parser0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._commandName = t0; + _._parser$_parent = t1; + _._grammar = t2; + _._args = t3; + _._parser$_rest = t4; + _._results = t5; + }, + Parser_parse_closure: function Parser_parse_closure(t0) { + this.$this = t0; + }, + Parser__setOption_closure: function Parser__setOption_closure() { + }, + _Usage: function _Usage(t0, t1, t2) { + var _ = this; + _._usage$_optionsAndSeparators = t0; + _._buffer = t1; + _._currentColumn = 0; + _.___Usage__columnWidths_FI = $; + _._newlinesNeeded = 0; + _.lineLength = t2; + }, + _Usage__writeOption_closure: function _Usage__writeOption_closure() { + }, + _Usage__buildAllowedList_closure: function _Usage__buildAllowedList_closure(t0) { + this.option = t0; + }, + ErrorResult: function ErrorResult(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + ValueResult: function ValueResult(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + StreamCompleter: function StreamCompleter(t0, t1) { + this._stream_completer$_stream = t0; + this.$ti = t1; + }, + _CompleterStream: function _CompleterStream(t0) { + this._sourceStream = this._stream_completer$_controller = null; + this.$ti = t0; + }, + StreamGroup: function StreamGroup(t0, t1, t2) { + var _ = this; + _.__StreamGroup__controller_A = $; + _._closed = false; + _._stream_group$_state = t0; + _._subscriptions = t1; + _.$ti = t2; + }, + StreamGroup_add_closure: function StreamGroup_add_closure() { + }, + StreamGroup_add_closure0: function StreamGroup_add_closure0(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + StreamGroup__onListen_closure: function StreamGroup__onListen_closure() { + }, + StreamGroup__onCancel_closure: function StreamGroup__onCancel_closure(t0) { + this.$this = t0; + }, + StreamGroup__listenToStream_closure: function StreamGroup__listenToStream_closure(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + _StreamGroupState: function _StreamGroupState(t0) { + this.name = t0; + }, + StreamQueue: function StreamQueue(t0, t1, t2, t3) { + var _ = this; + _._stream_queue$_source = t0; + _._stream_queue$_subscription = null; + _._isDone = false; + _._eventsReceived = 0; + _._eventQueue = t1; + _._requestQueue = t2; + _.$ti = t3; + }, + StreamQueue__ensureListening_closure: function StreamQueue__ensureListening_closure(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure1: function StreamQueue__ensureListening_closure1(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure0: function StreamQueue__ensureListening_closure0(t0) { + this.$this = t0; + }, + _NextRequest: function _NextRequest(t0, t1) { + this._completer = t0; + this.$ti = t1; + }, + Repl: function Repl(t0, t1, t2, t3) { + var _ = this; + _.prompt = t0; + _.continuation = t1; + _.validator = t2; + _.__Repl__adapter_A = $; + _.history = t3; + }, + alwaysValid_closure: function alwaysValid_closure() { + }, + ReplAdapter: function ReplAdapter(t0) { + this.repl = t0; + this.rl = null; + }, + ReplAdapter_runAsync_closure: function ReplAdapter_runAsync_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.rl = t2; + _.runController = t3; + }, + ReplAdapter_runAsync__closure: function ReplAdapter_runAsync__closure(t0) { + this.lineController = t0; + }, + Stdin: function Stdin() { + }, + Stdout: function Stdout() { + }, + ReadlineModule: function ReadlineModule() { + }, + ReadlineOptions: function ReadlineOptions() { + }, + ReadlineInterface: function ReadlineInterface() { + }, + EmptyUnmodifiableSet: function EmptyUnmodifiableSet(t0) { + this.$ti = t0; + }, + _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin: function _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin() { + }, + DefaultEquality: function DefaultEquality() { + }, + IterableEquality: function IterableEquality() { + }, + ListEquality: function ListEquality() { + }, + _MapEntry: function _MapEntry(t0, t1, t2) { + this.equality = t0; + this.key = t1; + this.value = t2; + }, + MapEquality: function MapEquality() { + }, + QueueList$(initialCapacity, $E) { + return new A.QueueList(A.List_List$filled(A.QueueList__computeInitialCapacity(initialCapacity), null, false, $E._eval$1("0?")), 0, 0, $E._eval$1("QueueList<0>")); + }, + QueueList_QueueList$from(source, $E) { + var $length, queue, t1; + if (type$.List_dynamic._is(source)) { + $length = J.get$length$asx(source); + queue = A.QueueList$($length + 1, $E); + J.setRange$4$ax(queue._table, 0, $length, source, 0); + queue._tail = $length; + return queue; + } else { + t1 = A.QueueList$(null, $E); + t1.addAll$1(0, source); + return t1; + } + }, + QueueList__computeInitialCapacity(initialCapacity) { + if (initialCapacity == null || initialCapacity < 8) + return 8; + ++initialCapacity; + if ((initialCapacity & initialCapacity - 1) >>> 0 === 0) + return initialCapacity; + return A.QueueList__nextPowerOf2(initialCapacity); + }, + QueueList__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (; true; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + QueueList: function QueueList(t0, t1, t2, t3) { + var _ = this; + _._table = t0; + _._head = t1; + _._tail = t2; + _.$ti = t3; + }, + _CastQueueList: function _CastQueueList(t0, t1, t2, t3, t4) { + var _ = this; + _._queue_list$_delegate = t0; + _._table = t1; + _._head = t2; + _._tail = t3; + _.$ti = t4; + }, + _QueueList_Object_ListMixin: function _QueueList_Object_ListMixin() { + }, + UnmodifiableSetMixin__throw() { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable Set")); + }, + UnmodifiableSetView: function UnmodifiableSetView(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + UnmodifiableSetMixin: function UnmodifiableSetMixin() { + }, + _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin: function _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin() { + }, + _DelegatingIterableBase: function _DelegatingIterableBase() { + }, + DelegatingSet: function DelegatingSet(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + MapKeySet: function MapKeySet(t0, t1) { + this._baseMap = t0; + this.$ti = t1; + }, + MapKeySet_difference_closure: function MapKeySet_difference_closure(t0, t1) { + this.$this = t0; + this.other = t1; + }, + _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin: function _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin() { + }, + BufferModule: function BufferModule() { + }, + BufferConstants: function BufferConstants() { + }, + Buffer: function Buffer() { + }, + ConsoleModule: function ConsoleModule() { + }, + Console: function Console() { + }, + EventEmitter: function EventEmitter() { + }, + fs() { + var t1 = $._fs; + return t1 == null ? $._fs = self.fs : t1; + }, + FS: function FS() { + }, + FSConstants: function FSConstants() { + }, + FSWatcher: function FSWatcher() { + }, + ReadStream: function ReadStream() { + }, + ReadStreamOptions: function ReadStreamOptions() { + }, + WriteStream: function WriteStream() { + }, + WriteStreamOptions: function WriteStreamOptions() { + }, + FileOptions: function FileOptions() { + }, + StatOptions: function StatOptions() { + }, + MkdirOptions: function MkdirOptions() { + }, + RmdirOptions: function RmdirOptions() { + }, + WatchOptions: function WatchOptions() { + }, + WatchFileOptions: function WatchFileOptions() { + }, + Stats: function Stats() { + }, + Promise: function Promise() { + }, + Date: function Date() { + }, + JsError: function JsError() { + }, + Atomics: function Atomics() { + }, + Modules: function Modules() { + }, + Module1: function Module1() { + }, + Net: function Net() { + }, + Socket: function Socket() { + }, + NetAddress: function NetAddress() { + }, + NetServer: function NetServer() { + }, + NodeJsError: function NodeJsError() { + }, + JsAssertionError: function JsAssertionError() { + }, + JsRangeError: function JsRangeError() { + }, + JsReferenceError: function JsReferenceError() { + }, + JsSyntaxError: function JsSyntaxError() { + }, + JsTypeError: function JsTypeError() { + }, + JsSystemError: function JsSystemError() { + }, + Process: function Process() { + }, + CPUUsage: function CPUUsage() { + }, + Release: function Release() { + }, + StreamModule: function StreamModule() { + }, + Readable: function Readable() { + }, + Writable: function Writable() { + }, + Duplex: function Duplex() { + }, + Transform: function Transform() { + }, + WritableOptions: function WritableOptions() { + }, + ReadableOptions: function ReadableOptions() { + }, + Immediate: function Immediate() { + }, + Timeout: function Timeout() { + }, + TTY: function TTY() { + }, + TTYReadStream: function TTYReadStream() { + }, + TTYWriteStream: function TTYWriteStream() { + }, + jsify(dartObject) { + if (A._isBasicType(dartObject)) + return dartObject; + return A._convertDataTree(dartObject); + }, + _isBasicType(value) { + var t1 = false; + if (t1) + return true; + return false; + }, + promiseToFuture(promise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._SyncCompleter(t1, $T._eval$1("_SyncCompleter<0>")); + J.then$2$x(promise, A.allowInterop(new A.promiseToFuture_closure(completer)), A.allowInterop(new A.promiseToFuture_closure0(completer))); + return t1; + }, + futureToPromise(future, $T) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure(future, $T))); + }, + Util: function Util() { + }, + promiseToFuture_closure: function promiseToFuture_closure(t0) { + this.completer = t0; + }, + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; + }, + futureToPromise_closure: function futureToPromise_closure(t0, t1) { + this.future = t0; + this.T = t1; + }, + futureToPromise__closure: function futureToPromise__closure(t0, t1) { + this.resolve = t0; + this.T = t1; + }, + Context_Context(style) { + var current = style == null ? A.current() : "."; + if (style == null) + style = $.$get$Style_platform(); + return new A.Context(type$.InternalStyle._as(style), current); + }, + _parseUri(uri) { + if (typeof uri == "string") + return A.Uri_parse(uri); + if (type$.Uri._is(uri)) + return uri; + throw A.wrapException(A.ArgumentError$value(uri, "uri", "Value must be a String or a Uri")); + }, + _validateArgList(method, args) { + var numArgs, i, numArgs0, message, t1, t2, t3, t4; + for (numArgs = args.length, i = 1; i < numArgs; ++i) { + if (args[i] == null || args[i - 1] != null) + continue; + for (; numArgs >= 1; numArgs = numArgs0) { + numArgs0 = numArgs - 1; + if (args[numArgs0] != null) + break; + } + message = new A.StringBuffer(""); + t1 = "" + (method + "("); + message._contents = t1; + t2 = A._arrayInstanceType(args); + t3 = t2._eval$1("SubListIterable<1>"); + t4 = new A.SubListIterable(args, 0, numArgs, t3); + t4.SubListIterable$3(args, 0, numArgs, t2._precomputed1); + t3 = t1 + new A.MappedListIterable(t4, new A._validateArgList_closure(), t3._eval$1("MappedListIterable")).join$1(0, ", "); + message._contents = t3; + message._contents = t3 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); + throw A.wrapException(A.ArgumentError$(message.toString$0(0), null)); + } + }, + Context: function Context(t0, t1) { + this.style = t0; + this._context$_current = t1; + }, + Context_joinAll_closure: function Context_joinAll_closure() { + }, + Context_split_closure: function Context_split_closure() { + }, + _validateArgList_closure: function _validateArgList_closure() { + }, + _PathDirection: function _PathDirection(t0) { + this.name = t0; + }, + _PathRelation: function _PathRelation(t0) { + this.name = t0; + }, + InternalStyle: function InternalStyle() { + }, + ParsedPath_ParsedPath$parse(path, style) { + var t1, parts, separators, start, i, + root = style.getRoot$1(path), + isRootRelative = style.isRootRelative$1(path); + if (root != null) + path = B.JSString_methods.substring$1(path, root.length); + t1 = type$.JSArray_String; + parts = A._setArrayType([], t1); + separators = A._setArrayType([], t1); + t1 = path.length; + if (t1 !== 0 && style.isSeparator$1(B.JSString_methods._codeUnitAt$1(path, 0))) { + separators.push(path[0]); + start = 1; + } else { + separators.push(""); + start = 0; + } + for (i = start; i < t1; ++i) + if (style.isSeparator$1(B.JSString_methods._codeUnitAt$1(path, i))) { + parts.push(B.JSString_methods.substring$2(path, start, i)); + separators.push(path[i]); + start = i + 1; + } + if (start < t1) { + parts.push(B.JSString_methods.substring$1(path, start)); + separators.push(""); + } + return new A.ParsedPath(style, root, isRootRelative, parts, separators); + }, + ParsedPath: function ParsedPath(t0, t1, t2, t3, t4) { + var _ = this; + _.style = t0; + _.root = t1; + _.isRootRelative = t2; + _.parts = t3; + _.separators = t4; + }, + ParsedPath__splitExtension_closure: function ParsedPath__splitExtension_closure() { + }, + ParsedPath__splitExtension_closure0: function ParsedPath__splitExtension_closure0() { + }, + PathException$(message) { + return new A.PathException(message); + }, + PathException: function PathException(t0) { + this.message = t0; + }, + PathMap__create(context, $V) { + var t1 = {}; + t1.context = context; + t1.context = $.$get$context(); + return A.LinkedHashMap_LinkedHashMap(new A.PathMap__create_closure(t1), new A.PathMap__create_closure0(t1), new A.PathMap__create_closure1(), type$.nullable_String, $V); + }, + PathMap: function PathMap(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + PathMap__create_closure: function PathMap__create_closure(t0) { + this._box_0 = t0; + }, + PathMap__create_closure0: function PathMap__create_closure0(t0) { + this._box_0 = t0; + }, + PathMap__create_closure1: function PathMap__create_closure1() { + }, + Style__getPlatformStyle() { + if (A.Uri_base().get$scheme() !== "file") + return $.$get$Style_url(); + var t1 = A.Uri_base(); + if (!B.JSString_methods.endsWith$1(t1.get$path(t1), "/")) + return $.$get$Style_url(); + if (A._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") + return $.$get$Style_windows(); + return $.$get$Style_posix(); + }, + Style: function Style() { + }, + PosixStyle: function PosixStyle(t0, t1, t2) { + this.separatorPattern = t0; + this.needsSeparatorPattern = t1; + this.rootPattern = t2; + }, + UrlStyle: function UrlStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle: function WindowsStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { + }, + CssMediaQuery$type(type, conditions, modifier) { + return new A.CssMediaQuery(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery(null, null, conjunction !== false, t1); + }, + CssMediaQuery: function CssMediaQuery(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult: function _SingletonCssMediaQueryMergeResult(t0) { + this._media_query$_name = t0; + }, + MediaQuerySuccessfulMergeResult: function MediaQuerySuccessfulMergeResult(t0) { + this.query = t0; + }, + ModifiableCssAtRule$($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssAtRule($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssAtRule: function ModifiableCssAtRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._children = t5; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssComment: function ModifiableCssComment(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssDeclaration$($name, value, span, parsedAsCustomProperty, valueSpanForMap) { + var t1 = valueSpanForMap == null ? value.get$span(value) : valueSpanForMap; + if (parsedAsCustomProperty) + if (!J.startsWith$1$s($name.get$value($name), "--")) + A.throwExpression(A.ArgumentError$(string$.parsed, null)); + else if (!(value.get$value(value) instanceof A.SassString)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeType(value.get$value(value)).toString$0(0) + ").", null)); + return new A.ModifiableCssDeclaration($name, value, parsedAsCustomProperty, t1, span); + }, + ModifiableCssDeclaration: function ModifiableCssDeclaration(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsCustomProperty = t2; + _.valueSpanForMap = t3; + _.span = t4; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssImport: function ModifiableCssImport(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssKeyframeBlock$(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssKeyframeBlock(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssKeyframeBlock: function ModifiableCssKeyframeBlock(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssMediaRule$(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode), t2); + }, + ModifiableCssMediaRule: function ModifiableCssMediaRule(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssNode: function ModifiableCssNode() { + }, + ModifiableCssNode_hasFollowingSibling_closure: function ModifiableCssNode_hasFollowingSibling_closure() { + }, + ModifiableCssParentNode: function ModifiableCssParentNode() { + }, + ModifiableCssStyleRule$(selector, span, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStyleRule(selector, originalSelector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStyleRule: function ModifiableCssStyleRule(t0, t1, t2, t3, t4) { + var _ = this; + _.selector = t0; + _.originalSelector = t1; + _.span = t2; + _.children = t3; + _._children = t4; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssStylesheet$(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStylesheet(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStylesheet: function ModifiableCssStylesheet(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._children = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssSupportsRule$(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssSupportsRule(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssSupportsRule: function ModifiableCssSupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssValue: function ModifiableCssValue(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + CssNode: function CssNode() { + }, + CssParentNode: function CssParentNode() { + }, + _IsInvisibleVisitor: function _IsInvisibleVisitor(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor: function __IsInvisibleVisitor_Object_EveryCssVisitor() { + }, + CssStylesheet: function CssStylesheet(t0, t1) { + this.children = t0; + this.span = t1; + }, + CssValue: function CssValue(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + AstNode: function AstNode() { + }, + _FakeAstNode: function _FakeAstNode(t0) { + this._callback = t0; + }, + Argument: function Argument(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ArgumentDeclaration_ArgumentDeclaration$parse(contents, url) { + return A.ScssParser$(contents, null, url).parseArgumentDeclaration$0(); + }, + ArgumentDeclaration: function ArgumentDeclaration(t0, t1, t2) { + this.$arguments = t0; + this.restArgument = t1; + this.span = t2; + }, + ArgumentDeclaration_verify_closure: function ArgumentDeclaration_verify_closure() { + }, + ArgumentDeclaration_verify_closure0: function ArgumentDeclaration_verify_closure0() { + }, + ArgumentInvocation$empty(span) { + return new A.ArgumentInvocation(B.List_empty9, B.Map_empty2, null, null, span); + }, + ArgumentInvocation: function ArgumentInvocation(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.named = t1; + _.rest = t2; + _.keywordRest = t3; + _.span = t4; + }, + AtRootQuery: function AtRootQuery(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._all = t2; + _._at_root_query$_rule = t3; + }, + ConfiguredVariable: function ConfiguredVariable(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + BinaryOperationExpression: function BinaryOperationExpression(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator: function BinaryOperator(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + BooleanExpression: function BooleanExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + CalculationExpression__verifyArguments($arguments) { + return A.List_List$unmodifiable(new A.MappedListIterable($arguments, new A.CalculationExpression__verifyArguments_closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Expression); + }, + CalculationExpression__verify(expression) { + var t1, + _s29_ = "Invalid calculation argument "; + if (expression instanceof A.NumberExpression) + return; + if (expression instanceof A.CalculationExpression) + return; + if (expression instanceof A.VariableExpression) + return; + if (expression instanceof A.FunctionExpression) + return; + if (expression instanceof A.IfExpression) + return; + if (expression instanceof A.StringExpression) { + if (expression.hasQuotes) + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + } else if (expression instanceof A.ParenthesizedExpression) + A.CalculationExpression__verify(expression.expression); + else if (expression instanceof A.BinaryOperationExpression) { + A.CalculationExpression__verify(expression.left); + A.CalculationExpression__verify(expression.right); + t1 = expression.operator; + if (t1 === B.BinaryOperator_qbf) + return; + if (t1 === B.BinaryOperator_KlB) + return; + if (t1 === B.BinaryOperator_6pl) + return; + if (t1 === B.BinaryOperator_qpm) + return; + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + } else + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + }, + CalculationExpression: function CalculationExpression(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + CalculationExpression__verifyArguments_closure: function CalculationExpression__verifyArguments_closure() { + }, + ColorExpression: function ColorExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + FunctionExpression: function FunctionExpression(t0, t1, t2, t3) { + var _ = this; + _.namespace = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + }, + IfExpression: function IfExpression(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + InterpolatedFunctionExpression: function InterpolatedFunctionExpression(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + ListExpression: function ListExpression(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure: function ListExpression_toString_closure(t0) { + this.$this = t0; + }, + MapExpression: function MapExpression(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + MapExpression_toString_closure: function MapExpression_toString_closure() { + }, + NullExpression: function NullExpression(t0) { + this.span = t0; + }, + NumberExpression: function NumberExpression(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + ParenthesizedExpression: function ParenthesizedExpression(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SelectorExpression: function SelectorExpression(t0) { + this.span = t0; + }, + StringExpression_quoteText(text) { + var t1, + quote = A.StringExpression__bestQuote(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""); + buffer._contents = "" + A.Primitives_stringFromCharCode(quote); + A.StringExpression__quoteInnerText(text, quote, buffer, true); + t1 = buffer._contents += A.Primitives_stringFromCharCode(quote); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText(text, quote, buffer, $static) { + var t1, t2, i, codeUnit, next, t3; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + next = B.JSString_methods._codeUnitAt$1(text, i + 1); + if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12 || A.isHex(next)) + buffer.writeCharCode$1(32); + } + } else { + if (codeUnit !== quote) + if (codeUnit !== 92) + t3 = $static && codeUnit === 35 && i < t2 && B.JSString_methods._codeUnitAt$1(text, i + 1) === 123; + else + t3 = true; + else + t3 = true; + if (t3) + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(codeUnit); + } + } + }, + StringExpression__bestQuote(strings) { + var t1, containsDoubleQuote, t2, t3, i, codeUnit; + for (t1 = J.get$iterator$ax(strings), containsDoubleQuote = false; t1.moveNext$0();) { + t2 = t1.get$current(t1); + for (t3 = t2.length, i = 0; i < t3; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(t2, i); + if (codeUnit === 39) + return 34; + if (codeUnit === 34) + containsDoubleQuote = true; + } + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression: function StringExpression(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + SupportsExpression: function SupportsExpression(t0) { + this.condition = t0; + }, + UnaryOperationExpression: function UnaryOperationExpression(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator: function UnaryOperator(t0, t1, t2) { + this.name = t0; + this.operator = t1; + this._name = t2; + }, + ValueExpression: function ValueExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + VariableExpression: function VariableExpression(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + DynamicImport: function DynamicImport(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + StaticImport: function StaticImport(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + Interpolation$(contents, span) { + var t1 = new A.Interpolation(A.List_List$unmodifiable(contents, type$.Object), span); + t1.Interpolation$2(contents, span); + return t1; + }, + Interpolation: function Interpolation(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Interpolation_toString_closure: function Interpolation_toString_closure() { + }, + AtRootRule$(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRootRule(query, span, t1, t2); + }, + AtRootRule: function AtRootRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + AtRule$($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRule($name, value, span, t1, t2 === true); + }, + AtRule: function AtRule(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + CallableDeclaration: function CallableDeclaration() { + }, + ContentBlock$($arguments, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.ContentBlock("@content", $arguments, span, t1, t2); + }, + ContentBlock: function ContentBlock(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + ContentRule: function ContentRule(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + DebugRule: function DebugRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + Declaration$($name, value, span) { + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--") && !(value instanceof A.StringExpression)) + A.throwExpression(A.ArgumentError$(string$.Declarwu + value.toString$0(0) + "` of type " + value.get$runtimeType(value).toString$0(0) + ").", null)); + return new A.Declaration($name, value, span, null, false); + }, + Declaration$nested($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--") && !(value instanceof A.StringExpression)) + A.throwExpression(A.ArgumentError$(string$.Declarwa, null)); + return new A.Declaration($name, value, span, t1, t2); + }, + Declaration: function Declaration(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule$(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.EachRule(t1, list, span, t2, t3); + }, + EachRule: function EachRule(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure: function EachRule_toString_closure() { + }, + ErrorRule: function ErrorRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ExtendRule: function ExtendRule(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + ForRule$(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.ForRule(variable, from, to, exclusive, span, t1, t2); + }, + ForRule: function ForRule(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule: function ForwardRule(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + FunctionRule$($name, $arguments, children, span, comment) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.FunctionRule($name, $arguments, span, t1, t2); + }, + FunctionRule: function FunctionRule(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + IfClause$(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.IfClause(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + ElseClause$(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.ElseClause(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + IfRule: function IfRule(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure: function IfRule_toString_closure() { + }, + IfRuleClause: function IfRuleClause() { + }, + IfRuleClause$__closure: function IfRuleClause$__closure() { + }, + IfRuleClause$___closure: function IfRuleClause$___closure() { + }, + IfClause: function IfClause(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause: function ElseClause(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + ImportRule: function ImportRule(t0, t1) { + this.imports = t0; + this.span = t1; + }, + IncludeRule: function IncludeRule(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.$arguments = t2; + _.content = t3; + _.span = t4; + }, + LoudComment: function LoudComment(t0) { + this.text = t0; + }, + MediaRule$(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.MediaRule(query, span, t1, t2); + }, + MediaRule: function MediaRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MixinRule$($name, $arguments, children, span, comment) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.MixinRule($name, $arguments, span, t1, t2); + }, + MixinRule: function MixinRule(t0, t1, t2, t3, t4) { + var _ = this; + _.__MixinRule_hasContent_FI = $; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + _HasContentVisitor: function _HasContentVisitor() { + }, + __HasContentVisitor_Object_StatementSearchVisitor: function __HasContentVisitor_Object_StatementSearchVisitor() { + }, + ParentStatement: function ParentStatement() { + }, + ParentStatement_closure: function ParentStatement_closure() { + }, + ParentStatement__closure: function ParentStatement__closure() { + }, + ReturnRule: function ReturnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SilentComment: function SilentComment(t0, t1) { + this.text = t0; + this.span = t1; + }, + StyleRule$(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.StyleRule(selector, span, t1, t2); + }, + StyleRule: function StyleRule(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + Stylesheet$(children, span) { + var t1 = A._setArrayType([], type$.JSArray_UseRule), + t2 = A._setArrayType([], type$.JSArray_ForwardRule), + t3 = A.List_List$unmodifiable(children, type$.Statement), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure()); + t1 = new A.Stylesheet(span, false, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss(children, span, false); + return t1; + }, + Stylesheet$internal(children, span, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule), + t2 = A._setArrayType([], type$.JSArray_ForwardRule), + t3 = A.List_List$unmodifiable(children, type$.Statement), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure()); + t1 = new A.Stylesheet(span, plainCss, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss(children, span, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse(contents, syntax, logger, url) { + var t1, t2; + switch (syntax) { + case B.Syntax_Sass_sass: + t1 = A.SpanScanner$(contents, url); + t2 = logger == null ? B.StderrLogger_false : logger; + return new A.SassParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, t2).parse$0(); + case B.Syntax_SCSS_scss: + return A.ScssParser$(contents, logger, url).parse$0(); + case B.Syntax_CSS_css: + t1 = A.SpanScanner$(contents, url); + t2 = logger == null ? B.StderrLogger_false : logger; + return new A.CssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, t2).parse$0(); + default: + throw A.wrapException(A.ArgumentError$("Unknown syntax " + syntax.toString$0(0) + ".", null)); + } + }, + Stylesheet: function Stylesheet(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._uses = t2; + _._forwards = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + SupportsRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.SupportsRule(condition, span, t1, t2); + }, + SupportsRule: function SupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + UseRule: function UseRule(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + VariableDeclaration$($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration: function VariableDeclaration(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule: function WarnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.WhileRule(condition, span, t1, t2); + }, + WhileRule: function WhileRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + SupportsAnything: function SupportsAnything(t0, t1) { + this.contents = t0; + this.span = t1; + }, + SupportsDeclaration: function SupportsDeclaration(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + SupportsFunction: function SupportsFunction(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + SupportsInterpolation: function SupportsInterpolation(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SupportsNegation: function SupportsNegation(t0, t1) { + this.condition = t0; + this.span = t1; + }, + SupportsOperation: function SupportsOperation(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + Selector: function Selector() { + }, + _IsInvisibleVisitor0: function _IsInvisibleVisitor0(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor: function _IsBogusVisitor(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure: function _IsBogusVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + _IsUselessVisitor: function _IsUselessVisitor() { + }, + _IsUselessVisitor_visitComplexSelector_closure: function _IsUselessVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + __IsBogusVisitor_Object_AnySelectorVisitor: function __IsBogusVisitor_Object_AnySelectorVisitor() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor: function __IsInvisibleVisitor_Object_AnySelectorVisitor() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor: function __IsUselessVisitor_Object_AnySelectorVisitor() { + }, + AttributeSelector: function AttributeSelector(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + }, + AttributeOperator: function AttributeOperator(t0, t1) { + this._attribute$_text = t0; + this._name = t1; + }, + ClassSelector: function ClassSelector(t0) { + this.name = t0; + }, + Combinator: function Combinator(t0, t1) { + this._combinator$_text = t0; + this._name = t1; + }, + ComplexSelector$(leadingCombinators, components, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.Combinator), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector(t1, t2, lineBreak); + }, + ComplexSelector: function ComplexSelector(t0, t1, t2) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _.__ComplexSelector_specificity_FI = $; + }, + ComplexSelector_specificity_closure: function ComplexSelector_specificity_closure() { + }, + ComplexSelectorComponent: function ComplexSelectorComponent(t0, t1) { + this.selector = t0; + this.combinators = t1; + }, + ComplexSelectorComponent_toString_closure: function ComplexSelectorComponent_toString_closure() { + }, + CompoundSelector$(components) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector(t1); + }, + CompoundSelector: function CompoundSelector(t0) { + this.components = t0; + this.__CompoundSelector_specificity_FI = $; + }, + CompoundSelector_specificity_closure: function CompoundSelector_specificity_closure() { + }, + IDSelector: function IDSelector(t0) { + this.name = t0; + }, + IDSelector_unify_closure: function IDSelector_unify_closure(t0) { + this.$this = t0; + }, + SelectorList$(components) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList(t1); + }, + SelectorList_SelectorList$parse(contents, allowParent, allowPlaceholder, logger) { + return A.SelectorParser$(contents, allowParent, allowPlaceholder, logger, null).parse$0(); + }, + SelectorList: function SelectorList(t0) { + this.components = t0; + }, + SelectorList_asSassList_closure: function SelectorList_asSassList_closure() { + }, + SelectorList_resolveParentSelectors_closure: function SelectorList_resolveParentSelectors_closure(t0, t1, t2) { + this.$this = t0; + this.implicitParent = t1; + this.parent = t2; + }, + SelectorList_resolveParentSelectors__closure: function SelectorList_resolveParentSelectors__closure(t0) { + this.complex = t0; + }, + SelectorList__complexContainsParentSelector_closure: function SelectorList__complexContainsParentSelector_closure() { + }, + SelectorList__complexContainsParentSelector__closure: function SelectorList__complexContainsParentSelector__closure() { + }, + SelectorList__resolveParentSelectorsCompound_closure: function SelectorList__resolveParentSelectorsCompound_closure() { + }, + SelectorList__resolveParentSelectorsCompound_closure0: function SelectorList__resolveParentSelectorsCompound_closure0(t0) { + this.parent = t0; + }, + SelectorList__resolveParentSelectorsCompound_closure1: function SelectorList__resolveParentSelectorsCompound_closure1(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure: function SelectorList_withAdditionalCombinators_closure(t0) { + this.combinators = t0; + }, + ParentSelector: function ParentSelector(t0) { + this.suffix = t0; + }, + PlaceholderSelector: function PlaceholderSelector(t0) { + this.name = t0; + }, + PseudoSelector$($name, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement($name); + return new A.PseudoSelector($name, A.unvendor($name), t2, t1, argument, selector); + }, + PseudoSelector__isFakePseudoElement($name) { + switch (B.JSString_methods._codeUnitAt$1($name, 0)) { + case 97: + case 65: + return A.equalsIgnoreCase($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase($name, "first-line") || A.equalsIgnoreCase($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector: function PseudoSelector(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _.__PseudoSelector_specificity_FI = $; + }, + PseudoSelector_specificity_closure: function PseudoSelector_specificity_closure(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure: function PseudoSelector_specificity__closure() { + }, + PseudoSelector_specificity__closure0: function PseudoSelector_specificity__closure0() { + }, + PseudoSelector_unify_closure: function PseudoSelector_unify_closure() { + }, + QualifiedName: function QualifiedName(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + SimpleSelector: function SimpleSelector() { + }, + SimpleSelector_isSuperselector_closure: function SimpleSelector_isSuperselector_closure(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure: function SimpleSelector_isSuperselector__closure(t0) { + this.$this = t0; + }, + TypeSelector: function TypeSelector(t0) { + this.name = t0; + }, + UniversalSelector: function UniversalSelector(t0) { + this.namespace = t0; + }, + compileAsync(path, charset, importCache, logger, quietDeps, sourceMap, style, syntax, verbose) { + return A.compileAsync$body(path, charset, importCache, logger, quietDeps, sourceMap, style, syntax, verbose); + }, + compileAsync$body(path, charset, importCache, logger, quietDeps, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t1, terseLogger, t2, stylesheet, result; + var $async$compileAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!verbose) { + t1 = logger == null ? new A.StderrLogger(false) : logger; + terseLogger = new A.TerseLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), t1); + logger = terseLogger; + } else + terseLogger = null; + t1 = syntax === A.Syntax_forPath(path); + $async$goto = t1 ? 3 : 5; + break; + case 3: + // then + t1 = $.$get$context(); + t2 = t1.absolute$7(".", null, null, null, null, null, null); + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(new A.FilesystemImporter(t2), t1.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath(t1.absolute$7(t1.normalize$1(path), null, null, null, null, null, null)) : t1.canonicalize$1(0, path)), t1.toUri$1(path)), $async$compileAsync); + case 6: + // returning from await. + t2 = $async$result; + t2.toString; + stylesheet = t2; + // goto join + $async$goto = 4; + break; + case 5: + // else + t1 = A.readFile(path); + t2 = $.$get$context(); + stylesheet = A.Stylesheet_Stylesheet$parse(t1, syntax, logger, t2.toUri$1(path)); + t1 = t2; + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, new A.FilesystemImporter(t1.absolute$7(".", null, null, null, null, null, null)), null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileAsync); + case 7: + // returning from await. + result = $async$result; + if (terseLogger != null) + terseLogger.summarize$1$node(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync, $async$completer); + }, + compileStringAsync(source, charset, importCache, importer, logger, quietDeps, sourceMap, style, syntax, verbose) { + return A.compileStringAsync$body(source, charset, importCache, importer, logger, quietDeps, sourceMap, style, syntax, verbose); + }, + compileStringAsync$body(source, charset, importCache, importer, logger, quietDeps, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t1, terseLogger, stylesheet, result; + var $async$compileStringAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!verbose) { + t1 = logger == null ? new A.StderrLogger(false) : logger; + terseLogger = new A.TerseLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), t1); + logger = terseLogger; + } else + terseLogger = null; + stylesheet = A.Stylesheet_Stylesheet$parse(source, syntax, logger, null); + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, importer, null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileStringAsync); + case 3: + // returning from await. + result = $async$result; + if (terseLogger != null) + terseLogger.summarize$1$node(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync, $async$completer); + }, + _compileStylesheet0(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, serializeResult, resultSourceMap, $async$temp1; + var $async$_compileStylesheet0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet0); + case 3: + // returning from await. + serializeResult = $async$temp1.serialize($async$result.stylesheet, charset, indentWidth, false, lineFeed, sourceMap, style, true); + resultSourceMap = serializeResult.sourceMap; + if (resultSourceMap != null && true) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure0(stylesheet, importCache)); + $async$returnValue = new A.CompileResult(serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet0, $async$completer); + }, + _compileStylesheet_closure0: function _compileStylesheet_closure0(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.AsyncCallable, + t6 = type$.JSArray_Map_String_AsyncCallable; + return new A.AsyncEnvironment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + AsyncEnvironment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule0(environment, css, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6; + if (forwarded == null) + forwarded = B.Set_empty1; + t1 = A._EnvironmentModule__makeModulesByVariable0(forwarded); + t2 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure5(), type$.Map_String_Value), type$.Value); + t3 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure6(), type$.Map_String_AstNode), type$.AstNode); + t4 = type$.Map_String_AsyncCallable; + t5 = type$.AsyncCallable; + t6 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure7(), t4), t5); + t5 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure8(), t4), t5); + t4 = J.get$isNotEmpty$asx(css.get$children(css)) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure9()); + return A._EnvironmentModule$_0(environment, css, extensionStore, t1, t2, t3, t6, t5, t4, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure10())); + }, + _EnvironmentModule__makeModulesByVariable0(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty3; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule0) { + for (t3 = t2._async_environment$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment$_environment._async_environment$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap0(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_0(_environment, css, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule0(_environment._async_environment$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment: function AsyncEnvironment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._async_environment$_modules = t0; + _._async_environment$_namespaceNodes = t1; + _._async_environment$_globalModules = t2; + _._async_environment$_importedModules = t3; + _._async_environment$_forwardedModules = t4; + _._async_environment$_nestedForwardedModules = t5; + _._async_environment$_allModules = t6; + _._async_environment$_variables = t7; + _._async_environment$_variableNodes = t8; + _._async_environment$_variableIndices = t9; + _._async_environment$_functions = t10; + _._async_environment$_functionIndices = t11; + _._async_environment$_mixins = t12; + _._async_environment$_mixinIndices = t13; + _._async_environment$_content = t14; + _._async_environment$_inMixin = false; + _._async_environment$_inSemiGlobalScope = true; + _._async_environment$_lastVariableIndex = _._async_environment$_lastVariableName = null; + }, + AsyncEnvironment_importForwards_closure: function AsyncEnvironment_importForwards_closure() { + }, + AsyncEnvironment_importForwards_closure0: function AsyncEnvironment_importForwards_closure0() { + }, + AsyncEnvironment_importForwards_closure1: function AsyncEnvironment_importForwards_closure1() { + }, + AsyncEnvironment__getVariableFromGlobalModule_closure: function AsyncEnvironment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure: function AsyncEnvironment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure0: function AsyncEnvironment_setVariable_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure1: function AsyncEnvironment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure: function AsyncEnvironment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure: function AsyncEnvironment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure: function AsyncEnvironment_toModule_closure() { + }, + AsyncEnvironment_toDummyModule_closure: function AsyncEnvironment_toDummyModule_closure() { + }, + AsyncEnvironment__fromOneModule_closure: function AsyncEnvironment__fromOneModule_closure(t0, t1) { + this.callback = t0; + this.T = t1; + }, + AsyncEnvironment__fromOneModule__closure: function AsyncEnvironment__fromOneModule__closure(t0, t1) { + this.entry = t0; + this.T = t1; + }, + _EnvironmentModule0: function _EnvironmentModule0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.transitivelyContainsCss = t7; + _.transitivelyContainsExtensions = t8; + _._async_environment$_environment = t9; + _._async_environment$_modulesByVariable = t10; + }, + _EnvironmentModule__EnvironmentModule_closure5: function _EnvironmentModule__EnvironmentModule_closure5() { + }, + _EnvironmentModule__EnvironmentModule_closure6: function _EnvironmentModule__EnvironmentModule_closure6() { + }, + _EnvironmentModule__EnvironmentModule_closure7: function _EnvironmentModule__EnvironmentModule_closure7() { + }, + _EnvironmentModule__EnvironmentModule_closure8: function _EnvironmentModule__EnvironmentModule_closure8() { + }, + _EnvironmentModule__EnvironmentModule_closure9: function _EnvironmentModule__EnvironmentModule_closure9() { + }, + _EnvironmentModule__EnvironmentModule_closure10: function _EnvironmentModule__EnvironmentModule_closure10() { + }, + AsyncImportCache__toImporters(importers, loadPaths, packageConfig) { + var sassPath, t2, t3, _i, path, _null = null, + t1 = J.get$env$x(self.process); + if (t1 == null) + t1 = type$.Object._as(t1); + sassPath = A._asStringQ(t1.SASS_PATH); + t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$7(t3, _null, _null, _null, _null, _null, _null))); + } + if (sassPath != null) { + t2 = sassPath.split(J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"); + t3 = t2.length; + _i = 0; + for (; _i < t3; ++_i) { + path = t2[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$7(path, _null, _null, _null, _null, _null, _null))); + } + } + return t1; + }, + AsyncImportCache: function AsyncImportCache(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._async_import_cache$_importers = t0; + _._async_import_cache$_logger = t1; + _._async_import_cache$_canonicalizeCache = t2; + _._async_import_cache$_relativeCanonicalizeCache = t3; + _._async_import_cache$_importCache = t4; + _._async_import_cache$_resultsCache = t5; + }, + AsyncImportCache_canonicalize_closure: function AsyncImportCache_canonicalize_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.baseUrl = t1; + _.url = t2; + _.baseImporter = t3; + _.forImport = t4; + }, + AsyncImportCache_canonicalize_closure0: function AsyncImportCache_canonicalize_closure0(t0, t1, t2) { + this.$this = t0; + this.url = t1; + this.forImport = t2; + }, + AsyncImportCache__canonicalize_closure: function AsyncImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure: function AsyncImportCache_importCanonical_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + AsyncImportCache_humanize_closure: function AsyncImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure0: function AsyncImportCache_humanize_closure0() { + }, + AsyncImportCache_humanize_closure1: function AsyncImportCache_humanize_closure1() { + }, + AsyncBuiltInCallable$mixin($name, $arguments, callback, url) { + return new A.AsyncBuiltInCallable($name, A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure(callback)); + }, + AsyncBuiltInCallable: function AsyncBuiltInCallable(t0, t1, t2) { + this.name = t0; + this._async_built_in$_arguments = t1; + this._async_built_in$_callback = t2; + }, + AsyncBuiltInCallable$mixin_closure: function AsyncBuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + BuiltInCallable$function($name, $arguments, callback, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A.Tuple2(A.ScssParser$("@function " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), callback, type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2)); + }, + BuiltInCallable$mixin($name, $arguments, callback, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A.Tuple2(A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure(callback), type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2)); + }, + BuiltInCallable$overloadedFunction($name, overloads) { + var t2, t3, t4, t5, t6, t7, t8, + t1 = A._setArrayType([], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2); + for (t2 = overloads.get$entries(overloads), t2 = t2.get$iterator(t2), t3 = type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2, t4 = "@function " + $name + "(", t5 = type$.String, t6 = type$.VariableDeclaration; t2.moveNext$0();) { + t7 = t2.get$current(t2); + t8 = A.SpanScanner$(t4 + A.S(t7.key) + ") {", null); + t1.push(new A.Tuple2(new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t5, t6), t8, B.StderrLogger_false).parseArgumentDeclaration$0(), t7.value, t3)); + } + return new A.BuiltInCallable($name, t1); + }, + BuiltInCallable: function BuiltInCallable(t0, t1) { + this.name = t0; + this._overloads = t1; + }, + BuiltInCallable$mixin_closure: function BuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + PlainCssCallable: function PlainCssCallable(t0) { + this.name = t0; + }, + UserDefinedCallable: function UserDefinedCallable(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + _compileStylesheet(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var serializeResult = A.serialize(A._EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet).stylesheet, charset, indentWidth, false, lineFeed, sourceMap, style, true), + resultSourceMap = serializeResult.sourceMap; + if (resultSourceMap != null && true) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure(stylesheet, importCache)); + return new A.CompileResult(serializeResult); + }, + _compileStylesheet_closure: function _compileStylesheet_closure(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileResult: function CompileResult(t0) { + this._serialize = t0; + }, + Configuration: function Configuration(t0, t1) { + this._values = t0; + this.__originalConfiguration = t1; + }, + Configuration_toString_closure: function Configuration_toString_closure() { + }, + ExplicitConfiguration: function ExplicitConfiguration(t0, t1, t2) { + this.nodeWithSpan = t0; + this._values = t1; + this.__originalConfiguration = t2; + }, + ConfiguredValue: function ConfiguredValue(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + Environment$() { + var t1 = type$.String, + t2 = type$.Module_Callable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.Callable, + t6 = type$.JSArray_Map_String_Callable; + return new A.Environment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + Environment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule(environment, css, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6; + if (forwarded == null) + forwarded = B.Set_empty; + t1 = A._EnvironmentModule__makeModulesByVariable(forwarded); + t2 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure(), type$.Map_String_Value), type$.Value); + t3 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure0(), type$.Map_String_AstNode), type$.AstNode); + t4 = type$.Map_String_Callable; + t5 = type$.Callable; + t6 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure1(), t4), t5); + t5 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure2(), t4), t5); + t4 = J.get$isNotEmpty$asx(css.get$children(css)) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure3()); + return A._EnvironmentModule$_(environment, css, extensionStore, t1, t2, t3, t6, t5, t4, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure4())); + }, + _EnvironmentModule__makeModulesByVariable(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule) { + for (t3 = t2._modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment$_environment._variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_(_environment, css, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule(_environment._allModules, variables, variableNodes, functions, mixins, extensionStore, css, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment: function Environment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._environment$_modules = t0; + _._namespaceNodes = t1; + _._globalModules = t2; + _._importedModules = t3; + _._forwardedModules = t4; + _._nestedForwardedModules = t5; + _._allModules = t6; + _._variables = t7; + _._variableNodes = t8; + _._variableIndices = t9; + _._functions = t10; + _._functionIndices = t11; + _._mixins = t12; + _._mixinIndices = t13; + _._content = t14; + _._inMixin = false; + _._inSemiGlobalScope = true; + _._lastVariableIndex = _._lastVariableName = null; + }, + Environment_importForwards_closure: function Environment_importForwards_closure() { + }, + Environment_importForwards_closure0: function Environment_importForwards_closure0() { + }, + Environment_importForwards_closure1: function Environment_importForwards_closure1() { + }, + Environment__getVariableFromGlobalModule_closure: function Environment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_setVariable_closure: function Environment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure0: function Environment_setVariable_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure1: function Environment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure: function Environment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure: function Environment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_toModule_closure: function Environment_toModule_closure() { + }, + Environment_toDummyModule_closure: function Environment_toDummyModule_closure() { + }, + Environment__fromOneModule_closure: function Environment__fromOneModule_closure(t0, t1) { + this.callback = t0; + this.T = t1; + }, + Environment__fromOneModule__closure: function Environment__fromOneModule__closure(t0, t1) { + this.entry = t0; + this.T = t1; + }, + _EnvironmentModule: function _EnvironmentModule(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.transitivelyContainsCss = t7; + _.transitivelyContainsExtensions = t8; + _._environment$_environment = t9; + _._modulesByVariable = t10; + }, + _EnvironmentModule__EnvironmentModule_closure: function _EnvironmentModule__EnvironmentModule_closure() { + }, + _EnvironmentModule__EnvironmentModule_closure0: function _EnvironmentModule__EnvironmentModule_closure0() { + }, + _EnvironmentModule__EnvironmentModule_closure1: function _EnvironmentModule__EnvironmentModule_closure1() { + }, + _EnvironmentModule__EnvironmentModule_closure2: function _EnvironmentModule__EnvironmentModule_closure2() { + }, + _EnvironmentModule__EnvironmentModule_closure3: function _EnvironmentModule__EnvironmentModule_closure3() { + }, + _EnvironmentModule__EnvironmentModule_closure4: function _EnvironmentModule__EnvironmentModule_closure4() { + }, + SassException$(message, span) { + return new A.SassException(message, span); + }, + MultiSpanSassRuntimeException$(message, span, primaryLabel, secondarySpans, trace) { + return new A.MultiSpanSassRuntimeException(trace, primaryLabel, A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String), message, span); + }, + SassFormatException$(message, span) { + return new A.SassFormatException(message, span); + }, + SassScriptException$(message, argumentName) { + return new A.SassScriptException(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException(primaryLabel, t1, message); + }, + SassException: function SassException(t0, t1) { + this._span_exception$_message = t0; + this._span = t1; + }, + MultiSpanSassException: function MultiSpanSassException(t0, t1, t2, t3) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + SassRuntimeException: function SassRuntimeException(t0, t1, t2) { + this.trace = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassRuntimeException: function MultiSpanSassRuntimeException(t0, t1, t2, t3, t4) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassFormatException: function SassFormatException(t0, t1) { + this._span_exception$_message = t0; + this._span = t1; + }, + SassScriptException: function SassScriptException(t0) { + this.message = t0; + }, + MultiSpanSassScriptException: function MultiSpanSassScriptException(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + compileStylesheet(options, graph, source, destination, ifModified) { + return A.compileStylesheet$body(options, graph, source, destination, ifModified); + }, + compileStylesheet$body(options, graph, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, syntax, result, importCache, error, exception, t2, t3, t4, t5, t6, t7, t8, t9, result0, logger, terseLogger, stylesheet, css, buffer, sourceName, t1, importer, $async$exception; + var $async$compileStylesheet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $.$get$context(); + importer = new A.FilesystemImporter(t1.absolute$7(".", null, null, null, null, null, null)); + if (ifModified) + try { + if (source != null && destination != null && !graph.modifiedSince$3(t1.toUri$1(source), A.modificationTime(destination), importer)) { + // goto return + $async$goto = 1; + break; + } + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + syntax = null; + if (A._asBoolQ(options._ifParsed$1("indented")) === true) + syntax = B.Syntax_Sass_sass; + else if (source != null) + syntax = A.Syntax_forPath(source); + else + syntax = B.Syntax_SCSS_scss; + result = null; + $async$handler = 4; + t1 = options._options; + $async$goto = A._asBool(t1.$index(0, "async")) ? 7 : 9; + break; + case 7: + // then + t2 = type$.List_String._as(t1.$index(0, "load-path")); + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = type$.nullable_Tuple3_AsyncImporter_Uri_Uri; + t5 = type$.Uri; + t2 = A.AsyncImportCache__toImporters(null, t2, null); + importCache = new A.AsyncImportCache(t2, t3, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t4), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri, t4), A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.ImporterResult)); + $async$goto = source == null ? 10 : 12; + break; + case 10: + // then + $async$goto = 13; + return A._asyncAwait(A.readStdin(), $async$compileStylesheet); + case 13: + // returning from await. + t2 = $async$result; + t3 = syntax; + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t5 = $.$get$context().absolute$7(".", null, null, null, null, null, null); + t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t7 = A._asBool(t1.$index(0, "quiet-deps")); + t8 = A._asBool(t1.$index(0, "verbose")); + t9 = options.get$emitSourceMap(); + $async$goto = 14; + return A._asyncAwait(A.compileStringAsync(t2, A._asBool(t1.$index(0, "charset")), importCache, new A.FilesystemImporter(t5), t4, t7, t9, t6, t3, t8), $async$compileStylesheet); + case 14: + // returning from await. + result0 = $async$result; + // goto join + $async$goto = 11; + break; + case 12: + // else + t2 = syntax; + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t5 = A._asBool(t1.$index(0, "quiet-deps")); + t6 = A._asBool(t1.$index(0, "verbose")); + t7 = options.get$emitSourceMap(); + $async$goto = 15; + return A._asyncAwait(A.compileAsync(source, A._asBool(t1.$index(0, "charset")), importCache, t3, t5, t7, t4, t2, t6), $async$compileStylesheet); + case 15: + // returning from await. + result0 = $async$result; + case 11: + // join + result = result0; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = source == null ? 16 : 18; + break; + case 16: + // then + $async$goto = 19; + return A._asyncAwait(A.readStdin(), $async$compileStylesheet); + case 19: + // returning from await. + t2 = $async$result; + t3 = syntax; + logger = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = $.$get$context().absolute$7(".", null, null, null, null, null, null); + t5 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t6 = A._asBool(t1.$index(0, "quiet-deps")); + t7 = A._asBool(t1.$index(0, "verbose")); + t8 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + if (!t7) { + terseLogger = new A.TerseLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = null; + stylesheet = A.Stylesheet_Stylesheet$parse(t2, t3 == null ? B.Syntax_SCSS_scss : t3, logger, null); + result0 = A._compileStylesheet(stylesheet, logger, graph.importCache, null, new A.FilesystemImporter(t4), null, t5, true, null, null, t6, t8, t1); + if (terseLogger != null) + terseLogger.summarize$1$node(false); + // goto join + $async$goto = 17; + break; + case 18: + // else + t2 = syntax; + logger = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + importCache = graph.importCache; + t3 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t4 = A._asBool(t1.$index(0, "quiet-deps")); + t5 = A._asBool(t1.$index(0, "verbose")); + t6 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + if (!t5) { + terseLogger = new A.TerseLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = null; + t5 = t2 == null || t2 === A.Syntax_forPath(source); + if (t5) { + t2 = $.$get$context(); + t5 = t2.absolute$7(".", null, null, null, null, null, null); + t5 = importCache.importCanonical$3$originalUrl(new A.FilesystemImporter(t5), t2.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath(t2.absolute$7(t2.normalize$1(source), null, null, null, null, null, null)) : t2.canonicalize$1(0, source)), t2.toUri$1(source)); + t5.toString; + stylesheet = t5; + } else { + t5 = A.readFile(source); + if (t2 == null) + t2 = A.Syntax_forPath(source); + t7 = $.$get$context(); + stylesheet = A.Stylesheet_Stylesheet$parse(t5, t2, logger, t7.toUri$1(source)); + t2 = t7; + } + result0 = A._compileStylesheet(stylesheet, logger, importCache, null, new A.FilesystemImporter(t2.absolute$7(".", null, null, null, null, null, null)), null, t3, true, null, null, t4, t6, t1); + if (terseLogger != null) + terseLogger.summarize$1$node(false); + case 17: + // join + result = result0; + case 8: + // join + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + if (options.get$emitErrorCss()) + if (destination == null) + A.print(error.toCssString$0()); + else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, error.toCssString$0() + "\n"); + } + throw $async$exception; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + css = result._serialize.css + A._writeSourceMap(options, result._serialize.sourceMap, destination); + if (destination == null) { + if (css.length !== 0) + A.print(css); + } else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, css + "\n"); + } + t1 = options._options; + if (!A._asBool(t1.$index(0, "quiet"))) + t1 = !A._asBool(t1.$index(0, "update")) && !A._asBool(t1.$index(0, "watch")); + else + t1 = true; + if (t1) { + // goto return + $async$goto = 1; + break; + } + buffer = new A.StringBuffer(""); + t1 = options.get$color() ? buffer._contents = "" + "\x1b[32m" : ""; + if (source == null) + sourceName = "stdin"; + else { + t2 = $.$get$context(); + sourceName = t2.prettyUri$1(t2.toUri$1(source)); + } + destination.toString; + t2 = $.$get$context(); + t2 = t1 + ("Compiled " + sourceName + " to " + t2.prettyUri$1(t2.toUri$1(destination)) + "."); + buffer._contents = t2; + if (options.get$color()) + buffer._contents = t2 + "\x1b[0m"; + A.print(buffer); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$compileStylesheet, $async$completer); + }, + _writeSourceMap(options, sourceMap, destination) { + var t1, sourceMapText, url, sourceMapPath, t2, escapedUrl; + if (sourceMap == null) + return ""; + if (destination != null) { + t1 = $.$get$context(); + sourceMap.targetUrl = t1.toUri$1(A.ParsedPath_ParsedPath$parse(destination, t1.style).get$basename()).toString$0(0); + } + A.mapInPlace(sourceMap.urls, new A._writeSourceMap_closure(options, destination)); + t1 = options._options; + sourceMapText = B.C_JsonCodec.encode$2$toEncodable(sourceMap.toJson$1$includeSourceContents(A._asBool(t1.$index(0, "embed-sources"))), null); + if (A._asBool(t1.$index(0, "embed-source-map"))) + url = A.Uri_Uri$dataFromString(sourceMapText, B.C_Utf8Codec, "application/json"); + else { + destination.toString; + sourceMapPath = destination + ".map"; + t2 = $.$get$context(); + A.ensureDir(t2.dirname$1(sourceMapPath)); + A.writeFile(sourceMapPath, sourceMapText); + url = t2.toUri$1(t2.relative$2$from(sourceMapPath, t2.dirname$1(destination))); + } + t2 = url.toString$0(0); + escapedUrl = A.stringReplaceAllUnchecked(t2, "*/", "%2A/"); + t1 = (J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0) === B.OutputStyle_1 ? "" : "\n\n"; + return t1 + ("/*# sourceMappingURL=" + escapedUrl + " */"); + }, + _writeSourceMap_closure: function _writeSourceMap_closure(t0, t1) { + this.options = t0; + this.destination = t1; + }, + ExecutableOptions__separator(text) { + var t1 = $.$get$ExecutableOptions__separatorBar(), + t2 = B.JSString_methods.$mul(t1, 3), + t3 = J.$eq$(self.process.stdout.isTTY, true) ? "\x1b[1m" : "", + t4 = J.$eq$(self.process.stdout.isTTY, true) ? "\x1b[0m" : ""; + return t2 + " " + t3 + text + t4 + " " + B.JSString_methods.$mul(t1, 35 - text.length); + }, + ExecutableOptions__fail(message) { + return A.throwExpression(A.UsageException$(message)); + }, + ExecutableOptions_ExecutableOptions$parse(args) { + var options, error, t1, exception; + try { + t1 = A.Parser$(null, $.$get$ExecutableOptions__parser(), A.ListQueue_ListQueue$of(args, type$.String), null, null).parse$0(); + if (t1.wasParsed$1("poll") && !A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--poll may not be passed without --watch."); + options = new A.ExecutableOptions(t1); + if (A._asBool(options._options.$index(0, "help"))) + A.ExecutableOptions__fail("Compile Sass to CSS."); + return options; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + A.ExecutableOptions__fail(J.get$message$x(error)); + } else + throw exception; + } + }, + UsageException$(message) { + return new A.UsageException(message); + }, + ExecutableOptions: function ExecutableOptions(t0) { + var _ = this; + _._options = t0; + _.__ExecutableOptions_interactive_FI = $; + _._sourcesToDestinations = null; + _.__ExecutableOptions__sourceDirectoriesToDestinations_F = $; + }, + ExecutableOptions__parser_closure: function ExecutableOptions__parser_closure() { + }, + ExecutableOptions_interactive_closure: function ExecutableOptions_interactive_closure(t0) { + this.$this = t0; + }, + ExecutableOptions_emitErrorCss_closure: function ExecutableOptions_emitErrorCss_closure() { + }, + UsageException: function UsageException(t0) { + this.message = t0; + }, + watch(options, graph) { + return A.watch$body(options, graph); + }, + watch$body(options, graph) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, t1, t2, t3, t4, t5, t6, dirWatcher, watcher; + var $async$watch = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + options._ensureSources$0(); + t1 = options.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = type$.String; + t1 = t1.cast$2$0(0, t2, t2); + t1 = A.List_List$of(t1.get$keys(t1), true, t2); + for (options._ensureSources$0(), t3 = options._sourcesToDestinations.cast$2$0(0, t2, t2), t3 = J.get$iterator$ax(t3.get$keys(t3)); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t1.push($.$get$context().dirname$1(t4)); + } + t3 = options._options; + B.JSArray_methods.addAll$1(t1, type$.List_String._as(t3.$index(0, "load-path"))); + t4 = A._asBool(t3.$index(0, "poll")); + t5 = type$.Stream_WatchEvent; + t6 = A.PathMap__create(null, t5); + t5 = new A.StreamGroup(B._StreamGroupState_dormant, A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.nullable_StreamSubscription_WatchEvent), type$.StreamGroup_WatchEvent); + t5.__StreamGroup__controller_A = A.StreamController_StreamController(t5.get$_onCancel(), t5.get$_onListen(), t5.get$_onPause(), t5.get$_onResume(), true, type$.WatchEvent); + dirWatcher = new A.MultiDirWatcher(new A.PathMap(t6, type$.PathMap_Stream_WatchEvent), t5, t4); + $async$goto = 3; + return A._asyncAwait(A.Future_wait(new A.MappedListIterable(t1, new A.watch_closure(dirWatcher), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Future<~>>")), type$.void), $async$watch); + case 3: + // returning from await. + watcher = new A._Watcher(options, graph); + options._ensureSources$0(), t1 = options._sourcesToDestinations.cast$2$0(0, t2, t2), t1 = t1.get$entries(t1), t1 = t1.get$iterator(t1); + case 4: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t2 = t1.get$current(t1); + t4 = $.$get$context(); + t5 = t4.absolute$7(".", null, null, null, null, null, null); + t6 = t2.key; + graph.addCanonical$4$recanonicalize(new A.FilesystemImporter(t5), t4.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath(t4.absolute$7(t4.normalize$1(t6), null, null, null, null, null, null)) : t4.canonicalize$1(0, t6)), t4.toUri$1(t6), false); + $async$goto = 6; + return A._asyncAwait(watcher.compile$3$ifModified(0, t6, t2.value, true), $async$watch); + case 6: + // returning from await. + if (!$async$result && A._asBool(t3.$index(0, "stop-on-error"))) { + t1 = dirWatcher._group.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + t1._subscribe$4(null, null, null, false).cancel$0(); + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + A.print("Sass is watching for changes. Press Ctrl-C to stop.\n"); + $async$goto = 7; + return A._asyncAwait(watcher.watch$1(0, dirWatcher), $async$watch); + case 7: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$watch, $async$completer); + }, + watch_closure: function watch_closure(t0) { + this.dirWatcher = t0; + }, + _Watcher: function _Watcher(t0, t1) { + this._watch$_options = t0; + this._graph = t1; + }, + _Watcher__debounceEvents_closure: function _Watcher__debounceEvents_closure() { + }, + EmptyExtensionStore: function EmptyExtensionStore() { + }, + Extension: function Extension(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender: function Extender(t0, t1, t2) { + var _ = this; + _.selector = t0; + _.isOriginal = t1; + _._extension = null; + _.span = t2; + }, + ExtensionStore__extendOrReplace(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, t9, compound, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true)) + extender._originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = type$.SimpleSelector, t8 = type$.Map_ComplexSelector_Extension, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t9 = complex.components; + t9 = t9.length === 1 && B.JSArray_methods.get$first(t9).combinators.length === 0; + } else + t9 = false; + compound = t9 ? B.JSArray_methods.get$first(complex.components).selector : null; + if (compound == null) + throw A.wrapException(A.SassScriptException$("Can't extend complex selector " + A.S(complex) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender(complex, false, span); + t14 = new A.Extension(t13, simple, null, true, span); + t13._extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extendList$3(selector, span, t9); + } + return selector; + }, + ExtensionStore$() { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableCssValue_SelectorList, type$.List_CssMediaQuery), new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), B.ExtendMode_normal_normal); + }, + ExtensionStore$_mode(_mode) { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableCssValue_SelectorList, type$.List_CssMediaQuery), new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), _mode); + }, + ExtensionStore: function ExtensionStore(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._selectors = t0; + _._extensions = t1; + _._extensionsByExtender = t2; + _._mediaContexts = t3; + _._sourceSpecificity = t4; + _._originals = t5; + _._mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure: function ExtensionStore_extensionsWhereTarget_closure() { + }, + ExtensionStore__registerSelector_closure: function ExtensionStore__registerSelector_closure() { + }, + ExtensionStore_addExtension_closure: function ExtensionStore_addExtension_closure() { + }, + ExtensionStore_addExtension_closure0: function ExtensionStore_addExtension_closure0() { + }, + ExtensionStore_addExtension_closure1: function ExtensionStore_addExtension_closure1(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure: function ExtensionStore__extendExistingExtensions_closure() { + }, + ExtensionStore__extendExistingExtensions_closure0: function ExtensionStore__extendExistingExtensions_closure0() { + }, + ExtensionStore_addExtensions_closure: function ExtensionStore_addExtensions_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + ExtensionStore_addExtensions__closure1: function ExtensionStore_addExtensions__closure1(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.existingSources = t1; + _.extensionsForTarget = t2; + _.selectorsForTarget = t3; + _.target = t4; + }, + ExtensionStore_addExtensions___closure: function ExtensionStore_addExtensions___closure() { + }, + ExtensionStore_addExtensions_closure0: function ExtensionStore_addExtensions_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + ExtensionStore_addExtensions__closure: function ExtensionStore_addExtensions__closure(t0, t1) { + this.$this = t0; + this.newExtensions = t1; + }, + ExtensionStore_addExtensions__closure0: function ExtensionStore_addExtensions__closure0(t0, t1) { + this.$this = t0; + this.newExtensions = t1; + }, + ExtensionStore__extendComplex_closure: function ExtensionStore__extendComplex_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure: function ExtensionStore__extendComplex__closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure: function ExtensionStore__extendCompound_closure() { + }, + ExtensionStore__extendCompound_closure0: function ExtensionStore__extendCompound_closure0() { + }, + ExtensionStore__extendCompound_closure1: function ExtensionStore__extendCompound_closure1(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo: function ExtensionStore__extendSimple_withoutPseudo(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.extensions = t1; + _.targetsUsed = t2; + _.simpleSpan = t3; + }, + ExtensionStore__extendSimple_closure: function ExtensionStore__extendSimple_closure(t0, t1, t2) { + this.$this = t0; + this.withoutPseudo = t1; + this.simpleSpan = t2; + }, + ExtensionStore__extendSimple_closure0: function ExtensionStore__extendSimple_closure0() { + }, + ExtensionStore__extendPseudo_closure: function ExtensionStore__extendPseudo_closure() { + }, + ExtensionStore__extendPseudo_closure0: function ExtensionStore__extendPseudo_closure0() { + }, + ExtensionStore__extendPseudo_closure1: function ExtensionStore__extendPseudo_closure1() { + }, + ExtensionStore__extendPseudo_closure2: function ExtensionStore__extendPseudo_closure2(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure3: function ExtensionStore__extendPseudo_closure3(t0) { + this.pseudo = t0; + }, + ExtensionStore__trim_closure: function ExtensionStore__trim_closure(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure0: function ExtensionStore__trim_closure0(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure: function ExtensionStore_clone_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.oldToNewSelectors = t2; + _.newMediaContexts = t3; + }, + unifyComplex(complexes) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, newLeadingCombinator, base, newTrailingCombinator, _i, t5, t6, t7, t8, t9, t10, result, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor)) + return _null; + t4 = t3.components; + if (t4.length === 1 && t3.leadingCombinators.length !== 0) { + newLeadingCombinator = B.JSArray_methods.get$single(t3.leadingCombinators); + if (leadingCombinator != null && leadingCombinator !== newLeadingCombinator) + return _null; + leadingCombinator = newLeadingCombinator; + } + base = B.JSArray_methods.get$last(t4); + t3 = base.combinators; + if (t3.length !== 0) { + newTrailingCombinator = B.JSArray_methods.get$single(t3); + if (trailingCombinator != null && trailingCombinator !== newTrailingCombinator) + return _null; + trailingCombinator = newTrailingCombinator; + } + if (unifiedBase == null) + unifiedBase = base.selector.components; + else + for (t3 = base.selector.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + unifiedBase = t3[_i].unify$1(unifiedBase); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes), t5 = type$.Combinator, t6 = type$.ComplexSelectorComponent; t4.moveNext$0();) { + t7 = t4.get$current(t4); + t8 = t7.components; + t9 = t8.length; + if (t9 > 1) { + t10 = t7.leadingCombinators; + t8 = B.JSArray_methods.take$1(t8, t9 - 1); + t7 = t7.lineBreak; + result = A.List_List$from(t10, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + result = A.List_List$from(t8, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t8 = result; + if (t10.length === 0 && t8.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, _null)); + t3.push(new A.ComplexSelector(t10, t8, t7)); + } + } + t4 = leadingCombinator == null ? B.List_empty0 : A._setArrayType([leadingCombinator], type$.JSArray_Combinator); + unifiedBase.toString; + t6 = A.CompoundSelector$(unifiedBase); + base = A.ComplexSelector$(t4, A._setArrayType([new A.ComplexSelectorComponent(t6, A.List_List$unmodifiable(trailingCombinator == null ? B.List_empty0 : A._setArrayType([trailingCombinator], type$.JSArray_Combinator), t5))], type$.JSArray_ComplexSelectorComponent), t1.any$1(complexes, new A.unifyComplex_closure())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$of(A.IterableExtension_get_exceptLast(t3), true, type$.ComplexSelector); + t1.push(B.JSArray_methods.get$last(t3).concatenate$1(base)); + } + return A.weave(t1, false); + }, + unifyCompound(compound1, compound2) { + var t1, result, _i, unified; + for (t1 = compound1.length, result = compound2, _i = 0; _i < t1; ++_i, result = unified) { + unified = compound1[_i].unify$1(result); + if (unified == null) + return null; + } + return A.CompoundSelector$(result); + }, + unifyUniversalAndElement(selector1, selector2) { + var namespace1, name1, t1, namespace2, name2, namespace, $name, _null = null, + _s45_ = string$.must_b; + if (selector1 instanceof A.UniversalSelector) { + namespace1 = selector1.namespace; + name1 = _null; + } else if (selector1 instanceof A.TypeSelector) { + t1 = selector1.name; + namespace1 = t1.namespace; + name1 = t1.name; + } else + throw A.wrapException(A.ArgumentError$value(selector1, "selector1", _s45_)); + if (selector2 instanceof A.UniversalSelector) { + namespace2 = selector2.namespace; + name2 = _null; + } else if (selector2 instanceof A.TypeSelector) { + t1 = selector2.name; + namespace2 = t1.namespace; + name2 = t1.name; + } else + throw A.wrapException(A.ArgumentError$value(selector2, "selector2", _s45_)); + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return _null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return _null; + $name = name2; + } + return $name == null ? new A.UniversalSelector(namespace) : new A.TypeSelector(new A.QualifiedName($name, namespace)); + }, + weave(complexes, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, target, i, t7, _i, t8, t9, _i0, parentPrefix, t10, t11, result, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.get$first(complexes); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$(complex.leadingCombinators, complex.components, true)], type$.JSArray_ComplexSelector); + } + t2 = type$.JSArray_ComplexSelector; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t1 = t1.get$iterator(t1), t3 = type$.Combinator, t4 = type$.ComplexSelectorComponent; t1.moveNext$0();) { + t5 = t1.get$current(t1); + t6 = t5.components; + target = B.JSArray_methods.get$last(t6); + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$2$forceLineBreak(t5, forceLineBreak); + continue; + } + t6 = A._setArrayType([], t2); + for (t7 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t7 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t8 = A._weaveParents(prefixes[_i], t5); + if (t8 == null) + t8 = B.List_empty1; + t9 = t8.length; + _i0 = 0; + for (; _i0 < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i0) { + parentPrefix = t8[_i0]; + t10 = A.List_List$of(parentPrefix.components, true, t4); + t10.push(target); + t11 = parentPrefix.lineBreak || forceLineBreak; + result = A.List_List$from(parentPrefix.leadingCombinators, false, t3); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + result = A.List_List$from(t10, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + if (t12.length === 0 && t10.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + t6.push(new A.ComplexSelector(t12, t10, t11)); + } + } + prefixes = t6; + } + return prefixes; + }, + _weaveParents(prefix, base) { + var t1, queue1, queue2, trailingCombinators, rootish1, rootish2, t2, rootish, groups1, groups2, lcs, choices, t3, t4, t5, _i, group, t6, t7, t8, _i0, chunk, t9, t10, result, _null = null, + leadingCombinators = A._mergeLeadingCombinators(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent; + queue1 = A.ListQueue_ListQueue$of(prefix.components, t1); + queue2 = A.ListQueue_ListQueue$of(A.IterableExtension_get_exceptLast(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators(queue1, queue2, _null); + if (trailingCombinators == null) + return _null; + rootish1 = A._firstIfRootish(queue1); + rootish2 = A._firstIfRootish(queue2); + t2 = rootish1 == null; + if (!t2 && rootish2 != null) { + rootish = A.unifyCompound(rootish1.selector.components, rootish2.selector.components); + if (rootish == null) + return _null; + t2 = type$.Combinator; + queue1.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(rootish1.combinators, t2))); + queue2.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(rootish2.combinators, t2))); + } else if (!t2 || rootish2 != null) { + t2 = t2 ? rootish2 : rootish1; + t2.toString; + queue1.addFirst$1(t2); + queue2.addFirst$1(t2); + } + groups1 = A._groupSelectors(queue1); + groups2 = A._groupSelectors(queue2); + t2 = type$.List_ComplexSelectorComponent; + lcs = A.longestCommonSubsequence(groups2, groups1, new A._weaveParents_closure(), t2); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent); + for (t3 = lcs.length, t4 = type$.JSArray_Iterable_ComplexSelectorComponent, t5 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < lcs.length; lcs.length === t3 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t6 = A._setArrayType([], t4); + for (t7 = A._chunks(groups1, groups2, new A._weaveParents_closure0(group), t2), t8 = t7.length, _i0 = 0; _i0 < t7.length; t7.length === t8 || (0, A.throwConcurrentModificationError)(t7), ++_i0) { + chunk = t7[_i0]; + t9 = A._setArrayType([], t5); + for (t10 = B.JSArray_methods.get$iterator(chunk); t10.moveNext$0();) + B.JSArray_methods.addAll$1(t9, t10.get$current(t10)); + t6.push(t9); + } + choices.push(t6); + choices.push(A._setArrayType([group], t4)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t3 = A._setArrayType([], t4); + for (t2 = A._chunks(groups1, groups2, new A._weaveParents_closure1(), t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + chunk = t2[_i]; + t6 = A._setArrayType([], t5); + for (t7 = B.JSArray_methods.get$iterator(chunk); t7.moveNext$0();) + B.JSArray_methods.addAll$1(t6, t7.get$current(t7)); + t3.push(t6); + } + choices.push(t3); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t2 = A._setArrayType([], type$.JSArray_ComplexSelector); + for (t3 = J.get$iterator$ax(A.paths(new A.WhereIterable(choices, new A._weaveParents_closure2(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent), type$.Iterable_ComplexSelectorComponent)), t4 = type$.Combinator, t6 = !prefix.lineBreak, t7 = base.lineBreak; t3.moveNext$0();) { + t8 = t3.get$current(t3); + t9 = A._setArrayType([], t5); + for (t8 = J.get$iterator$ax(t8); t8.moveNext$0();) + B.JSArray_methods.addAll$1(t9, t8.get$current(t8)); + t8 = !t6 || t7; + result = A.List_List$from(leadingCombinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + result = A.List_List$from(t9, false, t1); + result.fixed$length = Array; + result.immutable$list = Array; + t9 = result; + if (t10.length === 0 && t9.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, _null)); + t2.push(new A.ComplexSelector(t10, t9, t8)); + } + return t2; + }, + _firstIfRootish(queue) { + var first, t1, t2, _i, simple; + if (queue._collection$_head === queue._collection$_tail) + return null; + first = queue.get$first(queue); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + if (simple instanceof A.PseudoSelector && simple.isClass && $._rootishPseudoClasses.contains$1(0, simple.normalizedName)) { + queue.removeFirst$0(); + return first; + } + } + return null; + }, + _mergeLeadingCombinators(combinators1, combinators2) { + var t2, _null = null, + t1 = combinators1.length; + if (t1 > 1) + return _null; + t2 = combinators2.length; + if (t2 > 1) + return _null; + if (t1 === 0) + return combinators2; + if (t2 === 0) + return combinators1; + return B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + }, + _mergeTrailingCombinators(components1, components2, result) { + var combinators1, combinators2, t1, t2, combinator1, combinator2, component1, component2, t3, t4, choices, unified, followingSiblingComponent, nextSiblingComponent, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent); + combinators1 = components1._collection$_head === components1._collection$_tail ? B.List_empty0 : components1.get$last(components1).combinators; + combinators2 = components2._collection$_head === components2._collection$_tail ? B.List_empty0 : components2.get$last(components2).combinators; + t1 = combinators1.length; + t2 = t1 === 0; + if (t2 && combinators2.length === 0) + return result; + if (t1 > 1 || combinators2.length > 1) + return _null; + combinator1 = t2 ? _null : B.JSArray_methods.get$first(combinators1); + combinator2 = combinators2.length === 0 ? _null : B.JSArray_methods.get$first(combinators2); + t1 = combinator1 != null; + if (t1 && combinator2 != null) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t1 = combinator1 === B.Combinator_Htt; + if (t1 && combinator2 === B.Combinator_Htt) { + t1 = component1.selector; + t2 = component2.selector; + if (A.compoundIsSuperselector(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + else { + t3 = type$.JSArray_ComplexSelectorComponent; + t4 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(t2, t1, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t3)], t4)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t3), A._setArrayType([component2, component1], t3)], t4); + unified = A.unifyCompound(t1.components, t2.components); + if (unified != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(B.List_Kw1, type$.Combinator))], t3)); + result.addFirst$1(choices); + } + } + } else { + if (!(t1 && combinator2 === B.Combinator_4QF)) + t2 = combinator1 === B.Combinator_4QF && combinator2 === B.Combinator_Htt; + else + t2 = true; + if (t2) { + followingSiblingComponent = t1 ? component1 : component2; + nextSiblingComponent = t1 ? component2 : component1; + t1 = type$.JSArray_ComplexSelectorComponent; + t2 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(followingSiblingComponent.selector, nextSiblingComponent.selector, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([nextSiblingComponent], t1)], t2)); + else { + unified = A.unifyCompound(component1.selector.components, component2.selector.components); + t2 = A._setArrayType([A._setArrayType([followingSiblingComponent, nextSiblingComponent], t1)], t2); + if (unified != null) + t2.push(A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(B.List_IoD, type$.Combinator))], t1)); + result.addFirst$1(t2); + } + } else { + if (combinator1 === B.Combinator_Cht) + t2 = combinator2 === B.Combinator_4QF || combinator2 === B.Combinator_Htt; + else + t2 = false; + if (t2) { + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + components1._add$1(component1); + } else { + if (combinator2 === B.Combinator_Cht) + t1 = combinator1 === B.Combinator_4QF || t1; + else + t1 = false; + if (t1) { + result.addFirst$1(A._setArrayType([A._setArrayType([component1], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + components2._add$1(component2); + } else if (combinator1 === combinator2) { + unified = A.unifyCompound(component1.selector.components, component2.selector.components); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(A._setArrayType([combinator1], type$.JSArray_Combinator), type$.Combinator))], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + } else + return _null; + } + } + } + return A._mergeTrailingCombinators(components1, components2, result); + } else if (t1) { + if (combinator1 === B.Combinator_Cht && !components2.get$isEmpty(components2) && A.compoundIsSuperselector(components2.get$last(components2).selector, components1.get$last(components1).selector, _null)) + components2.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([components1.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + return A._mergeTrailingCombinators(components1, components2, result); + } else { + if (combinator2 === B.Combinator_Cht && !components1.get$isEmpty(components1) && A.compoundIsSuperselector(components1.get$last(components1).selector, components2.get$last(components2).selector, _null)) + components1.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([components2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + return A._mergeTrailingCombinators(components1, components2, result); + } + }, + _mustUnify(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(t3)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure(t1)); + }, + _isUnique(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks(queue1, queue2, done, $T) { + var chunk2, t2, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + for (; !done.call$1(queue1);) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + for (; !done.call$1(queue2);) + chunk2.push(queue2.removeFirst$0()); + t1 = chunk1.length === 0; + if (t1 && chunk2.length === 0) + return A._setArrayType([], $T._eval$1("JSArray>")); + if (t1) + return A._setArrayType([chunk2], $T._eval$1("JSArray>")); + if (chunk2.length === 0) + return A._setArrayType([chunk1], $T._eval$1("JSArray>")); + t1 = A.List_List$of(chunk1, true, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$of(chunk2, true, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + return A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + }, + paths(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure($T)); + }, + _groupSelectors(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent), + t1 = type$.JSArray_ComplexSelectorComponent, + group = A._setArrayType([], t1); + for (t2 = A._ListQueueIterator$(complex), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2._collection$_current; + if (t4 == null) + t4 = t3._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure(list1)); + }, + _complexIsParentSuperselector(complex1, complex2) { + var base, t1, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + base = new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([new A.PlaceholderSelector("")], type$.JSArray_SimpleSelector)), A.List_List$unmodifiable(B.List_empty0, type$.Combinator)); + t1 = type$.ComplexSelectorComponent; + t2 = A.List_List$of(complex1, true, t1); + t2.push(base); + t1 = A.List_List$of(complex2, true, t1); + t1.push(base); + return A.complexIsSuperselector(t2, t1); + }, + complexIsSuperselector(complex1, complex2) { + var t1, t2, t3, i1, i2, remaining1, t4, remaining2, component1, t5, parents, endOfSubselector, component2, combinator1, combinator2; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = type$.JSArray_ComplexSelectorComponent, t2 = A._arrayInstanceType(complex2), t3 = t2._precomputed1, t2 = t2._eval$1("SubListIterable<1>"), i1 = 0, i2 = 0; true;) { + remaining1 = complex1.length - i1; + t4 = complex2.length; + remaining2 = t4 - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t5 = component1.combinators; + if (t5.length > 1) + return false; + if (remaining1 === 1) { + parents = B.JSArray_methods.sublist$2(complex2, i2, t4 - 1); + if (B.JSArray_methods.any$1(parents, new A.complexIsSuperselector_closure())) + return false; + return A.compoundIsSuperselector(component1.selector, B.JSArray_methods.get$last(complex2).selector, parents); + } + for (t4 = component1.selector, endOfSubselector = i2, parents = null; true;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + if (A.compoundIsSuperselector(t4, component2.selector, parents)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + if (parents == null) + parents = A._setArrayType([], t1); + parents.push(component2); + } + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t5); + combinator2 = A.IterableExtension_get_firstOrNull(component2.combinators); + if (combinator1 != combinator2) + if (!(combinator1 == null && combinator2 === B.Combinator_Cht)) + t4 = combinator1 === B.Combinator_Htt && combinator2 === B.Combinator_4QF; + else + t4 = true; + else + t4 = true; + if (!t4) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) + if (combinator1 === B.Combinator_Htt) { + t4 = complex2.length - 1; + t5 = new A.SubListIterable(complex2, 0, t4, t2); + t5.SubListIterable$3(complex2, 0, t4, t3); + if (!t5.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure0(combinator1))) + return false; + } else if (combinator1 != null) + if (complex2.length - i2 > 1) + return false; + } + }, + _isSupercombinator(combinator1, combinator2) { + var t1; + if (combinator1 != combinator2) + if (!(combinator1 == null && combinator2 === B.Combinator_Cht)) + t1 = combinator1 === B.Combinator_Htt && combinator2 === B.Combinator_4QF; + else + t1 = true; + else + t1 = true; + return t1; + }, + compoundIsSuperselector(compound1, compound2, parents) { + var t2, t3, t4, t5, t6, t7, t8, _i, simple1, + tuple1 = A._findPseudoElementIndexed(compound1), + tuple2 = A._findPseudoElementIndexed(compound2), + t1 = tuple1 == null; + if (!t1 && tuple2 != null) { + if (tuple1.item1.isSuperselector$1(tuple2.item1)) { + t1 = compound1.components; + t2 = tuple1.item2; + t3 = type$.int; + t4 = A._arrayInstanceType(t1)._precomputed1; + t5 = A.SubListIterable$(t1, 0, A.checkNotNullable(t2, "count", t3), t4); + t6 = compound2.components; + t7 = tuple2.item2; + t8 = A._arrayInstanceType(t6)._precomputed1; + t1 = A._compoundComponentsIsSuperselector(t5, A.SubListIterable$(t6, 0, A.checkNotNullable(t7, "count", t3), t8), parents) && A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, t2 + 1, null, t4), A.SubListIterable$(t6, t7 + 1, null, t8), parents); + } else + t1 = false; + return t1; + } else if (!t1 || tuple2 != null) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector && simple1.selector != null) { + if (!A._selectorPseudoIsSuperselector(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) + return new A.Tuple2(simple, i, type$.Tuple2_PseudoSelector_int); + } + return null; + }, + _compoundComponentsIsSuperselector(compound1, compound2, parents) { + if (compound1.get$length(compound1) === 0) + return true; + if (compound2.get$length(compound2) === 0) + compound2 = A._setArrayType([new A.UniversalSelector("*")], type$.JSArray_SimpleSelector); + return A.compoundIsSuperselector(A.CompoundSelector$(compound1), A.CompoundSelector$(compound2), parents); + }, + _selectorPseudoIsSuperselector(pseudo1, compound2, parents) { + var selector1_ = pseudo1.selector; + if (selector1_ == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure(selector1_)) || B.JSArray_methods.any$1(selector1_.components, new A._selectorPseudoIsSuperselector_closure0(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure1(selector1_)); + case "slotted": + return A._selectorPseudoArgs(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure2(selector1_)); + case "not": + return B.JSArray_methods.every$1(selector1_.components, new A._selectorPseudoIsSuperselector_closure3(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure4(selector1_)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure5(pseudo1, selector1_)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector; + return A.IterableNullableExtension_whereNotNull(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure0(), t1._eval$1("MappedIterable")), type$.SelectorList); + }, + unifyComplex_closure: function unifyComplex_closure() { + }, + _weaveParents_closure: function _weaveParents_closure() { + }, + _weaveParents_closure0: function _weaveParents_closure0(t0) { + this.group = t0; + }, + _weaveParents_closure1: function _weaveParents_closure1() { + }, + _weaveParents_closure2: function _weaveParents_closure2() { + }, + _mustUnify_closure: function _mustUnify_closure(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure: function _mustUnify__closure(t0) { + this.uniqueSelectors = t0; + }, + paths_closure: function paths_closure(t0) { + this.T = t0; + }, + paths__closure: function paths__closure(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure: function paths___closure(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure: function listIsSuperselector_closure(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure: function listIsSuperselector__closure(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure: function complexIsSuperselector_closure() { + }, + complexIsSuperselector_closure0: function complexIsSuperselector_closure0(t0) { + this.combinator1 = t0; + }, + _selectorPseudoIsSuperselector_closure: function _selectorPseudoIsSuperselector_closure(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure0: function _selectorPseudoIsSuperselector_closure0(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure1: function _selectorPseudoIsSuperselector_closure1(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure2: function _selectorPseudoIsSuperselector_closure2(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure3: function _selectorPseudoIsSuperselector_closure3(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure: function _selectorPseudoIsSuperselector__closure(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure: function _selectorPseudoIsSuperselector___closure(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure0: function _selectorPseudoIsSuperselector___closure0(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure4: function _selectorPseudoIsSuperselector_closure4(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure5: function _selectorPseudoIsSuperselector_closure5(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure: function _selectorPseudoArgs_closure(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure0: function _selectorPseudoArgs_closure0() { + }, + MergedExtension_merge(left, right) { + var t3, t4, t5, t6, + t1 = left.extender, + t2 = t1.selector; + if (!t2.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t3 = left.mediaContext; + t4 = t3 == null; + if (!t4) { + t5 = right.mediaContext; + t5 = t5 != null && !B.C_ListEquality.equals$2(0, t3, t5); + } else + t5 = false; + if (t5) + throw A.wrapException(A.SassException$("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t4) + return right; + t5 = left.target; + t6 = left.span; + if (t4) + t3 = right.mediaContext; + t2.get$specificity(); + t1 = new A.Extender(t2, false, t1.span); + return t1._extension = new A.MergedExtension(left, right, t1, t5, t3, true, t6); + }, + MergedExtension: function MergedExtension(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + ExtendMode: function ExtendMode(t0, t1) { + this.name = t0; + this._name = t1; + }, + globalFunctions_closure: function globalFunctions_closure() { + }, + _updateComponents($arguments, adjust, change, scale) { + var keywords, alpha, red, green, blue, hueNumber, t2, hue, saturation, lightness, whiteness, blackness, hasRgb, hasSL, hasWB, t3, t4, t5, _null = null, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + argumentList = type$.SassArgumentList._as(t1.$index($arguments, 1)); + if (argumentList._list$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$(string$.Only_op, _null)); + argumentList._wereKeywordsAccessed = true; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._keywords, type$.String, type$.Value); + t1 = new A._updateComponents_getParam(keywords, scale, change); + alpha = t1.call$2("alpha", 1); + red = t1.call$2("red", 255); + green = t1.call$2("green", 255); + blue = t1.call$2("blue", 255); + if (scale) + hueNumber = _null; + else { + t2 = keywords.remove$1(0, "hue"); + hueNumber = t2 == null ? _null : t2.assertNumber$1("hue"); + } + t2 = hueNumber == null; + if (!t2) + A._checkAngle(hueNumber, "hue"); + hue = t2 ? _null : hueNumber._number$_value; + saturation = t1.call$3$checkPercent("saturation", 100, true); + lightness = t1.call$3$checkPercent("lightness", 100, true); + whiteness = t1.call$3$assertPercent("whiteness", 100, true); + blackness = t1.call$3$assertPercent("blackness", 100, true); + t1 = keywords.__js_helper$_length; + if (t1 !== 0) + throw A.wrapException(A.SassScriptException$("No " + A.pluralize("argument", t1, _null) + " named " + A.S(A.toSentence(keywords.get$keys(keywords).map$1$1(0, new A._updateComponents_closure(), type$.Object), "or")) + ".", _null)); + hasRgb = red != null || green != null || blue != null; + hasSL = saturation != null || lightness != null; + hasWB = whiteness != null || blackness != null; + if (hasRgb) + t1 = hasSL || hasWB || hue != null; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassScriptException$(string$.RGB_pa + (hasWB ? "HWB" : "HSL") + " parameters.", _null)); + if (hasSL && hasWB) + throw A.wrapException(A.SassScriptException$(string$.HSL_pa, _null)); + t1 = new A._updateComponents_updateValue(change, adjust); + t2 = new A._updateComponents_updateRgb(t1); + if (hasRgb) { + t3 = t2.call$2(color.get$red(color), red); + t4 = t2.call$2(color.get$green(color), green); + t2 = t2.call$2(color.get$blue(color), blue); + return color.changeRgb$4$alpha$blue$green$red(t1.call$3(color._alpha, alpha, 1), t2, t4, t3); + } else if (hasWB) { + if (change) + t2 = hue; + else { + t2 = color.get$hue(color); + t2 += hue == null ? 0 : hue; + } + t3 = t1.call$3(color.get$whiteness(color), whiteness, 100); + t4 = t1.call$3(color.get$blackness(color), blackness, 100); + t5 = color._alpha; + t1 = t1.call$3(t5, alpha, 1); + if (t2 == null) + t2 = color.get$hue(color); + if (t3 == null) + t3 = color.get$whiteness(color); + if (t4 == null) + t4 = color.get$blackness(color); + return A.SassColor_SassColor$hwb(t2, t3, t4, t1 == null ? t5 : t1); + } else { + t2 = hue == null; + if (!t2 || hasSL) { + if (change) + t2 = hue; + else { + t3 = color.get$hue(color); + t3 += t2 ? 0 : hue; + t2 = t3; + } + t3 = t1.call$3(color.get$saturation(color), saturation, 100); + t4 = t1.call$3(color.get$lightness(color), lightness, 100); + return color.changeHsl$4$alpha$hue$lightness$saturation(t1.call$3(color._alpha, alpha, 1), t2, t4, t3); + } else if (alpha != null) + return color.changeAlpha$1(t1.call$3(color._alpha, alpha, 1)); + else + return color; + } + }, + _functionString($name, $arguments) { + return new A.SassString($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction($name, argument, negative) { + return A.BuiltInCallable$function($name, "$color, $amount", new A._removedColorFunction_closure($name, argument, negative), "sass:color"); + }, + _rgb($name, $arguments) { + var t2, red, green, blue, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + return A._functionString($name, $arguments); + red = t1.$index($arguments, 0).assertNumber$1("red"); + green = t1.$index($arguments, 1).assertNumber$1("green"); + blue = t1.$index($arguments, 2).assertNumber$1("blue"); + return A.SassColor$rgbInternal(A.fuzzyRound(A._percentageOrUnitless(red, 255, "red")), A.fuzzyRound(A._percentageOrUnitless(green, 255, "green")), A.fuzzyRound(A._percentageOrUnitless(blue, 255, "blue")), A.NullableExtension_andThen(alpha, new A._rgb_closure()), B._ColorFormatEnum_rgbFunction); + }, + _rgbTwoArg($name, $arguments) { + var first, color, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar()) + return A._functionString($name, $arguments); + else if (t1.$index($arguments, 1).get$isVar()) { + first = t1.$index($arguments, 0); + if (first instanceof A.SassColor) + return new A.SassString($name + "(" + first.get$red(first) + ", " + first.get$green(first) + ", " + first.get$blue(first) + ", " + A.serializeValue(t1.$index($arguments, 1), false, true) + ")", false); + else + return A._functionString($name, $arguments); + } else if (t1.$index($arguments, 1).get$isSpecialNumber()) { + color = t1.$index($arguments, 0).assertColor$1("color"); + return new A.SassString($name + "(" + color.get$red(color) + ", " + color.get$green(color) + ", " + color.get$blue(color) + ", " + A.serializeValue(t1.$index($arguments, 1), false, true) + ")", false); + } + return t1.$index($arguments, 0).assertColor$1("color").changeAlpha$1(A._percentageOrUnitless(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha")); + }, + _hsl($name, $arguments) { + var t2, hue, saturation, lightness, + _s10_ = "saturation", + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + return A._functionString($name, $arguments); + hue = t1.$index($arguments, 0).assertNumber$1("hue"); + saturation = t1.$index($arguments, 1).assertNumber$1(_s10_); + lightness = t1.$index($arguments, 2).assertNumber$1(_s9_); + A._checkAngle(hue, "hue"); + A._checkPercent(saturation, _s10_); + A._checkPercent(lightness, _s9_); + return A.SassColor$hslInternal(hue._number$_value, B.JSNumber_methods.clamp$2(saturation._number$_value, 0, 100), B.JSNumber_methods.clamp$2(lightness._number$_value, 0, 100), A.NullableExtension_andThen(alpha, new A._hsl_closure()), B._ColorFormatEnum_hslFunction); + }, + _checkAngle(angle, $name) { + var t1, t2, t3; + if (!angle.get$hasUnits() || angle.hasUnit$1("deg")) + return; + t1 = "" + ("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + ") is deprecated.\n") + "\n"; + t2 = "To preserve current behavior: $" + $name; + if (angle.compatibleWithUnit$1("deg")) { + t3 = type$.JSArray_String; + t2 = t1 + ("You're passing " + angle.toString$0(0) + string$.x2c_whici + A.SassNumber_SassNumber(angle._number$_value, "deg").toString$0(0) + ".\n") + (string$.Soon__ + angle.coerce$2(A._setArrayType(["deg"], t3), A._setArrayType([], t3)).toString$0(0) + ".\n") + "\n" + (t2 + " * 1deg/1" + B.JSArray_methods.get$first(angle.get$numeratorUnits(angle)) + "\n") + ("To migrate to new behavior: 0deg + $" + $name + "\n") + "\n"; + t1 = t2; + } else + t1 = t1 + (t2 + A._removeUnits(angle) + "\n") + "\n"; + t1 += "See https://sass-lang.com/d/color-units"; + A.EvaluationContext_current().warn$2$deprecation(0, t1.charCodeAt(0) == 0 ? t1 : t1, true); + }, + _checkPercent(number, $name) { + var t1, t2; + if (number.hasUnit$1("%")) + return; + t1 = number.toString$0(0); + t2 = A._removeUnits(number); + A.EvaluationContext_current().warn$2$deprecation(0, "$" + $name + ": Passing a number without unit % (" + t1 + string$.x29x20is_d + $name + t2 + " * 1%", true); + }, + _removeUnits(number) { + var t2, + t1 = number.get$denominatorUnits(number); + t1 = new A.MappedListIterable(t1, new A._removeUnits_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = number.get$numeratorUnits(number); + return t1 + new A.MappedListIterable(t2, new A._removeUnits_closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + _hwb($arguments) { + var _s9_ = "whiteness", + _s9_0 = "blackness", + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + hue = t1.$index($arguments, 0).assertNumber$1("hue"), + whiteness = t1.$index($arguments, 1).assertNumber$1(_s9_), + blackness = t1.$index($arguments, 2).assertNumber$1(_s9_0); + A._checkAngle(hue, "hue"); + whiteness.assertUnit$2("%", _s9_); + blackness.assertUnit$2("%", _s9_0); + return A.SassColor_SassColor$hwb(hue._number$_value, whiteness.valueInRange$3(0, 100, _s9_), blackness.valueInRange$3(0, 100, _s9_0), A.NullableExtension_andThen(alpha, new A._hwb_closure())); + }, + _parseChannels($name, argumentNames, channels) { + var list, t1, channels0, alphaFromSlashList, isCommaSeparated, isBracketed, buffer, maybeSlashSeparated, slash, _null = null, + _s17_ = "$channels must be"; + if (channels.get$isVar()) + return A._functionString($name, A._setArrayType([channels], type$.JSArray_Value)); + if (channels.get$separator(channels) === B.ListSeparator_zg9) { + list = channels.get$asList(); + t1 = list.length; + if (t1 !== 2) + throw A.wrapException(A.SassScriptException$(string$.Only_2 + t1 + " " + A.pluralize("was", t1, "were") + " passed.", _null)); + channels0 = list[0]; + alphaFromSlashList = list[1]; + if (!alphaFromSlashList.get$isSpecialNumber()) + alphaFromSlashList.assertNumber$1("alpha"); + if (list[0].get$isVar()) + return A._functionString($name, A._setArrayType([channels], type$.JSArray_Value)); + } else { + alphaFromSlashList = _null; + channels0 = channels; + } + isCommaSeparated = channels0.get$separator(channels0) === B.ListSeparator_rXA; + isBracketed = channels0.get$hasBrackets(); + if (isCommaSeparated || isBracketed) { + buffer = new A.StringBuffer(_s17_); + if (isBracketed) { + t1 = _s17_ + " an unbracketed"; + buffer._contents = t1; + } else + t1 = _s17_; + if (isCommaSeparated) { + t1 += isBracketed ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-separated"; + } + buffer._contents = t1 + " list."; + throw A.wrapException(A.SassScriptException$(buffer.toString$0(0), _null)); + } + list = channels0.get$asList(); + t1 = list.length; + if (t1 > 3) + throw A.wrapException(A.SassScriptException$("Only 3 elements allowed, but " + t1 + " were passed.", _null)); + else if (t1 < 3) { + if (!B.JSArray_methods.any$1(list, new A._parseChannels_closure())) + if (list.length !== 0) { + t1 = B.JSArray_methods.get$last(list); + if (t1 instanceof A.SassString) + if (t1._hasQuotes) { + t1 = t1._string$_text; + t1 = A.startsWithIgnoreCase(t1, "var(") && B.JSString_methods.contains$1(t1, "/"); + } else + t1 = false; + else + t1 = false; + } else + t1 = false; + else + t1 = true; + if (t1) + return A._functionString($name, A._setArrayType([channels], type$.JSArray_Value)); + else + throw A.wrapException(A.SassScriptException$("Missing element " + argumentNames[list.length] + ".", _null)); + } + if (alphaFromSlashList != null) { + t1 = A.List_List$of(list, true, type$.Value); + t1.push(alphaFromSlashList); + return t1; + } + maybeSlashSeparated = list[2]; + if (maybeSlashSeparated instanceof A.SassNumber) { + slash = maybeSlashSeparated.asSlash; + if (slash == null) + return list; + return A._setArrayType([list[0], list[1], slash.item1, slash.item2], type$.JSArray_Value); + } else if (maybeSlashSeparated instanceof A.SassString && !maybeSlashSeparated._hasQuotes && B.JSString_methods.contains$1(maybeSlashSeparated._string$_text, "/")) + return A._functionString($name, A._setArrayType([channels0], type$.JSArray_Value)); + else + return list; + }, + _percentageOrUnitless(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number$_value; + else if (number.hasUnit$1("%")) + value = max * number._number$_value / 100; + else + throw A.wrapException(A.SassScriptException$("$" + $name + ": Expected " + number.toString$0(0) + ' to have no units or "%".', null)); + return B.JSNumber_methods.clamp$2(value, 0, max); + }, + _mixColors(color1, color2, weight) { + var weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1._alpha, + t2 = color2._alpha, + alphaDistance = t1 - t2, + t3 = normalizedWeight * alphaDistance, + weight1 = ((t3 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t3)) + 1) / 2, + weight2 = 1 - weight1; + return A.SassColor$rgb(A.fuzzyRound(color1.get$red(color1) * weight1 + color2.get$red(color2) * weight2), A.fuzzyRound(color1.get$green(color1) * weight1 + color2.get$green(color2) * weight2), A.fuzzyRound(color1.get$blue(color1) * weight1 + color2.get$blue(color2) * weight2), t1 * weightScale + t2 * (1 - weightScale)); + }, + _opacify($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"); + return color.changeAlpha$1(B.JSNumber_methods.clamp$2(color._alpha + t1.$index($arguments, 1).assertNumber$1("amount").valueInRangeWithUnit$4(0, 1, "amount", ""), 0, 1)); + }, + _transparentize($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"); + return color.changeAlpha$1(B.JSNumber_methods.clamp$2(color._alpha - t1.$index($arguments, 1).assertNumber$1("amount").valueInRangeWithUnit$4(0, 1, "amount", ""), 0, 1)); + }, + _function4($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:color"); + }, + global_closure: function global_closure() { + }, + global_closure0: function global_closure0() { + }, + global_closure1: function global_closure1() { + }, + global_closure2: function global_closure2() { + }, + global_closure3: function global_closure3() { + }, + global_closure4: function global_closure4() { + }, + global_closure5: function global_closure5() { + }, + global_closure6: function global_closure6() { + }, + global_closure7: function global_closure7() { + }, + global_closure8: function global_closure8() { + }, + global_closure9: function global_closure9() { + }, + global_closure10: function global_closure10() { + }, + global_closure11: function global_closure11() { + }, + global_closure12: function global_closure12() { + }, + global_closure13: function global_closure13() { + }, + global_closure14: function global_closure14() { + }, + global_closure15: function global_closure15() { + }, + global_closure16: function global_closure16() { + }, + global_closure17: function global_closure17() { + }, + global_closure18: function global_closure18() { + }, + global_closure19: function global_closure19() { + }, + global_closure20: function global_closure20() { + }, + global_closure21: function global_closure21() { + }, + global_closure22: function global_closure22() { + }, + global_closure23: function global_closure23() { + }, + global_closure24: function global_closure24() { + }, + global__closure: function global__closure() { + }, + global_closure25: function global_closure25() { + }, + module_closure: function module_closure() { + }, + module_closure0: function module_closure0() { + }, + module_closure1: function module_closure1() { + }, + module_closure2: function module_closure2() { + }, + module_closure3: function module_closure3() { + }, + module_closure4: function module_closure4() { + }, + module_closure5: function module_closure5() { + }, + module_closure6: function module_closure6() { + }, + module__closure: function module__closure() { + }, + module_closure7: function module_closure7() { + }, + _red_closure: function _red_closure() { + }, + _green_closure: function _green_closure() { + }, + _blue_closure: function _blue_closure() { + }, + _mix_closure: function _mix_closure() { + }, + _hue_closure: function _hue_closure() { + }, + _saturation_closure: function _saturation_closure() { + }, + _lightness_closure: function _lightness_closure() { + }, + _complement_closure: function _complement_closure() { + }, + _adjust_closure: function _adjust_closure() { + }, + _scale_closure: function _scale_closure() { + }, + _change_closure: function _change_closure() { + }, + _ieHexStr_closure: function _ieHexStr_closure() { + }, + _ieHexStr_closure_hexString: function _ieHexStr_closure_hexString() { + }, + _updateComponents_getParam: function _updateComponents_getParam(t0, t1, t2) { + this.keywords = t0; + this.scale = t1; + this.change = t2; + }, + _updateComponents_closure: function _updateComponents_closure() { + }, + _updateComponents_updateValue: function _updateComponents_updateValue(t0, t1) { + this.change = t0; + this.adjust = t1; + }, + _updateComponents_updateRgb: function _updateComponents_updateRgb(t0) { + this.updateValue = t0; + }, + _functionString_closure: function _functionString_closure() { + }, + _removedColorFunction_closure: function _removedColorFunction_closure(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure: function _rgb_closure() { + }, + _hsl_closure: function _hsl_closure() { + }, + _removeUnits_closure: function _removeUnits_closure() { + }, + _removeUnits_closure0: function _removeUnits_closure0() { + }, + _hwb_closure: function _hwb_closure() { + }, + _parseChannels_closure: function _parseChannels_closure() { + }, + _function3($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:list"); + }, + _length_closure0: function _length_closure0() { + }, + _nth_closure: function _nth_closure() { + }, + _setNth_closure: function _setNth_closure() { + }, + _join_closure: function _join_closure() { + }, + _append_closure0: function _append_closure0() { + }, + _zip_closure: function _zip_closure() { + }, + _zip__closure: function _zip__closure() { + }, + _zip__closure0: function _zip__closure0(t0) { + this._box_0 = t0; + }, + _zip__closure1: function _zip__closure1(t0) { + this._box_0 = t0; + }, + _index_closure0: function _index_closure0() { + }, + _separator_closure: function _separator_closure() { + }, + _isBracketed_closure: function _isBracketed_closure() { + }, + _slash_closure: function _slash_closure() { + }, + _modify(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl(map1, map2) { + var t2, t3, result, + t1 = map1._map$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + t2.forEach$1(0, new A._deepMergeImpl_closure(result)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function2($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:map"); + }, + _get_closure: function _get_closure() { + }, + _set_closure: function _set_closure() { + }, + _set__closure0: function _set__closure0(t0) { + this.$arguments = t0; + }, + _set_closure0: function _set_closure0() { + }, + _set__closure: function _set__closure(t0) { + this.args = t0; + }, + _merge_closure: function _merge_closure() { + }, + _merge_closure0: function _merge_closure0() { + }, + _merge__closure: function _merge__closure(t0) { + this.map2 = t0; + }, + _deepMerge_closure: function _deepMerge_closure() { + }, + _deepRemove_closure: function _deepRemove_closure() { + }, + _deepRemove__closure: function _deepRemove__closure(t0) { + this.keys = t0; + }, + _remove_closure: function _remove_closure() { + }, + _remove_closure0: function _remove_closure0() { + }, + _keys_closure: function _keys_closure() { + }, + _values_closure: function _values_closure() { + }, + _hasKey_closure: function _hasKey_closure() { + }, + _modify_modifyNestedMap: function _modify_modifyNestedMap(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + _deepMergeImpl_closure: function _deepMergeImpl_closure(t0) { + this.result = t0; + }, + _numberFunction($name, transform) { + return A.BuiltInCallable$function($name, "$number", new A._numberFunction_closure(transform), "sass:math"); + }, + _function1($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:math"); + }, + _ceil_closure: function _ceil_closure() { + }, + _clamp_closure: function _clamp_closure() { + }, + _floor_closure: function _floor_closure() { + }, + _max_closure: function _max_closure() { + }, + _min_closure: function _min_closure() { + }, + _round_closure: function _round_closure() { + }, + _abs_closure: function _abs_closure() { + }, + _hypot_closure: function _hypot_closure() { + }, + _hypot__closure: function _hypot__closure() { + }, + _log_closure: function _log_closure() { + }, + _pow_closure: function _pow_closure() { + }, + _sqrt_closure: function _sqrt_closure() { + }, + _acos_closure: function _acos_closure() { + }, + _asin_closure: function _asin_closure() { + }, + _atan_closure: function _atan_closure() { + }, + _atan2_closure: function _atan2_closure() { + }, + _cos_closure: function _cos_closure() { + }, + _sin_closure: function _sin_closure() { + }, + _tan_closure: function _tan_closure() { + }, + _compatible_closure: function _compatible_closure() { + }, + _isUnitless_closure: function _isUnitless_closure() { + }, + _unit_closure: function _unit_closure() { + }, + _percentage_closure: function _percentage_closure() { + }, + _randomFunction_closure: function _randomFunction_closure() { + }, + _div_closure: function _div_closure() { + }, + _numberFunction_closure: function _numberFunction_closure(t0) { + this.transform = t0; + }, + _function5($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:meta"); + }, + global_closure26: function global_closure26() { + }, + global_closure27: function global_closure27() { + }, + global_closure28: function global_closure28() { + }, + global_closure29: function global_closure29() { + }, + local_closure: function local_closure() { + }, + local_closure0: function local_closure0() { + }, + local__closure: function local__closure() { + }, + _prependParent(compound) { + var t2, _null = null, + t1 = compound.components, + first = B.JSArray_methods.get$first(t1); + if (first instanceof A.UniversalSelector) + return _null; + if (first instanceof A.TypeSelector) { + t2 = first.name; + if (t2.namespace != null) + return _null; + t2 = A._setArrayType([new A.ParentSelector(t2.name)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t2, A.SubListIterable$(t1, 1, _null, A._arrayInstanceType(t1)._precomputed1)); + return A.CompoundSelector$(t2); + } else { + t2 = A._setArrayType([new A.ParentSelector(_null)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t2, t1); + return A.CompoundSelector$(t2); + } + }, + _function0($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:selector"); + }, + _nest_closure: function _nest_closure() { + }, + _nest__closure: function _nest__closure(t0) { + this._box_0 = t0; + }, + _nest__closure0: function _nest__closure0() { + }, + _append_closure: function _append_closure() { + }, + _append__closure: function _append__closure() { + }, + _append__closure0: function _append__closure0() { + }, + _append___closure: function _append___closure(t0) { + this.parent = t0; + }, + _extend_closure: function _extend_closure() { + }, + _replace_closure: function _replace_closure() { + }, + _unify_closure: function _unify_closure() { + }, + _isSuperselector_closure: function _isSuperselector_closure() { + }, + _simpleSelectors_closure: function _simpleSelectors_closure() { + }, + _simpleSelectors__closure: function _simpleSelectors__closure() { + }, + _parse_closure: function _parse_closure() { + }, + _codepointForIndex(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:string"); + }, + _unquote_closure: function _unquote_closure() { + }, + _quote_closure: function _quote_closure() { + }, + _length_closure: function _length_closure() { + }, + _insert_closure: function _insert_closure() { + }, + _index_closure: function _index_closure() { + }, + _slice_closure: function _slice_closure() { + }, + _toUpperCase_closure: function _toUpperCase_closure() { + }, + _toLowerCase_closure: function _toLowerCase_closure() { + }, + _uniqueId_closure: function _uniqueId_closure() { + }, + ImportCache$(loadPaths, logger) { + var t1 = type$.nullable_Tuple3_Importer_Uri_Uri, + t2 = type$.Uri, + t3 = A.ImportCache__toImporters(null, loadPaths, null), + t4 = logger == null ? B.StderrLogger_false : logger; + return new A.ImportCache(t3, t4, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t1), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.ImporterResult)); + }, + ImportCache__toImporters(importers, loadPaths, packageConfig) { + var sassPath, t2, t3, _i, path, _null = null, + t1 = J.get$env$x(self.process); + if (t1 == null) + t1 = type$.Object._as(t1); + sassPath = A._asStringQ(t1.SASS_PATH); + t1 = A._setArrayType([], type$.JSArray_Importer_2); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$7(t3, _null, _null, _null, _null, _null, _null))); + } + if (sassPath != null) { + t2 = sassPath.split(J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"); + t3 = t2.length; + _i = 0; + for (; _i < t3; ++_i) { + path = t2[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$7(path, _null, _null, _null, _null, _null, _null))); + } + } + return t1; + }, + ImportCache: function ImportCache(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._importers = t0; + _._logger = t1; + _._canonicalizeCache = t2; + _._relativeCanonicalizeCache = t3; + _._importCache = t4; + _._resultsCache = t5; + }, + ImportCache_canonicalize_closure: function ImportCache_canonicalize_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.baseUrl = t1; + _.url = t2; + _.baseImporter = t3; + _.forImport = t4; + }, + ImportCache_canonicalize_closure0: function ImportCache_canonicalize_closure0(t0, t1, t2) { + this.$this = t0; + this.url = t1; + this.forImport = t2; + }, + ImportCache__canonicalize_closure: function ImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure: function ImportCache_importCanonical_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + ImportCache_humanize_closure: function ImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure0: function ImportCache_humanize_closure0() { + }, + ImportCache_humanize_closure1: function ImportCache_humanize_closure1() { + }, + Importer: function Importer() { + }, + AsyncImporter: function AsyncImporter() { + }, + FilesystemImporter: function FilesystemImporter(t0) { + this._loadPath = t0; + }, + FilesystemImporter_canonicalize_closure: function FilesystemImporter_canonicalize_closure() { + }, + ImporterResult: function ImporterResult(t0, t1, t2) { + this.contents = t0; + this._sourceMapUrl = t1; + this.syntax = t2; + }, + fromImport() { + var t1 = A._asBoolQ($.Zone__current.$index(0, B.Symbol__inImportRule)); + return t1 === true; + }, + resolveImportPath(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport() ? new A.resolveImportPath_closure(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPath(path)) : t1; + } + t1 = A.fromImport() ? new A.resolveImportPath_closure0(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne(A._tryPathWithExtensions(path)); + return t1 == null ? A._tryPathAsDirectory(path) : t1; + }, + _tryPathWithExtensions(path) { + var result = A._tryPath(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath(path + ".scss")); + return result.length !== 0 ? result : A._tryPath(path + ".css"); + }, + _tryPath(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists(partial)) + t1.push(partial); + if (A.fileExists(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory(path) { + var t1; + if (!A.dirExists(path)) + return null; + t1 = A.fromImport() ? new A._tryPathAsDirectory_closure(path).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPathWithExtensions(A.join(path, "index", null))) : t1; + }, + _exactlyOne(paths) { + var t1 = paths.length; + if (t1 === 0) + return null; + if (t1 === 1) + return B.JSArray_methods.get$first(paths); + throw A.wrapException(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure(), type$.String).join$1(0, "\n")); + }, + resolveImportPath_closure: function resolveImportPath_closure(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure0: function resolveImportPath_closure0(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure: function _tryPathAsDirectory_closure(t0) { + this.path = t0; + }, + _exactlyOne_closure: function _exactlyOne_closure() { + }, + InterpolationBuffer: function InterpolationBuffer(t0, t1) { + this._interpolation_buffer$_text = t0; + this._interpolation_buffer$_contents = t1; + }, + _realCasePath(path) { + var prefix, t1; + if (!(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin"))) + return path; + if (J.$eq$(J.get$platform$x(self.process), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.isAlphabetic0(B.JSString_methods._codeUnitAt$1(prefix, 0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper().call$1(path); + }, + _realCasePath_helper: function _realCasePath_helper() { + }, + _realCasePath_helper_closure: function _realCasePath_helper_closure(t0, t1, t2) { + this.helper = t0; + this.dirname = t1; + this.path = t2; + }, + _realCasePath_helper__closure: function _realCasePath_helper__closure(t0) { + this.basename = t0; + }, + readFile(path) { + var sourceFile, t1, i, + contents = A._asString(A._readFile(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (B.JSString_methods._codeUnitAt$1(contents, i) !== 65533) + continue; + throw A.wrapException(A.SassException$("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0())); + } + return contents; + }, + _readFile(path, encoding) { + return A._systemErrorToFileSystemException(new A._readFile_closure(path, encoding)); + }, + writeFile(path, contents) { + return A._systemErrorToFileSystemException(new A.writeFile_closure(path, contents)); + }, + deleteFile(path) { + return A._systemErrorToFileSystemException(new A.deleteFile_closure(path)); + }, + readStdin() { + return A.readStdin$body(); + }, + readStdin$body() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, sink, t1, t2, completer; + var $async$readStdin = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = new A._Future($.Zone__current, type$._Future_String); + completer = new A._AsyncCompleter(t2, type$._AsyncCompleter_String); + t1.contents = null; + sink = new A._StringCallbackSink(new A.readStdin_closure(t1, completer), new A.StringBuffer("")).asUtf8Sink$1(false); + J.on$2$x(J.get$stdin$x(self.process), "data", A.allowInterop(new A.readStdin_closure0(sink))); + J.on$2$x(J.get$stdin$x(self.process), "end", A.allowInterop(new A.readStdin_closure1(sink))); + J.on$2$x(J.get$stdin$x(self.process), "error", A.allowInterop(new A.readStdin_closure2(completer))); + $async$returnValue = t2; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$readStdin, $async$completer); + }, + fileExists(path) { + return A._systemErrorToFileSystemException(new A.fileExists_closure(path)); + }, + dirExists(path) { + return A._systemErrorToFileSystemException(new A.dirExists_closure(path)); + }, + ensureDir(path) { + return A._systemErrorToFileSystemException(new A.ensureDir_closure(path)); + }, + listDir(path, recursive) { + return A._systemErrorToFileSystemException(new A.listDir_closure(recursive, path)); + }, + modificationTime(path) { + return A._systemErrorToFileSystemException(new A.modificationTime_closure(path)); + }, + _systemErrorToFileSystemException(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + isWindows() { + return J.$eq$(J.get$platform$x(self.process), "win32"); + }, + watchDir(path, poll) { + var t2, t3, t1 = {}, + watcher = J.watch$2$x(self.chokidar, path, {disableGlobbing: true, usePolling: poll}); + t1.controller = null; + t2 = J.getInterceptor$x(watcher); + t2.on$2(watcher, "add", A.allowInterop(new A.watchDir_closure(t1))); + t2.on$2(watcher, "change", A.allowInterop(new A.watchDir_closure0(t1))); + t2.on$2(watcher, "unlink", A.allowInterop(new A.watchDir_closure1(t1))); + t2.on$2(watcher, "error", A.allowInterop(new A.watchDir_closure2(t1))); + t3 = new A._Future($.Zone__current, type$._Future_Stream_WatchEvent); + t2.on$2(watcher, "ready", A.allowInterop(new A.watchDir_closure3(t1, watcher, new A._AsyncCompleter(t3, type$._AsyncCompleter_Stream_WatchEvent)))); + return t3; + }, + FileSystemException: function FileSystemException(t0, t1) { + this.message = t0; + this.path = t1; + }, + Stderr: function Stderr(t0) { + this._stderr = t0; + }, + _readFile_closure: function _readFile_closure(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + writeFile_closure: function writeFile_closure(t0, t1) { + this.path = t0; + this.contents = t1; + }, + deleteFile_closure: function deleteFile_closure(t0) { + this.path = t0; + }, + readStdin_closure: function readStdin_closure(t0, t1) { + this._box_0 = t0; + this.completer = t1; + }, + readStdin_closure0: function readStdin_closure0(t0) { + this.sink = t0; + }, + readStdin_closure1: function readStdin_closure1(t0) { + this.sink = t0; + }, + readStdin_closure2: function readStdin_closure2(t0) { + this.completer = t0; + }, + fileExists_closure: function fileExists_closure(t0) { + this.path = t0; + }, + dirExists_closure: function dirExists_closure(t0) { + this.path = t0; + }, + ensureDir_closure: function ensureDir_closure(t0) { + this.path = t0; + }, + listDir_closure: function listDir_closure(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure: function listDir__closure(t0) { + this.path = t0; + }, + listDir__closure0: function listDir__closure0() { + }, + listDir_closure_list: function listDir_closure_list() { + }, + listDir__list_closure: function listDir__list_closure(t0, t1) { + this.parent = t0; + this.list = t1; + }, + modificationTime_closure: function modificationTime_closure(t0) { + this.path = t0; + }, + watchDir_closure: function watchDir_closure(t0) { + this._box_0 = t0; + }, + watchDir_closure0: function watchDir_closure0(t0) { + this._box_0 = t0; + }, + watchDir_closure1: function watchDir_closure1(t0) { + this._box_0 = t0; + }, + watchDir_closure2: function watchDir_closure2(t0) { + this._box_0 = t0; + }, + watchDir_closure3: function watchDir_closure3(t0, t1, t2) { + this._box_0 = t0; + this.watcher = t1; + this.completer = t2; + }, + watchDir__closure: function watchDir__closure(t0) { + this.watcher = t0; + }, + _QuietLogger: function _QuietLogger() { + }, + StderrLogger: function StderrLogger(t0) { + this.color = t0; + }, + TerseLogger: function TerseLogger(t0, t1) { + this._warningCounts = t0; + this._inner = t1; + }, + TerseLogger_summarize_closure: function TerseLogger_summarize_closure() { + }, + TerseLogger_summarize_closure0: function TerseLogger_summarize_closure0() { + }, + TrackingLogger: function TrackingLogger(t0) { + this._tracking$_logger = t0; + this._emittedDebug = this._emittedWarning = false; + }, + BuiltInModule$($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap(functions, $T), + t3 = A.BuiltInModule__callableMap(mixins, $T), + t4 = variables == null ? B.Map_empty1 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value); + return new A.BuiltInModule(t1, t2, t3, t4, $T._eval$1("BuiltInModule<0>")); + }, + BuiltInModule__callableMap(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, J.get$name$x(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule: function BuiltInModule(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + ForwardedModuleView_ifNecessary(inner, rule, $T) { + var t1; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t1 = rule.hiddenMixinsAndFunctions; + if (t1 == null) + t1 = null; + else { + t1 = t1._base; + t1 = t1.get$isEmpty(t1); + } + if (t1 === true) { + t1 = rule.hiddenVariables; + if (t1 == null) + t1 = null; + else { + t1 = t1._base; + t1 = t1.get$isEmpty(t1); + } + t1 = t1 === true; + } else + t1 = false; + } else + t1 = false; + else + t1 = false; + else + t1 = false; + if (t1) + return inner; + else + return A.ForwardedModuleView$(inner, rule, $T); + }, + ForwardedModuleView$(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView(_inner, _rule, A.ForwardedModuleView__forwardedMap(_inner.get$variables(), t1, t2, t3, type$.Value), A.ForwardedModuleView__forwardedMap(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode), A.ForwardedModuleView__forwardedMap(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView<0>")); + }, + ForwardedModuleView__forwardedMap(map, prefix, safelist, blocklist, $V) { + var t2, + t1 = prefix == null; + if (t1) + if (safelist == null) + if (blocklist != null) { + t2 = blocklist._base; + t2 = t2.get$isEmpty(t2); + } else + t2 = true; + else + t2 = false; + else + t2 = false; + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView(map, prefix, $V._eval$1("PrefixedMapView<0>")); + if (safelist != null) + map = new A.LimitedMapView(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView<1,2>")); + else { + if (blocklist != null) { + t1 = blocklist._base; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = false; + if (t1) + map = A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + } + return map; + }, + ForwardedModuleView: function ForwardedModuleView(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view$_inner = t0; + _._rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + ShadowedModuleView_ifNecessary(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist(inner.get$mixins(), mixins) ? new A.ShadowedModuleView(inner, A.ShadowedModuleView__shadowedMap(inner.get$variables(), variables, type$.Value), A.ShadowedModuleView__shadowedMap(inner.get$variableNodes(), variables, type$.AstNode), A.ShadowedModuleView__shadowedMap(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView<0>")) : null; + }, + ShadowedModuleView__shadowedMap(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView: function ShadowedModuleView(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + JSArray0: function JSArray0() { + }, + Chokidar: function Chokidar() { + }, + ChokidarOptions: function ChokidarOptions() { + }, + ChokidarWatcher: function ChokidarWatcher() { + }, + JSFunction: function JSFunction() { + }, + NodeImporterResult: function NodeImporterResult() { + }, + RenderContext: function RenderContext() { + }, + RenderContextOptions: function RenderContextOptions() { + }, + RenderContextResult: function RenderContextResult() { + }, + RenderContextResultStats: function RenderContextResultStats() { + }, + JSClass: function JSClass() { + }, + JSUrl: function JSUrl() { + }, + _PropertyDescriptor: function _PropertyDescriptor() { + }, + AtRootQueryParser: function AtRootQueryParser(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + AtRootQueryParser_parse_closure: function AtRootQueryParser_parse_closure(t0) { + this.$this = t0; + }, + _disallowedFunctionNames_closure: function _disallowedFunctionNames_closure() { + }, + CssParser: function CssParser(t0, t1, t2) { + var _ = this; + _._isUseAllowed = true; + _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + KeyframeSelectorParser$(contents, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.KeyframeSelectorParser(t1, logger); + }, + KeyframeSelectorParser: function KeyframeSelectorParser(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + KeyframeSelectorParser_parse_closure: function KeyframeSelectorParser_parse_closure(t0) { + this.$this = t0; + }, + MediaQueryParser: function MediaQueryParser(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + MediaQueryParser_parse_closure: function MediaQueryParser_parse_closure(t0) { + this.$this = t0; + }, + Parser_isIdentifier(text) { + var t1, t2, exception, logger = null; + try { + t1 = logger; + t2 = A.SpanScanner$(text, null); + new A.Parser(t2, t1 == null ? B.StderrLogger_false : t1)._parseIdentifier$0(); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassFormatException) + return false; + else + throw exception; + } + }, + Parser: function Parser(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + Parser__parseIdentifier_closure: function Parser__parseIdentifier_closure(t0) { + this.$this = t0; + }, + Parser_scanIdentChar_matches: function Parser_scanIdentChar_matches(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + SassParser: function SassParser(t0, t1, t2) { + var _ = this; + _._currentIndentation = 0; + _._spaces = _._nextIndentationEnd = _._nextIndentation = null; + _._isUseAllowed = true; + _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + SassParser_children_closure: function SassParser_children_closure(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + ScssParser$(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url), + t2 = logger == null ? B.StderrLogger_false : logger; + return new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, t2); + }, + ScssParser: function ScssParser(t0, t1, t2) { + var _ = this; + _._isUseAllowed = true; + _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + SelectorParser$(contents, allowParent, allowPlaceholder, logger, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.SelectorParser(allowParent, allowPlaceholder, t1, logger == null ? B.StderrLogger_false : logger); + }, + SelectorParser: function SelectorParser(t0, t1, t2, t3) { + var _ = this; + _._allowParent = t0; + _._allowPlaceholder = t1; + _.scanner = t2; + _.logger = t3; + }, + SelectorParser_parse_closure: function SelectorParser_parse_closure(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure: function SelectorParser_parseCompoundSelector_closure(t0) { + this.$this = t0; + }, + StylesheetParser: function StylesheetParser() { + }, + StylesheetParser_parse_closure: function StylesheetParser_parse_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure: function StylesheetParser_parse__closure(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure0: function StylesheetParser_parse__closure0() { + }, + StylesheetParser_parseArgumentDeclaration_closure: function StylesheetParser_parseArgumentDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseVariableDeclaration_closure: function StylesheetParser_parseVariableDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseUseRule_closure: function StylesheetParser_parseUseRule_closure(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure: function StylesheetParser__parseSingleProduction_closure(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser__statement_closure: function StylesheetParser__statement_closure(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure: function StylesheetParser_variableDeclarationWithoutNamespace_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure0: function StylesheetParser_variableDeclarationWithoutNamespace_closure0(t0) { + this.declaration = t0; + }, + StylesheetParser__declarationOrBuffer_closure: function StylesheetParser__declarationOrBuffer_closure(t0) { + this.name = t0; + }, + StylesheetParser__declarationOrBuffer_closure0: function StylesheetParser__declarationOrBuffer_closure0(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__styleRule_closure: function StylesheetParser__styleRule_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInStyleRule = t2; + _.start = t3; + }, + StylesheetParser__propertyOrVariableDeclaration_closure: function StylesheetParser__propertyOrVariableDeclaration_closure(t0) { + this._box_0 = t0; + }, + StylesheetParser__propertyOrVariableDeclaration_closure0: function StylesheetParser__propertyOrVariableDeclaration_closure0(t0, t1) { + this._box_0 = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure: function StylesheetParser__atRootRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure0: function StylesheetParser__atRootRule_closure0() { + }, + StylesheetParser__eachRule_closure: function StylesheetParser__eachRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure: function StylesheetParser__functionRule_closure(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure: function StylesheetParser__forRule_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure0: function StylesheetParser__forRule_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure: function StylesheetParser__memberList_closure(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure: function StylesheetParser__includeRule_closure(t0) { + this.contentArguments_ = t0; + }, + StylesheetParser_mediaRule_closure: function StylesheetParser_mediaRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure: function StylesheetParser__mixinRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.$arguments = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure: function StylesheetParser_mozDocumentRule_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure: function StylesheetParser_supportsRule_closure(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure: function StylesheetParser__whileRule_closure(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure: function StylesheetParser_unknownAtRule_closure(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState: function StylesheetParser__expression_resetState(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation: function StylesheetParser__expression_resolveOneOperation(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations: function StylesheetParser__expression_resolveOperations(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression: function StylesheetParser__expression_addSingleExpression(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator: function StylesheetParser__expression_addOperator(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOneOperation = t2; + }, + StylesheetParser__expression_resolveSpaceExpressions: function StylesheetParser__expression_resolveSpaceExpressions(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure: function StylesheetParser_expressionUntilComma_closure(t0) { + this.$this = t0; + }, + StylesheetParser__unicodeRange_closure: function StylesheetParser__unicodeRange_closure() { + }, + StylesheetParser__unicodeRange_closure0: function StylesheetParser__unicodeRange_closure0() { + }, + StylesheetParser_namespacedExpression_closure: function StylesheetParser_namespacedExpression_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure: function StylesheetParser_trySpecialFunction_closure() { + }, + StylesheetParser__expressionUntilComparison_closure: function StylesheetParser__expressionUntilComparison_closure(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure: function StylesheetParser__publicIdentifier_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetNode$_(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1 = new A.StylesheetNode(_stylesheet, importer, canonicalUrl, allUpstream.item1, allUpstream.item2, A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode)); + t1.StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream); + return t1; + }, + StylesheetGraph: function StylesheetGraph(t0, t1, t2) { + this._nodes = t0; + this.importCache = t1; + this._transitiveModificationTimes = t2; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime: function StylesheetGraph_modifiedSince_transitiveModificationTime(t0) { + this.$this = t0; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime_closure: function StylesheetGraph_modifiedSince_transitiveModificationTime_closure(t0, t1) { + this.node = t0; + this.transitiveModificationTime = t1; + }, + StylesheetGraph__add_closure: function StylesheetGraph__add_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + }, + StylesheetGraph_addCanonical_closure: function StylesheetGraph_addCanonical_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + StylesheetGraph_reload_closure: function StylesheetGraph_reload_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.canonicalUrl = t2; + }, + StylesheetGraph__recanonicalizeImportsForNode_closure: function StylesheetGraph__recanonicalizeImportsForNode_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.node = t3; + _.forImport = t4; + _.newMap = t5; + }, + StylesheetGraph__nodeFor_closure: function StylesheetGraph__nodeFor_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + _.forImport = t4; + }, + StylesheetGraph__nodeFor_closure0: function StylesheetGraph__nodeFor_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.resolvedUrl = t3; + }, + StylesheetNode: function StylesheetNode(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._stylesheet = t0; + _.importer = t1; + _.canonicalUrl = t2; + _._upstream = t3; + _._upstreamImports = t4; + _._downstream = t5; + }, + Syntax_forPath(path) { + switch (A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]) { + case ".sass": + return B.Syntax_Sass_sass; + case ".css": + return B.Syntax_CSS_css; + default: + return B.Syntax_SCSS_scss; + } + }, + Syntax: function Syntax(t0, t1) { + this._syntax$_name = t0; + this._name = t1; + }, + LimitedMapView$blocklist(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView<1,2>")); + }, + LimitedMapView: function LimitedMapView(t0, t1, t2) { + this._limited_map_view$_map = t0; + this._limited_map_view$_keys = t1; + this.$ti = t2; + }, + MergedMapView$(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView<1,2>")); + t1.MergedMapView$1(maps, $K, $V); + return t1; + }, + MergedMapView: function MergedMapView(t0, t1) { + this._mapsByKey = t0; + this.$ti = t1; + }, + MultiDirWatcher: function MultiDirWatcher(t0, t1, t2) { + this._watchers = t0; + this._group = t1; + this._poll = t2; + }, + MultiSpan: function MultiSpan(t0, t1, t2) { + this._multi_span$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + NoSourceMapBuffer: function NoSourceMapBuffer(t0) { + this._no_source_map_buffer$_buffer = t0; + }, + PrefixedMapView: function PrefixedMapView(t0, t1, t2) { + this._prefixed_map_view$_map = t0; + this._prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys: function _PrefixedKeys(t0) { + this._view = t0; + }, + _PrefixedKeys_iterator_closure: function _PrefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + PublicMemberMapView: function PublicMemberMapView(t0, t1) { + this._public_member_map_view$_inner = t0; + this.$ti = t1; + }, + SourceMapBuffer: function SourceMapBuffer(t0, t1) { + var _ = this; + _._source_map_buffer$_buffer = t0; + _._entries = t1; + _._column = _._line = 0; + _._inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure: function SourceMapBuffer_buildSourceMap_closure(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + UnprefixedMapView: function UnprefixedMapView(t0, t1, t2) { + this._unprefixed_map_view$_map = t0; + this._unprefixed_map_view$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys: function _UnprefixedKeys(t0) { + this._unprefixed_map_view$_view = t0; + }, + _UnprefixedKeys_iterator_closure: function _UnprefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure0: function _UnprefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + toSentence(iter, conjunction) { + var t1 = iter.__internal$_iterable, + t2 = J.getInterceptor$asx(t1); + if (t2.get$length(t1) === 1) + return J.toString$0$(iter._f.call$1(t2.get$first(t1))); + return A.IterableExtension_get_exceptLast(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter._f.call$1(t2.get$last(t1)))); + }, + indent(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight(string, excludeEscape) { + var end = A._lastNonWhitespace(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = B.JSString_methods._codeUnitAt$1(string, i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace(string, excludeEscape) { + var t1, i, codeUnit; + for (t1 = string.length, i = t1 - 1; i >= 0; --i) { + codeUnit = B.JSString_methods.codeUnitAt$1(string, i); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i !== 0 && i !== t1 && codeUnit === 92) + return i + 1; + else + return i; + } + return null; + }, + isPublic(member) { + var start = B.JSString_methods._codeUnitAt$1(member, 0); + return start !== 45 && start !== 95; + }, + flattenVertically(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure($T), t1), true, t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + for (; queues.length !== 0;) { + if (!!queues.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure0(result, $T), true); + } + return result; + }, + firstOrNull(iterable) { + var iterator = J.get$iterator$ax(iterable); + return iterator.moveNext$0() ? iterator.get$current(iterator) : null; + }, + codepointIndexToCodeUnitIndex(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = B.JSString_methods._codeUnitAt$1(string, codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (B.JSString_methods._codeUnitAt$1(string, i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName(span) { + var text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(span.file._decodedChars, span._file$_start, span._end), 0, null); + return A.trimAsciiRight(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if (B.JSString_methods._codeUnitAt$1($name, 0) !== 45) + return $name; + if (B.JSString_methods._codeUnitAt$1($name, 1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1($name, i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null || false) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(B.JSString_methods._codeUnitAt$1(string1, i), B.JSString_methods._codeUnitAt$1(string2, i))) + return false; + return true; + }, + startsWithIgnoreCase(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(B.JSString_methods._codeUnitAt$1(string, i), B.JSString_methods._codeUnitAt$1(prefix, i))) + return false; + return true; + }, + mapInPlace(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(list1) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(list1); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._tail - list1._head & J.get$length$asx(list1._table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack(selections, lengths, $T).call$2(list1.get$length(list1) - 1, list2.get$length(list2) - 1); + }, + removeFirstWhere(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll2(destination, source, K1, K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure(destination, K1, K2, $V)); + }, + setAll(map, keys, value) { + var t1; + for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync(iterable, callback, $E, $F) { + return A.mapAsync$body(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync, $async$completer); + }, + putIfAbsentAsync(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync, $async$completer); + }, + copyMapOfMap(map, K1, K2, $V) { + var t2, t3, t4, t5, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(K1, K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>")); + for (t2 = map.get$entries(map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = t3.key; + t3 = t3.value; + t5 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); + t5.addAll$1(0, t3); + t1.$indexSet(0, t4, t5); + } + return t1; + }, + copyMapOfList(map, $K, $E) { + var t2, t3, + t1 = A.LinkedHashMap_LinkedHashMap$_empty($K, $E._eval$1("List<0>")); + for (t2 = map.get$entries(map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.$indexSet(0, t3.key, J.toList$0$ax(t3.value)); + } + return t1; + }, + consumeEscapedCharacter(scanner) { + var first, value, i, next, t1; + scanner.expectChar$1(92); + first = scanner.peekChar$0(); + if (first == null) + return 65533; + else if (first === 10 || first === 13 || first === 12) + scanner.error$1(0, "Expected escape sequence."); + else if (A.isHex(first)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next == null || !A.isHex(next)) + break; + value = (value << 4 >>> 0) + A.asHex(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + if (value !== 0) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) + return 65533; + else + return value; + } else + return scanner.readChar$0(); + }, + throwWithTrace(error, trace) { + A.attachTrace(error, trace); + throw A.wrapException(error); + }, + attachTrace(error, trace) { + var t1; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap; + if (t1.get(error) == null) + t1.set(error, trace); + }, + getTrace(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + IterableExtension_get_exceptLast(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + indent_closure: function indent_closure(t0) { + this.indentation = t0; + }, + flattenVertically_closure: function flattenVertically_closure(t0) { + this.T = t0; + }, + flattenVertically_closure0: function flattenVertically_closure0(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack: function longestCommonSubsequence_backtrack(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure: function mapAddAll2_closure(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + SassApiValue_assertSelector(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._selectorString$1($name); + try { + t1 = A.SelectorList_SelectorList$parse(string, allowParent, true, null); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException($name == null ? t1 : "$" + $name + ": " + t1), stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._selectorString$1($name); + try { + t1 = A.SelectorParser$(string, allowParent, true, null, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException("$" + $name + ": " + t1), stackTrace); + } else + throw exception; + } + }, + Value: function Value() { + }, + SassArgumentList$(contents, keywords, separator) { + var t1 = type$.Value; + t1 = new A.SassArgumentList(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets(contents, separator, false); + return t1; + }, + SassArgumentList: function SassArgumentList(t0, t1, t2, t3) { + var _ = this; + _._keywords = t0; + _._wereKeywordsAccessed = false; + _._list$_contents = t1; + _._separator = t2; + _._hasBrackets = t3; + }, + SassBoolean: function SassBoolean(t0) { + this.value = t0; + }, + SassCalculation_calc(argument) { + argument = A.SassCalculation__simplify(argument); + if (argument instanceof A.SassNumber) + return argument; + if (argument instanceof A.SassCalculation) + return argument; + return new A.SassCalculation("calc", A.List_List$unmodifiable([argument], type$.Object)); + }, + SassCalculation_min($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("min", args); + }, + SassCalculation_max($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("max", args); + }, + SassCalculation_clamp(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify(min); + value = A.NullableExtension_andThen(value, A.calculation_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen(max, A.calculation_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber && value instanceof A.SassNumber && max instanceof A.SassNumber && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers(args); + A.SassCalculation__verifyLength(args, 3); + return new A.SassCalculation("clamp", args); + }, + SassCalculation_operateInternal(operator, left, right, inMinMax, simplify) { + var t1, t2; + if (!simplify) + return new A.CalculationOperation(operator, left, right); + left = A.SassCalculation__simplify(left); + right = A.SassCalculation__simplify(right); + t1 = operator === B.CalculationOperator_IyK; + if (t1 || operator === B.CalculationOperator_2bx) { + if (left instanceof A.SassNumber) + if (right instanceof A.SassNumber) + t2 = inMinMax ? left.isComparableTo$1(right) : left.hasCompatibleUnits$1(right); + else + t2 = false; + else + t2 = false; + if (t2) + return t1 ? left.plus$1(right) : left.minus$1(right); + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber) { + t2 = right._number$_value; + t2 = t2 < 0 && !A.fuzzyEquals(t2, 0); + } else + t2 = false; + if (t2) { + right = right.times$1(A.SassNumber_SassNumber(-1, null)); + operator = t1 ? B.CalculationOperator_2bx : B.CalculationOperator_IyK; + } + return new A.CalculationOperation(operator, left, right); + } else if (left instanceof A.SassNumber && right instanceof A.SassNumber) + return operator === B.CalculationOperator_jFr ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation(operator, left, right); + }, + SassCalculation__simplify(arg) { + var _s32_ = " can't be used in a calculation."; + if (arg instanceof A.SassNumber || arg instanceof A.CalculationInterpolation || arg instanceof A.CalculationOperation) + return arg; + else if (arg instanceof A.SassString) { + if (!arg._hasQuotes) + return arg; + throw A.wrapException(A.SassScriptException$("Quoted string " + arg.toString$0(0) + _s32_, null)); + } else if (arg instanceof A.SassCalculation) + return arg.name === "calc" ? arg.$arguments[0] : arg; + else if (arg instanceof A.Value) + throw A.wrapException(A.SassScriptException$("Value " + arg.toString$0(0) + _s32_, null)); + else + throw A.wrapException(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", null)); + }, + SassCalculation__verifyCompatibleNumbers(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (!(arg instanceof A.SassNumber)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(A.SassScriptException$("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength(args, expectedLength) { + var t1 = args.length; + if (t1 === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure())) + return; + throw A.wrapException(A.SassScriptException$("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize("was", t1, "were") + " passed.", null)); + }, + SassCalculation: function SassCalculation(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure: function SassCalculation__verifyLength_closure() { + }, + CalculationOperation: function CalculationOperation(t0, t1, t2) { + this.operator = t0; + this.left = t1; + this.right = t2; + }, + CalculationOperator: function CalculationOperator(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + CalculationInterpolation: function CalculationInterpolation(t0) { + this.value = t0; + }, + SassColor$rgb(red, green, blue, alpha) { + var _null = null, + t1 = new A.SassColor(red, green, blue, _null, _null, _null, alpha == null ? 1 : A.fuzzyAssertRange(alpha, 0, 1, "alpha"), _null); + A.RangeError_checkValueInInterval(t1.get$red(t1), 0, 255, "red"); + A.RangeError_checkValueInInterval(t1.get$green(t1), 0, 255, "green"); + A.RangeError_checkValueInInterval(t1.get$blue(t1), 0, 255, "blue"); + return t1; + }, + SassColor$rgbInternal(_red, _green, _blue, alpha, format) { + var t1 = new A.SassColor(_red, _green, _blue, null, null, null, alpha == null ? 1 : A.fuzzyAssertRange(alpha, 0, 1, "alpha"), format); + A.RangeError_checkValueInInterval(t1.get$red(t1), 0, 255, "red"); + A.RangeError_checkValueInInterval(t1.get$green(t1), 0, 255, "green"); + A.RangeError_checkValueInInterval(t1.get$blue(t1), 0, 255, "blue"); + return t1; + }, + SassColor$hslInternal(hue, saturation, lightness, alpha, format) { + var t1 = B.JSNumber_methods.$mod(hue, 360), + t2 = A.fuzzyAssertRange(saturation, 0, 100, "saturation"), + t3 = A.fuzzyAssertRange(lightness, 0, 100, "lightness"); + return new A.SassColor(null, null, null, t1, t2, t3, alpha == null ? 1 : A.fuzzyAssertRange(alpha, 0, 1, "alpha"), format); + }, + SassColor_SassColor$hwb(hue, whiteness, blackness, alpha) { + var t2, t1 = {}, + scaledHue = B.JSNumber_methods.$mod(hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = A.fuzzyAssertRange(whiteness, 0, 100, "whiteness") / 100, + scaledBlackness = A.fuzzyAssertRange(blackness, 0, 100, "blackness") / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t2 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t2 = scaledWhiteness; + t2 = new A.SassColor_SassColor$hwb_toRgb(t1, 1 - t2 - scaledBlackness); + return A.SassColor$rgb(t2.call$1(scaledHue + 0.3333333333333333), t2.call$1(scaledHue), t2.call$1(scaledHue - 0.3333333333333333), alpha); + }, + SassColor__hueToRgb(m1, m2, hue) { + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + if (hue < 0.16666666666666666) + return m1 + (m2 - m1) * hue * 6; + else if (hue < 0.5) + return m2; + else if (hue < 0.6666666666666666) + return m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + else + return m1; + }, + SassColor: function SassColor(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._red = t0; + _._green = t1; + _._blue = t2; + _._hue = t3; + _._saturation = t4; + _._lightness = t5; + _._alpha = t6; + _.format = t7; + }, + SassColor_SassColor$hwb_toRgb: function SassColor_SassColor$hwb_toRgb(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + _ColorFormatEnum: function _ColorFormatEnum(t0) { + this._color$_name = t0; + }, + SpanColorFormat: function SpanColorFormat(t0) { + this._color$_span = t0; + }, + SassFunction: function SassFunction(t0) { + this.callable = t0; + }, + SassList$(contents, _separator, brackets) { + var t1 = new A.SassList(A.List_List$unmodifiable(contents, type$.Value), _separator, brackets); + t1.SassList$3$brackets(contents, _separator, brackets); + return t1; + }, + SassList: function SassList(t0, t1, t2) { + this._list$_contents = t0; + this._separator = t1; + this._hasBrackets = t2; + }, + SassList_isBlank_closure: function SassList_isBlank_closure() { + }, + ListSeparator: function ListSeparator(t0, t1, t2) { + this._list$_name = t0; + this.separator = t1; + this._name = t2; + }, + SassMap: function SassMap(t0) { + this._map$_contents = t0; + }, + SassMap_asList_closure: function SassMap_asList_closure(t0) { + this.result = t0; + }, + _SassNull: function _SassNull() { + }, + conversionFactor(unit1, unit2) { + var innerMap; + if (unit1 === unit2) + return 1; + innerMap = B.Map_K2BWj.$index(0, unit1); + if (innerMap == null) + return null; + return innerMap.$index(0, unit2); + }, + SassNumber_SassNumber(value, unit) { + return unit == null ? new A.UnitlessSassNumber(value, null) : new A.SingleUnitSassNumber(unit, value, null); + }, + SassNumber_SassNumber$withUnits(value, denominatorUnits, numeratorUnits) { + var t1, numerators, unsimplifiedDenominators, denominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _null = null; + if (denominatorUnits == null || denominatorUnits.length === 0) { + t1 = numeratorUnits.length; + if (t1 === 0) + return new A.UnitlessSassNumber(value, _null); + else if (t1 === 1) + return new A.SingleUnitSassNumber(numeratorUnits[0], value, _null); + else + return new A.ComplexSassNumber(A.List_List$unmodifiable(numeratorUnits, type$.String), B.List_empty, value, _null); + } else { + t1 = numeratorUnits.length; + if (t1 === 0) + return new A.ComplexSassNumber(B.List_empty, A.List_List$unmodifiable(denominatorUnits, type$.String), value, _null); + else { + numerators = A._setArrayType(numeratorUnits.slice(0), A._arrayInstanceType(numeratorUnits)); + unsimplifiedDenominators = A._setArrayType(denominatorUnits.slice(0), A.instanceType(denominatorUnits)._eval$1("JSArray<1>")); + denominators = A._setArrayType([], type$.JSArray_String); + for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + while (true) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + if (denominatorUnits.length === 0) { + t1 = numeratorUnits.length; + if (t1 === 0) + return new A.UnitlessSassNumber(valueDouble, _null); + else if (t1 === 1) + return new A.SingleUnitSassNumber(B.JSArray_methods.get$single(numeratorUnits), valueDouble, _null); + } + t1 = type$.String; + return new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + } + } + }, + SassNumber: function SassNumber() { + }, + SassNumber__coerceOrConvertValue_compatibilityException: function SassNumber__coerceOrConvertValue_compatibilityException(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure: function SassNumber__coerceOrConvertValue_closure(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure0: function SassNumber__coerceOrConvertValue_closure0(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure1: function SassNumber__coerceOrConvertValue_closure1(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure2: function SassNumber__coerceOrConvertValue_closure2(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure: function SassNumber_plus_closure() { + }, + SassNumber_minus_closure: function SassNumber_minus_closure() { + }, + SassNumber_multiplyUnits_closure: function SassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure0: function SassNumber_multiplyUnits_closure0(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure1: function SassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure2: function SassNumber_multiplyUnits_closure2(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure: function SassNumber__areAnyConvertible_closure(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure: function SassNumber__canonicalizeUnitList_closure() { + }, + SassNumber__canonicalMultiplier_closure: function SassNumber__canonicalMultiplier_closure(t0) { + this.$this = t0; + }, + ComplexSassNumber: function ComplexSassNumber(t0, t1, t2, t3) { + var _ = this; + _._numeratorUnits = t0; + _._denominatorUnits = t1; + _._number$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + SingleUnitSassNumber: function SingleUnitSassNumber(t0, t1, t2) { + var _ = this; + _._unit = t0; + _._number$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure: function SingleUnitSassNumber__coerceToUnit_closure(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure: function SingleUnitSassNumber__coerceValueToUnit_closure(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure: function SingleUnitSassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure0: function SingleUnitSassNumber_multiplyUnits_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + UnitlessSassNumber: function UnitlessSassNumber(t0, t1) { + this._number$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + SassString$(_text, quotes) { + return new A.SassString(_text, quotes); + }, + SassString: function SassString(t0, t1) { + var _ = this; + _._string$_text = t0; + _._hasQuotes = t1; + _.__SassString__sassLength_FI = $; + _._hashCache = null; + }, + AnySelectorVisitor: function AnySelectorVisitor() { + }, + AnySelectorVisitor_visitComplexSelector_closure: function AnySelectorVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure: function AnySelectorVisitor_visitCompoundSelector_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_AsyncCallable, + t3 = A._setArrayType([], type$.JSArray_Tuple2_String_AstNode), + t4 = logger == null ? B.StderrLogger_false : logger; + t3 = new A._EvaluateVisitor0(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), t4, A.LinkedHashSet_LinkedHashSet$_empty(type$.Tuple2_String_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t3._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t3; + }, + _EvaluateVisitor0: function _EvaluateVisitor0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_evaluate$_importCache = t0; + _._async_evaluate$_nodeImporter = t1; + _._async_evaluate$_builtInFunctions = t2; + _._async_evaluate$_builtInModules = t3; + _._async_evaluate$_modules = t4; + _._async_evaluate$_moduleConfigurations = t5; + _._async_evaluate$_moduleNodes = t6; + _._async_evaluate$_logger = t7; + _._async_evaluate$_warningsEmitted = t8; + _._async_evaluate$_quietDeps = t9; + _._async_evaluate$_sourceMap = t10; + _._async_evaluate$_environment = t11; + _._async_evaluate$_declarationName = _._async_evaluate$__parent = _._async_evaluate$_mediaQuerySources = _._async_evaluate$_mediaQueries = _._async_evaluate$_styleRuleIgnoringAtRoot = null; + _._async_evaluate$_member = "root stylesheet"; + _._async_evaluate$_importSpan = _._async_evaluate$_callableNode = _._async_evaluate$_currentCallable = null; + _._async_evaluate$_inSupportsDeclaration = _._async_evaluate$_inKeyframes = _._async_evaluate$_atRootExcludingStyleRule = _._async_evaluate$_inUnknownAtRule = _._async_evaluate$_inFunction = false; + _._async_evaluate$_loadedUrls = t12; + _._async_evaluate$_activeModules = t13; + _._async_evaluate$_stack = t14; + _._async_evaluate$_importer = null; + _._async_evaluate$_inDependency = false; + _._async_evaluate$__extensionStore = _._async_evaluate$_outOfOrderImports = _._async_evaluate$__endOfImports = _._async_evaluate$__root = _._async_evaluate$__stylesheet = null; + _._async_evaluate$_configuration = t15; + }, + _EvaluateVisitor_closure9: function _EvaluateVisitor_closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure10: function _EvaluateVisitor_closure10(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure11: function _EvaluateVisitor_closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure12: function _EvaluateVisitor_closure12(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure13: function _EvaluateVisitor_closure13(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure14: function _EvaluateVisitor_closure14(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure15: function _EvaluateVisitor_closure15(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure16: function _EvaluateVisitor_closure16(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure4: function _EvaluateVisitor__closure4(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure17: function _EvaluateVisitor_closure17(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure18: function _EvaluateVisitor_closure18(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure2: function _EvaluateVisitor__closure2(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure3: function _EvaluateVisitor__closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure0: function _EvaluateVisitor_run_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor__loadModule_closure1: function _EvaluateVisitor__loadModule_closure1(t0, t1) { + this.callback = t0; + this.builtInModule = t1; + }, + _EvaluateVisitor__loadModule_closure2: function _EvaluateVisitor__loadModule_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure0: function _EvaluateVisitor__loadModule__closure0(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__execute_closure0: function _EvaluateVisitor__execute_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + }, + _EvaluateVisitor__combineCss_closure2: function _EvaluateVisitor__combineCss_closure2() { + }, + _EvaluateVisitor__combineCss_closure3: function _EvaluateVisitor__combineCss_closure3(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_closure4: function _EvaluateVisitor__combineCss_closure4() { + }, + _EvaluateVisitor__extendModules_closure1: function _EvaluateVisitor__extendModules_closure1(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure2: function _EvaluateVisitor__extendModules_closure2() { + }, + _EvaluateVisitor__topologicalModules_visitModule0: function _EvaluateVisitor__topologicalModules_visitModule0(t0, t1) { + this.seen = t0; + this.sorted = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure2: function _EvaluateVisitor_visitAtRootRule_closure2(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure3: function _EvaluateVisitor_visitAtRootRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure4: function _EvaluateVisitor_visitAtRootRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure5: function _EvaluateVisitor__scopeForAtRoot_closure5(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure6: function _EvaluateVisitor__scopeForAtRoot_closure6(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure7: function _EvaluateVisitor__scopeForAtRoot_closure7(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure0: function _EvaluateVisitor__scopeForAtRoot__closure0(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure8: function _EvaluateVisitor__scopeForAtRoot_closure8(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure9: function _EvaluateVisitor__scopeForAtRoot_closure9() { + }, + _EvaluateVisitor__scopeForAtRoot_closure10: function _EvaluateVisitor__scopeForAtRoot_closure10(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure0: function _EvaluateVisitor_visitContentRule_closure0(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure1: function _EvaluateVisitor_visitDeclaration_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitDeclaration_closure2: function _EvaluateVisitor_visitDeclaration_closure2(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitEachRule_closure2: function _EvaluateVisitor_visitEachRule_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure3: function _EvaluateVisitor_visitEachRule_closure3(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure4: function _EvaluateVisitor_visitEachRule_closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure0: function _EvaluateVisitor_visitEachRule__closure0(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure0: function _EvaluateVisitor_visitEachRule___closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitExtendRule_closure0: function _EvaluateVisitor_visitExtendRule_closure0(t0, t1) { + this.$this = t0; + this.targetText = t1; + }, + _EvaluateVisitor_visitAtRule_closure2: function _EvaluateVisitor_visitAtRule_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure3: function _EvaluateVisitor_visitAtRule_closure3(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule__closure0: function _EvaluateVisitor_visitAtRule__closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure4: function _EvaluateVisitor_visitAtRule_closure4() { + }, + _EvaluateVisitor_visitForRule_closure4: function _EvaluateVisitor_visitForRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure5: function _EvaluateVisitor_visitForRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure6: function _EvaluateVisitor_visitForRule_closure6(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure7: function _EvaluateVisitor_visitForRule_closure7(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure8: function _EvaluateVisitor_visitForRule_closure8(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure0: function _EvaluateVisitor_visitForRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure1: function _EvaluateVisitor_visitForwardRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure2: function _EvaluateVisitor_visitForwardRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIfRule_closure0: function _EvaluateVisitor_visitIfRule_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitIfRule__closure0: function _EvaluateVisitor_visitIfRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure0: function _EvaluateVisitor__visitDynamicImport_closure0(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure3: function _EvaluateVisitor__visitDynamicImport__closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure4: function _EvaluateVisitor__visitDynamicImport__closure4() { + }, + _EvaluateVisitor__visitDynamicImport__closure5: function _EvaluateVisitor__visitDynamicImport__closure5() { + }, + _EvaluateVisitor__visitDynamicImport__closure6: function _EvaluateVisitor__visitDynamicImport__closure6(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.result = t1; + _.stylesheet = t2; + _.loadsUserDefinedModules = t3; + _.environment = t4; + _.children = t5; + }, + _EvaluateVisitor_visitIncludeRule_closure3: function _EvaluateVisitor_visitIncludeRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure4: function _EvaluateVisitor_visitIncludeRule_closure4(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure6: function _EvaluateVisitor_visitIncludeRule_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure5: function _EvaluateVisitor_visitIncludeRule_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpan = t3; + }, + _EvaluateVisitor_visitIncludeRule__closure0: function _EvaluateVisitor_visitIncludeRule__closure0(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule___closure0: function _EvaluateVisitor_visitIncludeRule___closure0(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule____closure0: function _EvaluateVisitor_visitIncludeRule____closure0(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitMediaRule_closure2: function _EvaluateVisitor_visitMediaRule_closure2(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure3: function _EvaluateVisitor_visitMediaRule_closure3(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure0: function _EvaluateVisitor_visitMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure0: function _EvaluateVisitor_visitMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure4: function _EvaluateVisitor_visitMediaRule_closure4(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor__visitMediaQueries_closure0: function _EvaluateVisitor__visitMediaQueries_closure0(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitStyleRule_closure7: function _EvaluateVisitor_visitStyleRule_closure7(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure8: function _EvaluateVisitor_visitStyleRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure9: function _EvaluateVisitor_visitStyleRule_closure9() { + }, + _EvaluateVisitor_visitStyleRule_closure10: function _EvaluateVisitor_visitStyleRule_closure10(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure11: function _EvaluateVisitor_visitStyleRule_closure11(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitStyleRule_closure12: function _EvaluateVisitor_visitStyleRule_closure12(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure0: function _EvaluateVisitor_visitStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure13: function _EvaluateVisitor_visitStyleRule_closure13() { + }, + _EvaluateVisitor_visitStyleRule_closure14: function _EvaluateVisitor_visitStyleRule_closure14() { + }, + _EvaluateVisitor_visitSupportsRule_closure1: function _EvaluateVisitor_visitSupportsRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure0: function _EvaluateVisitor_visitSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure2: function _EvaluateVisitor_visitSupportsRule_closure2() { + }, + _EvaluateVisitor_visitVariableDeclaration_closure2: function _EvaluateVisitor_visitVariableDeclaration_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.override = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure3: function _EvaluateVisitor_visitVariableDeclaration_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure4: function _EvaluateVisitor_visitVariableDeclaration_closure4(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure0: function _EvaluateVisitor_visitUseRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure0: function _EvaluateVisitor_visitWarnRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure0: function _EvaluateVisitor_visitWhileRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure0: function _EvaluateVisitor_visitWhileRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure0: function _EvaluateVisitor_visitBinaryOperationExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation0: function _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation0() { + }, + _EvaluateVisitor_visitVariableExpression_closure0: function _EvaluateVisitor_visitVariableExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure0: function _EvaluateVisitor_visitUnaryOperationExpression_closure0(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor__visitCalculationValue_closure0: function _EvaluateVisitor__visitCalculationValue_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.inMinMax = t2; + }, + _EvaluateVisitor_visitListExpression_closure0: function _EvaluateVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure1: function _EvaluateVisitor_visitFunctionExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure2: function _EvaluateVisitor_visitFunctionExpression_closure2(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure0: function _EvaluateVisitor__runUserDefinedCallable_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure0: function _EvaluateVisitor__runUserDefinedCallable__closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure0: function _EvaluateVisitor__runUserDefinedCallable___closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure0: function _EvaluateVisitor__runUserDefinedCallable____closure0() { + }, + _EvaluateVisitor__runFunctionCallable_closure0: function _EvaluateVisitor__runFunctionCallable_closure0(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure1: function _EvaluateVisitor__runBuiltInCallable_closure1(t0, t1, t2) { + this.overload = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure2: function _EvaluateVisitor__runBuiltInCallable_closure2() { + }, + _EvaluateVisitor__evaluateArguments_closure3: function _EvaluateVisitor__evaluateArguments_closure3() { + }, + _EvaluateVisitor__evaluateArguments_closure4: function _EvaluateVisitor__evaluateArguments_closure4(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure5: function _EvaluateVisitor__evaluateArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure6: function _EvaluateVisitor__evaluateArguments_closure6() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure3: function _EvaluateVisitor__evaluateMacroArguments_closure3(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure4: function _EvaluateVisitor__evaluateMacroArguments_closure4(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure5: function _EvaluateVisitor__evaluateMacroArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure6: function _EvaluateVisitor__evaluateMacroArguments_closure6(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure0: function _EvaluateVisitor__addRestMap_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure0: function _EvaluateVisitor__verifyArguments_closure0(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitStringExpression_closure0: function _EvaluateVisitor_visitStringExpression_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitCssAtRule_closure1: function _EvaluateVisitor_visitCssAtRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure2: function _EvaluateVisitor_visitCssAtRule_closure2() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure1: function _EvaluateVisitor_visitCssKeyframeBlock_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure2: function _EvaluateVisitor_visitCssKeyframeBlock_closure2() { + }, + _EvaluateVisitor_visitCssMediaRule_closure2: function _EvaluateVisitor_visitCssMediaRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure3: function _EvaluateVisitor_visitCssMediaRule_closure3(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure0: function _EvaluateVisitor_visitCssMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure0: function _EvaluateVisitor_visitCssMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure4: function _EvaluateVisitor_visitCssMediaRule_closure4(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure1: function _EvaluateVisitor_visitCssStyleRule_closure1(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure0: function _EvaluateVisitor_visitCssStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure2: function _EvaluateVisitor_visitCssStyleRule_closure2() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure1: function _EvaluateVisitor_visitCssSupportsRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure0: function _EvaluateVisitor_visitCssSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure2: function _EvaluateVisitor_visitCssSupportsRule_closure2() { + }, + _EvaluateVisitor__performInterpolation_closure0: function _EvaluateVisitor__performInterpolation_closure0(t0, t1, t2) { + this.$this = t0; + this.warnForColor = t1; + this.interpolation = t2; + }, + _EvaluateVisitor__serialize_closure0: function _EvaluateVisitor__serialize_closure0(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure0: function _EvaluateVisitor__expressionNode_closure0(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation0: function _EvaluateVisitor__withoutSlash_recommendation0() { + }, + _EvaluateVisitor__stackFrame_closure0: function _EvaluateVisitor__stackFrame_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor__stackTrace_closure0: function _EvaluateVisitor__stackTrace_closure0(t0) { + this.$this = t0; + }, + _ImportedCssVisitor0: function _ImportedCssVisitor0(t0) { + this._async_evaluate$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure0: function _ImportedCssVisitor_visitCssAtRule_closure0() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure0: function _ImportedCssVisitor_visitCssMediaRule_closure0(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure0: function _ImportedCssVisitor_visitCssStyleRule_closure0() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure0: function _ImportedCssVisitor_visitCssSupportsRule_closure0() { + }, + EvaluateResult: function EvaluateResult(t0) { + this.stylesheet = t0; + }, + _EvaluationContext0: function _EvaluationContext0(t0, t1) { + this._async_evaluate$_visitor = t0; + this._async_evaluate$_defaultWarnNodeWithSpan = t1; + }, + _ArgumentResults0: function _ArgumentResults0(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.positionalNodes = t1; + _.named = t2; + _.namedNodes = t3; + _.separator = t4; + }, + _LoadedStylesheet0: function _LoadedStylesheet0(t0, t1, t2) { + this.stylesheet = t0; + this.importer = t1; + this.isDependency = t2; + }, + cloneCssStylesheet(stylesheet, extensionStore) { + var result = extensionStore.clone$0(); + return new A.Tuple2(new A._CloneCssVisitor(result.item2)._visitChildren$2(A.ModifiableCssStylesheet$(stylesheet.get$span(stylesheet)), stylesheet), result.item1, type$.Tuple2_ModifiableCssStylesheet_ExtensionStore); + }, + _CloneCssVisitor: function _CloneCssVisitor(t0) { + this._oldToNewSelectors = t0; + }, + _EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_Callable, + t3 = A._setArrayType([], type$.JSArray_Tuple2_String_AstNode), + t4 = logger == null ? B.StderrLogger_false : logger; + t3 = new A._EvaluateVisitor(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), t4, A.LinkedHashSet_LinkedHashSet$_empty(type$.Tuple2_String_SourceSpan), quietDeps, sourceMap, A.Environment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t3._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t3; + }, + Evaluator: function Evaluator(t0, t1) { + this._visitor = t0; + this._importer = t1; + }, + _EvaluateVisitor: function _EvaluateVisitor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._evaluate$_importCache = t0; + _._nodeImporter = t1; + _._builtInFunctions = t2; + _._builtInModules = t3; + _._modules = t4; + _._moduleConfigurations = t5; + _._moduleNodes = t6; + _._evaluate$_logger = t7; + _._warningsEmitted = t8; + _._quietDeps = t9; + _._sourceMap = t10; + _._environment = t11; + _._declarationName = _.__parent = _._mediaQuerySources = _._mediaQueries = _._styleRuleIgnoringAtRoot = null; + _._member = "root stylesheet"; + _._importSpan = _._callableNode = _._currentCallable = null; + _._inSupportsDeclaration = _._inKeyframes = _._atRootExcludingStyleRule = _._inUnknownAtRule = _._inFunction = false; + _._loadedUrls = t12; + _._activeModules = t13; + _._stack = t14; + _._importer = null; + _._inDependency = false; + _.__extensionStore = _._outOfOrderImports = _.__endOfImports = _.__root = _.__stylesheet = null; + _._configuration = t15; + }, + _EvaluateVisitor_closure: function _EvaluateVisitor_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure0: function _EvaluateVisitor_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure1: function _EvaluateVisitor_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure2: function _EvaluateVisitor_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure3: function _EvaluateVisitor_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure4: function _EvaluateVisitor_closure4(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure5: function _EvaluateVisitor_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure6: function _EvaluateVisitor_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure1: function _EvaluateVisitor__closure1(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure7: function _EvaluateVisitor_closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure8: function _EvaluateVisitor_closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure: function _EvaluateVisitor__closure(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure0: function _EvaluateVisitor__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure: function _EvaluateVisitor_run_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_runExpression_closure: function _EvaluateVisitor_runExpression_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.expression = t2; + }, + _EvaluateVisitor_runExpression__closure: function _EvaluateVisitor_runExpression__closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor_runStatement_closure: function _EvaluateVisitor_runStatement_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.statement = t2; + }, + _EvaluateVisitor_runStatement__closure: function _EvaluateVisitor_runStatement__closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor__loadModule_closure: function _EvaluateVisitor__loadModule_closure(t0, t1) { + this.callback = t0; + this.builtInModule = t1; + }, + _EvaluateVisitor__loadModule_closure0: function _EvaluateVisitor__loadModule_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure: function _EvaluateVisitor__loadModule__closure(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__execute_closure: function _EvaluateVisitor__execute_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + }, + _EvaluateVisitor__combineCss_closure: function _EvaluateVisitor__combineCss_closure() { + }, + _EvaluateVisitor__combineCss_closure0: function _EvaluateVisitor__combineCss_closure0(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_closure1: function _EvaluateVisitor__combineCss_closure1() { + }, + _EvaluateVisitor__extendModules_closure: function _EvaluateVisitor__extendModules_closure(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure0: function _EvaluateVisitor__extendModules_closure0() { + }, + _EvaluateVisitor__topologicalModules_visitModule: function _EvaluateVisitor__topologicalModules_visitModule(t0, t1) { + this.seen = t0; + this.sorted = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure: function _EvaluateVisitor_visitAtRootRule_closure(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure0: function _EvaluateVisitor_visitAtRootRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure1: function _EvaluateVisitor_visitAtRootRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure: function _EvaluateVisitor__scopeForAtRoot_closure(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure0: function _EvaluateVisitor__scopeForAtRoot_closure0(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure1: function _EvaluateVisitor__scopeForAtRoot_closure1(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure: function _EvaluateVisitor__scopeForAtRoot__closure(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure2: function _EvaluateVisitor__scopeForAtRoot_closure2(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure3: function _EvaluateVisitor__scopeForAtRoot_closure3() { + }, + _EvaluateVisitor__scopeForAtRoot_closure4: function _EvaluateVisitor__scopeForAtRoot_closure4(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure: function _EvaluateVisitor_visitContentRule_closure(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure: function _EvaluateVisitor_visitDeclaration_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitDeclaration_closure0: function _EvaluateVisitor_visitDeclaration_closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitEachRule_closure: function _EvaluateVisitor_visitEachRule_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure0: function _EvaluateVisitor_visitEachRule_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure1: function _EvaluateVisitor_visitEachRule_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure: function _EvaluateVisitor_visitEachRule__closure(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure: function _EvaluateVisitor_visitEachRule___closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitExtendRule_closure: function _EvaluateVisitor_visitExtendRule_closure(t0, t1) { + this.$this = t0; + this.targetText = t1; + }, + _EvaluateVisitor_visitAtRule_closure: function _EvaluateVisitor_visitAtRule_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure0: function _EvaluateVisitor_visitAtRule_closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule__closure: function _EvaluateVisitor_visitAtRule__closure(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure1: function _EvaluateVisitor_visitAtRule_closure1() { + }, + _EvaluateVisitor_visitForRule_closure: function _EvaluateVisitor_visitForRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure0: function _EvaluateVisitor_visitForRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure1: function _EvaluateVisitor_visitForRule_closure1(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure2: function _EvaluateVisitor_visitForRule_closure2(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure3: function _EvaluateVisitor_visitForRule_closure3(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure: function _EvaluateVisitor_visitForRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure: function _EvaluateVisitor_visitForwardRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure0: function _EvaluateVisitor_visitForwardRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIfRule_closure: function _EvaluateVisitor_visitIfRule_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitIfRule__closure: function _EvaluateVisitor_visitIfRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure: function _EvaluateVisitor__visitDynamicImport_closure(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure: function _EvaluateVisitor__visitDynamicImport__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure0: function _EvaluateVisitor__visitDynamicImport__closure0() { + }, + _EvaluateVisitor__visitDynamicImport__closure1: function _EvaluateVisitor__visitDynamicImport__closure1() { + }, + _EvaluateVisitor__visitDynamicImport__closure2: function _EvaluateVisitor__visitDynamicImport__closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.result = t1; + _.stylesheet = t2; + _.loadsUserDefinedModules = t3; + _.environment = t4; + _.children = t5; + }, + _EvaluateVisitor_visitIncludeRule_closure: function _EvaluateVisitor_visitIncludeRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure0: function _EvaluateVisitor_visitIncludeRule_closure0(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure2: function _EvaluateVisitor_visitIncludeRule_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure1: function _EvaluateVisitor_visitIncludeRule_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpan = t3; + }, + _EvaluateVisitor_visitIncludeRule__closure: function _EvaluateVisitor_visitIncludeRule__closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule___closure: function _EvaluateVisitor_visitIncludeRule___closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule____closure: function _EvaluateVisitor_visitIncludeRule____closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitMediaRule_closure: function _EvaluateVisitor_visitMediaRule_closure(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure0: function _EvaluateVisitor_visitMediaRule_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure: function _EvaluateVisitor_visitMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure: function _EvaluateVisitor_visitMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure1: function _EvaluateVisitor_visitMediaRule_closure1(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor__visitMediaQueries_closure: function _EvaluateVisitor__visitMediaQueries_closure(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitStyleRule_closure: function _EvaluateVisitor_visitStyleRule_closure(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure0: function _EvaluateVisitor_visitStyleRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure1: function _EvaluateVisitor_visitStyleRule_closure1() { + }, + _EvaluateVisitor_visitStyleRule_closure2: function _EvaluateVisitor_visitStyleRule_closure2(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure3: function _EvaluateVisitor_visitStyleRule_closure3(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitStyleRule_closure4: function _EvaluateVisitor_visitStyleRule_closure4(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure: function _EvaluateVisitor_visitStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure5: function _EvaluateVisitor_visitStyleRule_closure5() { + }, + _EvaluateVisitor_visitStyleRule_closure6: function _EvaluateVisitor_visitStyleRule_closure6() { + }, + _EvaluateVisitor_visitSupportsRule_closure: function _EvaluateVisitor_visitSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure: function _EvaluateVisitor_visitSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure0: function _EvaluateVisitor_visitSupportsRule_closure0() { + }, + _EvaluateVisitor_visitVariableDeclaration_closure: function _EvaluateVisitor_visitVariableDeclaration_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.override = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure0: function _EvaluateVisitor_visitVariableDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure1: function _EvaluateVisitor_visitVariableDeclaration_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure: function _EvaluateVisitor_visitUseRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure: function _EvaluateVisitor_visitWarnRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure: function _EvaluateVisitor_visitWhileRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure: function _EvaluateVisitor_visitWhileRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure: function _EvaluateVisitor_visitBinaryOperationExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation: function _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation() { + }, + _EvaluateVisitor_visitVariableExpression_closure: function _EvaluateVisitor_visitVariableExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure: function _EvaluateVisitor_visitUnaryOperationExpression_closure(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor__visitCalculationValue_closure: function _EvaluateVisitor__visitCalculationValue_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.inMinMax = t2; + }, + _EvaluateVisitor_visitListExpression_closure: function _EvaluateVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure: function _EvaluateVisitor_visitFunctionExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure0: function _EvaluateVisitor_visitFunctionExpression_closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure: function _EvaluateVisitor__runUserDefinedCallable_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure: function _EvaluateVisitor__runUserDefinedCallable__closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure: function _EvaluateVisitor__runUserDefinedCallable___closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure: function _EvaluateVisitor__runUserDefinedCallable____closure() { + }, + _EvaluateVisitor__runFunctionCallable_closure: function _EvaluateVisitor__runFunctionCallable_closure(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure: function _EvaluateVisitor__runBuiltInCallable_closure(t0, t1, t2) { + this.overload = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure0: function _EvaluateVisitor__runBuiltInCallable_closure0() { + }, + _EvaluateVisitor__evaluateArguments_closure: function _EvaluateVisitor__evaluateArguments_closure() { + }, + _EvaluateVisitor__evaluateArguments_closure0: function _EvaluateVisitor__evaluateArguments_closure0(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure1: function _EvaluateVisitor__evaluateArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure2: function _EvaluateVisitor__evaluateArguments_closure2() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure: function _EvaluateVisitor__evaluateMacroArguments_closure(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure0: function _EvaluateVisitor__evaluateMacroArguments_closure0(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure1: function _EvaluateVisitor__evaluateMacroArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure2: function _EvaluateVisitor__evaluateMacroArguments_closure2(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure: function _EvaluateVisitor__addRestMap_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure: function _EvaluateVisitor__verifyArguments_closure(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitStringExpression_closure: function _EvaluateVisitor_visitStringExpression_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitCssAtRule_closure: function _EvaluateVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure0: function _EvaluateVisitor_visitCssAtRule_closure0() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure: function _EvaluateVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure0: function _EvaluateVisitor_visitCssKeyframeBlock_closure0() { + }, + _EvaluateVisitor_visitCssMediaRule_closure: function _EvaluateVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure0: function _EvaluateVisitor_visitCssMediaRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure: function _EvaluateVisitor_visitCssMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure: function _EvaluateVisitor_visitCssMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure1: function _EvaluateVisitor_visitCssMediaRule_closure1(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure: function _EvaluateVisitor_visitCssStyleRule_closure(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure: function _EvaluateVisitor_visitCssStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure0: function _EvaluateVisitor_visitCssStyleRule_closure0() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure: function _EvaluateVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure: function _EvaluateVisitor_visitCssSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure0: function _EvaluateVisitor_visitCssSupportsRule_closure0() { + }, + _EvaluateVisitor__performInterpolation_closure: function _EvaluateVisitor__performInterpolation_closure(t0, t1, t2) { + this.$this = t0; + this.warnForColor = t1; + this.interpolation = t2; + }, + _EvaluateVisitor__serialize_closure: function _EvaluateVisitor__serialize_closure(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure: function _EvaluateVisitor__expressionNode_closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation: function _EvaluateVisitor__withoutSlash_recommendation() { + }, + _EvaluateVisitor__stackFrame_closure: function _EvaluateVisitor__stackFrame_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__stackTrace_closure: function _EvaluateVisitor__stackTrace_closure(t0) { + this.$this = t0; + }, + _ImportedCssVisitor: function _ImportedCssVisitor(t0) { + this._visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure: function _ImportedCssVisitor_visitCssAtRule_closure() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure: function _ImportedCssVisitor_visitCssMediaRule_closure(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure: function _ImportedCssVisitor_visitCssStyleRule_closure() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure: function _ImportedCssVisitor_visitCssSupportsRule_closure() { + }, + _EvaluationContext: function _EvaluationContext(t0, t1) { + this._visitor = t0; + this._defaultWarnNodeWithSpan = t1; + }, + _ArgumentResults: function _ArgumentResults(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.positionalNodes = t1; + _.named = t2; + _.namedNodes = t3; + _.separator = t4; + }, + _LoadedStylesheet: function _LoadedStylesheet(t0, t1, t2) { + this.stylesheet = t0; + this.importer = t1; + this.isDependency = t2; + }, + EveryCssVisitor: function EveryCssVisitor() { + }, + EveryCssVisitor_visitCssAtRule_closure: function EveryCssVisitor_visitCssAtRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure: function EveryCssVisitor_visitCssKeyframeBlock_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure: function EveryCssVisitor_visitCssMediaRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure: function EveryCssVisitor_visitCssStyleRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure: function EveryCssVisitor_visitCssStylesheet_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure: function EveryCssVisitor_visitCssSupportsRule_closure(t0) { + this.$this = t0; + }, + _FindDependenciesVisitor: function _FindDependenciesVisitor(t0, t1) { + this._usesAndForwards = t0; + this._imports = t1; + }, + __FindDependenciesVisitor_Object_RecursiveStatementVisitor: function __FindDependenciesVisitor_Object_RecursiveStatementVisitor() { + }, + RecursiveStatementVisitor: function RecursiveStatementVisitor() { + }, + serialize(node, charset, indentWidth, inspect, lineFeed, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$(2, inspect, lineFeed, true, sourceMap, style, true); + node.accept$1(visitor); + t1 = visitor._serialize$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_1 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A.SerializeResult(prefix + css, t1); + }, + serializeValue(value, inspect, quote) { + var visitor = A._SerializeVisitor$(null, inspect, null, quote, false, null, true); + value.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + serializeSelector(selector, inspect) { + var visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + selector.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + _SerializeVisitor$(indentWidth, inspect, lineFeed, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_0 : style, + t3 = indentWidth == null ? 2 : indentWidth; + A.RangeError_checkValueInInterval(t3, 0, 10, "indentWidth"); + return new A._SerializeVisitor(t1, t2, inspect, quote, 32, t3, B.LineFeed_lf); + }, + serialize_closure: function serialize_closure() { + }, + _SerializeVisitor: function _SerializeVisitor(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._serialize$_buffer = t0; + _._indentation = 0; + _._style = t1; + _._inspect = t2; + _._quote = t3; + _._indentCharacter = t4; + _._indentWidth = t5; + _._serialize$_lineFeed = t6; + }, + _SerializeVisitor_visitCssComment_closure: function _SerializeVisitor_visitCssComment_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure: function _SerializeVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure: function _SerializeVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure: function _SerializeVisitor_visitCssImport_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure: function _SerializeVisitor_visitCssImport__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure: function _SerializeVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure: function _SerializeVisitor_visitCssStyleRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure: function _SerializeVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure: function _SerializeVisitor_visitCssDeclaration_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure0: function _SerializeVisitor_visitCssDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure: function _SerializeVisitor_visitList_closure() { + }, + _SerializeVisitor_visitList_closure0: function _SerializeVisitor_visitList_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure1: function _SerializeVisitor_visitList_closure1(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure: function _SerializeVisitor_visitMap_closure(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure: function _SerializeVisitor_visitSelectorList_closure() { + }, + _SerializeVisitor__write_closure: function _SerializeVisitor__write_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure: function _SerializeVisitor__visitChildren_closure(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure0: function _SerializeVisitor__visitChildren_closure0(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle: function OutputStyle(t0) { + this._name = t0; + }, + LineFeed: function LineFeed(t0) { + this._name = t0; + }, + SerializeResult: function SerializeResult(t0, t1) { + this.css = t0; + this.sourceMap = t1; + }, + _IterableExtension__search(_this, callback) { + var t1, value; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + value = callback.call$1(t1.get$current(t1)); + if (value != null) + return value; + } + return null; + }, + StatementSearchVisitor: function StatementSearchVisitor() { + }, + StatementSearchVisitor_visitIfRule_closure: function StatementSearchVisitor_visitIfRule_closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure0: function StatementSearchVisitor_visitIfRule__closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure0: function StatementSearchVisitor_visitIfRule_closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure: function StatementSearchVisitor_visitIfRule__closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure: function StatementSearchVisitor_visitChildren_closure(t0) { + this.$this = t0; + }, + Entry: function Entry(t0, t1, t2) { + this.source = t0; + this.target = t1; + this.identifierName = t2; + }, + SingleMapping_SingleMapping$fromEntries(entries) { + var lines, t1, t2, urls, names, files, targetEntries, t3, t4, lineNum, _i, sourceEntry, t5, t6, sourceUrl, t7, urlId, + sourceEntries = J.toList$0$ax(entries); + B.JSArray_methods.sort$0(sourceEntries); + lines = A._setArrayType([], type$.JSArray_TargetLineEntry); + t1 = type$.String; + t2 = type$.int; + urls = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + names = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + files = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.SourceFile); + targetEntries = A._Cell$(); + for (t2 = sourceEntries.length, t3 = type$.JSArray_TargetEntry, t4 = targetEntries.__late_helper$_name, lineNum = null, _i = 0; _i < sourceEntries.length; sourceEntries.length === t2 || (0, A.throwConcurrentModificationError)(sourceEntries), ++_i) { + sourceEntry = sourceEntries[_i]; + if (lineNum == null || sourceEntry.target.line > lineNum) { + lineNum = sourceEntry.target.line; + t5 = A._setArrayType([], t3); + targetEntries._value = t5; + lines.push(new A.TargetLineEntry(lineNum, t5)); + } + t5 = sourceEntry.source; + t6 = t5.file; + sourceUrl = t6.url; + t7 = sourceUrl == null ? "" : sourceUrl.toString$0(0); + urlId = urls.putIfAbsent$2(t7, new A.SingleMapping_SingleMapping$fromEntries_closure(urls)); + files.putIfAbsent$2(urlId, new A.SingleMapping_SingleMapping$fromEntries_closure0(sourceEntry)); + t7 = targetEntries._value; + if (t7 === targetEntries) + A.throwExpression(A.LateError$localNI(t4)); + t5 = t5.offset; + J.add$1$ax(t7, new A.TargetEntry(sourceEntry.target.column, urlId, t6.getLine$1(t5), t6.getColumn$1(t5), null)); + } + t2 = urls.get$values(urls); + t2 = A.MappedIterable_MappedIterable(t2, new A.SingleMapping_SingleMapping$fromEntries_closure1(files), A._instanceType(t2)._eval$1("Iterable.E"), type$.nullable_SourceFile); + t2 = A.List_List$of(t2, true, A._instanceType(t2)._eval$1("Iterable.E")); + t3 = urls.$ti._eval$1("LinkedHashMapKeyIterable<1>"); + t4 = names.$ti._eval$1("LinkedHashMapKeyIterable<1>"); + return new A.SingleMapping(A.List_List$of(new A.LinkedHashMapKeyIterable(urls, t3), true, t3._eval$1("Iterable.E")), A.List_List$of(new A.LinkedHashMapKeyIterable(names, t4), true, t4._eval$1("Iterable.E")), t2, lines, null, A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.dynamic)); + }, + Mapping: function Mapping() { + }, + SingleMapping: function SingleMapping(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.urls = t0; + _.names = t1; + _.files = t2; + _.lines = t3; + _.targetUrl = t4; + _.sourceRoot = null; + _.extensions = t5; + }, + SingleMapping_SingleMapping$fromEntries_closure: function SingleMapping_SingleMapping$fromEntries_closure(t0) { + this.urls = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure0: function SingleMapping_SingleMapping$fromEntries_closure0(t0) { + this.sourceEntry = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure1: function SingleMapping_SingleMapping$fromEntries_closure1(t0) { + this.files = t0; + }, + SingleMapping_toJson_closure: function SingleMapping_toJson_closure() { + }, + SingleMapping_toJson_closure0: function SingleMapping_toJson_closure0(t0) { + this.result = t0; + }, + TargetLineEntry: function TargetLineEntry(t0, t1) { + this.line = t0; + this.entries = t1; + }, + TargetEntry: function TargetEntry(t0, t1, t2, t3, t4) { + var _ = this; + _.column = t0; + _.sourceUrlId = t1; + _.sourceLine = t2; + _.sourceColumn = t3; + _.sourceNameId = t4; + }, + SourceFile$fromString(text, url) { + var t1 = new A.CodeUnits(text), + t2 = A._setArrayType([0], type$.JSArray_int), + t3 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); + t2 = new A.SourceFile(t3, t2, new Uint32Array(A._ensureNativeList(t1.toList$0(t1)))); + t2.SourceFile$decoded$2$url(t1, url); + return t2; + }, + SourceFile$decoded(decodedChars, url) { + var t1 = A._setArrayType([0], type$.JSArray_int), + t2 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); + t1 = new A.SourceFile(t2, t1, new Uint32Array(A._ensureNativeList(J.toList$0$ax(decodedChars)))); + t1.SourceFile$decoded$2$url(decodedChars, url); + return t1; + }, + FileLocation$_(file, offset) { + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > file._decodedChars.length) + A.throwExpression(A.RangeError$("Offset " + offset + string$.x20must_ + file.get$length(file) + ".")); + return new A.FileLocation(file, offset); + }, + _FileSpan$(file, _start, _end) { + if (_end < _start) + A.throwExpression(A.ArgumentError$("End " + _end + " must come after start " + _start + ".", null)); + else if (_end > file._decodedChars.length) + A.throwExpression(A.RangeError$("End " + _end + string$.x20must_ + file.get$length(file) + ".")); + else if (_start < 0) + A.throwExpression(A.RangeError$("Start may not be negative, was " + _start + ".")); + return new A._FileSpan(file, _start, _end); + }, + FileSpanExtension_subspan(_this, start, end) { + var startOffset, + t1 = _this._end, + t2 = _this._file$_start, + t3 = t1 - t2; + A.RangeError_checkValidRange(start, end, t3); + if (start === 0) + t3 = end == null || end === t3; + else + t3 = false; + if (t3) + return _this; + t3 = _this.file; + startOffset = A.FileLocation$_(t3, t2).offset; + t1 = end == null ? A.FileLocation$_(t3, t1).offset : startOffset + end; + return t3.span$2(0, startOffset + start, t1); + }, + SourceFile: function SourceFile(t0, t1, t2) { + var _ = this; + _.url = t0; + _._lineStarts = t1; + _._decodedChars = t2; + _._cachedLine = null; + }, + FileLocation: function FileLocation(t0, t1) { + this.file = t0; + this.offset = t1; + }, + _FileSpan: function _FileSpan(t0, t1, t2) { + this.file = t0; + this._file$_start = t1; + this._end = t2; + }, + Highlighter$(span, color) { + var t1 = A.Highlighter__collateLines(A._setArrayType([A._Highlight$(span, null, true)], type$.JSArray__Highlight)), + t2 = new A.Highlighter_closure(color).call$0(), + t3 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1), + t4 = A.Highlighter__contiguous(t1) ? 0 : 3, + t5 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, null, 1 + Math.max(t3.length, t4), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t5._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t5._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter$multiple(primarySpan, primaryLabel, secondarySpans, color, primaryColor, secondaryColor) { + var t2, t3, t4, t5, t6, + t1 = A._setArrayType([A._Highlight$(primarySpan, primaryLabel, true)], type$.JSArray__Highlight); + for (t2 = secondarySpans.get$entries(secondarySpans), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(A._Highlight$(t3.key, t3.value, false)); + } + t1 = A.Highlighter__collateLines(t1); + if (color) + t2 = primaryColor == null ? "\x1b[31m" : primaryColor; + else + t2 = null; + if (color) + t3 = "\x1b[34m"; + else + t3 = null; + t4 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1); + t5 = A.Highlighter__contiguous(t1) ? 0 : 3; + t6 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, t3, 1 + Math.max(t4.length, t5), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t6._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t6._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter__contiguous(lines) { + var i, thisLine, nextLine; + for (i = 0; i < lines.length - 1;) { + thisLine = lines[i]; + ++i; + nextLine = lines[i]; + if (thisLine.number + 1 !== nextLine.number && J.$eq$(thisLine.url, nextLine.url)) + return false; + } + return true; + }, + Highlighter__collateLines(highlights) { + var t1, t2, t3, + highlightsByUrl = A.groupBy(highlights, new A.Highlighter__collateLines_closure(), type$._Highlight, type$.Object); + for (t1 = highlightsByUrl.get$values(highlightsByUrl), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f), t2 = A._instanceType(t1)._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + J.sort$1$ax(t3, new A.Highlighter__collateLines_closure0()); + } + t1 = highlightsByUrl.get$entries(highlightsByUrl); + t2 = A._instanceType(t1)._eval$1("ExpandIterable"); + return A.List_List$of(new A.ExpandIterable(t1, new A.Highlighter__collateLines_closure1(), t2), true, t2._eval$1("Iterable.E")); + }, + _Highlight$(span, label, primary) { + var t2, + t1 = new A._Highlight_closure(span).call$0(); + if (label == null) + t2 = null; + else + t2 = A.stringReplaceAllUnchecked(label, "\r\n", "\n"); + return new A._Highlight(t1, primary, t2); + }, + _Highlight__normalizeNewlines(span) { + var endOffset, t1, i, t2, t3, t4, + text = span.get$text(); + if (!B.JSString_methods.contains$1(text, "\r\n")) + return span; + endOffset = span.get$end(span).get$offset(); + for (t1 = text.length - 1, i = 0; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1(text, i) === 13 && B.JSString_methods._codeUnitAt$1(text, i + 1) === 10) + --endOffset; + t1 = span.get$start(span); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + t2 = A.SourceLocation$(endOffset, span.get$end(span).get$column(), t3, t2); + t3 = A.stringReplaceAllUnchecked(text, "\r\n", "\n"); + t4 = span.get$context(span); + return A.SourceSpanWithContext$(t1, t2, t3, A.stringReplaceAllUnchecked(t4, "\r\n", "\n")); + }, + _Highlight__normalizeTrailingNewline(span) { + var context, text, start, end, t1, t2, t3; + if (!B.JSString_methods.endsWith$1(span.get$context(span), "\n")) + return span; + if (B.JSString_methods.endsWith$1(span.get$text(), "\n\n")) + return span; + context = B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1); + text = span.get$text(); + start = span.get$start(span); + end = span.get$end(span); + if (B.JSString_methods.endsWith$1(span.get$text(), "\n")) { + t1 = A.findLineStart(span.get$context(span), span.get$text(), span.get$start(span).get$column()); + t1.toString; + t1 = t1 + span.get$start(span).get$column() + span.get$length(span) === span.get$context(span).length; + } else + t1 = false; + if (t1) { + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + if (text.length === 0) + end = start; + else { + t1 = span.get$end(span).get$offset(); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + end = A.SourceLocation$(t1 - 1, A._Highlight__lastLineLength(context), t3 - 1, t2); + start = span.get$start(span).get$offset() === span.get$end(span).get$offset() ? end : span.get$start(span); + } + } + return A.SourceSpanWithContext$(start, end, text, context); + }, + _Highlight__normalizeEndOfLine(span) { + var text, t1, t2, t3, t4; + if (span.get$end(span).get$column() !== 0) + return span; + if (span.get$end(span).get$line() === span.get$start(span).get$line()) + return span; + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + t1 = span.get$start(span); + t2 = span.get$end(span).get$offset(); + t3 = span.get$sourceUrl(span); + t4 = span.get$end(span).get$line(); + t3 = A.SourceLocation$(t2 - 1, text.length - B.JSString_methods.lastIndexOf$1(text, "\n") - 1, t4 - 1, t3); + return A.SourceSpanWithContext$(t1, t3, text, B.JSString_methods.endsWith$1(span.get$context(span), "\n") ? B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1) : span.get$context(span)); + }, + _Highlight__lastLineLength(text) { + var t1 = text.length; + if (t1 === 0) + return 0; + else if (B.JSString_methods.codeUnitAt$1(text, t1 - 1) === 10) + return t1 === 1 ? 0 : t1 - B.JSString_methods.lastIndexOf$2(text, "\n", t1 - 2) - 1; + else + return t1 - B.JSString_methods.lastIndexOf$1(text, "\n") - 1; + }, + Highlighter: function Highlighter(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._lines = t0; + _._primaryColor = t1; + _._secondaryColor = t2; + _._paddingBeforeSidebar = t3; + _._maxMultilineSpans = t4; + _._multipleFiles = t5; + _._highlighter$_buffer = t6; + }, + Highlighter_closure: function Highlighter_closure(t0) { + this.color = t0; + }, + Highlighter$__closure: function Highlighter$__closure() { + }, + Highlighter$___closure: function Highlighter$___closure() { + }, + Highlighter$__closure0: function Highlighter$__closure0() { + }, + Highlighter__collateLines_closure: function Highlighter__collateLines_closure() { + }, + Highlighter__collateLines_closure0: function Highlighter__collateLines_closure0() { + }, + Highlighter__collateLines_closure1: function Highlighter__collateLines_closure1() { + }, + Highlighter__collateLines__closure: function Highlighter__collateLines__closure(t0) { + this.line = t0; + }, + Highlighter_highlight_closure: function Highlighter_highlight_closure() { + }, + Highlighter__writeFileStart_closure: function Highlighter__writeFileStart_closure(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure: function Highlighter__writeMultilineHighlights_closure(t0, t1, t2) { + this.$this = t0; + this.startLine = t1; + this.line = t2; + }, + Highlighter__writeMultilineHighlights_closure0: function Highlighter__writeMultilineHighlights_closure0(t0, t1) { + this.$this = t0; + this.highlight = t1; + }, + Highlighter__writeMultilineHighlights_closure1: function Highlighter__writeMultilineHighlights_closure1(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure2: function Highlighter__writeMultilineHighlights_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.current = t2; + _.startLine = t3; + _.line = t4; + _.highlight = t5; + _.endLine = t6; + }, + Highlighter__writeMultilineHighlights__closure: function Highlighter__writeMultilineHighlights__closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Highlighter__writeMultilineHighlights__closure0: function Highlighter__writeMultilineHighlights__closure0(t0, t1) { + this.$this = t0; + this.vertical = t1; + }, + Highlighter__writeHighlightedText_closure: function Highlighter__writeHighlightedText_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.text = t1; + _.startColumn = t2; + _.endColumn = t3; + }, + Highlighter__writeIndicator_closure: function Highlighter__writeIndicator_closure(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure0: function Highlighter__writeIndicator_closure0(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure1: function Highlighter__writeIndicator_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.coversWholeLine = t1; + _.line = t2; + _.highlight = t3; + }, + Highlighter__writeLabel_closure: function Highlighter__writeLabel_closure(t0, t1) { + this.$this = t0; + this.lines = t1; + }, + Highlighter__writeLabel_closure0: function Highlighter__writeLabel_closure0(t0, t1) { + this.$this = t0; + this.text = t1; + }, + Highlighter__writeSidebar_closure: function Highlighter__writeSidebar_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.end = t2; + }, + _Highlight: function _Highlight(t0, t1, t2) { + this.span = t0; + this.isPrimary = t1; + this.label = t2; + }, + _Highlight_closure: function _Highlight_closure(t0) { + this.span = t0; + }, + _Line: function _Line(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.number = t1; + _.url = t2; + _.highlights = t3; + }, + SourceLocation$(offset, column, line, sourceUrl) { + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (line < 0) + A.throwExpression(A.RangeError$("Line may not be negative, was " + line + ".")); + else if (column < 0) + A.throwExpression(A.RangeError$("Column may not be negative, was " + column + ".")); + return new A.SourceLocation(sourceUrl, offset, line, column); + }, + SourceLocation: function SourceLocation(t0, t1, t2, t3) { + var _ = this; + _.sourceUrl = t0; + _.offset = t1; + _.line = t2; + _.column = t3; + }, + SourceLocationMixin: function SourceLocationMixin() { + }, + SourceSpanExtension_messageMultiple(_this, message, label, secondarySpans, color, primaryColor) { + var t2, + t1 = _this.get$start(_this); + t1 = t1.file.getLine$1(t1.offset); + t2 = _this.get$start(_this); + t2 = "" + ("line " + (t1 + 1) + ", column " + (t2.file.getColumn$1(t2.offset) + 1)); + if (_this.get$sourceUrl(_this) != null) { + t1 = _this.get$sourceUrl(_this); + t1 = t2 + (" of " + $.$get$context().prettyUri$1(t1)); + } else + t1 = t2; + t1 = t1 + (": " + message + "\n") + A.Highlighter$multiple(_this, label, secondarySpans, color, primaryColor, null).highlight$0(); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + SourceSpanBase: function SourceSpanBase() { + }, + SourceSpanException: function SourceSpanException() { + }, + SourceSpanFormatException: function SourceSpanFormatException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + SourceSpanMixin: function SourceSpanMixin() { + }, + SourceSpanWithContext$(start, end, text, _context) { + var t1 = new A.SourceSpanWithContext(_context, start, end, text); + t1.SourceSpanBase$3(start, end, text); + if (!B.JSString_methods.contains$1(_context, text)) + A.throwExpression(A.ArgumentError$('The context line "' + _context + '" must contain "' + text + '".', null)); + if (A.findLineStart(_context, text, start.get$column()) == null) + A.throwExpression(A.ArgumentError$('The span text "' + text + '" must start at column ' + (start.get$column() + 1) + ' in a line within "' + _context + '".', null)); + return t1; + }, + SourceSpanWithContext: function SourceSpanWithContext(t0, t1, t2, t3) { + var _ = this; + _._context = t0; + _.start = t1; + _.end = t2; + _.text = t3; + }, + Chain_Chain$parse(chain) { + var t1, t2, + _s51_ = string$.x3d_____; + if (chain.length === 0) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([], type$.JSArray_Trace), type$.Trace)); + t1 = $.$get$vmChainGap(); + if (B.JSString_methods.contains$1(chain, t1)) { + t1 = B.JSString_methods.split$1(chain, t1); + t2 = A._arrayInstanceType(t1); + return new A.Chain(A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(t1, new A.Chain_Chain$parse_closure(), t2._eval$1("WhereIterable<1>")), new A.Chain_Chain$parse_closure0(), t2._eval$1("MappedIterable<1,Trace>")), type$.Trace)); + } + if (!B.JSString_methods.contains$1(chain, _s51_)) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([A.Trace_Trace$parse(chain)], type$.JSArray_Trace), type$.Trace)); + return new A.Chain(A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(chain.split(_s51_), type$.JSArray_String), new A.Chain_Chain$parse_closure1(), type$.MappedListIterable_String_Trace), type$.Trace)); + }, + Chain: function Chain(t0) { + this.traces = t0; + }, + Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { + }, + Chain_Chain$parse_closure0: function Chain_Chain$parse_closure0() { + }, + Chain_Chain$parse_closure1: function Chain_Chain$parse_closure1() { + }, + Chain_toTrace_closure: function Chain_toTrace_closure() { + }, + Chain_toString_closure0: function Chain_toString_closure0() { + }, + Chain_toString__closure0: function Chain_toString__closure0() { + }, + Chain_toString_closure: function Chain_toString_closure(t0) { + this.longest = t0; + }, + Chain_toString__closure: function Chain_toString__closure(t0) { + this.longest = t0; + }, + Frame_Frame$parseVM(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); + }, + Frame_Frame$parseV8(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); + }, + Frame_Frame$_parseFirefoxEval(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$_parseFirefoxEval_closure(frame)); + }, + Frame_Frame$parseFirefox(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); + }, + Frame_Frame$parseFriendly(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); + }, + Frame__uriOrPathToUri(uriOrPath) { + if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__uriRegExp())) + return A.Uri_parse(uriOrPath); + else if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) + return A._Uri__Uri$file(uriOrPath, true); + else if (B.JSString_methods.startsWith$1(uriOrPath, "/")) + return A._Uri__Uri$file(uriOrPath, false); + if (B.JSString_methods.contains$1(uriOrPath, "\\")) + return $.$get$windows().toUri$1(uriOrPath); + return A.Uri_parse(uriOrPath); + }, + Frame__catchFormatException(text, body) { + var t1, exception; + try { + t1 = body.call$0(); + return t1; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), text); + else + throw exception; + } + }, + Frame: function Frame(t0, t1, t2, t3) { + var _ = this; + _.uri = t0; + _.line = t1; + _.column = t2; + _.member = t3; + }, + Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure_parseLocation: function Frame_Frame$parseV8_closure_parseLocation(t0) { + this.frame = t0; + }, + Frame_Frame$_parseFirefoxEval_closure: function Frame_Frame$_parseFirefoxEval_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { + this.frame = t0; + }, + LazyTrace: function LazyTrace(t0) { + this._thunk = t0; + this.__LazyTrace__trace_FI = $; + }, + LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { + this.$this = t0; + }, + Trace_Trace$from(trace) { + if (type$.Trace._is(trace)) + return trace; + if (trace instanceof A.Chain) + return trace.toTrace$0(); + return new A.LazyTrace(new A.Trace_Trace$from_closure(trace)); + }, + Trace_Trace$parse(trace) { + var error, t1, exception; + try { + if (trace.length === 0) { + t1 = A.Trace$(A._setArrayType([], type$.JSArray_Frame), null); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_v8Trace())) { + t1 = A.Trace$parseV8(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, "\tat ")) { + t1 = A.Trace$parseJSCore(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace()) || B.JSString_methods.contains$1(trace, $.$get$_firefoxEvalTrace())) { + t1 = A.Trace$parseFirefox(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, string$.x3d_____)) { + t1 = A.Chain_Chain$parse(trace).toTrace$0(); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { + t1 = A.Trace$parseFriendly(trace); + return t1; + } + t1 = A.Trace$parseVM(trace); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + throw A.wrapException(A.FormatException$(J.get$message$x(error) + "\nStack trace:\n" + trace, null, null)); + } else + throw exception; + } + }, + Trace$parseVM(trace) { + var t1 = A.List_List$unmodifiable(A.Trace__parseVM(trace), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace__parseVM(trace) { + var $frames, + t1 = B.JSString_methods.trim$0(trace), + t2 = $.$get$vmChainGap(), + t3 = type$.WhereIterable_String, + lines = new A.WhereIterable(A._setArrayType(A.stringReplaceAllUnchecked(t1, t2, "").split("\n"), type$.JSArray_String), new A.Trace__parseVM_closure(), t3); + if (!lines.get$iterator(lines).moveNext$0()) + return A._setArrayType([], type$.JSArray_Frame); + t1 = A.TakeIterable_TakeIterable(lines, lines.get$length(lines) - 1, t3._eval$1("Iterable.E")); + t1 = A.MappedIterable_MappedIterable(t1, new A.Trace__parseVM_closure0(), A._instanceType(t1)._eval$1("Iterable.E"), type$.Frame); + $frames = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + if (!J.endsWith$1$s(lines.get$last(lines), ".da")) + B.JSArray_methods.add$1($frames, A.Frame_Frame$parseVM(lines.get$last(lines))); + return $frames; + }, + Trace$parseV8(trace) { + var t1 = A.SubListIterable$(A._setArrayType(trace.split("\n"), type$.JSArray_String), 1, null, type$.String).super$Iterable$skipWhile(0, new A.Trace$parseV8_closure()), + t2 = type$.Frame; + t2 = A.List_List$unmodifiable(A.MappedIterable_MappedIterable(t1, new A.Trace$parseV8_closure0(), t1.$ti._eval$1("Iterable.E"), t2), t2); + return new A.Trace(t2, new A._StringStackTrace(trace)); + }, + Trace$parseJSCore(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(trace.split("\n"), type$.JSArray_String), new A.Trace$parseJSCore_closure(), type$.WhereIterable_String), new A.Trace$parseJSCore_closure0(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$parseFirefox(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFirefox_closure(), type$.WhereIterable_String), new A.Trace$parseFirefox_closure0(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$parseFriendly(trace) { + var t1 = trace.length === 0 ? A._setArrayType([], type$.JSArray_Frame) : new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFriendly_closure(), type$.WhereIterable_String), new A.Trace$parseFriendly_closure0(), type$.MappedIterable_String_Frame); + t1 = A.List_List$unmodifiable(t1, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$($frames, original) { + var t1 = A.List_List$unmodifiable($frames, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(original == null ? "" : original)); + }, + Trace: function Trace(t0, t1) { + this.frames = t0; + this.original = t1; + }, + Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { + this.trace = t0; + }, + Trace__parseVM_closure: function Trace__parseVM_closure() { + }, + Trace__parseVM_closure0: function Trace__parseVM_closure0() { + }, + Trace$parseV8_closure: function Trace$parseV8_closure() { + }, + Trace$parseV8_closure0: function Trace$parseV8_closure0() { + }, + Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { + }, + Trace$parseJSCore_closure0: function Trace$parseJSCore_closure0() { + }, + Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { + }, + Trace$parseFirefox_closure0: function Trace$parseFirefox_closure0() { + }, + Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { + }, + Trace$parseFriendly_closure0: function Trace$parseFriendly_closure0() { + }, + Trace_terse_closure: function Trace_terse_closure() { + }, + Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { + this.oldPredicate = t0; + }, + Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { + this._box_0 = t0; + }, + Trace_toString_closure0: function Trace_toString_closure0() { + }, + Trace_toString_closure: function Trace_toString_closure(t0) { + this.longest = t0; + }, + UnparsedFrame: function UnparsedFrame(t0, t1) { + this.uri = t0; + this.member = t1; + }, + TransformByHandlers_transformByHandlers(_this, onData, onDone, $S, $T) { + var _null = null, t1 = {}, + controller = A.StreamController_StreamController(_null, _null, _null, _null, true, $T); + t1.subscription = null; + controller.onListen = new A.TransformByHandlers_transformByHandlers_closure(t1, _this, onData, controller, A.instantiate1(A.from_handlers__TransformByHandlers__defaultHandleError$closure(), $T), onDone, $S); + return controller.get$stream(); + }, + TransformByHandlers__defaultHandleError(error, stackTrace, sink) { + sink.addError$2(error, stackTrace); + }, + TransformByHandlers_transformByHandlers_closure: function TransformByHandlers_transformByHandlers_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_1 = t0; + _._this = t1; + _.handleData = t2; + _.controller = t3; + _.handleError = t4; + _.handleDone = t5; + _.S = t6; + }, + TransformByHandlers_transformByHandlers__closure: function TransformByHandlers_transformByHandlers__closure(t0, t1, t2) { + this.handleData = t0; + this.controller = t1; + this.S = t2; + }, + TransformByHandlers_transformByHandlers__closure1: function TransformByHandlers_transformByHandlers__closure1(t0, t1) { + this.handleError = t0; + this.controller = t1; + }, + TransformByHandlers_transformByHandlers__closure0: function TransformByHandlers_transformByHandlers__closure0(t0, t1, t2) { + this._box_0 = t0; + this.handleDone = t1; + this.controller = t2; + }, + TransformByHandlers_transformByHandlers__closure2: function TransformByHandlers_transformByHandlers__closure2(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + RateLimit__debounceAggregate(_this, duration, collect, leading, trailing, $T, $S) { + var t1 = {}; + t1.soFar = t1.timer = null; + t1.emittedLatestAsLeading = t1.shouldClose = t1.hasPending = false; + return A.TransformByHandlers_transformByHandlers(_this, new A.RateLimit__debounceAggregate_closure(t1, $S, collect, false, duration, true, $T), new A.RateLimit__debounceAggregate_closure0(t1, true, $S), $T, $S); + }, + _collect($event, soFar, $T) { + var t1 = soFar == null ? A._setArrayType([], $T._eval$1("JSArray<0>")) : soFar; + J.add$1$ax(t1, $event); + return t1; + }, + RateLimit__debounceAggregate_closure: function RateLimit__debounceAggregate_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.S = t1; + _.collect = t2; + _.leading = t3; + _.duration = t4; + _.trailing = t5; + _.T = t6; + }, + RateLimit__debounceAggregate_closure_emit: function RateLimit__debounceAggregate_closure_emit(t0, t1, t2) { + this._box_0 = t0; + this.sink = t1; + this.S = t2; + }, + RateLimit__debounceAggregate__closure: function RateLimit__debounceAggregate__closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.trailing = t1; + _.emit = t2; + _.sink = t3; + }, + RateLimit__debounceAggregate_closure0: function RateLimit__debounceAggregate_closure0(t0, t1, t2) { + this._box_0 = t0; + this.trailing = t1; + this.S = t2; + }, + StringScannerException$(message, span, source) { + return new A.StringScannerException(source, message, span); + }, + StringScannerException: function StringScannerException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + LineScanner$(string) { + return new A.LineScanner(null, string); + }, + LineScanner: function LineScanner(t0, t1) { + var _ = this; + _._line_scanner$_column = _._line_scanner$_line = 0; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + SpanScanner$(string, sourceUrl) { + var t2, + t1 = A.SourceFile$fromString(string, sourceUrl); + if (sourceUrl == null) + t2 = null; + else + t2 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.SpanScanner(t1, t2, string); + }, + SpanScanner: function SpanScanner(t0, t1, t2) { + var _ = this; + _._sourceFile = t0; + _.sourceUrl = t1; + _.string = t2; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + _SpanScannerState: function _SpanScannerState(t0, t1) { + this._scanner = t0; + this.position = t1; + }, + StringScanner$(string, position, sourceUrl) { + var t1; + if (sourceUrl == null) + t1 = null; + else + t1 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.StringScanner(t1, string); + }, + StringScanner: function StringScanner(t0, t1) { + var _ = this; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + AsciiGlyphSet: function AsciiGlyphSet() { + }, + UnicodeGlyphSet: function UnicodeGlyphSet() { + }, + Tuple2: function Tuple2(t0, t1, t2) { + this.item1 = t0; + this.item2 = t1; + this.$ti = t2; + }, + Tuple3: function Tuple3(t0, t1, t2, t3) { + var _ = this; + _.item1 = t0; + _.item2 = t1; + _.item3 = t2; + _.$ti = t3; + }, + Tuple4: function Tuple4(t0, t1, t2, t3, t4) { + var _ = this; + _.item1 = t0; + _.item2 = t1; + _.item3 = t2; + _.item4 = t3; + _.$ti = t4; + }, + WatchEvent: function WatchEvent(t0, t1) { + this.type = t0; + this.path = t1; + }, + ChangeType: function ChangeType(t0) { + this._watch_event$_name = t0; + }, + AnySelectorVisitor0: function AnySelectorVisitor0() { + }, + AnySelectorVisitor_visitComplexSelector_closure0: function AnySelectorVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure0: function AnySelectorVisitor_visitCompoundSelector_closure0(t0) { + this.$this = t0; + }, + SupportsAnything0: function SupportsAnything0(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Argument0: function Argument0(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ArgumentDeclaration_ArgumentDeclaration$parse0(contents, url) { + return A.ScssParser$0(contents, null, url).parseArgumentDeclaration$0(); + }, + ArgumentDeclaration0: function ArgumentDeclaration0(t0, t1, t2) { + this.$arguments = t0; + this.restArgument = t1; + this.span = t2; + }, + ArgumentDeclaration_verify_closure1: function ArgumentDeclaration_verify_closure1() { + }, + ArgumentDeclaration_verify_closure2: function ArgumentDeclaration_verify_closure2() { + }, + ArgumentInvocation$empty0(span) { + return new A.ArgumentInvocation0(B.List_empty21, B.Map_empty9, null, null, span); + }, + ArgumentInvocation0: function ArgumentInvocation0(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.named = t1; + _.rest = t2; + _.keywordRest = t3; + _.span = t4; + }, + argumentListClass_closure: function argumentListClass_closure() { + }, + argumentListClass__closure: function argumentListClass__closure() { + }, + argumentListClass__closure0: function argumentListClass__closure0() { + }, + SassArgumentList$0(contents, keywords, separator) { + var t1 = type$.Value_2; + t1 = new A.SassArgumentList0(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets0(contents, separator, false); + return t1; + }, + SassArgumentList0: function SassArgumentList0(t0, t1, t2, t3) { + var _ = this; + _._argument_list$_keywords = t0; + _._argument_list$_wereKeywordsAccessed = false; + _._list1$_contents = t1; + _._list1$_separator = t2; + _._list1$_hasBrackets = t3; + }, + JSArray1: function JSArray1() { + }, + AsyncImporter0: function AsyncImporter0() { + }, + NodeToDartAsyncImporter: function NodeToDartAsyncImporter(t0, t1) { + this._async0$_canonicalize = t0; + this._load = t1; + }, + AsyncBuiltInCallable$mixin0($name, $arguments, callback, url) { + return new A.AsyncBuiltInCallable0($name, A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure0(callback)); + }, + AsyncBuiltInCallable0: function AsyncBuiltInCallable0(t0, t1, t2) { + this.name = t0; + this._async_built_in0$_arguments = t1; + this._async_built_in0$_callback = t2; + }, + AsyncBuiltInCallable$mixin_closure0: function AsyncBuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + compileAsync0(path, charset, functions, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, sourceMap, style, syntax, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, terseLogger, t1, t2, t3, stylesheet, t4, result; + var $async$compileAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!verbose) { + terseLogger = new A.TerseLogger0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = null; + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + $async$goto = t2 ? 3 : 5; + break; + case 3: + // then + if (importCache == null) + importCache = A.AsyncImportCache$none(logger); + t2 = $.$get$context(); + t3 = t2.absolute$7(".", null, null, null, null, null, null); + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(new A.FilesystemImporter0(t3), t2.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath0(t2.absolute$7(t2.normalize$1(path), null, null, null, null, null, null)) : t2.canonicalize$1(0, path)), t2.toUri$1(path)), $async$compileAsync0); + case 6: + // returning from await. + t3 = $async$result; + t3.toString; + stylesheet = t3; + // goto join + $async$goto = 4; + break; + case 5: + // else + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + t4 = $.$get$context(); + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, logger, t4.toUri$1(path)); + t2 = t4; + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, new A.FilesystemImporter0(t2.absolute$7(".", null, null, null, null, null, null)), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileAsync0); + case 7: + // returning from await. + result = $async$result; + if (terseLogger != null) + terseLogger.summarize$1$node(!t1); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync0, $async$completer); + }, + compileStringAsync0(source, charset, functions, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, sourceMap, style, syntax, url, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, terseLogger, stylesheet, result; + var $async$compileStringAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!verbose) { + terseLogger = new A.TerseLogger0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = null; + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, logger, url); + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, importer == null ? new A.FilesystemImporter0($.$get$context().absolute$7(".", null, null, null, null, null, null)) : importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileStringAsync0); + case 3: + // returning from await. + result = $async$result; + if (terseLogger != null) + terseLogger.summarize$1$node(nodeImporter != null); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync0, $async$completer); + }, + _compileStylesheet2(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, evaluateResult, serializeResult, resultSourceMap; + var $async$_compileStylesheet2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet2); + case 3: + // returning from await. + evaluateResult = $async$result; + serializeResult = A.serialize0(evaluateResult.stylesheet, charset, indentWidth, false, lineFeed, sourceMap, style, useSpaces); + resultSourceMap = serializeResult.sourceMap; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure2(stylesheet, importCache)); + $async$returnValue = new A.CompileResult0(evaluateResult, serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet2, $async$completer); + }, + _compileStylesheet_closure2: function _compileStylesheet_closure2(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$0() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.AsyncCallable_2, + t6 = type$.JSArray_Map_String_AsyncCallable_2; + return new A.AsyncEnvironment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + AsyncEnvironment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule2(environment, css, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6; + if (forwarded == null) + forwarded = B.Set_empty5; + t1 = A._EnvironmentModule__makeModulesByVariable2(forwarded); + t2 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure17(), type$.Map_String_Value_2), type$.Value_2); + t3 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure18(), type$.Map_String_AstNode_2), type$.AstNode_2); + t4 = type$.Map_String_AsyncCallable_2; + t5 = type$.AsyncCallable_2; + t6 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure19(), t4), t5); + t5 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure20(), t4), t5); + t4 = J.get$isNotEmpty$asx(css.get$children(css)) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure21()); + return A._EnvironmentModule$_2(environment, css, extensionStore, t1, t2, t3, t6, t5, t4, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure22())); + }, + _EnvironmentModule__makeModulesByVariable2(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty10; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule2) { + for (t3 = t2._async_environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment0$_environment._async_environment0$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap2(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_2(_environment, css, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule2(_environment._async_environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment0: function AsyncEnvironment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._async_environment0$_modules = t0; + _._async_environment0$_namespaceNodes = t1; + _._async_environment0$_globalModules = t2; + _._async_environment0$_importedModules = t3; + _._async_environment0$_forwardedModules = t4; + _._async_environment0$_nestedForwardedModules = t5; + _._async_environment0$_allModules = t6; + _._async_environment0$_variables = t7; + _._async_environment0$_variableNodes = t8; + _._async_environment0$_variableIndices = t9; + _._async_environment0$_functions = t10; + _._async_environment0$_functionIndices = t11; + _._async_environment0$_mixins = t12; + _._async_environment0$_mixinIndices = t13; + _._async_environment0$_content = t14; + _._async_environment0$_inMixin = false; + _._async_environment0$_inSemiGlobalScope = true; + _._async_environment0$_lastVariableIndex = _._async_environment0$_lastVariableName = null; + }, + AsyncEnvironment_importForwards_closure2: function AsyncEnvironment_importForwards_closure2() { + }, + AsyncEnvironment_importForwards_closure3: function AsyncEnvironment_importForwards_closure3() { + }, + AsyncEnvironment_importForwards_closure4: function AsyncEnvironment_importForwards_closure4() { + }, + AsyncEnvironment__getVariableFromGlobalModule_closure0: function AsyncEnvironment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure2: function AsyncEnvironment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure3: function AsyncEnvironment_setVariable_closure3(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure4: function AsyncEnvironment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure0: function AsyncEnvironment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure0: function AsyncEnvironment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure0: function AsyncEnvironment_toModule_closure0() { + }, + AsyncEnvironment_toDummyModule_closure0: function AsyncEnvironment_toDummyModule_closure0() { + }, + AsyncEnvironment__fromOneModule_closure0: function AsyncEnvironment__fromOneModule_closure0(t0, t1) { + this.callback = t0; + this.T = t1; + }, + AsyncEnvironment__fromOneModule__closure0: function AsyncEnvironment__fromOneModule__closure0(t0, t1) { + this.entry = t0; + this.T = t1; + }, + _EnvironmentModule2: function _EnvironmentModule2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.transitivelyContainsCss = t7; + _.transitivelyContainsExtensions = t8; + _._async_environment0$_environment = t9; + _._async_environment0$_modulesByVariable = t10; + }, + _EnvironmentModule__EnvironmentModule_closure17: function _EnvironmentModule__EnvironmentModule_closure17() { + }, + _EnvironmentModule__EnvironmentModule_closure18: function _EnvironmentModule__EnvironmentModule_closure18() { + }, + _EnvironmentModule__EnvironmentModule_closure19: function _EnvironmentModule__EnvironmentModule_closure19() { + }, + _EnvironmentModule__EnvironmentModule_closure20: function _EnvironmentModule__EnvironmentModule_closure20() { + }, + _EnvironmentModule__EnvironmentModule_closure21: function _EnvironmentModule__EnvironmentModule_closure21() { + }, + _EnvironmentModule__EnvironmentModule_closure22: function _EnvironmentModule__EnvironmentModule_closure22() { + }, + _EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_AsyncCallable_2, + t3 = A._setArrayType([], type$.JSArray_Tuple2_String_AstNode_2); + if (nodeImporter == null) + t4 = importCache == null ? A.AsyncImportCache$none(logger) : importCache; + else + t4 = null; + t1 = new A._EvaluateVisitor2(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Tuple2_String_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor2: function _EvaluateVisitor2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_evaluate0$_importCache = t0; + _._async_evaluate0$_nodeImporter = t1; + _._async_evaluate0$_builtInFunctions = t2; + _._async_evaluate0$_builtInModules = t3; + _._async_evaluate0$_modules = t4; + _._async_evaluate0$_moduleConfigurations = t5; + _._async_evaluate0$_moduleNodes = t6; + _._async_evaluate0$_logger = t7; + _._async_evaluate0$_warningsEmitted = t8; + _._async_evaluate0$_quietDeps = t9; + _._async_evaluate0$_sourceMap = t10; + _._async_evaluate0$_environment = t11; + _._async_evaluate0$_declarationName = _._async_evaluate0$__parent = _._async_evaluate0$_mediaQuerySources = _._async_evaluate0$_mediaQueries = _._async_evaluate0$_styleRuleIgnoringAtRoot = null; + _._async_evaluate0$_member = "root stylesheet"; + _._async_evaluate0$_importSpan = _._async_evaluate0$_callableNode = _._async_evaluate0$_currentCallable = null; + _._async_evaluate0$_inSupportsDeclaration = _._async_evaluate0$_inKeyframes = _._async_evaluate0$_atRootExcludingStyleRule = _._async_evaluate0$_inUnknownAtRule = _._async_evaluate0$_inFunction = false; + _._async_evaluate0$_loadedUrls = t12; + _._async_evaluate0$_activeModules = t13; + _._async_evaluate0$_stack = t14; + _._async_evaluate0$_importer = null; + _._async_evaluate0$_inDependency = false; + _._async_evaluate0$__extensionStore = _._async_evaluate0$_outOfOrderImports = _._async_evaluate0$__endOfImports = _._async_evaluate0$__root = _._async_evaluate0$__stylesheet = null; + _._async_evaluate0$_configuration = t15; + }, + _EvaluateVisitor_closure29: function _EvaluateVisitor_closure29(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure30: function _EvaluateVisitor_closure30(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure31: function _EvaluateVisitor_closure31(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure32: function _EvaluateVisitor_closure32(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure33: function _EvaluateVisitor_closure33(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure34: function _EvaluateVisitor_closure34(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure35: function _EvaluateVisitor_closure35(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure36: function _EvaluateVisitor_closure36(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure10: function _EvaluateVisitor__closure10(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure37: function _EvaluateVisitor_closure37(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure38: function _EvaluateVisitor_closure38(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure8: function _EvaluateVisitor__closure8(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure9: function _EvaluateVisitor__closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure2: function _EvaluateVisitor_run_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor__loadModule_closure5: function _EvaluateVisitor__loadModule_closure5(t0, t1) { + this.callback = t0; + this.builtInModule = t1; + }, + _EvaluateVisitor__loadModule_closure6: function _EvaluateVisitor__loadModule_closure6(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure2: function _EvaluateVisitor__loadModule__closure2(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__execute_closure2: function _EvaluateVisitor__execute_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + }, + _EvaluateVisitor__combineCss_closure8: function _EvaluateVisitor__combineCss_closure8() { + }, + _EvaluateVisitor__combineCss_closure9: function _EvaluateVisitor__combineCss_closure9(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_closure10: function _EvaluateVisitor__combineCss_closure10() { + }, + _EvaluateVisitor__extendModules_closure5: function _EvaluateVisitor__extendModules_closure5(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure6: function _EvaluateVisitor__extendModules_closure6() { + }, + _EvaluateVisitor__topologicalModules_visitModule2: function _EvaluateVisitor__topologicalModules_visitModule2(t0, t1) { + this.seen = t0; + this.sorted = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure8: function _EvaluateVisitor_visitAtRootRule_closure8(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure9: function _EvaluateVisitor_visitAtRootRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure10: function _EvaluateVisitor_visitAtRootRule_closure10(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure17: function _EvaluateVisitor__scopeForAtRoot_closure17(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure18: function _EvaluateVisitor__scopeForAtRoot_closure18(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure19: function _EvaluateVisitor__scopeForAtRoot_closure19(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure2: function _EvaluateVisitor__scopeForAtRoot__closure2(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure20: function _EvaluateVisitor__scopeForAtRoot_closure20(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure21: function _EvaluateVisitor__scopeForAtRoot_closure21() { + }, + _EvaluateVisitor__scopeForAtRoot_closure22: function _EvaluateVisitor__scopeForAtRoot_closure22(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure2: function _EvaluateVisitor_visitContentRule_closure2(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure5: function _EvaluateVisitor_visitDeclaration_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitDeclaration_closure6: function _EvaluateVisitor_visitDeclaration_closure6(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitEachRule_closure8: function _EvaluateVisitor_visitEachRule_closure8(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure9: function _EvaluateVisitor_visitEachRule_closure9(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure10: function _EvaluateVisitor_visitEachRule_closure10(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure2: function _EvaluateVisitor_visitEachRule__closure2(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure2: function _EvaluateVisitor_visitEachRule___closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitExtendRule_closure2: function _EvaluateVisitor_visitExtendRule_closure2(t0, t1) { + this.$this = t0; + this.targetText = t1; + }, + _EvaluateVisitor_visitAtRule_closure8: function _EvaluateVisitor_visitAtRule_closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure9: function _EvaluateVisitor_visitAtRule_closure9(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule__closure2: function _EvaluateVisitor_visitAtRule__closure2(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure10: function _EvaluateVisitor_visitAtRule_closure10() { + }, + _EvaluateVisitor_visitForRule_closure14: function _EvaluateVisitor_visitForRule_closure14(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure15: function _EvaluateVisitor_visitForRule_closure15(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure16: function _EvaluateVisitor_visitForRule_closure16(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure17: function _EvaluateVisitor_visitForRule_closure17(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure18: function _EvaluateVisitor_visitForRule_closure18(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure2: function _EvaluateVisitor_visitForRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure5: function _EvaluateVisitor_visitForwardRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure6: function _EvaluateVisitor_visitForwardRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIfRule_closure2: function _EvaluateVisitor_visitIfRule_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitIfRule__closure2: function _EvaluateVisitor_visitIfRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure2: function _EvaluateVisitor__visitDynamicImport_closure2(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure11: function _EvaluateVisitor__visitDynamicImport__closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure12: function _EvaluateVisitor__visitDynamicImport__closure12() { + }, + _EvaluateVisitor__visitDynamicImport__closure13: function _EvaluateVisitor__visitDynamicImport__closure13() { + }, + _EvaluateVisitor__visitDynamicImport__closure14: function _EvaluateVisitor__visitDynamicImport__closure14(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.result = t1; + _.stylesheet = t2; + _.loadsUserDefinedModules = t3; + _.environment = t4; + _.children = t5; + }, + _EvaluateVisitor_visitIncludeRule_closure11: function _EvaluateVisitor_visitIncludeRule_closure11(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure12: function _EvaluateVisitor_visitIncludeRule_closure12(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure14: function _EvaluateVisitor_visitIncludeRule_closure14(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure13: function _EvaluateVisitor_visitIncludeRule_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpan = t3; + }, + _EvaluateVisitor_visitIncludeRule__closure2: function _EvaluateVisitor_visitIncludeRule__closure2(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule___closure2: function _EvaluateVisitor_visitIncludeRule___closure2(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule____closure2: function _EvaluateVisitor_visitIncludeRule____closure2(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitMediaRule_closure8: function _EvaluateVisitor_visitMediaRule_closure8(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure9: function _EvaluateVisitor_visitMediaRule_closure9(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure2: function _EvaluateVisitor_visitMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure2: function _EvaluateVisitor_visitMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure10: function _EvaluateVisitor_visitMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor__visitMediaQueries_closure2: function _EvaluateVisitor__visitMediaQueries_closure2(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitStyleRule_closure23: function _EvaluateVisitor_visitStyleRule_closure23(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure24: function _EvaluateVisitor_visitStyleRule_closure24(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure25: function _EvaluateVisitor_visitStyleRule_closure25() { + }, + _EvaluateVisitor_visitStyleRule_closure26: function _EvaluateVisitor_visitStyleRule_closure26(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure27: function _EvaluateVisitor_visitStyleRule_closure27(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitStyleRule_closure28: function _EvaluateVisitor_visitStyleRule_closure28(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure2: function _EvaluateVisitor_visitStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure29: function _EvaluateVisitor_visitStyleRule_closure29() { + }, + _EvaluateVisitor_visitStyleRule_closure30: function _EvaluateVisitor_visitStyleRule_closure30() { + }, + _EvaluateVisitor_visitSupportsRule_closure5: function _EvaluateVisitor_visitSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure2: function _EvaluateVisitor_visitSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure6: function _EvaluateVisitor_visitSupportsRule_closure6() { + }, + _EvaluateVisitor_visitVariableDeclaration_closure8: function _EvaluateVisitor_visitVariableDeclaration_closure8(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.override = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure9: function _EvaluateVisitor_visitVariableDeclaration_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure10: function _EvaluateVisitor_visitVariableDeclaration_closure10(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure2: function _EvaluateVisitor_visitUseRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure2: function _EvaluateVisitor_visitWarnRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure2: function _EvaluateVisitor_visitWhileRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure2: function _EvaluateVisitor_visitWhileRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure2: function _EvaluateVisitor_visitBinaryOperationExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation2: function _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation2() { + }, + _EvaluateVisitor_visitVariableExpression_closure2: function _EvaluateVisitor_visitVariableExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure2: function _EvaluateVisitor_visitUnaryOperationExpression_closure2(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor__visitCalculationValue_closure2: function _EvaluateVisitor__visitCalculationValue_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.inMinMax = t2; + }, + _EvaluateVisitor_visitListExpression_closure2: function _EvaluateVisitor_visitListExpression_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure5: function _EvaluateVisitor_visitFunctionExpression_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure6: function _EvaluateVisitor_visitFunctionExpression_closure6(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure2: function _EvaluateVisitor__runUserDefinedCallable_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure2: function _EvaluateVisitor__runUserDefinedCallable__closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure2: function _EvaluateVisitor__runUserDefinedCallable___closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure2: function _EvaluateVisitor__runUserDefinedCallable____closure2() { + }, + _EvaluateVisitor__runFunctionCallable_closure2: function _EvaluateVisitor__runFunctionCallable_closure2(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure5: function _EvaluateVisitor__runBuiltInCallable_closure5(t0, t1, t2) { + this.overload = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure6: function _EvaluateVisitor__runBuiltInCallable_closure6() { + }, + _EvaluateVisitor__evaluateArguments_closure11: function _EvaluateVisitor__evaluateArguments_closure11() { + }, + _EvaluateVisitor__evaluateArguments_closure12: function _EvaluateVisitor__evaluateArguments_closure12(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure13: function _EvaluateVisitor__evaluateArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure14: function _EvaluateVisitor__evaluateArguments_closure14() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure11: function _EvaluateVisitor__evaluateMacroArguments_closure11(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure12: function _EvaluateVisitor__evaluateMacroArguments_closure12(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure13: function _EvaluateVisitor__evaluateMacroArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure14: function _EvaluateVisitor__evaluateMacroArguments_closure14(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure2: function _EvaluateVisitor__addRestMap_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure2: function _EvaluateVisitor__verifyArguments_closure2(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitStringExpression_closure2: function _EvaluateVisitor_visitStringExpression_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitCssAtRule_closure5: function _EvaluateVisitor_visitCssAtRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure6: function _EvaluateVisitor_visitCssAtRule_closure6() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure5: function _EvaluateVisitor_visitCssKeyframeBlock_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure6: function _EvaluateVisitor_visitCssKeyframeBlock_closure6() { + }, + _EvaluateVisitor_visitCssMediaRule_closure8: function _EvaluateVisitor_visitCssMediaRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure9: function _EvaluateVisitor_visitCssMediaRule_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure2: function _EvaluateVisitor_visitCssMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure2: function _EvaluateVisitor_visitCssMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure10: function _EvaluateVisitor_visitCssMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure5: function _EvaluateVisitor_visitCssStyleRule_closure5(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure2: function _EvaluateVisitor_visitCssStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure6: function _EvaluateVisitor_visitCssStyleRule_closure6() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure5: function _EvaluateVisitor_visitCssSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure2: function _EvaluateVisitor_visitCssSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure6: function _EvaluateVisitor_visitCssSupportsRule_closure6() { + }, + _EvaluateVisitor__performInterpolation_closure2: function _EvaluateVisitor__performInterpolation_closure2(t0, t1, t2) { + this.$this = t0; + this.warnForColor = t1; + this.interpolation = t2; + }, + _EvaluateVisitor__serialize_closure2: function _EvaluateVisitor__serialize_closure2(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure2: function _EvaluateVisitor__expressionNode_closure2(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation2: function _EvaluateVisitor__withoutSlash_recommendation2() { + }, + _EvaluateVisitor__stackFrame_closure2: function _EvaluateVisitor__stackFrame_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor__stackTrace_closure2: function _EvaluateVisitor__stackTrace_closure2(t0) { + this.$this = t0; + }, + _ImportedCssVisitor2: function _ImportedCssVisitor2(t0) { + this._async_evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure2: function _ImportedCssVisitor_visitCssAtRule_closure2() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure2: function _ImportedCssVisitor_visitCssMediaRule_closure2(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure2: function _ImportedCssVisitor_visitCssStyleRule_closure2() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure2: function _ImportedCssVisitor_visitCssSupportsRule_closure2() { + }, + EvaluateResult0: function EvaluateResult0(t0, t1) { + this.stylesheet = t0; + this.loadedUrls = t1; + }, + _EvaluationContext2: function _EvaluationContext2(t0, t1) { + this._async_evaluate0$_visitor = t0; + this._async_evaluate0$_defaultWarnNodeWithSpan = t1; + }, + _ArgumentResults2: function _ArgumentResults2(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.positionalNodes = t1; + _.named = t2; + _.namedNodes = t3; + _.separator = t4; + }, + _LoadedStylesheet2: function _LoadedStylesheet2(t0, t1, t2) { + this.stylesheet = t0; + this.importer = t1; + this.isDependency = t2; + }, + NodeToDartAsyncFileImporter: function NodeToDartAsyncFileImporter(t0) { + this._findFileUrl = t0; + }, + AsyncImportCache$(importers, loadPaths, logger, packageConfig) { + var t1 = type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2, + t2 = type$.Uri, + t3 = A.AsyncImportCache__toImporters0(importers, loadPaths, packageConfig); + return new A.AsyncImportCache0(t3, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t1), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri_2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.ImporterResult_2)); + }, + AsyncImportCache$none(logger) { + var t1 = type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2, + t2 = type$.Uri; + return new A.AsyncImportCache0(B.List_empty25, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t1), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri_2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.ImporterResult_2)); + }, + AsyncImportCache__toImporters0(importers, loadPaths, packageConfig) { + var sassPath, t2, t3, _i, path, _null = null, + t1 = J.get$env$x(self.process); + if (t1 == null) + t1 = type$.Object._as(t1); + sassPath = A._asStringQ(t1.SASS_PATH); + t1 = A._setArrayType([], type$.JSArray_AsyncImporter); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$7(t3, _null, _null, _null, _null, _null, _null))); + } + if (sassPath != null) { + t2 = sassPath.split(J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"); + t3 = t2.length; + _i = 0; + for (; _i < t3; ++_i) { + path = t2[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$7(path, _null, _null, _null, _null, _null, _null))); + } + } + return t1; + }, + AsyncImportCache0: function AsyncImportCache0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._async_import_cache0$_importers = t0; + _._async_import_cache0$_logger = t1; + _._async_import_cache0$_canonicalizeCache = t2; + _._async_import_cache0$_relativeCanonicalizeCache = t3; + _._async_import_cache0$_importCache = t4; + _._async_import_cache0$_resultsCache = t5; + }, + AsyncImportCache_canonicalize_closure1: function AsyncImportCache_canonicalize_closure1(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.baseUrl = t1; + _.url = t2; + _.baseImporter = t3; + _.forImport = t4; + }, + AsyncImportCache_canonicalize_closure2: function AsyncImportCache_canonicalize_closure2(t0, t1, t2) { + this.$this = t0; + this.url = t1; + this.forImport = t2; + }, + AsyncImportCache__canonicalize_closure0: function AsyncImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure0: function AsyncImportCache_importCanonical_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + AsyncImportCache_humanize_closure2: function AsyncImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure3: function AsyncImportCache_humanize_closure3() { + }, + AsyncImportCache_humanize_closure4: function AsyncImportCache_humanize_closure4() { + }, + AtRootQueryParser0: function AtRootQueryParser0(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + AtRootQueryParser_parse_closure0: function AtRootQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + AtRootQuery0: function AtRootQuery0(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._at_root_query0$_all = t2; + _._at_root_query0$_rule = t3; + }, + AtRootRule$0(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRootRule0(query, span, t1, t2); + }, + AtRootRule0: function AtRootRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + ModifiableCssAtRule$0($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssAtRule0($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssAtRule0: function ModifiableCssAtRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._node0$_children = t5; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + AtRule$0($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement_2), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRule0($name, value, span, t1, t2 === true); + }, + AtRule0: function AtRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + AttributeSelector0: function AttributeSelector0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + }, + AttributeOperator0: function AttributeOperator0(t0, t1) { + this._attribute0$_text = t0; + this._name = t1; + }, + BinaryOperationExpression0: function BinaryOperationExpression0(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator0: function BinaryOperator0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + BooleanExpression0: function BooleanExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + legacyBooleanClass_closure: function legacyBooleanClass_closure() { + }, + legacyBooleanClass__closure: function legacyBooleanClass__closure() { + }, + legacyBooleanClass__closure0: function legacyBooleanClass__closure0() { + }, + booleanClass_closure: function booleanClass_closure() { + }, + booleanClass__closure: function booleanClass__closure() { + }, + SassBoolean0: function SassBoolean0(t0) { + this.value = t0; + }, + BuiltInCallable$function0($name, $arguments, callback, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A.Tuple2(A.ScssParser$0("@function " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), callback, type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)); + }, + BuiltInCallable$mixin0($name, $arguments, callback, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A.Tuple2(A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure0(callback), type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)); + }, + BuiltInCallable$overloadedFunction0($name, overloads) { + var t2, t3, t4, t5, t6, t7, t8, + t1 = A._setArrayType([], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value); + for (t2 = overloads.get$entries(overloads), t2 = t2.get$iterator(t2), t3 = type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value, t4 = "@function " + $name + "(", t5 = type$.String, t6 = type$.VariableDeclaration_2; t2.moveNext$0();) { + t7 = t2.get$current(t2); + t8 = A.SpanScanner$(t4 + A.S(t7.key) + ") {", null); + t1.push(new A.Tuple2(new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(t5, t6), t8, B.StderrLogger_false0).parseArgumentDeclaration$0(), t7.value, t3)); + } + return new A.BuiltInCallable0($name, t1); + }, + BuiltInCallable0: function BuiltInCallable0(t0, t1) { + this.name = t0; + this._built_in$_overloads = t1; + }, + BuiltInCallable$mixin_closure0: function BuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + BuiltInModule$0($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap0(functions, $T), + t3 = A.BuiltInModule__callableMap0(mixins, $T), + t4 = variables == null ? B.Map_empty8 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value_2); + return new A.BuiltInModule0(t1, t2, t3, t4, $T._eval$1("BuiltInModule0<0>")); + }, + BuiltInModule__callableMap0(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, J.get$name$x(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule0: function BuiltInModule0(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + CalculationExpression__verifyArguments0($arguments) { + return A.List_List$unmodifiable(new A.MappedListIterable($arguments, new A.CalculationExpression__verifyArguments_closure0(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Expression_2); + }, + CalculationExpression__verify0(expression) { + var t1, + _s29_ = "Invalid calculation argument "; + if (expression instanceof A.NumberExpression0) + return; + if (expression instanceof A.CalculationExpression0) + return; + if (expression instanceof A.VariableExpression0) + return; + if (expression instanceof A.FunctionExpression0) + return; + if (expression instanceof A.IfExpression0) + return; + if (expression instanceof A.StringExpression0) { + if (expression.hasQuotes) + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + } else if (expression instanceof A.ParenthesizedExpression0) + A.CalculationExpression__verify0(expression.expression); + else if (expression instanceof A.BinaryOperationExpression0) { + A.CalculationExpression__verify0(expression.left); + A.CalculationExpression__verify0(expression.right); + t1 = expression.operator; + if (t1 === B.BinaryOperator_qbf0) + return; + if (t1 === B.BinaryOperator_KlB0) + return; + if (t1 === B.BinaryOperator_6pl0) + return; + if (t1 === B.BinaryOperator_qpm0) + return; + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + } else + throw A.wrapException(A.ArgumentError$(_s29_ + expression.toString$0(0) + ".", null)); + }, + CalculationExpression0: function CalculationExpression0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + CalculationExpression__verifyArguments_closure0: function CalculationExpression__verifyArguments_closure0() { + }, + SassCalculation_calc0(argument) { + argument = A.SassCalculation__simplify0(argument); + if (argument instanceof A.SassNumber0) + return argument; + if (argument instanceof A.SassCalculation0) + return argument; + return new A.SassCalculation0("calc", A.List_List$unmodifiable([argument], type$.Object)); + }, + SassCalculation_min0($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("min", args); + }, + SassCalculation_max0($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("max", args); + }, + SassCalculation_clamp0(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify0(min); + value = A.NullableExtension_andThen0(value, A.calculation0_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen0(max, A.calculation0_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber0 && value instanceof A.SassNumber0 && max instanceof A.SassNumber0 && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers0(args); + A.SassCalculation__verifyLength0(args, 3); + return new A.SassCalculation0("clamp", args); + }, + SassCalculation_operateInternal0(operator, left, right, inMinMax, simplify) { + var t1, t2; + if (!simplify) + return new A.CalculationOperation0(operator, left, right); + left = A.SassCalculation__simplify0(left); + right = A.SassCalculation__simplify0(right); + t1 = operator === B.CalculationOperator_IyK0; + if (t1 || operator === B.CalculationOperator_2bx0) { + if (left instanceof A.SassNumber0) + if (right instanceof A.SassNumber0) + t2 = inMinMax ? left.isComparableTo$1(right) : left.hasCompatibleUnits$1(right); + else + t2 = false; + else + t2 = false; + if (t2) + return t1 ? left.plus$1(right) : left.minus$1(right); + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber0) { + t2 = right._number1$_value; + t2 = t2 < 0 && !A.fuzzyEquals0(t2, 0); + } else + t2 = false; + if (t2) { + right = right.times$1(A.SassNumber_SassNumber0(-1, null)); + operator = t1 ? B.CalculationOperator_2bx0 : B.CalculationOperator_IyK0; + } + return new A.CalculationOperation0(operator, left, right); + } else if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + return operator === B.CalculationOperator_jFr0 ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation0(operator, left, right); + }, + SassCalculation__simplify0(arg) { + var _s32_ = " can't be used in a calculation."; + if (arg instanceof A.SassNumber0 || arg instanceof A.CalculationInterpolation0 || arg instanceof A.CalculationOperation0) + return arg; + else if (arg instanceof A.SassString0) { + if (!arg._string0$_hasQuotes) + return arg; + throw A.wrapException(A.SassScriptException$0("Quoted string " + arg.toString$0(0) + _s32_, null)); + } else if (arg instanceof A.SassCalculation0) + return arg.name === "calc" ? arg.$arguments[0] : arg; + else if (arg instanceof A.Value0) + throw A.wrapException(A.SassScriptException$0("Value " + arg.toString$0(0) + _s32_, null)); + else + throw A.wrapException(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", null)); + }, + SassCalculation__verifyCompatibleNumbers0(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (!(arg instanceof A.SassNumber0)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(A.SassScriptException$0("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength0(args, expectedLength) { + var t1 = args.length; + if (t1 === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure0())) + return; + throw A.wrapException(A.SassScriptException$0("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", null)); + }, + SassCalculation0: function SassCalculation0(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure0: function SassCalculation__verifyLength_closure0() { + }, + CalculationOperation0: function CalculationOperation0(t0, t1, t2) { + this.operator = t0; + this.left = t1; + this.right = t2; + }, + CalculationOperator0: function CalculationOperator0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + CalculationInterpolation0: function CalculationInterpolation0(t0) { + this.value = t0; + }, + CallableDeclaration0: function CallableDeclaration0() { + }, + Chokidar0: function Chokidar0() { + }, + ChokidarOptions0: function ChokidarOptions0() { + }, + ChokidarWatcher0: function ChokidarWatcher0() { + }, + ClassSelector0: function ClassSelector0(t0) { + this.name = t0; + }, + cloneCssStylesheet0(stylesheet, extensionStore) { + var result = extensionStore.clone$0(); + return new A.Tuple2(new A._CloneCssVisitor0(result.item2)._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(stylesheet.get$span(stylesheet)), stylesheet), result.item1, type$.Tuple2_ModifiableCssStylesheet_ExtensionStore_2); + }, + _CloneCssVisitor0: function _CloneCssVisitor0(t0) { + this._clone_css$_oldToNewSelectors = t0; + }, + ColorExpression0: function ColorExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + _updateComponents0($arguments, adjust, change, scale) { + var keywords, alpha, red, green, blue, hueNumber, t2, hue, saturation, lightness, whiteness, blackness, hasRgb, hasSL, hasWB, t3, t4, _null = null, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + argumentList = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + if (argumentList._list1$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$0(string$.Only_op, _null)); + argumentList._argument_list$_wereKeywordsAccessed = true; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._argument_list$_keywords, type$.String, type$.Value_2); + t1 = new A._updateComponents_getParam0(keywords, scale, change); + alpha = t1.call$2("alpha", 1); + red = t1.call$2("red", 255); + green = t1.call$2("green", 255); + blue = t1.call$2("blue", 255); + if (scale) + hueNumber = _null; + else { + t2 = keywords.remove$1(0, "hue"); + hueNumber = t2 == null ? _null : t2.assertNumber$1("hue"); + } + t2 = hueNumber == null; + if (!t2) + A._checkAngle0(hueNumber, "hue"); + hue = t2 ? _null : hueNumber._number1$_value; + saturation = t1.call$3$checkPercent("saturation", 100, true); + lightness = t1.call$3$checkPercent("lightness", 100, true); + whiteness = t1.call$3$assertPercent("whiteness", 100, true); + blackness = t1.call$3$assertPercent("blackness", 100, true); + t1 = keywords.__js_helper$_length; + if (t1 !== 0) + throw A.wrapException(A.SassScriptException$0("No " + A.pluralize0("argument", t1, _null) + " named " + A.S(A.toSentence0(keywords.get$keys(keywords).map$1$1(0, new A._updateComponents_closure0(), type$.Object), "or")) + ".", _null)); + hasRgb = red != null || green != null || blue != null; + hasSL = saturation != null || lightness != null; + hasWB = whiteness != null || blackness != null; + if (hasRgb) + t1 = hasSL || hasWB || hue != null; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassScriptException$0(string$.RGB_pa + (hasWB ? "HWB" : "HSL") + " parameters.", _null)); + if (hasSL && hasWB) + throw A.wrapException(A.SassScriptException$0(string$.HSL_pa, _null)); + t1 = new A._updateComponents_updateValue0(change, adjust); + t2 = new A._updateComponents_updateRgb0(t1); + if (hasRgb) { + t3 = t2.call$2(color.get$red(color), red); + t4 = t2.call$2(color.get$green(color), green); + t2 = t2.call$2(color.get$blue(color), blue); + return color.changeRgb$4$alpha$blue$green$red(t1.call$3(color._color1$_alpha, alpha, 1), t2, t4, t3); + } else if (hasWB) { + if (change) + t2 = hue; + else { + t2 = color.get$hue(color); + t2 += hue == null ? 0 : hue; + } + t3 = t1.call$3(color.get$whiteness(color), whiteness, 100); + t4 = t1.call$3(color.get$blackness(color), blackness, 100); + return color.changeHwb$4$alpha$blackness$hue$whiteness(t1.call$3(color._color1$_alpha, alpha, 1), t4, t2, t3); + } else { + t2 = hue == null; + if (!t2 || hasSL) { + if (change) + t2 = hue; + else { + t3 = color.get$hue(color); + t3 += t2 ? 0 : hue; + t2 = t3; + } + t3 = t1.call$3(color.get$saturation(color), saturation, 100); + t4 = t1.call$3(color.get$lightness(color), lightness, 100); + return color.changeHsl$4$alpha$hue$lightness$saturation(t1.call$3(color._color1$_alpha, alpha, 1), t2, t4, t3); + } else if (alpha != null) + return color.changeAlpha$1(t1.call$3(color._color1$_alpha, alpha, 1)); + else + return color; + } + }, + _functionString0($name, $arguments) { + return new A.SassString0($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure0(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction0($name, argument, negative) { + return A.BuiltInCallable$function0($name, "$color, $amount", new A._removedColorFunction_closure0($name, argument, negative), "sass:color"); + }, + _rgb0($name, $arguments) { + var t2, red, green, blue, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + return A._functionString0($name, $arguments); + red = t1.$index($arguments, 0).assertNumber$1("red"); + green = t1.$index($arguments, 1).assertNumber$1("green"); + blue = t1.$index($arguments, 2).assertNumber$1("blue"); + return A.SassColor$rgbInternal0(A.fuzzyRound0(A._percentageOrUnitless0(red, 255, "red")), A.fuzzyRound0(A._percentageOrUnitless0(green, 255, "green")), A.fuzzyRound0(A._percentageOrUnitless0(blue, 255, "blue")), A.NullableExtension_andThen0(alpha, new A._rgb_closure0()), B._ColorFormatEnum_rgbFunction0); + }, + _rgbTwoArg0($name, $arguments) { + var first, color, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar()) + return A._functionString0($name, $arguments); + else if (t1.$index($arguments, 1).get$isVar()) { + first = t1.$index($arguments, 0); + if (first instanceof A.SassColor0) + return new A.SassString0($name + "(" + first.get$red(first) + ", " + first.get$green(first) + ", " + first.get$blue(first) + ", " + A.serializeValue0(t1.$index($arguments, 1), false, true) + ")", false); + else + return A._functionString0($name, $arguments); + } else if (t1.$index($arguments, 1).get$isSpecialNumber()) { + color = t1.$index($arguments, 0).assertColor$1("color"); + return new A.SassString0($name + "(" + color.get$red(color) + ", " + color.get$green(color) + ", " + color.get$blue(color) + ", " + A.serializeValue0(t1.$index($arguments, 1), false, true) + ")", false); + } + return t1.$index($arguments, 0).assertColor$1("color").changeAlpha$1(A._percentageOrUnitless0(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha")); + }, + _hsl0($name, $arguments) { + var t2, hue, saturation, lightness, + _s10_ = "saturation", + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + return A._functionString0($name, $arguments); + hue = t1.$index($arguments, 0).assertNumber$1("hue"); + saturation = t1.$index($arguments, 1).assertNumber$1(_s10_); + lightness = t1.$index($arguments, 2).assertNumber$1(_s9_); + A._checkAngle0(hue, "hue"); + A._checkPercent0(saturation, _s10_); + A._checkPercent0(lightness, _s9_); + return A.SassColor$hslInternal0(hue._number1$_value, B.JSNumber_methods.clamp$2(saturation._number1$_value, 0, 100), B.JSNumber_methods.clamp$2(lightness._number1$_value, 0, 100), A.NullableExtension_andThen0(alpha, new A._hsl_closure0()), B._ColorFormatEnum_hslFunction0); + }, + _checkAngle0(angle, $name) { + var t1, t2, t3; + if (!angle.get$hasUnits() || angle.hasUnit$1("deg")) + return; + t1 = "" + ("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + ") is deprecated.\n") + "\n"; + t2 = "To preserve current behavior: $" + $name; + if (angle.compatibleWithUnit$1("deg")) { + t3 = type$.JSArray_String; + t2 = t1 + ("You're passing " + angle.toString$0(0) + string$.x2c_whici + A.SassNumber_SassNumber0(angle._number1$_value, "deg").toString$0(0) + ".\n") + (string$.Soon__ + angle.coerce$2(A._setArrayType(["deg"], t3), A._setArrayType([], t3)).toString$0(0) + ".\n") + "\n" + (t2 + " * 1deg/1" + B.JSArray_methods.get$first(angle.get$numeratorUnits(angle)) + "\n") + ("To migrate to new behavior: 0deg + $" + $name + "\n") + "\n"; + t1 = t2; + } else + t1 = t1 + (t2 + A._removeUnits0(angle) + "\n") + "\n"; + t1 += "See https://sass-lang.com/d/color-units"; + A.EvaluationContext_current0().warn$2$deprecation(0, t1.charCodeAt(0) == 0 ? t1 : t1, true); + }, + _checkPercent0(number, $name) { + var t1, t2; + if (number.hasUnit$1("%")) + return; + t1 = number.toString$0(0); + t2 = A._removeUnits0(number); + A.EvaluationContext_current0().warn$2$deprecation(0, "$" + $name + ": Passing a number without unit % (" + t1 + string$.x29x20is_d + $name + t2 + " * 1%", true); + }, + _removeUnits0(number) { + var t2, + t1 = number.get$denominatorUnits(number); + t1 = new A.MappedListIterable(t1, new A._removeUnits_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = number.get$numeratorUnits(number); + return t1 + new A.MappedListIterable(t2, new A._removeUnits_closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + _hwb0($arguments) { + var _s9_ = "whiteness", + _s9_0 = "blackness", + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + hue = t1.$index($arguments, 0).assertNumber$1("hue"), + whiteness = t1.$index($arguments, 1).assertNumber$1(_s9_), + blackness = t1.$index($arguments, 2).assertNumber$1(_s9_0); + A._checkAngle0(hue, "hue"); + whiteness.assertUnit$2("%", _s9_); + blackness.assertUnit$2("%", _s9_0); + return A.SassColor_SassColor$hwb0(hue._number1$_value, whiteness.valueInRange$3(0, 100, _s9_), blackness.valueInRange$3(0, 100, _s9_0), A.NullableExtension_andThen0(alpha, new A._hwb_closure0())); + }, + _parseChannels0($name, argumentNames, channels) { + var list, t1, channels0, alphaFromSlashList, isCommaSeparated, isBracketed, buffer, maybeSlashSeparated, slash, _null = null, + _s17_ = "$channels must be"; + if (channels.get$isVar()) + return A._functionString0($name, A._setArrayType([channels], type$.JSArray_Value_2)); + if (channels.get$separator(channels) === B.ListSeparator_zg90) { + list = channels.get$asList(); + t1 = list.length; + if (t1 !== 2) + throw A.wrapException(A.SassScriptException$0(string$.Only_2 + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", _null)); + channels0 = list[0]; + alphaFromSlashList = list[1]; + if (!alphaFromSlashList.get$isSpecialNumber()) + alphaFromSlashList.assertNumber$1("alpha"); + if (list[0].get$isVar()) + return A._functionString0($name, A._setArrayType([channels], type$.JSArray_Value_2)); + } else { + alphaFromSlashList = _null; + channels0 = channels; + } + isCommaSeparated = channels0.get$separator(channels0) === B.ListSeparator_rXA0; + isBracketed = channels0.get$hasBrackets(); + if (isCommaSeparated || isBracketed) { + buffer = new A.StringBuffer(_s17_); + if (isBracketed) { + t1 = _s17_ + " an unbracketed"; + buffer._contents = t1; + } else + t1 = _s17_; + if (isCommaSeparated) { + t1 += isBracketed ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-separated"; + } + buffer._contents = t1 + " list."; + throw A.wrapException(A.SassScriptException$0(buffer.toString$0(0), _null)); + } + list = channels0.get$asList(); + t1 = list.length; + if (t1 > 3) + throw A.wrapException(A.SassScriptException$0("Only 3 elements allowed, but " + t1 + " were passed.", _null)); + else if (t1 < 3) { + if (!B.JSArray_methods.any$1(list, new A._parseChannels_closure0())) + if (list.length !== 0) { + t1 = B.JSArray_methods.get$last(list); + if (t1 instanceof A.SassString0) + if (t1._string0$_hasQuotes) { + t1 = t1._string0$_text; + t1 = A.startsWithIgnoreCase0(t1, "var(") && B.JSString_methods.contains$1(t1, "/"); + } else + t1 = false; + else + t1 = false; + } else + t1 = false; + else + t1 = true; + if (t1) + return A._functionString0($name, A._setArrayType([channels], type$.JSArray_Value_2)); + else + throw A.wrapException(A.SassScriptException$0("Missing element " + argumentNames[list.length] + ".", _null)); + } + if (alphaFromSlashList != null) { + t1 = A.List_List$of(list, true, type$.Value_2); + t1.push(alphaFromSlashList); + return t1; + } + maybeSlashSeparated = list[2]; + if (maybeSlashSeparated instanceof A.SassNumber0) { + slash = maybeSlashSeparated.asSlash; + if (slash == null) + return list; + return A._setArrayType([list[0], list[1], slash.item1, slash.item2], type$.JSArray_Value_2); + } else if (maybeSlashSeparated instanceof A.SassString0 && !maybeSlashSeparated._string0$_hasQuotes && B.JSString_methods.contains$1(maybeSlashSeparated._string0$_text, "/")) + return A._functionString0($name, A._setArrayType([channels0], type$.JSArray_Value_2)); + else + return list; + }, + _percentageOrUnitless0(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number1$_value; + else if (number.hasUnit$1("%")) + value = max * number._number1$_value / 100; + else + throw A.wrapException(A.SassScriptException$0("$" + $name + ": Expected " + number.toString$0(0) + ' to have no units or "%".', null)); + return B.JSNumber_methods.clamp$2(value, 0, max); + }, + _mixColors0(color1, color2, weight) { + var weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1._color1$_alpha, + t2 = color2._color1$_alpha, + alphaDistance = t1 - t2, + t3 = normalizedWeight * alphaDistance, + weight1 = ((t3 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t3)) + 1) / 2, + weight2 = 1 - weight1; + return A.SassColor$rgb0(A.fuzzyRound0(color1.get$red(color1) * weight1 + color2.get$red(color2) * weight2), A.fuzzyRound0(color1.get$green(color1) * weight1 + color2.get$green(color2) * weight2), A.fuzzyRound0(color1.get$blue(color1) * weight1 + color2.get$blue(color2) * weight2), t1 * weightScale + t2 * (1 - weightScale)); + }, + _opacify0($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"); + return color.changeAlpha$1(B.JSNumber_methods.clamp$2(color._color1$_alpha + t1.$index($arguments, 1).assertNumber$1("amount").valueInRangeWithUnit$4(0, 1, "amount", ""), 0, 1)); + }, + _transparentize0($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"); + return color.changeAlpha$1(B.JSNumber_methods.clamp$2(color._color1$_alpha - t1.$index($arguments, 1).assertNumber$1("amount").valueInRangeWithUnit$4(0, 1, "amount", ""), 0, 1)); + }, + _function11($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:color"); + }, + global_closure30: function global_closure30() { + }, + global_closure31: function global_closure31() { + }, + global_closure32: function global_closure32() { + }, + global_closure33: function global_closure33() { + }, + global_closure34: function global_closure34() { + }, + global_closure35: function global_closure35() { + }, + global_closure36: function global_closure36() { + }, + global_closure37: function global_closure37() { + }, + global_closure38: function global_closure38() { + }, + global_closure39: function global_closure39() { + }, + global_closure40: function global_closure40() { + }, + global_closure41: function global_closure41() { + }, + global_closure42: function global_closure42() { + }, + global_closure43: function global_closure43() { + }, + global_closure44: function global_closure44() { + }, + global_closure45: function global_closure45() { + }, + global_closure46: function global_closure46() { + }, + global_closure47: function global_closure47() { + }, + global_closure48: function global_closure48() { + }, + global_closure49: function global_closure49() { + }, + global_closure50: function global_closure50() { + }, + global_closure51: function global_closure51() { + }, + global_closure52: function global_closure52() { + }, + global_closure53: function global_closure53() { + }, + global_closure54: function global_closure54() { + }, + global_closure55: function global_closure55() { + }, + global__closure0: function global__closure0() { + }, + global_closure56: function global_closure56() { + }, + module_closure8: function module_closure8() { + }, + module_closure9: function module_closure9() { + }, + module_closure10: function module_closure10() { + }, + module_closure11: function module_closure11() { + }, + module_closure12: function module_closure12() { + }, + module_closure13: function module_closure13() { + }, + module_closure14: function module_closure14() { + }, + module_closure15: function module_closure15() { + }, + module__closure0: function module__closure0() { + }, + module_closure16: function module_closure16() { + }, + _red_closure0: function _red_closure0() { + }, + _green_closure0: function _green_closure0() { + }, + _blue_closure0: function _blue_closure0() { + }, + _mix_closure0: function _mix_closure0() { + }, + _hue_closure0: function _hue_closure0() { + }, + _saturation_closure0: function _saturation_closure0() { + }, + _lightness_closure0: function _lightness_closure0() { + }, + _complement_closure0: function _complement_closure0() { + }, + _adjust_closure0: function _adjust_closure0() { + }, + _scale_closure0: function _scale_closure0() { + }, + _change_closure0: function _change_closure0() { + }, + _ieHexStr_closure0: function _ieHexStr_closure0() { + }, + _ieHexStr_closure_hexString0: function _ieHexStr_closure_hexString0() { + }, + _updateComponents_getParam0: function _updateComponents_getParam0(t0, t1, t2) { + this.keywords = t0; + this.scale = t1; + this.change = t2; + }, + _updateComponents_closure0: function _updateComponents_closure0() { + }, + _updateComponents_updateValue0: function _updateComponents_updateValue0(t0, t1) { + this.change = t0; + this.adjust = t1; + }, + _updateComponents_updateRgb0: function _updateComponents_updateRgb0(t0) { + this.updateValue = t0; + }, + _functionString_closure0: function _functionString_closure0() { + }, + _removedColorFunction_closure0: function _removedColorFunction_closure0(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure0: function _rgb_closure0() { + }, + _hsl_closure0: function _hsl_closure0() { + }, + _removeUnits_closure1: function _removeUnits_closure1() { + }, + _removeUnits_closure2: function _removeUnits_closure2() { + }, + _hwb_closure0: function _hwb_closure0() { + }, + _parseChannels_closure0: function _parseChannels_closure0() { + }, + _NodeSassColor: function _NodeSassColor() { + }, + legacyColorClass_closure: function legacyColorClass_closure() { + }, + legacyColorClass_closure0: function legacyColorClass_closure0() { + }, + legacyColorClass_closure1: function legacyColorClass_closure1() { + }, + legacyColorClass_closure2: function legacyColorClass_closure2() { + }, + legacyColorClass_closure3: function legacyColorClass_closure3() { + }, + legacyColorClass_closure4: function legacyColorClass_closure4() { + }, + legacyColorClass_closure5: function legacyColorClass_closure5() { + }, + legacyColorClass_closure6: function legacyColorClass_closure6() { + }, + legacyColorClass_closure7: function legacyColorClass_closure7() { + }, + colorClass_closure: function colorClass_closure() { + }, + colorClass__closure: function colorClass__closure() { + }, + colorClass__closure0: function colorClass__closure0() { + }, + colorClass__closure1: function colorClass__closure1() { + }, + colorClass__closure2: function colorClass__closure2() { + }, + colorClass__closure3: function colorClass__closure3() { + }, + colorClass__closure4: function colorClass__closure4() { + }, + colorClass__closure5: function colorClass__closure5() { + }, + colorClass__closure6: function colorClass__closure6() { + }, + colorClass__closure7: function colorClass__closure7() { + }, + colorClass__closure8: function colorClass__closure8() { + }, + colorClass__closure9: function colorClass__closure9() { + }, + _Channels: function _Channels() { + }, + SassColor$rgb0(red, green, blue, alpha) { + var _null = null, + t1 = new A.SassColor0(red, green, blue, _null, _null, _null, alpha == null ? 1 : A.fuzzyAssertRange0(alpha, 0, 1, "alpha"), _null); + A.RangeError_checkValueInInterval(t1.get$red(t1), 0, 255, "red"); + A.RangeError_checkValueInInterval(t1.get$green(t1), 0, 255, "green"); + A.RangeError_checkValueInInterval(t1.get$blue(t1), 0, 255, "blue"); + return t1; + }, + SassColor$rgbInternal0(_red, _green, _blue, alpha, format) { + var t1 = new A.SassColor0(_red, _green, _blue, null, null, null, alpha == null ? 1 : A.fuzzyAssertRange0(alpha, 0, 1, "alpha"), format); + A.RangeError_checkValueInInterval(t1.get$red(t1), 0, 255, "red"); + A.RangeError_checkValueInInterval(t1.get$green(t1), 0, 255, "green"); + A.RangeError_checkValueInInterval(t1.get$blue(t1), 0, 255, "blue"); + return t1; + }, + SassColor$hsl(hue, saturation, lightness, alpha) { + var _null = null, + t1 = B.JSNumber_methods.$mod(hue, 360), + t2 = A.fuzzyAssertRange0(saturation, 0, 100, "saturation"), + t3 = A.fuzzyAssertRange0(lightness, 0, 100, "lightness"); + return new A.SassColor0(_null, _null, _null, t1, t2, t3, alpha == null ? 1 : A.fuzzyAssertRange0(alpha, 0, 1, "alpha"), _null); + }, + SassColor$hslInternal0(hue, saturation, lightness, alpha, format) { + var t1 = B.JSNumber_methods.$mod(hue, 360), + t2 = A.fuzzyAssertRange0(saturation, 0, 100, "saturation"), + t3 = A.fuzzyAssertRange0(lightness, 0, 100, "lightness"); + return new A.SassColor0(null, null, null, t1, t2, t3, alpha == null ? 1 : A.fuzzyAssertRange0(alpha, 0, 1, "alpha"), format); + }, + SassColor_SassColor$hwb0(hue, whiteness, blackness, alpha) { + var t2, t1 = {}, + scaledHue = B.JSNumber_methods.$mod(hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = A.fuzzyAssertRange0(whiteness, 0, 100, "whiteness") / 100, + scaledBlackness = A.fuzzyAssertRange0(blackness, 0, 100, "blackness") / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t2 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t2 = scaledWhiteness; + t2 = new A.SassColor_SassColor$hwb_toRgb0(t1, 1 - t2 - scaledBlackness); + return A.SassColor$rgb0(t2.call$1(scaledHue + 0.3333333333333333), t2.call$1(scaledHue), t2.call$1(scaledHue - 0.3333333333333333), alpha); + }, + SassColor__hueToRgb0(m1, m2, hue) { + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + if (hue < 0.16666666666666666) + return m1 + (m2 - m1) * hue * 6; + else if (hue < 0.5) + return m2; + else if (hue < 0.6666666666666666) + return m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + else + return m1; + }, + SassColor0: function SassColor0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._color1$_red = t0; + _._color1$_green = t1; + _._color1$_blue = t2; + _._color1$_hue = t3; + _._color1$_saturation = t4; + _._color1$_lightness = t5; + _._color1$_alpha = t6; + _.format = t7; + }, + SassColor_SassColor$hwb_toRgb0: function SassColor_SassColor$hwb_toRgb0(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + _ColorFormatEnum0: function _ColorFormatEnum0(t0) { + this._color1$_name = t0; + }, + SpanColorFormat0: function SpanColorFormat0(t0) { + this._color1$_span = t0; + }, + Combinator0: function Combinator0(t0, t1) { + this._combinator0$_text = t0; + this._name = t1; + }, + ModifiableCssComment0: function ModifiableCssComment0(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + compile0(path, options) { + var result, error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, exception, _null = null, + t1 = options == null, + color0 = t1 ? _null : J.get$alertColor$x(options), + color = color0 == null ? J.$eq$(self.process.stdout.isTTY, true) : color0, + ascii0 = t1 ? _null : J.get$alertAscii$x(options), + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; + try { + t2 = t1 ? _null : J.get$loadPaths$x(options); + t3 = t1 ? _null : J.get$quietDeps$x(options); + if (t3 == null) + t3 = false; + t4 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t5 = t1 ? _null : J.get$verbose$x(options); + if (t5 == null) + t5 = false; + t6 = t1 ? _null : J.get$charset$x(options); + if (t6 == null) + t6 = true; + t7 = t1 ? _null : J.get$sourceMap$x(options); + if (t7 == null) + t7 = false; + t8 = t1 ? _null : J.get$logger$x(options); + t9 = ascii; + if (t9 == null) + t9 = $._glyphs === B.C_AsciiGlyphSet; + t9 = new A.NodeToDartLogger(t8, new A.StderrLogger0(color), t9); + if (t1) + t8 = _null; + else { + t8 = J.get$importers$x(options); + t8 = t8 == null ? _null : J.map$1$1$ax(t8, A.compile___parseImporter$closure(), type$.Importer); + } + t10 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + result = A.compile(path, t6, new A.CastList(t10, A._arrayInstanceType(t10)._eval$1("CastList<1,Callable0>")), A.ImportCache$0(t8, t2, t9, _null), _null, _null, t9, _null, t3, t7, t4, _null, true, t5); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileString0(text, options) { + var result, error, stackTrace, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, exception, _null = null, + t1 = options == null, + color0 = t1 ? _null : J.get$alertColor$x(options), + color = color0 == null ? J.$eq$(self.process.stdout.isTTY, true) : color0, + ascii0 = t1 ? _null : J.get$alertAscii$x(options), + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; + try { + t2 = A.parseSyntax(t1 ? _null : J.get$syntax$x(options)); + t3 = t1 ? _null : A.NullableExtension_andThen0(J.get$url$x(options), A.utils1__jsToDartUrl$closure()); + t4 = t1 ? _null : J.get$loadPaths$x(options); + t5 = t1 ? _null : J.get$quietDeps$x(options); + if (t5 == null) + t5 = false; + t6 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t7 = t1 ? _null : J.get$verbose$x(options); + if (t7 == null) + t7 = false; + t8 = t1 ? _null : J.get$charset$x(options); + if (t8 == null) + t8 = true; + t9 = t1 ? _null : J.get$sourceMap$x(options); + if (t9 == null) + t9 = false; + t10 = t1 ? _null : J.get$logger$x(options); + t11 = ascii; + if (t11 == null) + t11 = $._glyphs === B.C_AsciiGlyphSet; + t11 = new A.NodeToDartLogger(t10, new A.StderrLogger0(color), t11); + if (t1) + t10 = _null; + else { + t10 = J.get$importers$x(options); + t10 = t10 == null ? _null : J.map$1$1$ax(t10, A.compile___parseImporter$closure(), type$.Importer); + } + t12 = t1 ? _null : A.NullableExtension_andThen0(J.get$importer$x(options), A.compile___parseImporter$closure()); + if (t12 == null) + t12 = (t1 ? _null : J.get$url$x(options)) == null ? new A.NoOpImporter() : _null; + t13 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + result = A.compileString(text, t8, new A.CastList(t13, A._arrayInstanceType(t13)._eval$1("CastList<1,Callable0>")), A.ImportCache$0(t10, t4, t11, _null), t12, _null, _null, t11, _null, t5, t9, t6, t2, t3, true, t7); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileAsync1(path, options) { + var ascii, + t1 = options == null, + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = J.$eq$(self.process.stdout.isTTY, true); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileAsync_closure(path, color, options, ascii).call$0()), ascii, color); + }, + compileStringAsync1(text, options) { + var ascii, + t1 = options == null, + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = J.$eq$(self.process.stdout.isTTY, true); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileStringAsync_closure(text, options, color, ascii).call$0()), ascii, color); + }, + _convertResult(result, includeSourceContents) { + var loadedUrls, + t1 = result._compile_result$_serialize, + t2 = t1.sourceMap, + sourceMap = t2 == null ? null : t2.toJson$1$includeSourceContents(includeSourceContents); + if (type$.Map_String_dynamic._is(sourceMap) && !sourceMap.containsKey$1("sources")) + sourceMap.$indexSet(0, "sources", A._setArrayType([], type$.JSArray_String)); + t2 = result._evaluate.loadedUrls; + loadedUrls = A.toJSArray(new A.EfficientLengthMappedIterable(t2, A.utils1__dartToJSUrl$closure(), A._instanceType(t2)._eval$1("EfficientLengthMappedIterable<1,Object?>"))); + t1 = t1.css; + return sourceMap == null ? {css: t1, loadedUrls: loadedUrls} : {css: t1, sourceMap: A.jsify(sourceMap), loadedUrls: loadedUrls}; + }, + _wrapAsyncSassExceptions(promise, ascii, color) { + return J.then$2$x(promise, null, A.allowInterop(new A._wrapAsyncSassExceptions_closure(color, ascii))); + }, + _parseOutputStyle0(style) { + if (style == null || style === "expanded") + return B.OutputStyle_00; + if (style === "compressed") + return B.OutputStyle_10; + A.jsThrow(new self.Error('Unknown output style "' + A.S(style) + '".')); + }, + _parseAsyncImporter(importer) { + var t1, findFileUrl, canonicalize, load; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.NodeImporter._as(importer); + t1 = J.getInterceptor$x(importer); + findFileUrl = t1.get$findFileUrl(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + if (findFileUrl == null) { + if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + return new A.NodeToDartAsyncImporter(canonicalize, load); + } else if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.NodeToDartAsyncFileImporter(findFileUrl); + }, + _parseImporter0(importer) { + var t1, findFileUrl, canonicalize, load; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.NodeImporter._as(importer); + t1 = J.getInterceptor$x(importer); + findFileUrl = t1.get$findFileUrl(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + if (findFileUrl == null) { + if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + return new A.NodeToDartImporter(canonicalize, load); + } else if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.NodeToDartFileImporter(findFileUrl); + }, + _parseFunctions0(functions, asynch) { + var result; + if (functions == null) + return B.List_empty24; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure0(asynch, result)); + return result; + }, + compileAsync_closure: function compileAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.path = t0; + _.color = t1; + _.options = t2; + _.ascii = t3; + }, + compileAsync__closure: function compileAsync__closure() { + }, + compileStringAsync_closure: function compileStringAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.options = t1; + _.color = t2; + _.ascii = t3; + }, + compileStringAsync__closure: function compileStringAsync__closure() { + }, + compileStringAsync__closure0: function compileStringAsync__closure0() { + }, + _wrapAsyncSassExceptions_closure: function _wrapAsyncSassExceptions_closure(t0, t1) { + this.color = t0; + this.ascii = t1; + }, + _parseFunctions_closure0: function _parseFunctions_closure0(t0, t1) { + this.asynch = t0; + this.result = t1; + }, + _parseFunctions__closure2: function _parseFunctions__closure2(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + _parseFunctions__closure3: function _parseFunctions__closure3(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + compile(path, charset, functions, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, sourceMap, style, syntax, useSpaces, verbose) { + var terseLogger, t1, t2, t3, stylesheet, t4, result, _null = null; + if (!verbose) { + terseLogger = new A.TerseLogger0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = _null; + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + if (t2) { + if (importCache == null) + importCache = A.ImportCache$none(logger); + t2 = $.$get$context(); + t3 = t2.absolute$7(".", _null, _null, _null, _null, _null, _null); + t3 = importCache.importCanonical$3$originalUrl(new A.FilesystemImporter0(t3), t2.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath0(t2.absolute$7(t2.normalize$1(path), _null, _null, _null, _null, _null, _null)) : t2.canonicalize$1(0, path)), t2.toUri$1(path)); + t3.toString; + stylesheet = t3; + } else { + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + t4 = $.$get$context(); + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, logger, t4.toUri$1(path)); + t2 = t4; + } + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, new A.FilesystemImporter0(t2.absolute$7(".", _null, _null, _null, _null, _null, _null)), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + if (terseLogger != null) + terseLogger.summarize$1$node(!t1); + return result; + }, + compileString(source, charset, functions, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, sourceMap, style, syntax, url, useSpaces, verbose) { + var terseLogger, stylesheet, result, _null = null; + if (!verbose) { + terseLogger = new A.TerseLogger0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.int), logger); + logger = terseLogger; + } else + terseLogger = _null; + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, logger, url); + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, importer == null ? new A.FilesystemImporter0($.$get$context().absolute$7(".", _null, _null, _null, _null, _null, _null)) : importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + if (terseLogger != null) + terseLogger.summarize$1$node(nodeImporter != null); + return result; + }, + _compileStylesheet1(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var evaluateResult = A._EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), + serializeResult = A.serialize0(evaluateResult.stylesheet, charset, indentWidth, false, lineFeed, sourceMap, style, useSpaces), + resultSourceMap = serializeResult.sourceMap; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure1(stylesheet, importCache)); + return new A.CompileResult0(evaluateResult, serializeResult); + }, + _compileStylesheet_closure1: function _compileStylesheet_closure1(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileOptions: function CompileOptions() { + }, + CompileStringOptions: function CompileStringOptions() { + }, + NodeCompileResult: function NodeCompileResult() { + }, + CompileResult0: function CompileResult0(t0, t1) { + this._evaluate = t0; + this._compile_result$_serialize = t1; + }, + ComplexSassNumber0: function ComplexSassNumber0(t0, t1, t2, t3) { + var _ = this; + _._complex0$_numeratorUnits = t0; + _._complex0$_denominatorUnits = t1; + _._number1$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + ComplexSelector$0(leadingCombinators, components, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.Combinator_2), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent_2); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector0(t1, t2, lineBreak); + }, + ComplexSelector0: function ComplexSelector0(t0, t1, t2) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _._complex$__ComplexSelector_specificity_FI = $; + }, + ComplexSelector_specificity_closure0: function ComplexSelector_specificity_closure0() { + }, + ComplexSelectorComponent0: function ComplexSelectorComponent0(t0, t1) { + this.selector = t0; + this.combinators = t1; + }, + ComplexSelectorComponent_toString_closure0: function ComplexSelectorComponent_toString_closure0() { + }, + CompoundSelector$0(components) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector0(t1); + }, + CompoundSelector0: function CompoundSelector0(t0) { + this.components = t0; + this._compound$__CompoundSelector_specificity_FI = $; + }, + CompoundSelector_specificity_closure0: function CompoundSelector_specificity_closure0() { + }, + Configuration0: function Configuration0(t0, t1) { + this._configuration$_values = t0; + this._configuration$__originalConfiguration = t1; + }, + Configuration_toString_closure0: function Configuration_toString_closure0() { + }, + ExplicitConfiguration0: function ExplicitConfiguration0(t0, t1, t2) { + this.nodeWithSpan = t0; + this._configuration$_values = t1; + this._configuration$__originalConfiguration = t2; + }, + ConfiguredValue0: function ConfiguredValue0(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + ConfiguredVariable0: function ConfiguredVariable0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + ContentBlock$0($arguments, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.ContentBlock0("@content", $arguments, span, t1, t2); + }, + ContentBlock0: function ContentBlock0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + ContentRule0: function ContentRule0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + _disallowedFunctionNames_closure0: function _disallowedFunctionNames_closure0() { + }, + CssParser0: function CssParser0(t0, t1, t2) { + var _ = this; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + DebugRule0: function DebugRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ModifiableCssDeclaration$0($name, value, span, parsedAsCustomProperty, valueSpanForMap) { + var t1 = valueSpanForMap == null ? value.get$span(value) : valueSpanForMap; + if (parsedAsCustomProperty) + if (!J.startsWith$1$s($name.get$value($name), "--")) + A.throwExpression(A.ArgumentError$(string$.parsed, null)); + else if (!(value.get$value(value) instanceof A.SassString0)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeType(value.get$value(value)).toString$0(0) + ").", null)); + return new A.ModifiableCssDeclaration0($name, value, parsedAsCustomProperty, t1, span); + }, + ModifiableCssDeclaration0: function ModifiableCssDeclaration0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsCustomProperty = t2; + _.valueSpanForMap = t3; + _.span = t4; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + Declaration$0($name, value, span) { + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--") && !(value instanceof A.StringExpression0)) + A.throwExpression(A.ArgumentError$(string$.Declarwu + value.toString$0(0) + "` of type " + value.get$runtimeType(value).toString$0(0) + ").", null)); + return new A.Declaration0($name, value, span, null, false); + }, + Declaration$nested0($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--") && !(value instanceof A.StringExpression0)) + A.throwExpression(A.ArgumentError$(string$.Declarwa, null)); + return new A.Declaration0($name, value, span, t1, t2); + }, + Declaration0: function Declaration0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + SupportsDeclaration0: function SupportsDeclaration0(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + DynamicImport0: function DynamicImport0(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + EachRule$0(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.EachRule0(t1, list, span, t2, t3); + }, + EachRule0: function EachRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure0: function EachRule_toString_closure0() { + }, + EmptyExtensionStore0: function EmptyExtensionStore0() { + }, + Environment$0() { + var t1 = type$.String, + t2 = type$.Module_Callable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.Callable_2, + t6 = type$.JSArray_Map_String_Callable_2; + return new A.Environment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + Environment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule1(environment, css, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6; + if (forwarded == null) + forwarded = B.Set_empty3; + t1 = A._EnvironmentModule__makeModulesByVariable1(forwarded); + t2 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure11(), type$.Map_String_Value_2), type$.Value_2); + t3 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure12(), type$.Map_String_AstNode_2), type$.AstNode_2); + t4 = type$.Map_String_Callable_2; + t5 = type$.Callable_2; + t6 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure13(), t4), t5); + t5 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure14(), t4), t5); + t4 = J.get$isNotEmpty$asx(css.get$children(css)) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure15()); + return A._EnvironmentModule$_1(environment, css, extensionStore, t1, t2, t3, t6, t5, t4, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure16())); + }, + _EnvironmentModule__makeModulesByVariable1(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty6; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule1) { + for (t3 = t2._environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment0$_environment._environment0$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap1(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_1(_environment, css, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule1(_environment._environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment0: function Environment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._environment0$_modules = t0; + _._environment0$_namespaceNodes = t1; + _._environment0$_globalModules = t2; + _._environment0$_importedModules = t3; + _._environment0$_forwardedModules = t4; + _._environment0$_nestedForwardedModules = t5; + _._environment0$_allModules = t6; + _._environment0$_variables = t7; + _._environment0$_variableNodes = t8; + _._environment0$_variableIndices = t9; + _._environment0$_functions = t10; + _._environment0$_functionIndices = t11; + _._environment0$_mixins = t12; + _._environment0$_mixinIndices = t13; + _._environment0$_content = t14; + _._environment0$_inMixin = false; + _._environment0$_inSemiGlobalScope = true; + _._environment0$_lastVariableIndex = _._environment0$_lastVariableName = null; + }, + Environment_importForwards_closure2: function Environment_importForwards_closure2() { + }, + Environment_importForwards_closure3: function Environment_importForwards_closure3() { + }, + Environment_importForwards_closure4: function Environment_importForwards_closure4() { + }, + Environment__getVariableFromGlobalModule_closure0: function Environment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure2: function Environment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure3: function Environment_setVariable_closure3(t0) { + this.name = t0; + }, + Environment_setVariable_closure4: function Environment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure0: function Environment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure0: function Environment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_toModule_closure0: function Environment_toModule_closure0() { + }, + Environment_toDummyModule_closure0: function Environment_toDummyModule_closure0() { + }, + Environment__fromOneModule_closure0: function Environment__fromOneModule_closure0(t0, t1) { + this.callback = t0; + this.T = t1; + }, + Environment__fromOneModule__closure0: function Environment__fromOneModule__closure0(t0, t1) { + this.entry = t0; + this.T = t1; + }, + _EnvironmentModule1: function _EnvironmentModule1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.transitivelyContainsCss = t7; + _.transitivelyContainsExtensions = t8; + _._environment0$_environment = t9; + _._environment0$_modulesByVariable = t10; + }, + _EnvironmentModule__EnvironmentModule_closure11: function _EnvironmentModule__EnvironmentModule_closure11() { + }, + _EnvironmentModule__EnvironmentModule_closure12: function _EnvironmentModule__EnvironmentModule_closure12() { + }, + _EnvironmentModule__EnvironmentModule_closure13: function _EnvironmentModule__EnvironmentModule_closure13() { + }, + _EnvironmentModule__EnvironmentModule_closure14: function _EnvironmentModule__EnvironmentModule_closure14() { + }, + _EnvironmentModule__EnvironmentModule_closure15: function _EnvironmentModule__EnvironmentModule_closure15() { + }, + _EnvironmentModule__EnvironmentModule_closure16: function _EnvironmentModule__EnvironmentModule_closure16() { + }, + ErrorRule0: function ErrorRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + _EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_Callable_2, + t3 = A._setArrayType([], type$.JSArray_Tuple2_String_AstNode_2); + if (nodeImporter == null) + t4 = importCache == null ? A.ImportCache$none(logger) : importCache; + else + t4 = null; + t1 = new A._EvaluateVisitor1(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Tuple2_String_SourceSpan), quietDeps, sourceMap, A.Environment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor1: function _EvaluateVisitor1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._evaluate0$_importCache = t0; + _._evaluate0$_nodeImporter = t1; + _._evaluate0$_builtInFunctions = t2; + _._evaluate0$_builtInModules = t3; + _._evaluate0$_modules = t4; + _._evaluate0$_moduleConfigurations = t5; + _._evaluate0$_moduleNodes = t6; + _._evaluate0$_logger = t7; + _._evaluate0$_warningsEmitted = t8; + _._evaluate0$_quietDeps = t9; + _._evaluate0$_sourceMap = t10; + _._evaluate0$_environment = t11; + _._evaluate0$_declarationName = _._evaluate0$__parent = _._evaluate0$_mediaQuerySources = _._evaluate0$_mediaQueries = _._evaluate0$_styleRuleIgnoringAtRoot = null; + _._evaluate0$_member = "root stylesheet"; + _._evaluate0$_importSpan = _._evaluate0$_callableNode = _._evaluate0$_currentCallable = null; + _._evaluate0$_inSupportsDeclaration = _._evaluate0$_inKeyframes = _._evaluate0$_atRootExcludingStyleRule = _._evaluate0$_inUnknownAtRule = _._evaluate0$_inFunction = false; + _._evaluate0$_loadedUrls = t12; + _._evaluate0$_activeModules = t13; + _._evaluate0$_stack = t14; + _._evaluate0$_importer = null; + _._evaluate0$_inDependency = false; + _._evaluate0$__extensionStore = _._evaluate0$_outOfOrderImports = _._evaluate0$__endOfImports = _._evaluate0$__root = _._evaluate0$__stylesheet = null; + _._evaluate0$_configuration = t15; + }, + _EvaluateVisitor_closure19: function _EvaluateVisitor_closure19(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure20: function _EvaluateVisitor_closure20(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure21: function _EvaluateVisitor_closure21(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure22: function _EvaluateVisitor_closure22(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure23: function _EvaluateVisitor_closure23(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure24: function _EvaluateVisitor_closure24(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure25: function _EvaluateVisitor_closure25(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure26: function _EvaluateVisitor_closure26(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure7: function _EvaluateVisitor__closure7(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure27: function _EvaluateVisitor_closure27(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure28: function _EvaluateVisitor_closure28(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure5: function _EvaluateVisitor__closure5(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure6: function _EvaluateVisitor__closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure1: function _EvaluateVisitor_run_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor__loadModule_closure3: function _EvaluateVisitor__loadModule_closure3(t0, t1) { + this.callback = t0; + this.builtInModule = t1; + }, + _EvaluateVisitor__loadModule_closure4: function _EvaluateVisitor__loadModule_closure4(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure1: function _EvaluateVisitor__loadModule__closure1(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__execute_closure1: function _EvaluateVisitor__execute_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + }, + _EvaluateVisitor__combineCss_closure5: function _EvaluateVisitor__combineCss_closure5() { + }, + _EvaluateVisitor__combineCss_closure6: function _EvaluateVisitor__combineCss_closure6(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_closure7: function _EvaluateVisitor__combineCss_closure7() { + }, + _EvaluateVisitor__extendModules_closure3: function _EvaluateVisitor__extendModules_closure3(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure4: function _EvaluateVisitor__extendModules_closure4() { + }, + _EvaluateVisitor__topologicalModules_visitModule1: function _EvaluateVisitor__topologicalModules_visitModule1(t0, t1) { + this.seen = t0; + this.sorted = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure5: function _EvaluateVisitor_visitAtRootRule_closure5(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure6: function _EvaluateVisitor_visitAtRootRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure7: function _EvaluateVisitor_visitAtRootRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure11: function _EvaluateVisitor__scopeForAtRoot_closure11(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure12: function _EvaluateVisitor__scopeForAtRoot_closure12(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure13: function _EvaluateVisitor__scopeForAtRoot_closure13(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure1: function _EvaluateVisitor__scopeForAtRoot__closure1(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure14: function _EvaluateVisitor__scopeForAtRoot_closure14(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure15: function _EvaluateVisitor__scopeForAtRoot_closure15() { + }, + _EvaluateVisitor__scopeForAtRoot_closure16: function _EvaluateVisitor__scopeForAtRoot_closure16(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure1: function _EvaluateVisitor_visitContentRule_closure1(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure3: function _EvaluateVisitor_visitDeclaration_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitDeclaration_closure4: function _EvaluateVisitor_visitDeclaration_closure4(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitEachRule_closure5: function _EvaluateVisitor_visitEachRule_closure5(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure6: function _EvaluateVisitor_visitEachRule_closure6(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure7: function _EvaluateVisitor_visitEachRule_closure7(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure1: function _EvaluateVisitor_visitEachRule__closure1(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure1: function _EvaluateVisitor_visitEachRule___closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitExtendRule_closure1: function _EvaluateVisitor_visitExtendRule_closure1(t0, t1) { + this.$this = t0; + this.targetText = t1; + }, + _EvaluateVisitor_visitAtRule_closure5: function _EvaluateVisitor_visitAtRule_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure6: function _EvaluateVisitor_visitAtRule_closure6(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule__closure1: function _EvaluateVisitor_visitAtRule__closure1(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure7: function _EvaluateVisitor_visitAtRule_closure7() { + }, + _EvaluateVisitor_visitForRule_closure9: function _EvaluateVisitor_visitForRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure10: function _EvaluateVisitor_visitForRule_closure10(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure11: function _EvaluateVisitor_visitForRule_closure11(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure12: function _EvaluateVisitor_visitForRule_closure12(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure13: function _EvaluateVisitor_visitForRule_closure13(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure1: function _EvaluateVisitor_visitForRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure3: function _EvaluateVisitor_visitForwardRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure4: function _EvaluateVisitor_visitForwardRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIfRule_closure1: function _EvaluateVisitor_visitIfRule_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitIfRule__closure1: function _EvaluateVisitor_visitIfRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure1: function _EvaluateVisitor__visitDynamicImport_closure1(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure7: function _EvaluateVisitor__visitDynamicImport__closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure8: function _EvaluateVisitor__visitDynamicImport__closure8() { + }, + _EvaluateVisitor__visitDynamicImport__closure9: function _EvaluateVisitor__visitDynamicImport__closure9() { + }, + _EvaluateVisitor__visitDynamicImport__closure10: function _EvaluateVisitor__visitDynamicImport__closure10(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.result = t1; + _.stylesheet = t2; + _.loadsUserDefinedModules = t3; + _.environment = t4; + _.children = t5; + }, + _EvaluateVisitor_visitIncludeRule_closure7: function _EvaluateVisitor_visitIncludeRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure8: function _EvaluateVisitor_visitIncludeRule_closure8(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure10: function _EvaluateVisitor_visitIncludeRule_closure10(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure9: function _EvaluateVisitor_visitIncludeRule_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpan = t3; + }, + _EvaluateVisitor_visitIncludeRule__closure1: function _EvaluateVisitor_visitIncludeRule__closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule___closure1: function _EvaluateVisitor_visitIncludeRule___closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitIncludeRule____closure1: function _EvaluateVisitor_visitIncludeRule____closure1(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitMediaRule_closure5: function _EvaluateVisitor_visitMediaRule_closure5(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure6: function _EvaluateVisitor_visitMediaRule_closure6(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure1: function _EvaluateVisitor_visitMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure1: function _EvaluateVisitor_visitMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure7: function _EvaluateVisitor_visitMediaRule_closure7(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor__visitMediaQueries_closure1: function _EvaluateVisitor__visitMediaQueries_closure1(t0, t1) { + this.$this = t0; + this.resolved = t1; + }, + _EvaluateVisitor_visitStyleRule_closure15: function _EvaluateVisitor_visitStyleRule_closure15(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure16: function _EvaluateVisitor_visitStyleRule_closure16(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure17: function _EvaluateVisitor_visitStyleRule_closure17() { + }, + _EvaluateVisitor_visitStyleRule_closure18: function _EvaluateVisitor_visitStyleRule_closure18(t0, t1) { + this.$this = t0; + this.selectorText = t1; + }, + _EvaluateVisitor_visitStyleRule_closure19: function _EvaluateVisitor_visitStyleRule_closure19(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitStyleRule_closure20: function _EvaluateVisitor_visitStyleRule_closure20(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure1: function _EvaluateVisitor_visitStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure21: function _EvaluateVisitor_visitStyleRule_closure21() { + }, + _EvaluateVisitor_visitStyleRule_closure22: function _EvaluateVisitor_visitStyleRule_closure22() { + }, + _EvaluateVisitor_visitSupportsRule_closure3: function _EvaluateVisitor_visitSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure1: function _EvaluateVisitor_visitSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure4: function _EvaluateVisitor_visitSupportsRule_closure4() { + }, + _EvaluateVisitor_visitVariableDeclaration_closure5: function _EvaluateVisitor_visitVariableDeclaration_closure5(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.override = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure6: function _EvaluateVisitor_visitVariableDeclaration_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure7: function _EvaluateVisitor_visitVariableDeclaration_closure7(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure1: function _EvaluateVisitor_visitUseRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure1: function _EvaluateVisitor_visitWarnRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure1: function _EvaluateVisitor_visitWhileRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure1: function _EvaluateVisitor_visitWhileRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure1: function _EvaluateVisitor_visitBinaryOperationExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation1: function _EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation1() { + }, + _EvaluateVisitor_visitVariableExpression_closure1: function _EvaluateVisitor_visitVariableExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure1: function _EvaluateVisitor_visitUnaryOperationExpression_closure1(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor__visitCalculationValue_closure1: function _EvaluateVisitor__visitCalculationValue_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.inMinMax = t2; + }, + _EvaluateVisitor_visitListExpression_closure1: function _EvaluateVisitor_visitListExpression_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure3: function _EvaluateVisitor_visitFunctionExpression_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure4: function _EvaluateVisitor_visitFunctionExpression_closure4(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure1: function _EvaluateVisitor__runUserDefinedCallable_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure1: function _EvaluateVisitor__runUserDefinedCallable__closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure1: function _EvaluateVisitor__runUserDefinedCallable___closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure1: function _EvaluateVisitor__runUserDefinedCallable____closure1() { + }, + _EvaluateVisitor__runFunctionCallable_closure1: function _EvaluateVisitor__runFunctionCallable_closure1(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure3: function _EvaluateVisitor__runBuiltInCallable_closure3(t0, t1, t2) { + this.overload = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure4: function _EvaluateVisitor__runBuiltInCallable_closure4() { + }, + _EvaluateVisitor__evaluateArguments_closure7: function _EvaluateVisitor__evaluateArguments_closure7() { + }, + _EvaluateVisitor__evaluateArguments_closure8: function _EvaluateVisitor__evaluateArguments_closure8(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure9: function _EvaluateVisitor__evaluateArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure10: function _EvaluateVisitor__evaluateArguments_closure10() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure7: function _EvaluateVisitor__evaluateMacroArguments_closure7(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure8: function _EvaluateVisitor__evaluateMacroArguments_closure8(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure9: function _EvaluateVisitor__evaluateMacroArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure10: function _EvaluateVisitor__evaluateMacroArguments_closure10(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure1: function _EvaluateVisitor__addRestMap_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure1: function _EvaluateVisitor__verifyArguments_closure1(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitStringExpression_closure1: function _EvaluateVisitor_visitStringExpression_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitCssAtRule_closure3: function _EvaluateVisitor_visitCssAtRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure4: function _EvaluateVisitor_visitCssAtRule_closure4() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure3: function _EvaluateVisitor_visitCssKeyframeBlock_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure4: function _EvaluateVisitor_visitCssKeyframeBlock_closure4() { + }, + _EvaluateVisitor_visitCssMediaRule_closure5: function _EvaluateVisitor_visitCssMediaRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure6: function _EvaluateVisitor_visitCssMediaRule_closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure1: function _EvaluateVisitor_visitCssMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure1: function _EvaluateVisitor_visitCssMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure7: function _EvaluateVisitor_visitCssMediaRule_closure7(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure3: function _EvaluateVisitor_visitCssStyleRule_closure3(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure1: function _EvaluateVisitor_visitCssStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure4: function _EvaluateVisitor_visitCssStyleRule_closure4() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure3: function _EvaluateVisitor_visitCssSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure1: function _EvaluateVisitor_visitCssSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure4: function _EvaluateVisitor_visitCssSupportsRule_closure4() { + }, + _EvaluateVisitor__performInterpolation_closure1: function _EvaluateVisitor__performInterpolation_closure1(t0, t1, t2) { + this.$this = t0; + this.warnForColor = t1; + this.interpolation = t2; + }, + _EvaluateVisitor__serialize_closure1: function _EvaluateVisitor__serialize_closure1(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure1: function _EvaluateVisitor__expressionNode_closure1(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation1: function _EvaluateVisitor__withoutSlash_recommendation1() { + }, + _EvaluateVisitor__stackFrame_closure1: function _EvaluateVisitor__stackFrame_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor__stackTrace_closure1: function _EvaluateVisitor__stackTrace_closure1(t0) { + this.$this = t0; + }, + _ImportedCssVisitor1: function _ImportedCssVisitor1(t0) { + this._evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure1: function _ImportedCssVisitor_visitCssAtRule_closure1() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure1: function _ImportedCssVisitor_visitCssMediaRule_closure1(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure1: function _ImportedCssVisitor_visitCssStyleRule_closure1() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure1: function _ImportedCssVisitor_visitCssSupportsRule_closure1() { + }, + _EvaluationContext1: function _EvaluationContext1(t0, t1) { + this._evaluate0$_visitor = t0; + this._evaluate0$_defaultWarnNodeWithSpan = t1; + }, + _ArgumentResults1: function _ArgumentResults1(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.positionalNodes = t1; + _.named = t2; + _.namedNodes = t3; + _.separator = t4; + }, + _LoadedStylesheet1: function _LoadedStylesheet1(t0, t1, t2) { + this.stylesheet = t0; + this.importer = t1; + this.isDependency = t2; + }, + EveryCssVisitor0: function EveryCssVisitor0() { + }, + EveryCssVisitor_visitCssAtRule_closure0: function EveryCssVisitor_visitCssAtRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure0: function EveryCssVisitor_visitCssKeyframeBlock_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure0: function EveryCssVisitor_visitCssMediaRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure0: function EveryCssVisitor_visitCssStyleRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure0: function EveryCssVisitor_visitCssStylesheet_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure0: function EveryCssVisitor_visitCssSupportsRule_closure0(t0) { + this.$this = t0; + }, + throwNodeException(exception, ascii, color, trace) { + var wasAscii, jsException, t1, trace0; + trace = trace; + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = A.callConstructor($.$get$exceptionClass(), [exception, B.JSString_methods.replaceFirst$2(exception.toString$1$color(0, color), "Error: ", "")]); + jsException = type$._NodeException._as(t1); + trace0 = A.getTrace0(exception); + trace = trace0 == null ? trace : trace0; + if (trace != null) + A.attachJsStack(jsException, trace); + A.jsThrow(jsException); + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _NodeException: function _NodeException() { + }, + exceptionClass_closure: function exceptionClass_closure() { + }, + exceptionClass__closure: function exceptionClass__closure() { + }, + exceptionClass__closure0: function exceptionClass__closure0() { + }, + exceptionClass__closure1: function exceptionClass__closure1() { + }, + SassException$0(message, span) { + return new A.SassException0(message, span); + }, + MultiSpanSassRuntimeException$0(message, span, primaryLabel, secondarySpans, trace) { + return new A.MultiSpanSassRuntimeException0(trace, primaryLabel, A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String), message, span); + }, + SassFormatException$0(message, span) { + return new A.SassFormatException0(message, span); + }, + SassScriptException$0(message, argumentName) { + return new A.SassScriptException0(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$0(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException0(primaryLabel, t1, message); + }, + SassException0: function SassException0(t0, t1) { + this._span_exception$_message = t0; + this._span = t1; + }, + MultiSpanSassException0: function MultiSpanSassException0(t0, t1, t2, t3) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + SassRuntimeException0: function SassRuntimeException0(t0, t1, t2) { + this.trace = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassRuntimeException0: function MultiSpanSassRuntimeException0(t0, t1, t2, t3, t4) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassFormatException0: function SassFormatException0(t0, t1) { + this._span_exception$_message = t0; + this._span = t1; + }, + SassScriptException0: function SassScriptException0(t0) { + this.message = t0; + }, + MultiSpanSassScriptException0: function MultiSpanSassScriptException0(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + Exports: function Exports() { + }, + LoggerNamespace: function LoggerNamespace() { + }, + ExtendRule0: function ExtendRule0(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + Extension0: function Extension0(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender0: function Extender0(t0, t1, t2) { + var _ = this; + _.selector = t0; + _.isOriginal = t1; + _._extension$_extension = null; + _.span = t2; + }, + ExtensionStore__extendOrReplace0(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, t9, compound, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode0(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true0)) + extender._extension_store$_originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = type$.SimpleSelector_2, t8 = type$.Map_ComplexSelector_Extension_2, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t9 = complex.components; + t9 = t9.length === 1 && B.JSArray_methods.get$first(t9).combinators.length === 0; + } else + t9 = false; + compound = t9 ? B.JSArray_methods.get$first(complex.components).selector : null; + if (compound == null) + throw A.wrapException(A.SassScriptException$0("Can't extend complex selector " + A.S(complex) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender0(complex, false, span); + t14 = new A.Extension0(t13, simple, null, true, span); + t13._extension$_extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extension_store$_extendList$3(selector, span, t9); + } + return selector; + }, + ExtensionStore$0() { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableCssValue_SelectorList_2, type$.List_CssMediaQuery_2), new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), B.ExtendMode_normal_normal0); + }, + ExtensionStore$_mode0(_mode) { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableCssValue_SelectorList_2, type$.List_CssMediaQuery_2), new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), _mode); + }, + ExtensionStore0: function ExtensionStore0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._extension_store$_selectors = t0; + _._extension_store$_extensions = t1; + _._extension_store$_extensionsByExtender = t2; + _._extension_store$_mediaContexts = t3; + _._extension_store$_sourceSpecificity = t4; + _._extension_store$_originals = t5; + _._extension_store$_mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure0: function ExtensionStore_extensionsWhereTarget_closure0() { + }, + ExtensionStore__registerSelector_closure0: function ExtensionStore__registerSelector_closure0() { + }, + ExtensionStore_addExtension_closure2: function ExtensionStore_addExtension_closure2() { + }, + ExtensionStore_addExtension_closure3: function ExtensionStore_addExtension_closure3() { + }, + ExtensionStore_addExtension_closure4: function ExtensionStore_addExtension_closure4(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure1: function ExtensionStore__extendExistingExtensions_closure1() { + }, + ExtensionStore__extendExistingExtensions_closure2: function ExtensionStore__extendExistingExtensions_closure2() { + }, + ExtensionStore_addExtensions_closure1: function ExtensionStore_addExtensions_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + ExtensionStore_addExtensions__closure4: function ExtensionStore_addExtensions__closure4(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.existingSources = t1; + _.extensionsForTarget = t2; + _.selectorsForTarget = t3; + _.target = t4; + }, + ExtensionStore_addExtensions___closure0: function ExtensionStore_addExtensions___closure0() { + }, + ExtensionStore_addExtensions_closure2: function ExtensionStore_addExtensions_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + ExtensionStore_addExtensions__closure2: function ExtensionStore_addExtensions__closure2(t0, t1) { + this.$this = t0; + this.newExtensions = t1; + }, + ExtensionStore_addExtensions__closure3: function ExtensionStore_addExtensions__closure3(t0, t1) { + this.$this = t0; + this.newExtensions = t1; + }, + ExtensionStore__extendComplex_closure0: function ExtensionStore__extendComplex_closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure0: function ExtensionStore__extendComplex__closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure2: function ExtensionStore__extendCompound_closure2() { + }, + ExtensionStore__extendCompound_closure3: function ExtensionStore__extendCompound_closure3() { + }, + ExtensionStore__extendCompound_closure4: function ExtensionStore__extendCompound_closure4(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo0: function ExtensionStore__extendSimple_withoutPseudo0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.extensions = t1; + _.targetsUsed = t2; + _.simpleSpan = t3; + }, + ExtensionStore__extendSimple_closure1: function ExtensionStore__extendSimple_closure1(t0, t1, t2) { + this.$this = t0; + this.withoutPseudo = t1; + this.simpleSpan = t2; + }, + ExtensionStore__extendSimple_closure2: function ExtensionStore__extendSimple_closure2() { + }, + ExtensionStore__extendPseudo_closure4: function ExtensionStore__extendPseudo_closure4() { + }, + ExtensionStore__extendPseudo_closure5: function ExtensionStore__extendPseudo_closure5() { + }, + ExtensionStore__extendPseudo_closure6: function ExtensionStore__extendPseudo_closure6() { + }, + ExtensionStore__extendPseudo_closure7: function ExtensionStore__extendPseudo_closure7(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure8: function ExtensionStore__extendPseudo_closure8(t0) { + this.pseudo = t0; + }, + ExtensionStore__trim_closure1: function ExtensionStore__trim_closure1(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure2: function ExtensionStore__trim_closure2(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure0: function ExtensionStore_clone_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.oldToNewSelectors = t2; + _.newMediaContexts = t3; + }, + FiberClass: function FiberClass() { + }, + Fiber: function Fiber() { + }, + NodeToDartFileImporter: function NodeToDartFileImporter(t0) { + this._file0$_findFileUrl = t0; + }, + FilesystemImporter$(loadPath) { + var _null = null; + return new A.FilesystemImporter0($.$get$context().absolute$7(loadPath, _null, _null, _null, _null, _null, _null)); + }, + FilesystemImporter0: function FilesystemImporter0(t0) { + this._filesystem$_loadPath = t0; + }, + FilesystemImporter_canonicalize_closure0: function FilesystemImporter_canonicalize_closure0() { + }, + ForRule$0(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.ForRule0(variable, from, to, exclusive, span, t1, t2); + }, + ForRule0: function ForRule0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule0: function ForwardRule0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + ForwardedModuleView_ifNecessary0(inner, rule, $T) { + var t1; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t1 = rule.hiddenMixinsAndFunctions; + if (t1 == null) + t1 = null; + else { + t1 = t1._base; + t1 = t1.get$isEmpty(t1); + } + if (t1 === true) { + t1 = rule.hiddenVariables; + if (t1 == null) + t1 = null; + else { + t1 = t1._base; + t1 = t1.get$isEmpty(t1); + } + t1 = t1 === true; + } else + t1 = false; + } else + t1 = false; + else + t1 = false; + else + t1 = false; + if (t1) + return inner; + else + return A.ForwardedModuleView$0(inner, rule, $T); + }, + ForwardedModuleView$0(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView0(_inner, _rule, A.ForwardedModuleView__forwardedMap0(_inner.get$variables(), t1, t2, t3, type$.Value_2), A.ForwardedModuleView__forwardedMap0(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode_2), A.ForwardedModuleView__forwardedMap0(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap0(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView0<0>")); + }, + ForwardedModuleView__forwardedMap0(map, prefix, safelist, blocklist, $V) { + var t2, + t1 = prefix == null; + if (t1) + if (safelist == null) + if (blocklist != null) { + t2 = blocklist._base; + t2 = t2.get$isEmpty(t2); + } else + t2 = true; + else + t2 = false; + else + t2 = false; + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView0(map, prefix, $V._eval$1("PrefixedMapView0<0>")); + if (safelist != null) + map = new A.LimitedMapView0(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + else { + if (blocklist != null) { + t1 = blocklist._base; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = false; + if (t1) + map = A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + } + return map; + }, + ForwardedModuleView0: function ForwardedModuleView0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view0$_inner = t0; + _._forwarded_view0$_rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + FunctionExpression0: function FunctionExpression0(t0, t1, t2, t3) { + var _ = this; + _.namespace = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + }, + JSFunction0: function JSFunction0() { + }, + SupportsFunction0: function SupportsFunction0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + functionClass_closure: function functionClass_closure() { + }, + functionClass__closure: function functionClass__closure() { + }, + functionClass__closure0: function functionClass__closure0() { + }, + SassFunction0: function SassFunction0(t0) { + this.callable = t0; + }, + FunctionRule$0($name, $arguments, children, span, comment) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.FunctionRule0($name, $arguments, span, t1, t2); + }, + FunctionRule0: function FunctionRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + unifyComplex0(complexes) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, newLeadingCombinator, base, newTrailingCombinator, _i, t5, t6, t7, t8, t9, t10, result, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor0)) + return _null; + t4 = t3.components; + if (t4.length === 1 && t3.leadingCombinators.length !== 0) { + newLeadingCombinator = B.JSArray_methods.get$single(t3.leadingCombinators); + if (leadingCombinator != null && leadingCombinator !== newLeadingCombinator) + return _null; + leadingCombinator = newLeadingCombinator; + } + base = B.JSArray_methods.get$last(t4); + t3 = base.combinators; + if (t3.length !== 0) { + newTrailingCombinator = B.JSArray_methods.get$single(t3); + if (trailingCombinator != null && trailingCombinator !== newTrailingCombinator) + return _null; + trailingCombinator = newTrailingCombinator; + } + if (unifiedBase == null) + unifiedBase = base.selector.components; + else + for (t3 = base.selector.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + unifiedBase = t3[_i].unify$1(unifiedBase); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector_2; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes), t5 = type$.Combinator_2, t6 = type$.ComplexSelectorComponent_2; t4.moveNext$0();) { + t7 = t4.get$current(t4); + t8 = t7.components; + t9 = t8.length; + if (t9 > 1) { + t10 = t7.leadingCombinators; + t8 = B.JSArray_methods.take$1(t8, t9 - 1); + t7 = t7.lineBreak; + result = A.List_List$from(t10, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + result = A.List_List$from(t8, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t8 = result; + if (t10.length === 0 && t8.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, _null)); + t3.push(new A.ComplexSelector0(t10, t8, t7)); + } + } + t4 = leadingCombinator == null ? B.List_empty13 : A._setArrayType([leadingCombinator], type$.JSArray_Combinator_2); + unifiedBase.toString; + t6 = A.CompoundSelector$0(unifiedBase); + base = A.ComplexSelector$0(t4, A._setArrayType([new A.ComplexSelectorComponent0(t6, A.List_List$unmodifiable(trailingCombinator == null ? B.List_empty13 : A._setArrayType([trailingCombinator], type$.JSArray_Combinator_2), t5))], type$.JSArray_ComplexSelectorComponent_2), t1.any$1(complexes, new A.unifyComplex_closure0())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$of(A.IterableExtension_get_exceptLast0(t3), true, type$.ComplexSelector_2); + t1.push(B.JSArray_methods.get$last(t3).concatenate$1(base)); + } + return A.weave0(t1, false); + }, + unifyCompound0(compound1, compound2) { + var t1, result, _i, unified; + for (t1 = compound1.length, result = compound2, _i = 0; _i < t1; ++_i, result = unified) { + unified = compound1[_i].unify$1(result); + if (unified == null) + return null; + } + return A.CompoundSelector$0(result); + }, + unifyUniversalAndElement0(selector1, selector2) { + var namespace1, name1, t1, namespace2, name2, namespace, $name, _null = null, + _s45_ = string$.must_b; + if (selector1 instanceof A.UniversalSelector0) { + namespace1 = selector1.namespace; + name1 = _null; + } else if (selector1 instanceof A.TypeSelector0) { + t1 = selector1.name; + namespace1 = t1.namespace; + name1 = t1.name; + } else + throw A.wrapException(A.ArgumentError$value(selector1, "selector1", _s45_)); + if (selector2 instanceof A.UniversalSelector0) { + namespace2 = selector2.namespace; + name2 = _null; + } else if (selector2 instanceof A.TypeSelector0) { + t1 = selector2.name; + namespace2 = t1.namespace; + name2 = t1.name; + } else + throw A.wrapException(A.ArgumentError$value(selector2, "selector2", _s45_)); + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return _null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return _null; + $name = name2; + } + return $name == null ? new A.UniversalSelector0(namespace) : new A.TypeSelector0(new A.QualifiedName0($name, namespace)); + }, + weave0(complexes, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, target, i, t7, _i, t8, t9, _i0, parentPrefix, t10, t11, result, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.get$first(complexes); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$0(complex.leadingCombinators, complex.components, true)], type$.JSArray_ComplexSelector_2); + } + t2 = type$.JSArray_ComplexSelector_2; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t1 = t1.get$iterator(t1), t3 = type$.Combinator_2, t4 = type$.ComplexSelectorComponent_2; t1.moveNext$0();) { + t5 = t1.get$current(t1); + t6 = t5.components; + target = B.JSArray_methods.get$last(t6); + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$2$forceLineBreak(t5, forceLineBreak); + continue; + } + t6 = A._setArrayType([], t2); + for (t7 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t7 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t8 = A._weaveParents0(prefixes[_i], t5); + if (t8 == null) + t8 = B.List_empty14; + t9 = t8.length; + _i0 = 0; + for (; _i0 < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i0) { + parentPrefix = t8[_i0]; + t10 = A.List_List$of(parentPrefix.components, true, t4); + t10.push(target); + t11 = parentPrefix.lineBreak || forceLineBreak; + result = A.List_List$from(parentPrefix.leadingCombinators, false, t3); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + result = A.List_List$from(t10, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + if (t12.length === 0 && t10.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + t6.push(new A.ComplexSelector0(t12, t10, t11)); + } + } + prefixes = t6; + } + return prefixes; + }, + _weaveParents0(prefix, base) { + var t1, queue1, queue2, trailingCombinators, rootish1, rootish2, t2, rootish, groups1, groups2, lcs, choices, t3, t4, t5, _i, group, t6, t7, t8, _i0, chunk, t9, t10, result, _null = null, + leadingCombinators = A._mergeLeadingCombinators0(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent_2; + queue1 = A.ListQueue_ListQueue$of(prefix.components, t1); + queue2 = A.ListQueue_ListQueue$of(A.IterableExtension_get_exceptLast0(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators0(queue1, queue2, _null); + if (trailingCombinators == null) + return _null; + rootish1 = A._firstIfRootish0(queue1); + rootish2 = A._firstIfRootish0(queue2); + t2 = rootish1 == null; + if (!t2 && rootish2 != null) { + rootish = A.unifyCompound0(rootish1.selector.components, rootish2.selector.components); + if (rootish == null) + return _null; + t2 = type$.Combinator_2; + queue1.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(rootish1.combinators, t2))); + queue2.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(rootish2.combinators, t2))); + } else if (!t2 || rootish2 != null) { + t2 = t2 ? rootish2 : rootish1; + t2.toString; + queue1.addFirst$1(t2); + queue2.addFirst$1(t2); + } + groups1 = A._groupSelectors0(queue1); + groups2 = A._groupSelectors0(queue2); + t2 = type$.List_ComplexSelectorComponent_2; + lcs = A.longestCommonSubsequence0(groups2, groups1, new A._weaveParents_closure3(), t2); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent_2); + for (t3 = lcs.length, t4 = type$.JSArray_Iterable_ComplexSelectorComponent_2, t5 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < lcs.length; lcs.length === t3 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t6 = A._setArrayType([], t4); + for (t7 = A._chunks0(groups1, groups2, new A._weaveParents_closure4(group), t2), t8 = t7.length, _i0 = 0; _i0 < t7.length; t7.length === t8 || (0, A.throwConcurrentModificationError)(t7), ++_i0) { + chunk = t7[_i0]; + t9 = A._setArrayType([], t5); + for (t10 = B.JSArray_methods.get$iterator(chunk); t10.moveNext$0();) + B.JSArray_methods.addAll$1(t9, t10.get$current(t10)); + t6.push(t9); + } + choices.push(t6); + choices.push(A._setArrayType([group], t4)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t3 = A._setArrayType([], t4); + for (t2 = A._chunks0(groups1, groups2, new A._weaveParents_closure5(), t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + chunk = t2[_i]; + t6 = A._setArrayType([], t5); + for (t7 = B.JSArray_methods.get$iterator(chunk); t7.moveNext$0();) + B.JSArray_methods.addAll$1(t6, t7.get$current(t7)); + t3.push(t6); + } + choices.push(t3); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t2 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + for (t3 = J.get$iterator$ax(A.paths0(new A.WhereIterable(choices, new A._weaveParents_closure6(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent_2), type$.Iterable_ComplexSelectorComponent_2)), t4 = type$.Combinator_2, t6 = !prefix.lineBreak, t7 = base.lineBreak; t3.moveNext$0();) { + t8 = t3.get$current(t3); + t9 = A._setArrayType([], t5); + for (t8 = J.get$iterator$ax(t8); t8.moveNext$0();) + B.JSArray_methods.addAll$1(t9, t8.get$current(t8)); + t8 = !t6 || t7; + result = A.List_List$from(leadingCombinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + result = A.List_List$from(t9, false, t1); + result.fixed$length = Array; + result.immutable$list = Array; + t9 = result; + if (t10.length === 0 && t9.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, _null)); + t2.push(new A.ComplexSelector0(t10, t9, t8)); + } + return t2; + }, + _firstIfRootish0(queue) { + var first, t1, t2, _i, simple; + if (queue._collection$_head === queue._collection$_tail) + return null; + first = queue.get$first(queue); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + if (simple instanceof A.PseudoSelector0 && simple.isClass && $._rootishPseudoClasses0.contains$1(0, simple.normalizedName)) { + queue.removeFirst$0(); + return first; + } + } + return null; + }, + _mergeLeadingCombinators0(combinators1, combinators2) { + var t2, _null = null, + t1 = combinators1.length; + if (t1 > 1) + return _null; + t2 = combinators2.length; + if (t2 > 1) + return _null; + if (t1 === 0) + return combinators2; + if (t2 === 0) + return combinators1; + return B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + }, + _mergeTrailingCombinators0(components1, components2, result) { + var combinators1, combinators2, t1, t2, combinator1, combinator2, component1, component2, t3, t4, choices, unified, followingSiblingComponent, nextSiblingComponent, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent_2); + combinators1 = components1._collection$_head === components1._collection$_tail ? B.List_empty13 : components1.get$last(components1).combinators; + combinators2 = components2._collection$_head === components2._collection$_tail ? B.List_empty13 : components2.get$last(components2).combinators; + t1 = combinators1.length; + t2 = t1 === 0; + if (t2 && combinators2.length === 0) + return result; + if (t1 > 1 || combinators2.length > 1) + return _null; + combinator1 = t2 ? _null : B.JSArray_methods.get$first(combinators1); + combinator2 = combinators2.length === 0 ? _null : B.JSArray_methods.get$first(combinators2); + t1 = combinator1 != null; + if (t1 && combinator2 != null) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t1 = combinator1 === B.Combinator_Htt0; + if (t1 && combinator2 === B.Combinator_Htt0) { + t1 = component1.selector; + t2 = component2.selector; + if (A.compoundIsSuperselector0(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + else { + t3 = type$.JSArray_ComplexSelectorComponent_2; + t4 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(t2, t1, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t3)], t4)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t3), A._setArrayType([component2, component1], t3)], t4); + unified = A.unifyCompound0(t1.components, t2.components); + if (unified != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(B.List_Kw10, type$.Combinator_2))], t3)); + result.addFirst$1(choices); + } + } + } else { + if (!(t1 && combinator2 === B.Combinator_4QF0)) + t2 = combinator1 === B.Combinator_4QF0 && combinator2 === B.Combinator_Htt0; + else + t2 = true; + if (t2) { + followingSiblingComponent = t1 ? component1 : component2; + nextSiblingComponent = t1 ? component2 : component1; + t1 = type$.JSArray_ComplexSelectorComponent_2; + t2 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(followingSiblingComponent.selector, nextSiblingComponent.selector, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([nextSiblingComponent], t1)], t2)); + else { + unified = A.unifyCompound0(component1.selector.components, component2.selector.components); + t2 = A._setArrayType([A._setArrayType([followingSiblingComponent, nextSiblingComponent], t1)], t2); + if (unified != null) + t2.push(A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(B.List_IoD0, type$.Combinator_2))], t1)); + result.addFirst$1(t2); + } + } else { + if (combinator1 === B.Combinator_Cht0) + t2 = combinator2 === B.Combinator_4QF0 || combinator2 === B.Combinator_Htt0; + else + t2 = false; + if (t2) { + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + components1._add$1(component1); + } else { + if (combinator2 === B.Combinator_Cht0) + t1 = combinator1 === B.Combinator_4QF0 || t1; + else + t1 = false; + if (t1) { + result.addFirst$1(A._setArrayType([A._setArrayType([component1], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + components2._add$1(component2); + } else if (combinator1 === combinator2) { + unified = A.unifyCompound0(component1.selector.components, component2.selector.components); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(A._setArrayType([combinator1], type$.JSArray_Combinator_2), type$.Combinator_2))], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + } else + return _null; + } + } + } + return A._mergeTrailingCombinators0(components1, components2, result); + } else if (t1) { + if (combinator1 === B.Combinator_Cht0 && !components2.get$isEmpty(components2) && A.compoundIsSuperselector0(components2.get$last(components2).selector, components1.get$last(components1).selector, _null)) + components2.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([components1.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + return A._mergeTrailingCombinators0(components1, components2, result); + } else { + if (combinator2 === B.Combinator_Cht0 && !components1.get$isEmpty(components1) && A.compoundIsSuperselector0(components1.get$last(components1).selector, components2.get$last(components2).selector, _null)) + components1.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([components2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + return A._mergeTrailingCombinators0(components1, components2, result); + } + }, + _mustUnify0(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions0___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(t3)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure0(t1)); + }, + _isUnique0(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks0(queue1, queue2, done, $T) { + var chunk2, t2, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + for (; !done.call$1(queue1);) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + for (; !done.call$1(queue2);) + chunk2.push(queue2.removeFirst$0()); + t1 = chunk1.length === 0; + if (t1 && chunk2.length === 0) + return A._setArrayType([], $T._eval$1("JSArray>")); + if (t1) + return A._setArrayType([chunk2], $T._eval$1("JSArray>")); + if (chunk2.length === 0) + return A._setArrayType([chunk1], $T._eval$1("JSArray>")); + t1 = A.List_List$of(chunk1, true, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$of(chunk2, true, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + return A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + }, + paths0(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure0($T)); + }, + _groupSelectors0(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent_2), + t1 = type$.JSArray_ComplexSelectorComponent_2, + group = A._setArrayType([], t1); + for (t2 = A._ListQueueIterator$(complex), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2._collection$_current; + if (t4 == null) + t4 = t3._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector0(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure0(list1)); + }, + _complexIsParentSuperselector0(complex1, complex2) { + var base, t1, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + base = new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([new A.PlaceholderSelector0("")], type$.JSArray_SimpleSelector_2)), A.List_List$unmodifiable(B.List_empty13, type$.Combinator_2)); + t1 = type$.ComplexSelectorComponent_2; + t2 = A.List_List$of(complex1, true, t1); + t2.push(base); + t1 = A.List_List$of(complex2, true, t1); + t1.push(base); + return A.complexIsSuperselector0(t2, t1); + }, + complexIsSuperselector0(complex1, complex2) { + var t1, t2, t3, i1, i2, remaining1, t4, remaining2, component1, t5, parents, endOfSubselector, component2, combinator1, combinator2; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = type$.JSArray_ComplexSelectorComponent_2, t2 = A._arrayInstanceType(complex2), t3 = t2._precomputed1, t2 = t2._eval$1("SubListIterable<1>"), i1 = 0, i2 = 0; true;) { + remaining1 = complex1.length - i1; + t4 = complex2.length; + remaining2 = t4 - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t5 = component1.combinators; + if (t5.length > 1) + return false; + if (remaining1 === 1) { + parents = B.JSArray_methods.sublist$2(complex2, i2, t4 - 1); + if (B.JSArray_methods.any$1(parents, new A.complexIsSuperselector_closure1())) + return false; + return A.compoundIsSuperselector0(component1.selector, B.JSArray_methods.get$last(complex2).selector, parents); + } + for (t4 = component1.selector, endOfSubselector = i2, parents = null; true;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + if (A.compoundIsSuperselector0(t4, component2.selector, parents)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + if (parents == null) + parents = A._setArrayType([], t1); + parents.push(component2); + } + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t5); + combinator2 = A.IterableExtension_get_firstOrNull(component2.combinators); + if (combinator1 != combinator2) + if (!(combinator1 == null && combinator2 === B.Combinator_Cht0)) + t4 = combinator1 === B.Combinator_Htt0 && combinator2 === B.Combinator_4QF0; + else + t4 = true; + else + t4 = true; + if (!t4) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) + if (combinator1 === B.Combinator_Htt0) { + t4 = complex2.length - 1; + t5 = new A.SubListIterable(complex2, 0, t4, t2); + t5.SubListIterable$3(complex2, 0, t4, t3); + if (!t5.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure2(combinator1))) + return false; + } else if (combinator1 != null) + if (complex2.length - i2 > 1) + return false; + } + }, + _isSupercombinator0(combinator1, combinator2) { + var t1; + if (combinator1 != combinator2) + if (!(combinator1 == null && combinator2 === B.Combinator_Cht0)) + t1 = combinator1 === B.Combinator_Htt0 && combinator2 === B.Combinator_4QF0; + else + t1 = true; + else + t1 = true; + return t1; + }, + compoundIsSuperselector0(compound1, compound2, parents) { + var t2, t3, t4, t5, t6, t7, t8, _i, simple1, + tuple1 = A._findPseudoElementIndexed0(compound1), + tuple2 = A._findPseudoElementIndexed0(compound2), + t1 = tuple1 == null; + if (!t1 && tuple2 != null) { + if (tuple1.item1.isSuperselector$1(tuple2.item1)) { + t1 = compound1.components; + t2 = tuple1.item2; + t3 = type$.int; + t4 = A._arrayInstanceType(t1)._precomputed1; + t5 = A.SubListIterable$(t1, 0, A.checkNotNullable(t2, "count", t3), t4); + t6 = compound2.components; + t7 = tuple2.item2; + t8 = A._arrayInstanceType(t6)._precomputed1; + t1 = A._compoundComponentsIsSuperselector0(t5, A.SubListIterable$(t6, 0, A.checkNotNullable(t7, "count", t3), t8), parents) && A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, t2 + 1, null, t4), A.SubListIterable$(t6, t7 + 1, null, t8), parents); + } else + t1 = false; + return t1; + } else if (!t1 || tuple2 != null) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector0 && simple1.selector != null) { + if (!A._selectorPseudoIsSuperselector0(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed0(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) + return new A.Tuple2(simple, i, type$.Tuple2_PseudoSelector_int_2); + } + return null; + }, + _compoundComponentsIsSuperselector0(compound1, compound2, parents) { + if (compound1.get$length(compound1) === 0) + return true; + if (compound2.get$length(compound2) === 0) + compound2 = A._setArrayType([new A.UniversalSelector0("*")], type$.JSArray_SimpleSelector_2); + return A.compoundIsSuperselector0(A.CompoundSelector$0(compound1), A.CompoundSelector$0(compound2), parents); + }, + _selectorPseudoIsSuperselector0(pseudo1, compound2, parents) { + var selector1_ = pseudo1.selector; + if (selector1_ == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure6(selector1_)) || B.JSArray_methods.any$1(selector1_.components, new A._selectorPseudoIsSuperselector_closure7(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure8(selector1_)); + case "slotted": + return A._selectorPseudoArgs0(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure9(selector1_)); + case "not": + return B.JSArray_methods.every$1(selector1_.components, new A._selectorPseudoIsSuperselector_closure10(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure11(selector1_)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure12(pseudo1, selector1_)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs0(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector_2; + return A.IterableNullableExtension_whereNotNull(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure1(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure2(), t1._eval$1("MappedIterable")), type$.SelectorList_2); + }, + unifyComplex_closure0: function unifyComplex_closure0() { + }, + _weaveParents_closure3: function _weaveParents_closure3() { + }, + _weaveParents_closure4: function _weaveParents_closure4(t0) { + this.group = t0; + }, + _weaveParents_closure5: function _weaveParents_closure5() { + }, + _weaveParents_closure6: function _weaveParents_closure6() { + }, + _mustUnify_closure0: function _mustUnify_closure0(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure0: function _mustUnify__closure0(t0) { + this.uniqueSelectors = t0; + }, + paths_closure0: function paths_closure0(t0) { + this.T = t0; + }, + paths__closure0: function paths__closure0(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure0: function paths___closure0(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure0: function listIsSuperselector_closure0(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure0: function listIsSuperselector__closure0(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure1: function complexIsSuperselector_closure1() { + }, + complexIsSuperselector_closure2: function complexIsSuperselector_closure2(t0) { + this.combinator1 = t0; + }, + _selectorPseudoIsSuperselector_closure6: function _selectorPseudoIsSuperselector_closure6(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure7: function _selectorPseudoIsSuperselector_closure7(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure8: function _selectorPseudoIsSuperselector_closure8(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure9: function _selectorPseudoIsSuperselector_closure9(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure10: function _selectorPseudoIsSuperselector_closure10(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure0: function _selectorPseudoIsSuperselector__closure0(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure1: function _selectorPseudoIsSuperselector___closure1(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure2: function _selectorPseudoIsSuperselector___closure2(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure11: function _selectorPseudoIsSuperselector_closure11(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure12: function _selectorPseudoIsSuperselector_closure12(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure1: function _selectorPseudoArgs_closure1(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure2: function _selectorPseudoArgs_closure2() { + }, + globalFunctions_closure0: function globalFunctions_closure0() { + }, + IDSelector0: function IDSelector0(t0) { + this.name = t0; + }, + IDSelector_unify_closure0: function IDSelector_unify_closure0(t0) { + this.$this = t0; + }, + IfExpression0: function IfExpression0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + IfClause$0(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.IfClause0(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + ElseClause$0(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.ElseClause0(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + IfRule0: function IfRule0(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure0: function IfRule_toString_closure0() { + }, + IfRuleClause0: function IfRuleClause0() { + }, + IfRuleClause$__closure0: function IfRuleClause$__closure0() { + }, + IfRuleClause$___closure0: function IfRuleClause$___closure0() { + }, + IfClause0: function IfClause0(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause0: function ElseClause0(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + jsToDartList(list) { + return self.immutable.isOrderedMap(list) ? J.toArray$0$x(type$.ImmutableList._as(list)) : type$.List_dynamic._as(list); + }, + dartMapToImmutableMap(dartMap) { + var t1, t2, + immutableMap = J.asMutable$0$x(new self.immutable.OrderedMap()); + for (t1 = dartMap.get$entries(dartMap), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + immutableMap = J.$set$2$x(immutableMap, t2.key, t2.value); + } + return J.asImmutable$0$x(immutableMap); + }, + immutableMapToDartMap(immutableMap) { + var dartMap = A.LinkedHashMap_LinkedHashMap$_empty(type$.Object, type$.nullable_Object); + J.forEach$1$x(immutableMap, A.allowInterop(new A.immutableMapToDartMap_closure(dartMap))); + return dartMap; + }, + ImmutableList: function ImmutableList() { + }, + ImmutableMap: function ImmutableMap() { + }, + immutableMapToDartMap_closure: function immutableMapToDartMap_closure(t0) { + this.dartMap = t0; + }, + NodeImporter__addSassPath($async$includePaths) { + return A._makeSyncStarIterable(function() { + var includePaths = $async$includePaths; + var $async$goto = 0, $async$handler = 2, $async$currentError, t1, sassPath; + return function $async$NodeImporter__addSassPath($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._IterationMarker_yieldStar(includePaths); + case 3: + // after yield + t1 = J.get$env$x(self.process); + if (t1 == null) + t1 = type$.Object._as(t1); + sassPath = A._asStringQ(t1.SASS_PATH); + if (sassPath == null) { + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._IterationMarker_yieldStar(A._setArrayType(sassPath.split(J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"), type$.JSArray_String)); + case 4: + // after yield + case 1: + // return + return A._IterationMarker_endOfIteration(); + case 2: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.String); + }, + NodeImporter: function NodeImporter(t0, t1, t2) { + this._implementation$_options = t0; + this._includePaths = t1; + this._implementation$_importers = t2; + }, + NodeImporter__tryPath_closure: function NodeImporter__tryPath_closure(t0) { + this.path = t0; + }, + NodeImporter__tryPath_closure0: function NodeImporter__tryPath_closure0() { + }, + ModifiableCssImport0: function ModifiableCssImport0(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + ImportCache$0(importers, loadPaths, logger, packageConfig) { + var t1 = type$.nullable_Tuple3_Importer_Uri_Uri_2, + t2 = type$.Uri, + t3 = A.ImportCache__toImporters0(importers, loadPaths, packageConfig); + return new A.ImportCache0(t3, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t1), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri_2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.ImporterResult_2)); + }, + ImportCache$none(logger) { + var t1 = type$.nullable_Tuple3_Importer_Uri_Uri_2, + t2 = type$.Uri; + return new A.ImportCache0(B.List_empty23, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple2_Uri_bool, t1), A.LinkedHashMap_LinkedHashMap$_empty(type$.Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri_2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.ImporterResult_2)); + }, + ImportCache__toImporters0(importers, loadPaths, packageConfig) { + var sassPath, t2, t3, _i, path, _null = null, + t1 = J.get$env$x(self.process); + if (t1 == null) + t1 = type$.Object._as(t1); + sassPath = A._asStringQ(t1.SASS_PATH); + t1 = A._setArrayType([], type$.JSArray_Importer); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$7(t3, _null, _null, _null, _null, _null, _null))); + } + if (sassPath != null) { + t2 = sassPath.split(J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"); + t3 = t2.length; + _i = 0; + for (; _i < t3; ++_i) { + path = t2[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$7(path, _null, _null, _null, _null, _null, _null))); + } + } + return t1; + }, + ImportCache0: function ImportCache0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._import_cache$_importers = t0; + _._import_cache$_logger = t1; + _._import_cache$_canonicalizeCache = t2; + _._import_cache$_relativeCanonicalizeCache = t3; + _._import_cache$_importCache = t4; + _._import_cache$_resultsCache = t5; + }, + ImportCache_canonicalize_closure1: function ImportCache_canonicalize_closure1(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.baseUrl = t1; + _.url = t2; + _.baseImporter = t3; + _.forImport = t4; + }, + ImportCache_canonicalize_closure2: function ImportCache_canonicalize_closure2(t0, t1, t2) { + this.$this = t0; + this.url = t1; + this.forImport = t2; + }, + ImportCache__canonicalize_closure0: function ImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure0: function ImportCache_importCanonical_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + ImportCache_humanize_closure2: function ImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure3: function ImportCache_humanize_closure3() { + }, + ImportCache_humanize_closure4: function ImportCache_humanize_closure4() { + }, + ImportRule0: function ImportRule0(t0, t1) { + this.imports = t0; + this.span = t1; + }, + NodeImporter0: function NodeImporter0() { + }, + CanonicalizeOptions: function CanonicalizeOptions() { + }, + NodeImporterResult0: function NodeImporterResult0() { + }, + Importer0: function Importer0() { + }, + NodeImporterResult1: function NodeImporterResult1() { + }, + IncludeRule0: function IncludeRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.$arguments = t2; + _.content = t3; + _.span = t4; + }, + InterpolatedFunctionExpression0: function InterpolatedFunctionExpression0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + Interpolation$0(contents, span) { + var t1 = new A.Interpolation0(A.List_List$unmodifiable(contents, type$.Object), span); + t1.Interpolation$20(contents, span); + return t1; + }, + Interpolation0: function Interpolation0(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Interpolation_toString_closure0: function Interpolation_toString_closure0() { + }, + SupportsInterpolation0: function SupportsInterpolation0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + InterpolationBuffer0: function InterpolationBuffer0(t0, t1) { + this._interpolation_buffer0$_text = t0; + this._interpolation_buffer0$_contents = t1; + }, + _realCasePath0(path) { + var prefix, t1; + if (!(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin"))) + return path; + if (J.$eq$(J.get$platform$x(self.process), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.isAlphabetic1(B.JSString_methods._codeUnitAt$1(prefix, 0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper0().call$1(path); + }, + _realCasePath_helper0: function _realCasePath_helper0() { + }, + _realCasePath_helper_closure0: function _realCasePath_helper_closure0(t0, t1, t2) { + this.helper = t0; + this.dirname = t1; + this.path = t2; + }, + _realCasePath_helper__closure0: function _realCasePath_helper__closure0(t0) { + this.basename = t0; + }, + ModifiableCssKeyframeBlock$0(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssKeyframeBlock0(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssKeyframeBlock0: function ModifiableCssKeyframeBlock0(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._node0$_children = t3; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + KeyframeSelectorParser$0(contents, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.KeyframeSelectorParser0(t1, logger); + }, + KeyframeSelectorParser0: function KeyframeSelectorParser0(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + KeyframeSelectorParser_parse_closure0: function KeyframeSelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + render(options, callback) { + var fiber = J.get$fiber$x(options); + if (fiber != null) + J.run$0$x(fiber.call$1(A.allowInterop(new A.render_closure(callback, options)))); + else + A._renderAsync(options).then$1$2$onError(0, new A.render_closure0(callback), new A.render_closure1(callback), type$.Null); + }, + _renderAsync(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.RenderResult), + $async$returnValue, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, result, start, t1, data, file; + var $async$_renderAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + start = new A.DateTime(Date.now(), false); + t1 = J.getInterceptor$x(options); + data = t1.get$data(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + $async$goto = data != null ? 3 : 5; + break; + case 3: + // then + t2 = A._parseImporter(options, start); + t3 = A._parseFunctions(options, start, true); + t4 = t1.get$indentedSyntax(options); + t4 = !J.$eq$(t4, false) && t4 != null ? B.Syntax_Sass_sass0 : null; + t5 = A._parseOutputStyle(t1.get$outputStyle(options)); + t6 = J.$eq$(t1.get$indentType(options), "tab"); + t7 = A._parseIndentWidth(t1.get$indentWidth(options)); + t8 = A._parseLineFeed(t1.get$linefeed(options)); + t9 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = t1.get$verbose(options); + if (t11 == null) + t11 = false; + t12 = t1.get$charset(options); + if (t12 == null) + t12 = true; + t13 = A._enableSourceMaps(options); + t1 = t1.get$logger(options); + t14 = J.$eq$(self.process.stdout.isTTY, true); + t15 = $._glyphs; + $async$goto = 6; + return A._asyncAwait(A.compileStringAsync0(data, t12, t3, null, null, t7, t8, new A.NodeToDartLogger(t1, new A.StderrLogger0(t14), t15 === B.C_AsciiGlyphSet), t2, t10, t13, t5, t4, t9, !t6, t11), $async$_renderAsync); + case 6: + // returning from await. + result = $async$result; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = file != null ? 7 : 9; + break; + case 7: + // then + t2 = A._parseImporter(options, start); + t3 = A._parseFunctions(options, start, true); + t4 = t1.get$indentedSyntax(options); + t4 = !J.$eq$(t4, false) && t4 != null ? B.Syntax_Sass_sass0 : null; + t5 = A._parseOutputStyle(t1.get$outputStyle(options)); + t6 = J.$eq$(t1.get$indentType(options), "tab"); + t7 = A._parseIndentWidth(t1.get$indentWidth(options)); + t8 = A._parseLineFeed(t1.get$linefeed(options)); + t9 = t1.get$quietDeps(options); + if (t9 == null) + t9 = false; + t10 = t1.get$verbose(options); + if (t10 == null) + t10 = false; + t11 = t1.get$charset(options); + if (t11 == null) + t11 = true; + t12 = A._enableSourceMaps(options); + t1 = t1.get$logger(options); + t13 = J.$eq$(self.process.stdout.isTTY, true); + t14 = $._glyphs; + $async$goto = 10; + return A._asyncAwait(A.compileAsync0(file, t11, t3, null, t7, t8, new A.NodeToDartLogger(t1, new A.StderrLogger0(t13), t14 === B.C_AsciiGlyphSet), t2, t9, t12, t5, t4, !t6, t10), $async$_renderAsync); + case 10: + // returning from await. + result = $async$result; + // goto join + $async$goto = 8; + break; + case 9: + // else + throw A.wrapException(A.ArgumentError$(string$.Either, null)); + case 8: + // join + case 4: + // join + $async$returnValue = A._newRenderResult(options, result, start); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_renderAsync, $async$completer); + }, + renderSync(options) { + var start, result, data, file, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, exception, _null = null; + try { + start = new A.DateTime(Date.now(), false); + result = null; + t1 = J.getInterceptor$x(options); + data = t1.get$data(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + if (data != null) { + t2 = A._parseImporter(options, start); + t3 = A._parseFunctions(options, start, false); + t4 = t1.get$indentedSyntax(options); + t4 = !J.$eq$(t4, false) && t4 != null ? B.Syntax_Sass_sass0 : _null; + t5 = A._parseOutputStyle(t1.get$outputStyle(options)); + t6 = J.$eq$(t1.get$indentType(options), "tab"); + t7 = A._parseIndentWidth(t1.get$indentWidth(options)); + t8 = A._parseLineFeed(t1.get$linefeed(options)); + t9 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = t1.get$verbose(options); + if (t11 == null) + t11 = false; + t12 = t1.get$charset(options); + if (t12 == null) + t12 = true; + t13 = A._enableSourceMaps(options); + t1 = t1.get$logger(options); + t14 = J.$eq$(self.process.stdout.isTTY, true); + t15 = $._glyphs; + result = A.compileString(data, t12, new A.CastList(t3, A._arrayInstanceType(t3)._eval$1("CastList<1,Callable0>")), _null, _null, t7, t8, new A.NodeToDartLogger(t1, new A.StderrLogger0(t14), t15 === B.C_AsciiGlyphSet), t2, t10, t13, t5, t4, t9, !t6, t11); + } else if (file != null) { + t2 = A._parseImporter(options, start); + t3 = A._parseFunctions(options, start, false); + t4 = t1.get$indentedSyntax(options); + t4 = !J.$eq$(t4, false) && t4 != null ? B.Syntax_Sass_sass0 : _null; + t5 = A._parseOutputStyle(t1.get$outputStyle(options)); + t6 = J.$eq$(t1.get$indentType(options), "tab"); + t7 = A._parseIndentWidth(t1.get$indentWidth(options)); + t8 = A._parseLineFeed(t1.get$linefeed(options)); + t9 = t1.get$quietDeps(options); + if (t9 == null) + t9 = false; + t10 = t1.get$verbose(options); + if (t10 == null) + t10 = false; + t11 = t1.get$charset(options); + if (t11 == null) + t11 = true; + t12 = A._enableSourceMaps(options); + t1 = t1.get$logger(options); + t13 = J.$eq$(self.process.stdout.isTTY, true); + t14 = $._glyphs; + result = A.compile(file, t11, new A.CastList(t3, A._arrayInstanceType(t3)._eval$1("CastList<1,Callable0>")), _null, t7, t8, new A.NodeToDartLogger(t1, new A.StderrLogger0(t13), t14 === B.C_AsciiGlyphSet), t2, t9, t12, t5, t4, !t6, t10); + } else { + t1 = A.ArgumentError$(string$.Either, _null); + throw A.wrapException(t1); + } + t1 = A._newRenderResult(options, result, start); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.jsThrow(A._wrapException(error, stackTrace)); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = J.toString$0$(error0); + t2 = A.getTrace0(error0); + A.jsThrow(A._newRenderError(t1, t2 == null ? stackTrace0 : t2, _null, _null, _null, 3)); + } + } + }, + _wrapException(exception, stackTrace) { + var file, t2, t3, t4, + t1 = A.SourceSpanException.prototype.get$span.call(exception, exception), + url = t1.get$sourceUrl(t1); + if (url == null) + file = "stdin"; + else + file = url.get$scheme() === "file" ? $.$get$context().style.pathFromUri$1(A._parseUri(url)) : url.toString$0(0); + t1 = B.JSString_methods.replaceFirst$2(exception.toString$0(0), "Error: ", ""); + t2 = A.getTrace0(exception); + if (t2 == null) + t2 = stackTrace; + t3 = A.SourceSpanException.prototype.get$span.call(exception, exception); + t3 = t3.get$start(t3); + t3 = t3.file.getLine$1(t3.offset); + t4 = A.SourceSpanException.prototype.get$span.call(exception, exception); + t4 = t4.get$start(t4); + return A._newRenderError(t1, t2, t4.file.getColumn$1(t4.offset) + 1, file, t3 + 1, 1); + }, + _parseFunctions(options, start, asynch) { + var result, + functions = J.get$functions$x(options); + if (functions == null) + return B.List_empty24; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure(options, start, result, asynch)); + return result; + }, + _parseImporter(options, start) { + var importers, t2, t3, contextOptions, fiber, + t1 = J.getInterceptor$x(options); + if (t1.get$importer(options) == null) + importers = A._setArrayType([], type$.JSArray_JSFunction); + else { + t2 = type$.List_nullable_Object; + t3 = type$.JSFunction; + importers = t2._is(t1.get$importer(options)) ? J.cast$1$0$ax(t2._as(t1.get$importer(options)), t3) : A._setArrayType([t3._as(t1.get$importer(options))], type$.JSArray_JSFunction); + } + t2 = J.getInterceptor$asx(importers); + contextOptions = t2.get$isNotEmpty(importers) ? A._contextOptions(options, start) : new A.Object(); + fiber = t1.get$fiber(options); + if (fiber != null) { + t2 = t2.map$1$1(importers, new A._parseImporter_closure(fiber), type$.JSFunction); + importers = A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E")); + } + t1 = t1.get$includePaths(options); + if (t1 == null) + t1 = []; + t2 = type$.String; + return new A.NodeImporter(contextOptions, A.List_List$unmodifiable(A.NodeImporter__addSassPath(A.List_List$from(t1, true, t2)), t2), A.List_List$unmodifiable(J.cast$1$0$ax(importers, type$.dynamic), type$.JSFunction)); + }, + _contextOptions(options, start) { + var includePaths, t3, t4, t5, t6, t7, + t1 = J.getInterceptor$x(options), + t2 = t1.get$includePaths(options); + if (t2 == null) + t2 = []; + includePaths = A.List_List$from(t2, true, type$.String); + t2 = t1.get$file(options); + t3 = t1.get$data(options); + t4 = A._setArrayType([A.current()], type$.JSArray_String); + B.JSArray_methods.addAll$1(t4, includePaths); + t4 = B.JSArray_methods.join$1(t4, J.$eq$(J.get$platform$x(self.process), "win32") ? ";" : ":"); + t5 = J.$eq$(t1.get$indentType(options), "tab") ? 1 : 0; + t6 = A._parseIndentWidth(t1.get$indentWidth(options)); + if (t6 == null) + t6 = 2; + t7 = A._parseLineFeed(t1.get$linefeed(options)); + t1 = t1.get$file(options); + if (t1 == null) + t1 = "data"; + return {file: t2, data: t3, includePaths: t4, precision: 10, style: 1, indentType: t5, indentWidth: t6, linefeed: t7.text, result: {stats: {start: start._core$_value, entry: t1}}}; + }, + _parseOutputStyle(style) { + if (style == null || style === "expanded") + return B.OutputStyle_00; + if (style === "compressed") + return B.OutputStyle_10; + throw A.wrapException(A.ArgumentError$('Unsupported output style "' + A.S(style) + '".', null)); + }, + _parseIndentWidth(width) { + if (width == null) + return null; + return A._isInt(width) ? width : A.int_parse(J.toString$0$(width), null); + }, + _parseLineFeed(str) { + switch (str) { + case "cr": + return B.LineFeed_oyU; + case "crlf": + return B.LineFeed_gg4; + case "lfcr": + return B.LineFeed_t2a; + default: + return B.LineFeed_SsD; + } + }, + _newRenderResult(options, result, start) { + var t3, sourceMapOption, sourceMapPath, t4, sourceMapDir, outFile, t5, file, sourceMapDirUrl, i, source, t6, t7, buffer, indices, url, t8, t9, _null = null, + t1 = Date.now(), + t2 = result._compile_result$_serialize, + css = t2.css, + sourceMapBytes = type$.Null._as(self.undefined); + if (A._enableSourceMaps(options)) { + t3 = J.getInterceptor$x(options); + sourceMapOption = t3.get$sourceMap(options); + if (typeof sourceMapOption == "string") + sourceMapPath = sourceMapOption; + else { + t4 = t3.get$outFile(options); + t4.toString; + sourceMapPath = J.$add$ansx(t4, ".map"); + } + t4 = $.$get$context(); + sourceMapDir = t4.dirname$1(sourceMapPath); + t2 = t2.sourceMap; + t2.toString; + t2.sourceRoot = t3.get$sourceMapRoot(options); + outFile = t3.get$outFile(options); + t5 = outFile == null; + if (t5) { + file = t3.get$file(options); + if (file == null) + t2.targetUrl = "stdin.css"; + else + t2.targetUrl = t4.toUri$1(t4.withoutExtension$1(file) + ".css").toString$0(0); + } else + t2.targetUrl = t4.toUri$1(t4.relative$2$from(outFile, sourceMapDir)).toString$0(0); + sourceMapDirUrl = t4.toUri$1(sourceMapDir).toString$0(0); + for (t4 = t2.urls, i = 0; i < t4.length; ++i) { + source = t4[i]; + if (source === "stdin") + continue; + t6 = $.$get$url(); + t7 = t6.style; + if (t7.rootLength$1(source) <= 0 || t7.isRootRelative$1(source)) + continue; + t4[i] = t6.relative$2$from(source, sourceMapDirUrl); + } + t4 = t3.get$sourceMapContents(options); + sourceMapBytes = self.Buffer.from(B.C_JsonCodec.encode$2$toEncodable(t2.toJson$1$includeSourceContents(!J.$eq$(t4, false) && t4 != null), _null), "utf8"); + t2 = t3.get$omitSourceMapUrl(options); + if (!(!J.$eq$(t2, false) && t2 != null)) { + t2 = t3.get$sourceMapEmbed(options); + if (!J.$eq$(t2, false) && t2 != null) { + buffer = new A.StringBuffer(""); + indices = A._setArrayType([-1], type$.JSArray_int); + A.UriData__writeUri("application/json", _null, _null, buffer, indices); + indices.push(buffer._contents.length); + t2 = buffer._contents += ";base64,"; + indices.push(t2.length - 1); + t2 = B.C_Base64Encoder.startChunkedConversion$1(new A._StringSinkConversionSink(buffer)); + t3 = sourceMapBytes.length; + A.RangeError_checkValidRange(0, t3, t3); + t2._convert$_add$4(sourceMapBytes, 0, t3, true); + t2 = buffer._contents; + url = new A.UriData(t2.charCodeAt(0) == 0 ? t2 : t2, indices, _null).get$uri(); + } else { + if (t5) + t2 = sourceMapPath; + else { + t2 = $.$get$context(); + t2 = t2.relative$2$from(sourceMapPath, t2.dirname$1(outFile)); + } + url = $.$get$context().toUri$1(t2); + } + t2 = url.toString$0(0); + css += "\n\n/*# sourceMappingURL=" + A.stringReplaceAllUnchecked(t2, "*/", "%2A/") + " */"; + } + } + t2 = self.Buffer.from(css, "utf8"); + t3 = J.get$file$x(options); + if (t3 == null) + t3 = "data"; + t4 = start._core$_value; + t1 = new A.DateTime(t1, false)._core$_value; + t5 = B.JSInt_methods._tdivFast$1(A.Duration$(t1 - t4)._duration, 1000); + t6 = A._setArrayType([], type$.JSArray_String); + for (t7 = result._evaluate.loadedUrls, t7 = A._LinkedHashSetIterator$(t7, t7._collection$_modifications), t8 = A._instanceType(t7)._precomputed1; t7.moveNext$0();) { + t9 = t7._collection$_current; + if (t9 == null) + t9 = t8._as(t9); + if (t9.get$scheme() === "file") + t6.push($.$get$context().style.pathFromUri$1(A._parseUri(t9))); + else + t6.push(t9.toString$0(0)); + } + return {css: t2, map: sourceMapBytes, stats: {entry: t3, start: t4, end: t1, duration: t5, includedFiles: t6}}; + }, + _enableSourceMaps(options) { + var t2, + t1 = J.getInterceptor$x(options); + if (typeof t1.get$sourceMap(options) != "string") { + t2 = t1.get$sourceMap(options); + t1 = !J.$eq$(t2, false) && t2 != null && t1.get$outFile(options) != null; + } else + t1 = true; + return t1; + }, + _newRenderError(message, stackTrace, column, file, line, $status) { + var error = new self.Error(message); + error.formatted = "Error: " + message; + if (line != null) + error.line = line; + if (column != null) + error.column = column; + if (file != null) + error.file = file; + error.status = $status; + A.attachJsStack(error, stackTrace); + return error; + }, + render_closure: function render_closure(t0, t1) { + this.callback = t0; + this.options = t1; + }, + render_closure0: function render_closure0(t0) { + this.callback = t0; + }, + render_closure1: function render_closure1(t0) { + this.callback = t0; + }, + _parseFunctions_closure: function _parseFunctions_closure(t0, t1, t2, t3) { + var _ = this; + _.options = t0; + _.start = t1; + _.result = t2; + _.asynch = t3; + }, + _parseFunctions__closure: function _parseFunctions__closure(t0, t1, t2) { + this.fiber = t0; + this.callback = t1; + this.context = t2; + }, + _parseFunctions___closure0: function _parseFunctions___closure0(t0) { + this.currentFiber = t0; + }, + _parseFunctions____closure: function _parseFunctions____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseFunctions___closure1: function _parseFunctions___closure1(t0) { + this.fiber = t0; + }, + _parseFunctions__closure0: function _parseFunctions__closure0(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions__closure1: function _parseFunctions__closure1(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions___closure: function _parseFunctions___closure(t0) { + this.completer = t0; + }, + _parseImporter_closure: function _parseImporter_closure(t0) { + this.fiber = t0; + }, + _parseImporter__closure: function _parseImporter__closure(t0, t1) { + this.fiber = t0; + this.importer = t1; + }, + _parseImporter___closure: function _parseImporter___closure(t0) { + this.currentFiber = t0; + }, + _parseImporter____closure: function _parseImporter____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseImporter___closure0: function _parseImporter___closure0(t0) { + this.fiber = t0; + }, + LimitedMapView$blocklist0(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView0(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + }, + LimitedMapView0: function LimitedMapView0(t0, t1, t2) { + this._limited_map_view0$_map = t0; + this._limited_map_view0$_keys = t1; + this.$ti = t2; + }, + ListExpression0: function ListExpression0(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure0: function ListExpression_toString_closure0(t0) { + this.$this = t0; + }, + _function10($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:list"); + }, + _length_closure2: function _length_closure2() { + }, + _nth_closure0: function _nth_closure0() { + }, + _setNth_closure0: function _setNth_closure0() { + }, + _join_closure0: function _join_closure0() { + }, + _append_closure2: function _append_closure2() { + }, + _zip_closure0: function _zip_closure0() { + }, + _zip__closure2: function _zip__closure2() { + }, + _zip__closure3: function _zip__closure3(t0) { + this._box_0 = t0; + }, + _zip__closure4: function _zip__closure4(t0) { + this._box_0 = t0; + }, + _index_closure2: function _index_closure2() { + }, + _separator_closure0: function _separator_closure0() { + }, + _isBracketed_closure0: function _isBracketed_closure0() { + }, + _slash_closure0: function _slash_closure0() { + }, + SelectorList$0(components) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList0(t1); + }, + SelectorList_SelectorList$parse0(contents, allowParent, allowPlaceholder, logger) { + return A.SelectorParser$0(contents, allowParent, allowPlaceholder, logger, null).parse$0(); + }, + SelectorList0: function SelectorList0(t0) { + this.components = t0; + }, + SelectorList_asSassList_closure0: function SelectorList_asSassList_closure0() { + }, + SelectorList_resolveParentSelectors_closure0: function SelectorList_resolveParentSelectors_closure0(t0, t1, t2) { + this.$this = t0; + this.implicitParent = t1; + this.parent = t2; + }, + SelectorList_resolveParentSelectors__closure0: function SelectorList_resolveParentSelectors__closure0(t0) { + this.complex = t0; + }, + SelectorList__complexContainsParentSelector_closure0: function SelectorList__complexContainsParentSelector_closure0() { + }, + SelectorList__complexContainsParentSelector__closure0: function SelectorList__complexContainsParentSelector__closure0() { + }, + SelectorList__resolveParentSelectorsCompound_closure2: function SelectorList__resolveParentSelectorsCompound_closure2() { + }, + SelectorList__resolveParentSelectorsCompound_closure3: function SelectorList__resolveParentSelectorsCompound_closure3(t0) { + this.parent = t0; + }, + SelectorList__resolveParentSelectorsCompound_closure4: function SelectorList__resolveParentSelectorsCompound_closure4(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure0: function SelectorList_withAdditionalCombinators_closure0(t0) { + this.combinators = t0; + }, + _NodeSassList: function _NodeSassList() { + }, + legacyListClass_closure: function legacyListClass_closure() { + }, + legacyListClass__closure: function legacyListClass__closure() { + }, + legacyListClass_closure0: function legacyListClass_closure0() { + }, + legacyListClass_closure1: function legacyListClass_closure1() { + }, + legacyListClass_closure2: function legacyListClass_closure2() { + }, + legacyListClass_closure3: function legacyListClass_closure3() { + }, + legacyListClass_closure4: function legacyListClass_closure4() { + }, + listClass_closure: function listClass_closure() { + }, + listClass__closure: function listClass__closure() { + }, + listClass__closure0: function listClass__closure0() { + }, + _ConstructorOptions: function _ConstructorOptions() { + }, + SassList$0(contents, _separator, brackets) { + var t1 = new A.SassList0(A.List_List$unmodifiable(contents, type$.Value_2), _separator, brackets); + t1.SassList$3$brackets0(contents, _separator, brackets); + return t1; + }, + SassList0: function SassList0(t0, t1, t2) { + this._list1$_contents = t0; + this._list1$_separator = t1; + this._list1$_hasBrackets = t2; + }, + SassList_isBlank_closure0: function SassList_isBlank_closure0() { + }, + ListSeparator0: function ListSeparator0(t0, t1, t2) { + this._list1$_name = t0; + this.separator = t1; + this._name = t2; + }, + NodeLogger: function NodeLogger() { + }, + WarnOptions: function WarnOptions() { + }, + DebugOptions: function DebugOptions() { + }, + _QuietLogger0: function _QuietLogger0() { + }, + LoudComment0: function LoudComment0(t0) { + this.text = t0; + }, + MapExpression0: function MapExpression0(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + MapExpression_toString_closure0: function MapExpression_toString_closure0() { + }, + _modify0(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap0(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl0(map1, map2) { + var t2, t3, result, + t1 = map1._map0$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map0$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value_2; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + t2.forEach$1(0, new A._deepMergeImpl_closure0(result)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function9($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:map"); + }, + _get_closure0: function _get_closure0() { + }, + _set_closure1: function _set_closure1() { + }, + _set__closure2: function _set__closure2(t0) { + this.$arguments = t0; + }, + _set_closure2: function _set_closure2() { + }, + _set__closure1: function _set__closure1(t0) { + this.args = t0; + }, + _merge_closure1: function _merge_closure1() { + }, + _merge_closure2: function _merge_closure2() { + }, + _merge__closure0: function _merge__closure0(t0) { + this.map2 = t0; + }, + _deepMerge_closure0: function _deepMerge_closure0() { + }, + _deepRemove_closure0: function _deepRemove_closure0() { + }, + _deepRemove__closure0: function _deepRemove__closure0(t0) { + this.keys = t0; + }, + _remove_closure1: function _remove_closure1() { + }, + _remove_closure2: function _remove_closure2() { + }, + _keys_closure0: function _keys_closure0() { + }, + _values_closure0: function _values_closure0() { + }, + _hasKey_closure0: function _hasKey_closure0() { + }, + _modify_modifyNestedMap0: function _modify_modifyNestedMap0(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + _deepMergeImpl_closure0: function _deepMergeImpl_closure0(t0) { + this.result = t0; + }, + _NodeSassMap: function _NodeSassMap() { + }, + legacyMapClass_closure: function legacyMapClass_closure() { + }, + legacyMapClass__closure: function legacyMapClass__closure() { + }, + legacyMapClass__closure0: function legacyMapClass__closure0() { + }, + legacyMapClass_closure0: function legacyMapClass_closure0() { + }, + legacyMapClass_closure1: function legacyMapClass_closure1() { + }, + legacyMapClass_closure2: function legacyMapClass_closure2() { + }, + legacyMapClass_closure3: function legacyMapClass_closure3() { + }, + legacyMapClass_closure4: function legacyMapClass_closure4() { + }, + mapClass_closure: function mapClass_closure() { + }, + mapClass__closure: function mapClass__closure() { + }, + mapClass__closure0: function mapClass__closure0() { + }, + mapClass__closure1: function mapClass__closure1() { + }, + SassMap0: function SassMap0(t0) { + this._map0$_contents = t0; + }, + SassMap_asList_closure0: function SassMap_asList_closure0(t0) { + this.result = t0; + }, + _numberFunction0($name, transform) { + return A.BuiltInCallable$function0($name, "$number", new A._numberFunction_closure0(transform), "sass:math"); + }, + _function8($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:math"); + }, + _ceil_closure0: function _ceil_closure0() { + }, + _clamp_closure0: function _clamp_closure0() { + }, + _floor_closure0: function _floor_closure0() { + }, + _max_closure0: function _max_closure0() { + }, + _min_closure0: function _min_closure0() { + }, + _round_closure0: function _round_closure0() { + }, + _abs_closure0: function _abs_closure0() { + }, + _hypot_closure0: function _hypot_closure0() { + }, + _hypot__closure0: function _hypot__closure0() { + }, + _log_closure0: function _log_closure0() { + }, + _pow_closure0: function _pow_closure0() { + }, + _sqrt_closure0: function _sqrt_closure0() { + }, + _acos_closure0: function _acos_closure0() { + }, + _asin_closure0: function _asin_closure0() { + }, + _atan_closure0: function _atan_closure0() { + }, + _atan2_closure0: function _atan2_closure0() { + }, + _cos_closure0: function _cos_closure0() { + }, + _sin_closure0: function _sin_closure0() { + }, + _tan_closure0: function _tan_closure0() { + }, + _compatible_closure0: function _compatible_closure0() { + }, + _isUnitless_closure0: function _isUnitless_closure0() { + }, + _unit_closure0: function _unit_closure0() { + }, + _percentage_closure0: function _percentage_closure0() { + }, + _randomFunction_closure0: function _randomFunction_closure0() { + }, + _div_closure0: function _div_closure0() { + }, + _numberFunction_closure0: function _numberFunction_closure0(t0) { + this.transform = t0; + }, + CssMediaQuery$type0(type, conditions, modifier) { + return new A.CssMediaQuery0(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition0(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery0(null, null, conjunction !== false, t1); + }, + CssMediaQuery0: function CssMediaQuery0(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult0: function _SingletonCssMediaQueryMergeResult0(t0) { + this._media_query0$_name = t0; + }, + MediaQuerySuccessfulMergeResult0: function MediaQuerySuccessfulMergeResult0(t0) { + this.query = t0; + }, + MediaQueryParser0: function MediaQueryParser0(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + MediaQueryParser_parse_closure0: function MediaQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + ModifiableCssMediaRule$0(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery_2), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule0(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode_2), t2); + }, + ModifiableCssMediaRule0: function ModifiableCssMediaRule0(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._node0$_children = t3; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + MediaRule$0(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.MediaRule0(query, span, t1, t2); + }, + MediaRule0: function MediaRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MergedExtension_merge0(left, right) { + var t3, t4, t5, t6, + t1 = left.extender, + t2 = t1.selector; + if (!t2.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t3 = left.mediaContext; + t4 = t3 == null; + if (!t4) { + t5 = right.mediaContext; + t5 = t5 != null && !B.C_ListEquality.equals$2(0, t3, t5); + } else + t5 = false; + if (t5) + throw A.wrapException(A.SassException$0("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t4) + return right; + t5 = left.target; + t6 = left.span; + if (t4) + t3 = right.mediaContext; + t2.get$specificity(); + t1 = new A.Extender0(t2, false, t1.span); + return t1._extension$_extension = new A.MergedExtension0(left, right, t1, t5, t3, true, t6); + }, + MergedExtension0: function MergedExtension0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + MergedMapView$0(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView0(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView0<1,2>")); + t1.MergedMapView$10(maps, $K, $V); + return t1; + }, + MergedMapView0: function MergedMapView0(t0, t1) { + this._merged_map_view$_mapsByKey = t0; + this.$ti = t1; + }, + _function12($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:meta"); + }, + global_closure57: function global_closure57() { + }, + global_closure58: function global_closure58() { + }, + global_closure59: function global_closure59() { + }, + global_closure60: function global_closure60() { + }, + local_closure1: function local_closure1() { + }, + local_closure2: function local_closure2() { + }, + local__closure0: function local__closure0() { + }, + MixinRule$0($name, $arguments, children, span, comment) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.MixinRule0($name, $arguments, span, t1, t2); + }, + MixinRule0: function MixinRule0(t0, t1, t2, t3, t4) { + var _ = this; + _._mixin_rule$__MixinRule_hasContent_FI = $; + _.name = t0; + _.$arguments = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + _HasContentVisitor0: function _HasContentVisitor0() { + }, + __HasContentVisitor_Object_StatementSearchVisitor0: function __HasContentVisitor_Object_StatementSearchVisitor0() { + }, + ExtendMode0: function ExtendMode0(t0, t1) { + this.name = t0; + this._name = t1; + }, + MultiSpan0: function MultiSpan0(t0, t1, t2) { + this._multi_span0$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + SupportsNegation0: function SupportsNegation0(t0, t1) { + this.condition = t0; + this.span = t1; + }, + NoOpImporter: function NoOpImporter() { + }, + NoSourceMapBuffer0: function NoSourceMapBuffer0(t0) { + this._no_source_map_buffer0$_buffer = t0; + }, + AstNode0: function AstNode0() { + }, + _FakeAstNode0: function _FakeAstNode0(t0) { + this._node1$_callback = t0; + }, + CssNode0: function CssNode0() { + }, + CssParentNode0: function CssParentNode0() { + }, + _IsInvisibleVisitor1: function _IsInvisibleVisitor1(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor0: function __IsInvisibleVisitor_Object_EveryCssVisitor0() { + }, + readFile0(path) { + var sourceFile, t1, i, + contents = A._asString(A._readFile0(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (B.JSString_methods._codeUnitAt$1(contents, i) !== 65533) + continue; + throw A.wrapException(A.SassException$0("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0())); + } + return contents; + }, + _readFile0(path, encoding) { + return A._systemErrorToFileSystemException0(new A._readFile_closure0(path, encoding)); + }, + fileExists0(path) { + return A._systemErrorToFileSystemException0(new A.fileExists_closure0(path)); + }, + dirExists0(path) { + return A._systemErrorToFileSystemException0(new A.dirExists_closure0(path)); + }, + listDir0(path) { + return A._systemErrorToFileSystemException0(new A.listDir_closure0(false, path)); + }, + _systemErrorToFileSystemException0(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException0(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + FileSystemException0: function FileSystemException0(t0, t1) { + this.message = t0; + this.path = t1; + }, + Stderr0: function Stderr0(t0) { + this._node$_stderr = t0; + }, + _readFile_closure0: function _readFile_closure0(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + fileExists_closure0: function fileExists_closure0(t0) { + this.path = t0; + }, + dirExists_closure0: function dirExists_closure0(t0) { + this.path = t0; + }, + listDir_closure0: function listDir_closure0(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure1: function listDir__closure1(t0) { + this.path = t0; + }, + listDir__closure2: function listDir__closure2() { + }, + listDir_closure_list0: function listDir_closure_list0() { + }, + listDir__list_closure0: function listDir__list_closure0(t0, t1) { + this.parent = t0; + this.list = t1; + }, + ModifiableCssNode0: function ModifiableCssNode0() { + }, + ModifiableCssNode_hasFollowingSibling_closure0: function ModifiableCssNode_hasFollowingSibling_closure0() { + }, + ModifiableCssParentNode0: function ModifiableCssParentNode0() { + }, + main() { + J.set$compile$x(self.exports, A.allowInteropNamed("sass.compile", A.compile__compile$closure())); + J.set$compileString$x(self.exports, A.allowInteropNamed("sass.compileString", A.compile__compileString$closure())); + J.set$compileAsync$x(self.exports, A.allowInteropNamed("sass.compileAsync", A.compile__compileAsync$closure())); + J.set$compileStringAsync$x(self.exports, A.allowInteropNamed("sass.compileStringAsync", A.compile__compileStringAsync$closure())); + J.set$Value$x(self.exports, $.$get$valueClass()); + J.set$SassBoolean$x(self.exports, $.$get$booleanClass()); + J.set$SassArgumentList$x(self.exports, $.$get$argumentListClass()); + J.set$SassColor$x(self.exports, $.$get$colorClass()); + J.set$SassFunction$x(self.exports, $.$get$functionClass()); + J.set$SassList$x(self.exports, $.$get$listClass()); + J.set$SassMap$x(self.exports, $.$get$mapClass()); + J.set$SassNumber$x(self.exports, $.$get$numberClass()); + J.set$SassString$x(self.exports, $.$get$stringClass()); + J.set$sassNull$x(self.exports, B.C__SassNull0); + J.set$sassTrue$x(self.exports, B.SassBoolean_true0); + J.set$sassFalse$x(self.exports, B.SassBoolean_false0); + J.set$Exception$x(self.exports, $.$get$exceptionClass()); + J.set$Logger$x(self.exports, {silent: {warn: A.allowInteropNamed("sass.Logger.silent.warn", new A.main_closure0()), debug: A.allowInteropNamed("sass.Logger.silent.debug", new A.main_closure1())}}); + J.set$info$x(self.exports, "dart-sass\t1.55.0\t(Sass Compiler)\t[Dart]\ndart2js\t2.18.1\t(Dart Compiler)\t[Dart]"); + A.updateSourceSpanPrototype(); + J.set$render$x(self.exports, A.allowInteropNamed("sass.render", A.legacy__render$closure())); + J.set$renderSync$x(self.exports, A.allowInteropNamed("sass.renderSync", A.legacy__renderSync$closure())); + J.set$types$x(self.exports, {Boolean: $.$get$legacyBooleanClass(), Color: $.$get$legacyColorClass(), List: $.$get$legacyListClass(), Map: $.$get$legacyMapClass(), Null: $.$get$legacyNullClass(), Number: $.$get$legacyNumberClass(), String: $.$get$legacyStringClass(), Error: self.Error}); + J.set$NULL$x(self.exports, B.C__SassNull0); + J.set$TRUE$x(self.exports, B.SassBoolean_true0); + J.set$FALSE$x(self.exports, B.SassBoolean_false0); + }, + main_closure0: function main_closure0() { + }, + main_closure1: function main_closure1() { + }, + NodeToDartLogger: function NodeToDartLogger(t0, t1, t2) { + this._node = t0; + this._fallback = t1; + this._ascii = t2; + }, + NodeToDartLogger_warn_closure: function NodeToDartLogger_warn_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.message = t1; + _.span = t2; + _.trace = t3; + _.deprecation = t4; + }, + NodeToDartLogger_debug_closure: function NodeToDartLogger_debug_closure(t0, t1, t2) { + this.$this = t0; + this.message = t1; + this.span = t2; + }, + NullExpression0: function NullExpression0(t0) { + this.span = t0; + }, + legacyNullClass_closure: function legacyNullClass_closure() { + }, + legacyNullClass__closure: function legacyNullClass__closure() { + }, + _SassNull0: function _SassNull0() { + }, + NumberExpression0: function NumberExpression0(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + _parseNumber(value, unit) { + var invalidUnit, operands, t1, numerator, denominator, numeratorUnits, denominatorUnits; + if (unit == null || unit.length === 0) + return A.SassNumber_SassNumber0(value, null); + if (!J.contains$1$asx(unit, "*") && !B.JSString_methods.contains$1(unit, "/")) + return A.SassNumber_SassNumber0(value, unit); + invalidUnit = new A.ArgumentError(true, unit, "unit", "is invalid."); + operands = unit.split("/"); + t1 = operands.length; + if (t1 > 2) + throw A.wrapException(invalidUnit); + numerator = operands[0]; + denominator = t1 === 1 ? null : operands[1]; + t1 = type$.JSArray_String; + numeratorUnits = numerator.length === 0 ? A._setArrayType([], t1) : A._setArrayType(numerator.split("*"), t1); + if (B.JSArray_methods.any$1(numeratorUnits, new A._parseNumber_closure())) + throw A.wrapException(invalidUnit); + denominatorUnits = denominator == null ? A._setArrayType([], t1) : A._setArrayType(denominator.split("*"), t1); + if (B.JSArray_methods.any$1(denominatorUnits, new A._parseNumber_closure0())) + throw A.wrapException(invalidUnit); + return A.SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits); + }, + _NodeSassNumber: function _NodeSassNumber() { + }, + legacyNumberClass_closure: function legacyNumberClass_closure() { + }, + legacyNumberClass_closure0: function legacyNumberClass_closure0() { + }, + legacyNumberClass_closure1: function legacyNumberClass_closure1() { + }, + legacyNumberClass_closure2: function legacyNumberClass_closure2() { + }, + legacyNumberClass_closure3: function legacyNumberClass_closure3() { + }, + _parseNumber_closure: function _parseNumber_closure() { + }, + _parseNumber_closure0: function _parseNumber_closure0() { + }, + numberClass_closure: function numberClass_closure() { + }, + numberClass__closure: function numberClass__closure() { + }, + numberClass__closure0: function numberClass__closure0() { + }, + numberClass__closure1: function numberClass__closure1() { + }, + numberClass__closure2: function numberClass__closure2() { + }, + numberClass__closure3: function numberClass__closure3() { + }, + numberClass__closure4: function numberClass__closure4() { + }, + numberClass__closure5: function numberClass__closure5() { + }, + numberClass__closure6: function numberClass__closure6() { + }, + numberClass__closure7: function numberClass__closure7() { + }, + numberClass__closure8: function numberClass__closure8() { + }, + numberClass__closure9: function numberClass__closure9() { + }, + numberClass__closure10: function numberClass__closure10() { + }, + numberClass__closure11: function numberClass__closure11() { + }, + numberClass__closure12: function numberClass__closure12() { + }, + numberClass__closure13: function numberClass__closure13() { + }, + numberClass__closure14: function numberClass__closure14() { + }, + numberClass__closure15: function numberClass__closure15() { + }, + numberClass__closure16: function numberClass__closure16() { + }, + numberClass__closure17: function numberClass__closure17() { + }, + numberClass__closure18: function numberClass__closure18() { + }, + numberClass__closure19: function numberClass__closure19() { + }, + _ConstructorOptions0: function _ConstructorOptions0() { + }, + conversionFactor0(unit1, unit2) { + var innerMap; + if (unit1 === unit2) + return 1; + innerMap = B.Map_K2BWj.$index(0, unit1); + if (innerMap == null) + return null; + return innerMap.$index(0, unit2); + }, + SassNumber_SassNumber0(value, unit) { + return unit == null ? new A.UnitlessSassNumber0(value, null) : new A.SingleUnitSassNumber0(unit, value, null); + }, + SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits) { + var t1, numerators, t2, unsimplifiedDenominators, denominators, t3, valueDouble, _i, denominator, simplifiedAway, i, factor, _null = null; + if (denominatorUnits == null || J.get$isEmpty$asx(denominatorUnits)) + if (numeratorUnits == null || J.get$isEmpty$asx(numeratorUnits)) + return new A.UnitlessSassNumber0(value, _null); + else { + t1 = J.getInterceptor$asx(numeratorUnits); + if (t1.get$length(numeratorUnits) === 1) + return new A.SingleUnitSassNumber0(t1.$index(numeratorUnits, 0), value, _null); + else + return new A.ComplexSassNumber0(A.List_List$unmodifiable(numeratorUnits, type$.String), B.List_empty, value, _null); + } + else if (numeratorUnits == null || J.get$isEmpty$asx(numeratorUnits)) + return new A.ComplexSassNumber0(B.List_empty, A.List_List$unmodifiable(denominatorUnits, type$.String), value, _null); + else { + t1 = J.getInterceptor$ax(numeratorUnits); + numerators = t1.toList$0(numeratorUnits); + t2 = J.getInterceptor$ax(denominatorUnits); + unsimplifiedDenominators = t2.toList$0(denominatorUnits); + denominators = A._setArrayType([], type$.JSArray_String); + for (t3 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t3 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + while (true) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor0(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + if (t2.get$isEmpty(denominatorUnits)) + if (t1.get$isEmpty(numeratorUnits)) + return new A.UnitlessSassNumber0(valueDouble, _null); + else if (t1.get$length(numeratorUnits) === 1) + return new A.SingleUnitSassNumber0(t1.get$single(numeratorUnits), valueDouble, _null); + t1 = type$.String; + return new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + } + }, + SassNumber0: function SassNumber0() { + }, + SassNumber__coerceOrConvertValue_compatibilityException0: function SassNumber__coerceOrConvertValue_compatibilityException0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure3: function SassNumber__coerceOrConvertValue_closure3(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure4: function SassNumber__coerceOrConvertValue_closure4(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure5: function SassNumber__coerceOrConvertValue_closure5(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure6: function SassNumber__coerceOrConvertValue_closure6(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure0: function SassNumber_plus_closure0() { + }, + SassNumber_minus_closure0: function SassNumber_minus_closure0() { + }, + SassNumber_multiplyUnits_closure3: function SassNumber_multiplyUnits_closure3(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure4: function SassNumber_multiplyUnits_closure4(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure5: function SassNumber_multiplyUnits_closure5(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure6: function SassNumber_multiplyUnits_closure6(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure0: function SassNumber__areAnyConvertible_closure0(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure0: function SassNumber__canonicalizeUnitList_closure0() { + }, + SassNumber__canonicalMultiplier_closure0: function SassNumber__canonicalMultiplier_closure0(t0) { + this.$this = t0; + }, + SupportsOperation0: function SupportsOperation0(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + ParentSelector0: function ParentSelector0(t0) { + this.suffix = t0; + }, + ParentStatement0: function ParentStatement0() { + }, + ParentStatement_closure0: function ParentStatement_closure0() { + }, + ParentStatement__closure0: function ParentStatement__closure0() { + }, + ParenthesizedExpression0: function ParenthesizedExpression0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + Parser_isIdentifier0(text) { + var t1, t2, exception, logger = null; + try { + t1 = logger; + t2 = A.SpanScanner$(text, null); + new A.Parser1(t2, t1 == null ? B.StderrLogger_false0 : t1)._parser0$_parseIdentifier$0(); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassFormatException0) + return false; + else + throw exception; + } + }, + Parser1: function Parser1(t0, t1) { + this.scanner = t0; + this.logger = t1; + }, + Parser__parseIdentifier_closure0: function Parser__parseIdentifier_closure0(t0) { + this.$this = t0; + }, + Parser_scanIdentChar_matches0: function Parser_scanIdentChar_matches0(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + PlaceholderSelector0: function PlaceholderSelector0(t0) { + this.name = t0; + }, + PlainCssCallable0: function PlainCssCallable0(t0) { + this.name = t0; + }, + PrefixedMapView0: function PrefixedMapView0(t0, t1, t2) { + this._prefixed_map_view0$_map = t0; + this._prefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys0: function _PrefixedKeys0(t0) { + this._prefixed_map_view0$_view = t0; + }, + _PrefixedKeys_iterator_closure0: function _PrefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + PseudoSelector$0($name, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement0($name); + return new A.PseudoSelector0($name, A.unvendor0($name), t2, t1, argument, selector); + }, + PseudoSelector__isFakePseudoElement0($name) { + switch (B.JSString_methods._codeUnitAt$1($name, 0)) { + case 97: + case 65: + return A.equalsIgnoreCase0($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase0($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase0($name, "first-line") || A.equalsIgnoreCase0($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector0: function PseudoSelector0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _._pseudo$__PseudoSelector_specificity_FI = $; + }, + PseudoSelector_specificity_closure0: function PseudoSelector_specificity_closure0(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure1: function PseudoSelector_specificity__closure1() { + }, + PseudoSelector_specificity__closure2: function PseudoSelector_specificity__closure2() { + }, + PseudoSelector_unify_closure0: function PseudoSelector_unify_closure0() { + }, + PublicMemberMapView0: function PublicMemberMapView0(t0, t1) { + this._public_member_map_view0$_inner = t0; + this.$ti = t1; + }, + QualifiedName0: function QualifiedName0(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + createJSClass($name, $constructor) { + return type$.JSClass._as(A.allowInteropCaptureThisNamed($name, $constructor)); + }, + JSClassExtension_injectSuperclass(_this, superclass) { + var t1 = J.getInterceptor$x(superclass), + t2 = J.getInterceptor$x(_this); + self.Object.setPrototypeOf(t1.get$$prototype(superclass), J.get$$prototype$x(type$.JSClass._as(self.Object.getPrototypeOf(t2.get$$prototype(_this)).constructor))); + self.Object.setPrototypeOf(t2.get$$prototype(_this), self.Object.create(t1.get$$prototype(superclass))); + }, + JSClassExtension_setCustomInspect(_this, inspect) { + J.get$$prototype$x(_this)[self.util.inspect.custom] = A.allowInteropCaptureThis(new A.JSClassExtension_setCustomInspect_closure(inspect)); + }, + JSClassExtension_get_defineMethod(_this) { + return new A.JSClassExtension_get_defineMethod_closure(_this); + }, + JSClassExtension_defineMethods(_this, methods) { + methods.forEach$1(0, A.JSClassExtension_get_defineMethod(_this)); + }, + JSClassExtension_get_defineGetter(_this) { + return new A.JSClassExtension_get_defineGetter_closure(_this); + }, + JSClass0: function JSClass0() { + }, + JSClassExtension_setCustomInspect_closure: function JSClassExtension_setCustomInspect_closure(t0) { + this.inspect = t0; + }, + JSClassExtension_get_defineMethod_closure: function JSClassExtension_get_defineMethod_closure(t0) { + this._this = t0; + }, + JSClassExtension_get_defineGetter_closure: function JSClassExtension_get_defineGetter_closure(t0) { + this._this = t0; + }, + RenderContext0: function RenderContext0() { + }, + RenderContextOptions0: function RenderContextOptions0() { + }, + RenderContextResult0: function RenderContextResult0() { + }, + RenderContextResultStats0: function RenderContextResultStats0() { + }, + RenderOptions: function RenderOptions() { + }, + RenderResult: function RenderResult() { + }, + RenderResultStats: function RenderResultStats() { + }, + ImporterResult$(contents, sourceMapUrl, syntax) { + var t2, + t1 = syntax == null; + if (t1) + t2 = B.Syntax_SCSS_scss0; + else + t2 = syntax; + if ((sourceMapUrl == null ? null : sourceMapUrl.get$scheme()) === "") + A.throwExpression(A.ArgumentError$value(sourceMapUrl, "sourceMapUrl", "must be absolute")); + else if (t1 && true) + A.throwExpression(A.ArgumentError$("The syntax parameter must be passed.", null)); + return new A.ImporterResult0(contents, sourceMapUrl, t2); + }, + ImporterResult0: function ImporterResult0(t0, t1, t2) { + this.contents = t0; + this._result$_sourceMapUrl = t1; + this.syntax = t2; + }, + ReturnRule0: function ReturnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + main0(args) { + return A.main$body(args); + }, + main$body(args) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, printError, graph, source, destination, error, stackTrace, error0, stackTrace0, path, error1, error2, stackTrace1, buffer, options, t1, t2, t3, exception, t4, t5, _box_0, $async$exception, $async$exception1, $async$temp1; + var $async$main0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.printedError = false; + printError = new A.main_printError(_box_0); + _box_0.options = null; + $async$handler = 4; + options = A.ExecutableOptions_ExecutableOptions$parse(args); + _box_0.options = options; + t1 = options._options; + $._glyphs = !(t1.wasParsed$1("unicode") ? A._asBool(t1.$index(0, "unicode")) : $._glyphs !== B.C_AsciiGlyphSet) ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + $async$goto = A._asBool(_box_0.options._options.$index(0, "version")) ? 7 : 8; + break; + case 7: + // then + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait(A._loadVersion(), $async$main0); + case 9: + // returning from await. + $async$temp1.print($async$result); + J.set$exitCode$x(self.process, 0); + // goto return + $async$goto = 1; + break; + case 8: + // join + $async$goto = _box_0.options.get$interactive() ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(A.repl(_box_0.options), $async$main0); + case 12: + // returning from await. + // goto return + $async$goto = 1; + break; + case 11: + // join + t1 = type$.List_String._as(_box_0.options._options.$index(0, "load-path")); + t2 = _box_0.options; + t3 = type$.Uri; + graph = new A.StylesheetGraph(A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.StylesheetNode), A.ImportCache$(t1, A._asBool(t2._options.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(t2.get$color())), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + $async$goto = A._asBool(_box_0.options._options.$index(0, "watch")) ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(A.watch(_box_0.options, graph), $async$main0); + case 15: + // returning from await. + // goto return + $async$goto = 1; + break; + case 14: + // join + t1 = _box_0.options, t1._ensureSources$0(), t1 = t1._sourcesToDestinations, t1 = J.get$iterator$ax(t1.get$keys(t1)); + case 16: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 17; + break; + } + source = t1.get$current(t1); + t2 = _box_0.options; + t2._ensureSources$0(); + destination = t2._sourcesToDestinations.$index(0, source); + $async$handler = 19; + t2 = _box_0.options; + $async$goto = 22; + return A._asyncAwait(A.compileStylesheet(t2, graph, source, destination, A._asBool(t2._options.$index(0, "update"))), $async$main0); + case 22: + // returning from await. + $async$handler = 4; + // goto after finally + $async$goto = 21; + break; + case 19: + // catch + $async$handler = 18; + $async$exception = $async$currentError; + t2 = A.unwrapException($async$exception); + if (t2 instanceof A.SassException) { + error = t2; + stackTrace = A.getTraceFromException($async$exception); + new A.main_closure(_box_0, destination).call$0(); + t2 = _box_0.options._options; + if (!t2._parser.options._map.containsKey$1("color")) + A.throwExpression(A.ArgumentError$('Could not find an option named "color".', null)); + t2 = t2._parsed.containsKey$1("color") ? A._asBool(t2.$index(0, "color")) : J.$eq$(self.process.stdout.isTTY, true); + t2 = J.toString$1$color$(error, t2); + if (A._asBool(_box_0.options._options.$index(0, "trace"))) { + t3 = error; + t4 = typeof t3 == "string"; + if (t4 || typeof t3 == "number" || A._isBool(t3)) + t3 = null; + else { + t5 = $.$get$_traces(); + if (A._isBool(t3) || typeof t3 == "number" || t4) + A.throwExpression(A.ArgumentError$value(t3, string$.Expand, null)); + t3 = t5._jsWeakMap.get(t3); + } + if (t3 == null) + t3 = stackTrace; + } else + t3 = null; + printError.call$2(t2, t3); + if (J.get$exitCode$x(self.process) !== 66) + J.set$exitCode$x(self.process, 65); + if (A._asBool(_box_0.options._options.$index(0, "stop-on-error"))) { + // goto return + $async$goto = 1; + break; + } + } else if (t2 instanceof A.FileSystemException) { + error0 = t2; + stackTrace0 = A.getTraceFromException($async$exception); + path = error0.path; + t2 = path == null ? error0.message : "Error reading " + $.$get$context().relative$2$from(path, null) + ": " + error0.message + "."; + if (A._asBool(_box_0.options._options.$index(0, "trace"))) { + t3 = error0; + t4 = typeof t3 == "string"; + if (t4 || typeof t3 == "number" || A._isBool(t3)) + t3 = null; + else { + t5 = $.$get$_traces(); + if (A._isBool(t3) || typeof t3 == "number" || t4) + A.throwExpression(A.ArgumentError$value(t3, string$.Expand, null)); + t3 = t5._jsWeakMap.get(t3); + } + if (t3 == null) + t3 = stackTrace0; + } else + t3 = null; + printError.call$2(t2, t3); + J.set$exitCode$x(self.process, 66); + if (A._asBool(_box_0.options._options.$index(0, "stop-on-error"))) { + // goto return + $async$goto = 1; + break; + } + } else + throw $async$exception; + // goto after finally + $async$goto = 21; + break; + case 18: + // uncaught + // goto catch + $async$goto = 4; + break; + case 21: + // after finally + // goto for condition + $async$goto = 16; + break; + case 17: + // after for + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception1 = $async$currentError; + t1 = A.unwrapException($async$exception1); + if (t1 instanceof A.UsageException) { + error1 = t1; + A.print(error1.message + "\n"); + A.print("Usage: sass [output.css]\n sass : : \n"); + t1 = $.$get$ExecutableOptions__parser(); + A.print(new A._Usage(t1._optionsAndSeparators, new A.StringBuffer(""), t1.usageLineLength).generate$0()); + J.set$exitCode$x(self.process, 64); + } else { + error2 = t1; + stackTrace1 = A.getTraceFromException($async$exception1); + buffer = new A.StringBuffer(""); + t1 = _box_0.options; + if (t1 != null && t1.get$color()) + buffer._contents += "\x1b[31m\x1b[1m"; + buffer._contents += "Unexpected exception:"; + t1 = _box_0.options; + if (t1 != null && t1.get$color()) + buffer._contents += "\x1b[0m"; + buffer._contents += "\n"; + buffer._contents += A.S(error2) + "\n"; + t1 = buffer._contents; + t2 = A.getTrace(error2); + if (t2 == null) + t2 = stackTrace1; + printError.call$2(t1.charCodeAt(0) == 0 ? t1 : t1, t2); + J.set$exitCode$x(self.process, 255); + } + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$main0, $async$completer); + }, + _loadVersion() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue; + var $async$_loadVersion = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = "1.55.0 compiled with dart2js 2.18.1"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_loadVersion, $async$completer); + }, + main_printError: function main_printError(t0) { + this._box_0 = t0; + }, + main_closure: function main_closure(t0, t1) { + this._box_0 = t0; + this.destination = t1; + }, + SassParser0: function SassParser0(t0, t1, t2) { + var _ = this; + _._sass0$_currentIndentation = 0; + _._sass0$_spaces = _._sass0$_nextIndentationEnd = _._sass0$_nextIndentation = null; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + SassParser_children_closure0: function SassParser_children_closure0(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + _translateReturnValue(val) { + if (type$.Future_dynamic._is(val)) + return A.futureToPromise(val, type$.dynamic); + else + return val; + }, + main1() { + new Uint8Array(0); + A.main(); + J.set$cli_pkg_main_0_$x(self.exports, A._wrapMain(A.sass__main$closure())); + }, + _wrapMain(main) { + if (type$.dynamic_Function._is(main)) + return A.allowInterop(new A._wrapMain_closure(main)); + else + return A.allowInterop(new A._wrapMain_closure0(main)); + }, + _Exports: function _Exports() { + }, + _wrapMain_closure: function _wrapMain_closure(t0) { + this.main = t0; + }, + _wrapMain_closure0: function _wrapMain_closure0(t0) { + this.main = t0; + }, + ScssParser$0(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url), + t2 = logger == null ? B.StderrLogger_false0 : logger; + return new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, t2); + }, + ScssParser0: function ScssParser0(t0, t1, t2) { + var _ = this; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + }, + Selector0: function Selector0() { + }, + _IsInvisibleVisitor2: function _IsInvisibleVisitor2(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor0: function _IsBogusVisitor0(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure0: function _IsBogusVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + _IsUselessVisitor0: function _IsUselessVisitor0() { + }, + _IsUselessVisitor_visitComplexSelector_closure0: function _IsUselessVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + __IsBogusVisitor_Object_AnySelectorVisitor0: function __IsBogusVisitor_Object_AnySelectorVisitor0() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor0: function __IsInvisibleVisitor_Object_AnySelectorVisitor0() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor0: function __IsUselessVisitor_Object_AnySelectorVisitor0() { + }, + SelectorExpression0: function SelectorExpression0(t0) { + this.span = t0; + }, + _prependParent0(compound) { + var t2, _null = null, + t1 = compound.components, + first = B.JSArray_methods.get$first(t1); + if (first instanceof A.UniversalSelector0) + return _null; + if (first instanceof A.TypeSelector0) { + t2 = first.name; + if (t2.namespace != null) + return _null; + t2 = A._setArrayType([new A.ParentSelector0(t2.name)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t2, A.SubListIterable$(t1, 1, _null, A._arrayInstanceType(t1)._precomputed1)); + return A.CompoundSelector$0(t2); + } else { + t2 = A._setArrayType([new A.ParentSelector0(_null)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t2, t1); + return A.CompoundSelector$0(t2); + } + }, + _function7($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:selector"); + }, + _nest_closure0: function _nest_closure0() { + }, + _nest__closure1: function _nest__closure1(t0) { + this._box_0 = t0; + }, + _nest__closure2: function _nest__closure2() { + }, + _append_closure1: function _append_closure1() { + }, + _append__closure1: function _append__closure1() { + }, + _append__closure2: function _append__closure2() { + }, + _append___closure0: function _append___closure0(t0) { + this.parent = t0; + }, + _extend_closure0: function _extend_closure0() { + }, + _replace_closure0: function _replace_closure0() { + }, + _unify_closure0: function _unify_closure0() { + }, + _isSuperselector_closure0: function _isSuperselector_closure0() { + }, + _simpleSelectors_closure0: function _simpleSelectors_closure0() { + }, + _simpleSelectors__closure0: function _simpleSelectors__closure0() { + }, + _parse_closure0: function _parse_closure0() { + }, + SelectorParser$0(contents, allowParent, allowPlaceholder, logger, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.SelectorParser0(allowParent, allowPlaceholder, t1, logger == null ? B.StderrLogger_false0 : logger); + }, + SelectorParser0: function SelectorParser0(t0, t1, t2, t3) { + var _ = this; + _._selector$_allowParent = t0; + _._selector$_allowPlaceholder = t1; + _.scanner = t2; + _.logger = t3; + }, + SelectorParser_parse_closure0: function SelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure0: function SelectorParser_parseCompoundSelector_closure0(t0) { + this.$this = t0; + }, + serialize0(node, charset, indentWidth, inspect, lineFeed, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$0(indentWidth == null ? 2 : indentWidth, inspect, lineFeed, true, sourceMap, style, useSpaces); + node.accept$1(visitor); + t1 = visitor._serialize0$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure0()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_10 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A.SerializeResult0(prefix + css, t1); + }, + serializeValue0(value, inspect, quote) { + var visitor = A._SerializeVisitor$0(null, inspect, null, quote, false, null, true); + value.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + serializeSelector0(selector, inspect) { + var visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + selector.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + _SerializeVisitor$0(indentWidth, inspect, lineFeed, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer0(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_00 : style, + t3 = useSpaces ? 32 : 9, + t4 = indentWidth == null ? 2 : indentWidth, + t5 = lineFeed == null ? B.LineFeed_SsD : lineFeed; + A.RangeError_checkValueInInterval(t4, 0, 10, "indentWidth"); + return new A._SerializeVisitor0(t1, t2, inspect, quote, t3, t4, t5); + }, + serialize_closure0: function serialize_closure0() { + }, + _SerializeVisitor0: function _SerializeVisitor0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._serialize0$_buffer = t0; + _._serialize0$_indentation = 0; + _._serialize0$_style = t1; + _._serialize0$_inspect = t2; + _._serialize0$_quote = t3; + _._serialize0$_indentCharacter = t4; + _._serialize0$_indentWidth = t5; + _._lineFeed = t6; + }, + _SerializeVisitor_visitCssComment_closure0: function _SerializeVisitor_visitCssComment_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure0: function _SerializeVisitor_visitCssAtRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure0: function _SerializeVisitor_visitCssMediaRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure0: function _SerializeVisitor_visitCssImport_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure0: function _SerializeVisitor_visitCssImport__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure0: function _SerializeVisitor_visitCssKeyframeBlock_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure0: function _SerializeVisitor_visitCssStyleRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure0: function _SerializeVisitor_visitCssSupportsRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure1: function _SerializeVisitor_visitCssDeclaration_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure2: function _SerializeVisitor_visitCssDeclaration_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure2: function _SerializeVisitor_visitList_closure2() { + }, + _SerializeVisitor_visitList_closure3: function _SerializeVisitor_visitList_closure3(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure4: function _SerializeVisitor_visitList_closure4(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure0: function _SerializeVisitor_visitMap_closure0(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure0: function _SerializeVisitor_visitSelectorList_closure0() { + }, + _SerializeVisitor__write_closure0: function _SerializeVisitor__write_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure1: function _SerializeVisitor__visitChildren_closure1(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure2: function _SerializeVisitor__visitChildren_closure2(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle0: function OutputStyle0(t0) { + this._name = t0; + }, + LineFeed0: function LineFeed0(t0, t1, t2) { + this.name = t0; + this.text = t1; + this._name = t2; + }, + SerializeResult0: function SerializeResult0(t0, t1) { + this.css = t0; + this.sourceMap = t1; + }, + ShadowedModuleView_ifNecessary0(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist0(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist0(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist0(inner.get$mixins(), mixins) ? new A.ShadowedModuleView0(inner, A.ShadowedModuleView__shadowedMap0(inner.get$variables(), variables, type$.Value_2), A.ShadowedModuleView__shadowedMap0(inner.get$variableNodes(), variables, type$.AstNode_2), A.ShadowedModuleView__shadowedMap0(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap0(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView0<0>")) : null; + }, + ShadowedModuleView__shadowedMap0(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist0(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist0(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView0: function ShadowedModuleView0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view0$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + SilentComment0: function SilentComment0(t0, t1) { + this.text = t0; + this.span = t1; + }, + SimpleSelector0: function SimpleSelector0() { + }, + SimpleSelector_isSuperselector_closure0: function SimpleSelector_isSuperselector_closure0(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure0: function SimpleSelector_isSuperselector__closure0(t0) { + this.$this = t0; + }, + SingleUnitSassNumber0: function SingleUnitSassNumber0(t0, t1, t2) { + var _ = this; + _._single_unit$_unit = t0; + _._number1$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure0: function SingleUnitSassNumber__coerceToUnit_closure0(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure0: function SingleUnitSassNumber__coerceValueToUnit_closure0(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure1: function SingleUnitSassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure2: function SingleUnitSassNumber_multiplyUnits_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SourceMapBuffer0: function SourceMapBuffer0(t0, t1) { + var _ = this; + _._source_map_buffer0$_buffer = t0; + _._source_map_buffer0$_entries = t1; + _._source_map_buffer0$_column = _._source_map_buffer0$_line = 0; + _._source_map_buffer0$_inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure0: function SourceMapBuffer_buildSourceMap_closure0(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + updateSourceSpanPrototype() { + var t3, t4, _i, t5, + span = A.SourceFile$fromString("", null).span$1(0, 0), + t1 = type$.SourceSpan, + t2 = type$.String; + for (t1 = [span, new A.MultiSpan0(span, "", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), t1, t2))], t3 = type$.JSClass, t4 = type$.Function, _i = 0; _i < 2; ++_i) { + t5 = t3._as(t1[_i].constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["start", new A.updateSourceSpanPrototype_closure(), "end", new A.updateSourceSpanPrototype_closure0(), "url", new A.updateSourceSpanPrototype_closure1(), "text", new A.updateSourceSpanPrototype_closure2(), "context", new A.updateSourceSpanPrototype_closure3()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t5)); + } + t1 = t3._as(A.FileLocation$_(span.file, span._file$_start).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["line", new A.updateSourceSpanPrototype_closure4(), "column", new A.updateSourceSpanPrototype_closure5()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + }, + updateSourceSpanPrototype_closure: function updateSourceSpanPrototype_closure() { + }, + updateSourceSpanPrototype_closure0: function updateSourceSpanPrototype_closure0() { + }, + updateSourceSpanPrototype_closure1: function updateSourceSpanPrototype_closure1() { + }, + updateSourceSpanPrototype_closure2: function updateSourceSpanPrototype_closure2() { + }, + updateSourceSpanPrototype_closure3: function updateSourceSpanPrototype_closure3() { + }, + updateSourceSpanPrototype_closure4: function updateSourceSpanPrototype_closure4() { + }, + updateSourceSpanPrototype_closure5: function updateSourceSpanPrototype_closure5() { + }, + _IterableExtension__search0(_this, callback) { + var t1, value; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + value = callback.call$1(t1.get$current(t1)); + if (value != null) + return value; + } + return null; + }, + StatementSearchVisitor0: function StatementSearchVisitor0() { + }, + StatementSearchVisitor_visitIfRule_closure1: function StatementSearchVisitor_visitIfRule_closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure2: function StatementSearchVisitor_visitIfRule__closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure2: function StatementSearchVisitor_visitIfRule_closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure1: function StatementSearchVisitor_visitIfRule__closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure0: function StatementSearchVisitor_visitChildren_closure0(t0) { + this.$this = t0; + }, + StaticImport0: function StaticImport0(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + StderrLogger0: function StderrLogger0(t0) { + this.color = t0; + }, + StringExpression_quoteText0(text) { + var t1, + quote = A.StringExpression__bestQuote0(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""); + buffer._contents = "" + A.Primitives_stringFromCharCode(quote); + A.StringExpression__quoteInnerText0(text, quote, buffer, true); + t1 = buffer._contents += A.Primitives_stringFromCharCode(quote); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText0(text, quote, buffer, $static) { + var t1, t2, i, codeUnit, next, t3; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + next = B.JSString_methods._codeUnitAt$1(text, i + 1); + if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12 || A.isHex0(next)) + buffer.writeCharCode$1(32); + } + } else { + if (codeUnit !== quote) + if (codeUnit !== 92) + t3 = $static && codeUnit === 35 && i < t2 && B.JSString_methods._codeUnitAt$1(text, i + 1) === 123; + else + t3 = true; + else + t3 = true; + if (t3) + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(codeUnit); + } + } + }, + StringExpression__bestQuote0(strings) { + var t1, containsDoubleQuote, t2, t3, i, codeUnit; + for (t1 = J.get$iterator$ax(strings), containsDoubleQuote = false; t1.moveNext$0();) { + t2 = t1.get$current(t1); + for (t3 = t2.length, i = 0; i < t3; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(t2, i); + if (codeUnit === 39) + return 34; + if (codeUnit === 34) + containsDoubleQuote = true; + } + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression0: function StringExpression0(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + _codepointForIndex0(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function6($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:string"); + }, + _unquote_closure0: function _unquote_closure0() { + }, + _quote_closure0: function _quote_closure0() { + }, + _length_closure1: function _length_closure1() { + }, + _insert_closure0: function _insert_closure0() { + }, + _index_closure1: function _index_closure1() { + }, + _slice_closure0: function _slice_closure0() { + }, + _toUpperCase_closure0: function _toUpperCase_closure0() { + }, + _toLowerCase_closure0: function _toLowerCase_closure0() { + }, + _uniqueId_closure0: function _uniqueId_closure0() { + }, + _NodeSassString: function _NodeSassString() { + }, + legacyStringClass_closure: function legacyStringClass_closure() { + }, + legacyStringClass_closure0: function legacyStringClass_closure0() { + }, + legacyStringClass_closure1: function legacyStringClass_closure1() { + }, + stringClass_closure: function stringClass_closure() { + }, + stringClass__closure: function stringClass__closure() { + }, + stringClass__closure0: function stringClass__closure0() { + }, + stringClass__closure1: function stringClass__closure1() { + }, + stringClass__closure2: function stringClass__closure2() { + }, + stringClass__closure3: function stringClass__closure3() { + }, + _ConstructorOptions1: function _ConstructorOptions1() { + }, + SassString$0(_text, quotes) { + return new A.SassString0(_text, quotes); + }, + SassString0: function SassString0(t0, t1) { + var _ = this; + _._string0$_text = t0; + _._string0$_hasQuotes = t1; + _._string0$__SassString__sassLength_FI = $; + _._string0$_hashCache = null; + }, + ModifiableCssStyleRule$0(selector, span, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStyleRule0(selector, originalSelector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStyleRule0: function ModifiableCssStyleRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.selector = t0; + _.originalSelector = t1; + _.span = t2; + _.children = t3; + _._node0$_children = t4; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + StyleRule$0(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.StyleRule0(selector, span, t1, t2); + }, + StyleRule0: function StyleRule0(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + CssStylesheet0: function CssStylesheet0(t0, t1) { + this.children = t0; + this.span = t1; + }, + ModifiableCssStylesheet$0(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStylesheet0(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStylesheet0: function ModifiableCssStylesheet0(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._node0$_children = t2; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + StylesheetParser0: function StylesheetParser0() { + }, + StylesheetParser_parse_closure0: function StylesheetParser_parse_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure1: function StylesheetParser_parse__closure1(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure2: function StylesheetParser_parse__closure2() { + }, + StylesheetParser_parseArgumentDeclaration_closure0: function StylesheetParser_parseArgumentDeclaration_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure0: function StylesheetParser__parseSingleProduction_closure0(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser_parseSignature_closure: function StylesheetParser_parseSignature_closure(t0, t1) { + this.$this = t0; + this.requireParens = t1; + }, + StylesheetParser__statement_closure0: function StylesheetParser__statement_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure1: function StylesheetParser_variableDeclarationWithoutNamespace_closure1(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure2: function StylesheetParser_variableDeclarationWithoutNamespace_closure2(t0) { + this.declaration = t0; + }, + StylesheetParser__declarationOrBuffer_closure1: function StylesheetParser__declarationOrBuffer_closure1(t0) { + this.name = t0; + }, + StylesheetParser__declarationOrBuffer_closure2: function StylesheetParser__declarationOrBuffer_closure2(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__styleRule_closure0: function StylesheetParser__styleRule_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInStyleRule = t2; + _.start = t3; + }, + StylesheetParser__propertyOrVariableDeclaration_closure1: function StylesheetParser__propertyOrVariableDeclaration_closure1(t0) { + this._box_0 = t0; + }, + StylesheetParser__propertyOrVariableDeclaration_closure2: function StylesheetParser__propertyOrVariableDeclaration_closure2(t0, t1) { + this._box_0 = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure1: function StylesheetParser__atRootRule_closure1(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure2: function StylesheetParser__atRootRule_closure2() { + }, + StylesheetParser__eachRule_closure0: function StylesheetParser__eachRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure0: function StylesheetParser__functionRule_closure0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure1: function StylesheetParser__forRule_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure2: function StylesheetParser__forRule_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure0: function StylesheetParser__memberList_closure0(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure0: function StylesheetParser__includeRule_closure0(t0) { + this.contentArguments_ = t0; + }, + StylesheetParser_mediaRule_closure0: function StylesheetParser_mediaRule_closure0(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure0: function StylesheetParser__mixinRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.$arguments = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure0: function StylesheetParser_mozDocumentRule_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure0: function StylesheetParser_supportsRule_closure0(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure0: function StylesheetParser__whileRule_closure0(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure0: function StylesheetParser_unknownAtRule_closure0(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState0: function StylesheetParser__expression_resetState0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation0: function StylesheetParser__expression_resolveOneOperation0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations0: function StylesheetParser__expression_resolveOperations0(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression0: function StylesheetParser__expression_addSingleExpression0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator0: function StylesheetParser__expression_addOperator0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOneOperation = t2; + }, + StylesheetParser__expression_resolveSpaceExpressions0: function StylesheetParser__expression_resolveSpaceExpressions0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure0: function StylesheetParser_expressionUntilComma_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__unicodeRange_closure1: function StylesheetParser__unicodeRange_closure1() { + }, + StylesheetParser__unicodeRange_closure2: function StylesheetParser__unicodeRange_closure2() { + }, + StylesheetParser_namespacedExpression_closure0: function StylesheetParser_namespacedExpression_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure0: function StylesheetParser_trySpecialFunction_closure0() { + }, + StylesheetParser__expressionUntilComparison_closure0: function StylesheetParser__expressionUntilComparison_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure0: function StylesheetParser__publicIdentifier_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + Stylesheet$internal0(children, span, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule_2), + t2 = A._setArrayType([], type$.JSArray_ForwardRule_2), + t3 = A.List_List$unmodifiable(children, type$.Statement_2), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure0()); + t1 = new A.Stylesheet0(span, plainCss, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss0(children, span, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse0(contents, syntax, logger, url) { + var t1, t2; + switch (syntax) { + case B.Syntax_Sass_sass0: + t1 = A.SpanScanner$(contents, url); + t2 = logger == null ? B.StderrLogger_false0 : logger; + return new A.SassParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, t2).parse$0(); + case B.Syntax_SCSS_scss0: + return A.ScssParser$0(contents, logger, url).parse$0(); + case B.Syntax_CSS_css0: + t1 = A.SpanScanner$(contents, url); + t2 = logger == null ? B.StderrLogger_false0 : logger; + return new A.CssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, t2).parse$0(); + default: + throw A.wrapException(A.ArgumentError$("Unknown syntax " + syntax.toString$0(0) + ".", null)); + } + }, + Stylesheet0: function Stylesheet0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._stylesheet1$_uses = t2; + _._stylesheet1$_forwards = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + SupportsExpression0: function SupportsExpression0(t0) { + this.condition = t0; + }, + ModifiableCssSupportsRule$0(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssSupportsRule0(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssSupportsRule0: function ModifiableCssSupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._node0$_children = t3; + _._node0$_indexInParent = _._node0$_parent = null; + _.isGroupEnd = false; + }, + SupportsRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.SupportsRule0(condition, span, t1, t2); + }, + SupportsRule0: function SupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + NodeToDartImporter: function NodeToDartImporter(t0, t1) { + this._sync$_canonicalize = t0; + this._sync$_load = t1; + }, + Syntax_forPath0(path) { + switch (A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]) { + case ".sass": + return B.Syntax_Sass_sass0; + case ".css": + return B.Syntax_CSS_css0; + default: + return B.Syntax_SCSS_scss0; + } + }, + Syntax0: function Syntax0(t0, t1) { + this._syntax0$_name = t0; + this._name = t1; + }, + TerseLogger0: function TerseLogger0(t0, t1) { + this._terse$_warningCounts = t0; + this._terse$_inner = t1; + }, + TerseLogger_summarize_closure1: function TerseLogger_summarize_closure1() { + }, + TerseLogger_summarize_closure2: function TerseLogger_summarize_closure2() { + }, + TypeSelector0: function TypeSelector0(t0) { + this.name = t0; + }, + Types: function Types() { + }, + UnaryOperationExpression0: function UnaryOperationExpression0(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator0: function UnaryOperator0(t0, t1, t2) { + this.name = t0; + this.operator = t1; + this._name = t2; + }, + UnitlessSassNumber0: function UnitlessSassNumber0(t0, t1) { + this._number1$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + UniversalSelector0: function UniversalSelector0(t0) { + this.namespace = t0; + }, + UnprefixedMapView0: function UnprefixedMapView0(t0, t1, t2) { + this._unprefixed_map_view0$_map = t0; + this._unprefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys0: function _UnprefixedKeys0(t0) { + this._unprefixed_map_view0$_view = t0; + }, + _UnprefixedKeys_iterator_closure1: function _UnprefixedKeys_iterator_closure1(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure2: function _UnprefixedKeys_iterator_closure2(t0) { + this.$this = t0; + }, + JSUrl0: function JSUrl0() { + }, + UseRule0: function UseRule0(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + UserDefinedCallable0: function UserDefinedCallable0(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + fromImport0() { + var t1 = A._asBoolQ($.Zone__current.$index(0, B.Symbol__inImportRule)); + return t1 === true; + }, + resolveImportPath0(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport0() ? new A.resolveImportPath_closure1(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPath0(path)) : t1; + } + t1 = A.fromImport0() ? new A.resolveImportPath_closure2(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne0(A._tryPathWithExtensions0(path)); + return t1 == null ? A._tryPathAsDirectory0(path) : t1; + }, + _tryPathWithExtensions0(path) { + var result = A._tryPath0(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath0(path + ".scss")); + return result.length !== 0 ? result : A._tryPath0(path + ".css"); + }, + _tryPath0(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists0(partial)) + t1.push(partial); + if (A.fileExists0(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory0(path) { + var t1; + if (!A.dirExists0(path)) + return null; + t1 = A.fromImport0() ? new A._tryPathAsDirectory_closure0(path).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPathWithExtensions0(A.join(path, "index", null))) : t1; + }, + _exactlyOne0(paths) { + var t1 = paths.length; + if (t1 === 0) + return null; + if (t1 === 1) + return B.JSArray_methods.get$first(paths); + throw A.wrapException(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure0(), type$.String).join$1(0, "\n")); + }, + resolveImportPath_closure1: function resolveImportPath_closure1(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure2: function resolveImportPath_closure2(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure0: function _tryPathAsDirectory_closure0(t0) { + this.path = t0; + }, + _exactlyOne_closure0: function _exactlyOne_closure0() { + }, + jsThrow(error) { + return type$.Never._as($.$get$_jsThrow().call$1(error)); + }, + attachJsStack(error, trace) { + var traceString = trace.toString$0(0), + firstRealLine = B.JSString_methods.indexOf$1(traceString, "\n at"); + if (firstRealLine !== -1) + traceString = B.JSString_methods.substring$1(traceString, firstRealLine + 1); + error.stack = "Error: " + A.S(J.get$message$x(error)) + "\n" + traceString; + }, + jsForEach(object, callback) { + var t1, t2; + for (t1 = J.get$iterator$ax(self.Object.keys(object)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + callback.call$2(t2, object[t2]); + } + }, + defineGetter(object, $name, get, value) { + self.Object.defineProperty(object, $name, get == null ? {value: value, enumerable: false} : {get: A.allowInteropCaptureThis(get), enumerable: false}); + }, + allowInteropNamed($name, $function) { + $function = A.allowInterop($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + allowInteropCaptureThisNamed($name, $function) { + $function = A.allowInteropCaptureThis($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + _hideDartProperties(object) { + var t1, t2, t3, t4; + for (t1 = J.cast$1$0$ax(self.Object.getOwnPropertyNames(object), type$.String), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (B.JSString_methods.startsWith$1(t3, "_")) { + t4 = {value: object[t3], enumerable: false}; + self.Object.defineProperty(object, t3, t4); + } + } + }, + futureToPromise0(future) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure0(future))); + }, + jsToDartUrl(url) { + return A.Uri_parse(J.toString$0$(url)); + }, + dartToJSUrl(url) { + return new self.URL(url.toString$0(0)); + }, + toJSArray(iterable) { + var t1, t2, + array = new self.Array(); + for (t1 = J.get$iterator$ax(iterable), t2 = J.getInterceptor$x(array); t1.moveNext$0();) + t2.push$1(array, t1.get$current(t1)); + return array; + }, + objectToMap(object) { + var map = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.nullable_Object); + A.jsForEach(object, new A.objectToMap_closure(map)); + return map; + }, + jsToDartSeparator(separator) { + switch (separator) { + case " ": + return B.ListSeparator_EVt0; + case ",": + return B.ListSeparator_rXA0; + case "/": + return B.ListSeparator_zg90; + case null: + return B.ListSeparator_undecided_null_undecided0; + default: + A.jsThrow(new self.Error('Unknown separator "' + A.S(separator) + '".')); + } + }, + parseSyntax(syntax) { + if (syntax == null || syntax === "scss") + return B.Syntax_SCSS_scss0; + if (syntax === "indented") + return B.Syntax_Sass_sass0; + if (syntax === "css") + return B.Syntax_CSS_css0; + A.jsThrow(new self.Error('Unknown syntax "' + A.S(syntax) + '".')); + }, + _PropertyDescriptor0: function _PropertyDescriptor0() { + }, + futureToPromise_closure0: function futureToPromise_closure0(t0) { + this.future = t0; + }, + futureToPromise__closure0: function futureToPromise__closure0(t0) { + this.resolve = t0; + }, + futureToPromise__closure1: function futureToPromise__closure1(t0) { + this.reject = t0; + }, + objectToMap_closure: function objectToMap_closure(t0) { + this.map = t0; + }, + toSentence0(iter, conjunction) { + var t1 = iter.__internal$_iterable, + t2 = J.getInterceptor$asx(t1); + if (t2.get$length(t1) === 1) + return J.toString$0$(iter._f.call$1(t2.get$first(t1))); + return A.IterableExtension_get_exceptLast0(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter._f.call$1(t2.get$last(t1)))); + }, + indent0(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure0(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize0($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii0(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace0(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace0(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight0(string, excludeEscape) { + var end = A._lastNonWhitespace0(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace0(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = B.JSString_methods._codeUnitAt$1(string, i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace0(string, excludeEscape) { + var t1, i, codeUnit; + for (t1 = string.length, i = t1 - 1; i >= 0; --i) { + codeUnit = B.JSString_methods.codeUnitAt$1(string, i); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i !== 0 && i !== t1 && codeUnit === 92) + return i + 1; + else + return i; + } + return null; + }, + isPublic0(member) { + var start = B.JSString_methods._codeUnitAt$1(member, 0); + return start !== 45 && start !== 95; + }, + flattenVertically0(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure1($T), t1), true, t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + for (; queues.length !== 0;) { + if (!!queues.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure2(result, $T), true); + } + return result; + }, + firstOrNull0(iterable) { + var iterator = J.get$iterator$ax(iterable); + return iterator.moveNext$0() ? iterator.get$current(iterator) : null; + }, + codepointIndexToCodeUnitIndex0(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = B.JSString_methods._codeUnitAt$1(string, codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex0(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (B.JSString_methods._codeUnitAt$1(string, i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan0(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl0(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName0(span) { + var text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(span.file._decodedChars, span._file$_start, span._end), 0, null); + return A.trimAsciiRight0(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor0($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if (B.JSString_methods._codeUnitAt$1($name, 0) !== 45) + return $name; + if (B.JSString_methods._codeUnitAt$1($name, 1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1($name, i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase0(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null || false) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(B.JSString_methods._codeUnitAt$1(string1, i), B.JSString_methods._codeUnitAt$1(string2, i))) + return false; + return true; + }, + startsWithIgnoreCase0(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(B.JSString_methods._codeUnitAt$1(string, i), B.JSString_methods._codeUnitAt$1(prefix, i))) + return false; + return true; + }, + mapInPlace0(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence0(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(list1) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(list1); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._tail - list1._head & J.get$length$asx(list1._table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._tail - list2._head & J.get$length$asx(list2._table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack0(selections, lengths, $T).call$2(list1.get$length(list1) - 1, list2.get$length(list2) - 1); + }, + removeFirstWhere0(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll20(destination, source, K1, K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure0(destination, K1, K2, $V)); + }, + setAll0(map, keys, value) { + var t1; + for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice0(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync0(iterable, callback, $E, $F) { + return A.mapAsync$body0(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body0(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync0); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync0, $async$completer); + }, + putIfAbsentAsync0(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync0); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync0, $async$completer); + }, + copyMapOfMap0(map, K1, K2, $V) { + var t2, t3, t4, t5, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(K1, K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>")); + for (t2 = map.get$entries(map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = t3.key; + t3 = t3.value; + t5 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); + t5.addAll$1(0, t3); + t1.$indexSet(0, t4, t5); + } + return t1; + }, + copyMapOfList0(map, $K, $E) { + var t2, t3, + t1 = A.LinkedHashMap_LinkedHashMap$_empty($K, $E._eval$1("List<0>")); + for (t2 = map.get$entries(map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.$indexSet(0, t3.key, J.toList$0$ax(t3.value)); + } + return t1; + }, + consumeEscapedCharacter0(scanner) { + var first, value, i, next, t1; + scanner.expectChar$1(92); + first = scanner.peekChar$0(); + if (first == null) + return 65533; + else if (first === 10 || first === 13 || first === 12) + scanner.error$1(0, "Expected escape sequence."); + else if (A.isHex0(first)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next == null || !A.isHex0(next)) + break; + value = (value << 4 >>> 0) + A.asHex0(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + if (value !== 0) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) + return 65533; + else + return value; + } else + return scanner.readChar$0(); + }, + throwWithTrace0(error, trace) { + A.attachTrace0(error, trace); + throw A.wrapException(error); + }, + attachTrace0(error, trace) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + return; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap; + if (t1.get(error) == null) + t1.set(error, trace); + }, + getTrace0(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + IterableExtension_get_exceptLast0(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + indent_closure0: function indent_closure0(t0) { + this.indentation = t0; + }, + flattenVertically_closure1: function flattenVertically_closure1(t0) { + this.T = t0; + }, + flattenVertically_closure2: function flattenVertically_closure2(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack0: function longestCommonSubsequence_backtrack0(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure0: function mapAddAll2_closure0(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + CssValue0: function CssValue0(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + ValueExpression0: function ValueExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + ModifiableCssValue0: function ModifiableCssValue0(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + valueClass_closure: function valueClass_closure() { + }, + valueClass__closure: function valueClass__closure() { + }, + valueClass__closure0: function valueClass__closure0() { + }, + valueClass__closure1: function valueClass__closure1() { + }, + valueClass__closure2: function valueClass__closure2() { + }, + valueClass__closure3: function valueClass__closure3() { + }, + valueClass__closure4: function valueClass__closure4() { + }, + valueClass__closure5: function valueClass__closure5() { + }, + valueClass__closure6: function valueClass__closure6() { + }, + valueClass__closure7: function valueClass__closure7() { + }, + valueClass__closure8: function valueClass__closure8() { + }, + valueClass__closure9: function valueClass__closure9() { + }, + valueClass__closure10: function valueClass__closure10() { + }, + valueClass__closure11: function valueClass__closure11() { + }, + valueClass__closure12: function valueClass__closure12() { + }, + valueClass__closure13: function valueClass__closure13() { + }, + valueClass__closure14: function valueClass__closure14() { + }, + valueClass__closure15: function valueClass__closure15() { + }, + valueClass__closure16: function valueClass__closure16() { + }, + SassApiValue_assertSelector0(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._value$_selectorString$1($name); + try { + t1 = A.SelectorList_SelectorList$parse0(string, allowParent, true, null); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0($name == null ? t1 : "$" + $name + ": " + t1), stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector0(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._value$_selectorString$1($name); + try { + t1 = A.SelectorParser$0(string, allowParent, true, null, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0("$" + $name + ": " + t1), stackTrace); + } else + throw exception; + } + }, + Value0: function Value0() { + }, + VariableExpression0: function VariableExpression0(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + VariableDeclaration$0($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration0(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration0: function VariableDeclaration0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule0: function WarnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.WhileRule0(condition, span, t1, t2); + }, + WhileRule0: function WhileRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + printString(string) { + if (typeof dartPrint == "function") { + dartPrint(string); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(string); + return; + } + if (typeof window == "object") + return; + if (typeof print == "function") { + print(string); + return; + } + throw "Unable to print message: " + String(string); + }, + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; + }, + _convertDartFunctionFastCaptureThis(f) { + var ret, + existing = f._$dart_jsFunctionCaptureThis; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, this, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFastCaptureThis, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f._$dart_jsFunctionCaptureThis = ret; + return ret; + }, + _callDartFunctionFast(callback, $arguments) { + return A.Function_apply(callback, $arguments); + }, + _callDartFunctionFastCaptureThis(callback, $self, $arguments) { + var t1 = [$self]; + B.JSArray_methods.addAll$1(t1, $arguments); + return A.Function_apply(callback, t1); + }, + allowInterop(f) { + if (typeof f == "function") + return f; + else + return A._convertDartFunctionFast(f); + }, + allowInteropCaptureThis(f) { + if (typeof f == "function") + throw A.wrapException(A.ArgumentError$("Function is already a JS function so cannot capture this.", null)); + else + return A._convertDartFunctionFastCaptureThis(f); + }, + mergeMaps(map1, map2, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap$of(map1, $K, $V); + result.addAll$1(0, map2); + return result; + }, + groupBy(values, key, $S, $T) { + var t1, t2, _i, element, t3, t4, + map = A.LinkedHashMap_LinkedHashMap$_empty($T, $S._eval$1("List<0>")); + for (t1 = values.length, t2 = $S._eval$1("JSArray<0>"), _i = 0; _i < values.length; values.length === t1 || (0, A.throwConcurrentModificationError)(values), ++_i) { + element = values[_i]; + t3 = key.call$1(element); + t4 = map.$index(0, t3); + if (t4 == null) { + t4 = A._setArrayType([], t2); + map.$indexSet(0, t3, t4); + t3 = t4; + } else + t3 = t4; + J.add$1$ax(t3, element); + } + return map; + }, + minBy(values, orderBy) { + var t1, t2, minValue, minOrderBy, element, elementOrderBy; + for (t1 = new A.MappedIterator(J.get$iterator$ax(values.__internal$_iterable), values._f), t2 = A._instanceType(t1)._rest[1], minValue = null, minOrderBy = null; t1.moveNext$0();) { + element = t1.__internal$_current; + if (element == null) + element = t2._as(element); + elementOrderBy = orderBy.call$1(element); + if (minOrderBy == null || A.defaultCompare(elementOrderBy, minOrderBy) < 0) { + minOrderBy = elementOrderBy; + minValue = element; + } + } + return minValue; + }, + IterableExtension_get_firstOrNull(_this) { + var t1, + iterator = new J.ArrayIterator(_this, _this.length); + if (iterator.moveNext$0()) { + t1 = iterator._current; + return t1 == null ? A._instanceType(iterator)._precomputed1._as(t1) : t1; + } + return null; + }, + IterableNullableExtension_whereNotNull(_this, $T) { + return A.IterableNullableExtension_whereNotNull$body(_this, $T, $T); + }, + IterableNullableExtension_whereNotNull$body($async$_this, $async$$T, $async$type) { + return A._makeSyncStarIterable(function() { + var _this = $async$_this, + $T = $async$$T; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, element; + return function $async$IterableNullableExtension_whereNotNull($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = _this.get$iterator(_this); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + element = t1.get$current(t1); + $async$goto = element != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return element; + case 6: + // after yield + case 5: + // join + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, $async$type); + }, + IterableIntegerExtension_get_maxOrNull(_this) { + var value, t1, newValue, + iterator = new A.ListIterator(_this, _this.get$length(_this)); + if (iterator.moveNext$0()) { + value = iterator.__internal$_current; + if (value == null) + value = A._instanceType(iterator)._precomputed1._as(value); + for (t1 = A._instanceType(iterator)._precomputed1; iterator.moveNext$0();) { + newValue = iterator.__internal$_current; + if (newValue == null) + newValue = t1._as(newValue); + if (newValue > value) + value = newValue; + } + return value; + } + return null; + }, + IterableIntegerExtension_get_max(_this) { + var t1 = A.IterableIntegerExtension_get_maxOrNull(_this); + return t1 == null ? A.throwExpression(A.StateError$("No element")) : t1; + }, + IterableIntegerExtension_get_sum(_this) { + var t1, t2, result, t3; + for (t1 = new A.MappedIterator(J.get$iterator$ax(_this.__internal$_iterable), _this._f), t2 = A._instanceType(t1)._rest[1], result = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + result += t3 == null ? t2._as(t3) : t3; + } + return result; + }, + ListExtensions_mapIndexed(_this, convert, $E, $R) { + return A.ListExtensions_mapIndexed$body(_this, convert, $E, $R, $R); + }, + ListExtensions_mapIndexed$body($async$_this, $async$convert, $async$$E, $async$$R, $async$type) { + return A._makeSyncStarIterable(function() { + var _this = $async$_this, + convert = $async$convert, + $E = $async$$E, + $R = $async$$R; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, index; + return function $async$ListExtensions_mapIndexed($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = _this.length, index = 0; + case 2: + // for condition + if (!(index < t1)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return convert.call$2(index, _this[index]); + case 5: + // after yield + case 3: + // for update + ++index; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, $async$type); + }, + defaultCompare(value1, value2) { + return J.compareTo$1$ns(type$.Comparable_nullable_Object._as(value1), value2); + }, + current() { + var exception, t1, path, lastIndex, uri = null; + try { + uri = A.Uri_base(); + } catch (exception) { + if (type$.Exception._is(A.unwrapException(exception))) { + t1 = $._current; + if (t1 != null) + return t1; + throw exception; + } else + throw exception; + } + if (J.$eq$(uri, $._currentUriBase)) { + t1 = $._current; + t1.toString; + return t1; + } + $._currentUriBase = uri; + if ($.$get$Style_platform() == $.$get$Style_url()) + t1 = $._current = uri.resolve$1(".").toString$0(0); + else { + path = uri.toFilePath$0(); + lastIndex = path.length - 1; + t1 = $._current = lastIndex === 0 ? path : B.JSString_methods.substring$2(path, 0, lastIndex); + } + return t1; + }, + absolute(part1, part2, part3, part4, part5, part6, part7) { + return $.$get$context().absolute$7(part1, part2, part3, part4, part5, part6, part7); + }, + join(part1, part2, part3) { + var _null = null; + return $.$get$context().join$8(0, part1, part2, part3, _null, _null, _null, _null, _null); + }, + prettyUri(uri) { + return $.$get$context().prettyUri$1(uri); + }, + isAlphabetic(char) { + var t1; + if (!(char >= 65 && char <= 90)) + t1 = char >= 97 && char <= 122; + else + t1 = true; + return t1; + }, + isDriveLetter(path, index) { + var t1 = path.length, + t2 = index + 2; + if (t1 < t2) + return false; + if (!A.isAlphabetic(B.JSString_methods.codeUnitAt$1(path, index))) + return false; + if (B.JSString_methods.codeUnitAt$1(path, index + 1) !== 58) + return false; + if (t1 === t2) + return true; + return B.JSString_methods.codeUnitAt$1(path, t2) === 47; + }, + _combine(hash, value) { + hash = hash + value & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + return hash ^ hash >>> 6; + }, + _finish(hash) { + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >>> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + EvaluationContext_current() { + var context = $.Zone__current.$index(0, B.Symbol__evaluationContext); + if (type$.EvaluationContext._is(context)) + return context; + throw A.wrapException(A.StateError$(string$.No_Sass)); + }, + repl(options) { + return A.repl$body(options); + }, + repl$body(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$currentError, $async$next = [], repl, logger, evaluator, line, declaration, error, stackTrace, t4, t5, t6, t7, t8, line0, toZone, exception, t1, t2, t3, repl0; + var $async$repl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], type$.JSArray_String); + t2 = B.JSString_methods.$mul(" ", 3); + t3 = $.$get$alwaysValid(); + repl0 = new A.Repl(">> ", t2, t3, t1); + repl0.__Repl__adapter_A = new A.ReplAdapter(repl0); + repl = repl0; + t1 = options._options; + logger = new A.TrackingLogger(A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color())); + t2 = $.$get$context().absolute$7(".", null, null, null, null, null, null); + evaluator = new A.Evaluator(A._EvaluateVisitor$(null, A.ImportCache$(type$.List_String._as(t1.$index(0, "load-path")), logger), logger, null, false, false), new A.FilesystemImporter(t2)); + t2 = repl.__Repl__adapter_A; + t2 === $ && A.throwUnnamedLateFieldNI(); + t2 = new A._StreamIterator(A.checkNotNullable(t2.runAsync$0(), "stream", type$.Object)); + $async$handler = 2; + t1 = type$.Expression, t3 = type$.String, t4 = type$.VariableDeclaration; + case 5: + // for condition + $async$goto = 7; + return A._asyncAwait(t2.moveNext$0(), $async$repl); + case 7: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 6; + break; + } + line = t2.get$current(t2); + if (J.trim$0$s(line).length === 0) { + // goto for condition + $async$goto = 5; + break; + } + try { + if (J.startsWith$1$s(line, "@")) { + t5 = evaluator; + t6 = logger; + t7 = A.SpanScanner$(line, null); + if (t6 == null) + t6 = B.StderrLogger_false; + t6 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t7, t6).parseUseRule$0(); + t5._visitor.runStatement$2(t5._importer, t6); + // goto for condition + $async$goto = 5; + break; + } + t5 = A.SpanScanner$(line, null); + if (new A.Parser(t5, B.StderrLogger_false)._isVariableDeclarationLike$0()) { + t5 = logger; + t6 = A.SpanScanner$(line, null); + if (t5 == null) + t5 = B.StderrLogger_false; + declaration = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t6, t5).parseVariableDeclaration$0(); + t5 = evaluator; + t5._visitor.runStatement$2(t5._importer, declaration); + t5 = evaluator; + t6 = declaration.name; + t7 = declaration.span; + t8 = declaration.namespace; + line0 = t5._visitor.runExpression$2(t5._importer, new A.VariableExpression(t8, t6, t7)).toString$0(0); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } else { + t5 = evaluator; + t6 = logger; + t7 = A.SpanScanner$(line, null); + if (t6 == null) + t6 = B.StderrLogger_false; + t6 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t7, t6); + t6 = t6._parseSingleProduction$1$1(t6.get$_expression(), t1); + line0 = t5._visitor.runExpression$2(t5._importer, t6).toString$0(0); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + } catch (exception) { + t5 = A.unwrapException(exception); + if (t5 instanceof A.SassException) { + error = t5; + stackTrace = A.getTraceFromException(exception); + t5 = error; + t6 = typeof t5 == "string"; + if (t6 || typeof t5 == "number" || A._isBool(t5)) + t5 = null; + else { + t7 = $.$get$_traces(); + if (A._isBool(t5) || typeof t5 == "number" || t6) + A.throwExpression(A.ArgumentError$value(t5, string$.Expand, null)); + t5 = t7._jsWeakMap.get(t5); + } + if (t5 == null) + t5 = stackTrace; + A._logError(error, t5, line, repl, options, logger); + } else + throw exception; + } + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + $async$next.push(4); + // goto finally + $async$goto = 3; + break; + case 2: + // uncaught + $async$next = [1]; + case 3: + // finally + $async$handler = 1; + $async$goto = 8; + return A._asyncAwait(t2.cancel$0(), $async$repl); + case 8: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 4: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$repl, $async$completer); + }, + _logError(error, stackTrace, line, repl, options, logger) { + var t2, spacesBeforeError, t3, + t1 = A.SourceSpanException.prototype.get$span.call(error, error); + if (t1.get$sourceUrl(t1) == null) + if (!A._asBool(options._options.$index(0, "quiet"))) + t1 = logger._emittedDebug || logger._emittedWarning; + else + t1 = false; + else + t1 = true; + if (t1) { + A.print(error.toString$1$color(0, options.get$color())); + return; + } + t1 = options.get$color() ? "" + "\x1b[31m" : ""; + t2 = A.SourceSpanException.prototype.get$span.call(error, error); + t2 = t2.get$start(t2); + spacesBeforeError = repl.prompt.length + t2.file.getColumn$1(t2.offset); + if (options.get$color()) { + t2 = A.SourceSpanException.prototype.get$span.call(error, error); + t2 = t2.get$start(t2); + t2 = t2.file.getColumn$1(t2.offset) < line.length; + } else + t2 = false; + if (t2) + t1 = t1 + ("\x1b[1F\x1b[" + spacesBeforeError + "C") + (A.SourceSpanException.prototype.get$span.call(error, error).get$text() + "\n"); + t2 = B.JSString_methods.$mul(" ", spacesBeforeError); + t3 = A.SourceSpanException.prototype.get$span.call(error, error); + t3 = t1 + t2 + (B.JSString_methods.$mul("^", Math.max(1, t3.get$length(t3))) + "\n"); + t1 = options.get$color() ? t3 + "\x1b[0m" : t3; + t1 += "Error: " + error._span_exception$_message + "\n"; + if (A._asBool(options._options.$index(0, "trace"))) + t1 += A.Trace_Trace$from(stackTrace).get$terse().toString$0(0); + A.print(B.JSString_methods.trimRight$0(t1.charCodeAt(0) == 0 ? t1 : t1)); + }, + isWhitespace(character) { + return character === 32 || character === 9 || character === 10 || character === 13 || character === 12; + }, + isNewline(character) { + return character === 10 || character === 13 || character === 12; + }, + isAlphabetic0(character) { + var t1; + if (!(character >= 97 && character <= 122)) + t1 = character >= 65 && character <= 90; + else + t1 = true; + return t1; + }, + isDigit(character) { + return character != null && character >= 48 && character <= 57; + }, + isHex(character) { + if (character == null) + return false; + if (A.isDigit(character)) + return true; + if (character >= 97 && character <= 102) + return true; + if (character >= 65 && character <= 70) + return true; + return false; + }, + asHex(character) { + if (character <= 57) + return character - 48; + if (character <= 70) + return 10 + character - 65; + return 10 + character - 97; + }, + hexCharFor(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite(character) { + switch (character) { + case 40: + return 41; + case 123: + return 125; + case 91: + return 93; + default: + throw A.wrapException(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + }, + characterEqualsIgnoreCase(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + NullableExtension_andThen(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + SetExtension_removeNull(_this, $T) { + _this.remove$1(0, null); + return A.Set_castFrom(_this, _this.get$_newSimilarSet(), A._instanceType(_this)._precomputed1, $T); + }, + fuzzyEquals(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { + t1 = $.$get$_inverseEpsilon(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon())); + }, + fuzzyLessThan(number1, number2) { + return number1 < number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyLessThanOrEquals(number1, number2) { + return number1 < number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThan(number1, number2) { + return number1 > number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThanOrEquals(number1, number2) { + return number1 > number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyAsInt(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals(number, rounded) ? rounded : null; + }, + fuzzyRound(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange(number, min, max) { + if (A.fuzzyEquals(number, min)) + return min; + if (A.fuzzyEquals(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange(number, min, max, $name) { + var result = A.fuzzyCheckRange(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass(num1, num2) { + var result; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + SpanExtensions_trimLeft(_this) { + var t5, + t1 = _this._file$_start, + t2 = _this._end, + t3 = _this.file._decodedChars, + t4 = t3.length, + start = 0; + while (true) { + t5 = B.JSString_methods._codeUnitAt$1(A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2, t4))), 0, null), start); + if (!(t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight(_this) { + var t5, + t1 = _this._file$_start, + t2 = _this._end, + t3 = _this.file._decodedChars, + end = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3, t1, t2), 0, null).length - 1, + t4 = t3.length; + while (true) { + t5 = B.JSString_methods.codeUnitAt$1(A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2, t4))), 0, null), end); + if (!(t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + encodeVlq(value) { + var res, signBit, digit, t1; + if (value < $.$get$MIN_INT32() || value > $.$get$MAX_INT32()) + throw A.wrapException(A.ArgumentError$("expected 32 bit int, got: " + value, null)); + res = A._setArrayType([], type$.JSArray_String); + if (value < 0) { + value = -value; + signBit = 1; + } else + signBit = 0; + value = value << 1 | signBit; + do { + digit = value & 31; + value = value >>> 5; + t1 = value > 0; + res.push(string$.ABCDEF[t1 ? digit | 32 : digit]); + } while (t1); + return res; + }, + isAllTheSame(iter) { + var firstValue, t1, t2, value; + if (iter.get$length(iter) === 0) + return true; + firstValue = iter.get$first(iter); + for (t1 = A.SubListIterable$(iter, 1, null, iter.$ti._eval$1("ListIterable.E")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + value = t1.__internal$_current; + if (!J.$eq$(value == null ? t2._as(value) : value, firstValue)) + return false; + } + return true; + }, + replaceFirstNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, null); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no null elements.", null)); + list[index] = element; + }, + replaceWithNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, element); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no elements matching " + element.toString$0(0) + ".", null)); + list[index] = null; + }, + countCodeUnits(string, codeUnit) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(string), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === codeUnit) + ++count; + } + return count; + }, + findLineStart(context, text, column) { + var beginningOfLine, index, lineStart; + if (text.length === 0) + for (beginningOfLine = 0; true;) { + index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); + if (index === -1) + return context.length - beginningOfLine >= column ? beginningOfLine : null; + if (index - beginningOfLine >= column) + return beginningOfLine; + beginningOfLine = index + 1; + } + index = B.JSString_methods.indexOf$1(context, text); + for (; index !== -1;) { + lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; + if (column === index - lineStart) + return lineStart; + index = B.JSString_methods.indexOf$2(context, text, index + 1); + } + return null; + }, + validateErrorArgs(string, match, position, $length) { + var t2, + t1 = position != null; + if (t1) + if (position < 0) + throw A.wrapException(A.RangeError$("position must be greater than or equal to 0.")); + else if (position > string.length) + throw A.wrapException(A.RangeError$("position must be less than or equal to the string length.")); + t2 = $length != null; + if (t2 && $length < 0) + throw A.wrapException(A.RangeError$("length must be greater than or equal to 0.")); + if (t1 && t2 && position + $length > string.length) + throw A.wrapException(A.RangeError$("position plus length must not go beyond the end of the string.")); + }, + isWhitespace0(character) { + return character === 32 || character === 9 || character === 10 || character === 13 || character === 12; + }, + isNewline0(character) { + return character === 10 || character === 13 || character === 12; + }, + isAlphabetic1(character) { + var t1; + if (!(character >= 97 && character <= 122)) + t1 = character >= 65 && character <= 90; + else + t1 = true; + return t1; + }, + isDigit0(character) { + return character != null && character >= 48 && character <= 57; + }, + isHex0(character) { + if (character == null) + return false; + if (A.isDigit0(character)) + return true; + if (character >= 97 && character <= 102) + return true; + if (character >= 65 && character <= 70) + return true; + return false; + }, + asHex0(character) { + if (character <= 57) + return character - 48; + if (character <= 70) + return 10 + character - 65; + return 10 + character - 97; + }, + hexCharFor0(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite0(character) { + switch (character) { + case 40: + return 41; + case 123: + return 125; + case 91: + return 93; + default: + throw A.wrapException(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + }, + characterEqualsIgnoreCase0(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + EvaluationContext_current0() { + var context = $.Zone__current.$index(0, B.Symbol__evaluationContext); + if (type$.EvaluationContext_2._is(context)) + return context; + throw A.wrapException(A.StateError$(string$.No_Sass)); + }, + NullableExtension_andThen0(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + fuzzyEquals0(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { + t1 = $.$get$_inverseEpsilon0(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode0(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon0())); + }, + fuzzyLessThan0(number1, number2) { + return number1 < number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyLessThanOrEquals0(number1, number2) { + return number1 < number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThan0(number1, number2) { + return number1 > number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThanOrEquals0(number1, number2) { + return number1 > number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyIsInt(number) { + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return false; + return A.fuzzyEquals0(number, B.JSNumber_methods.round$0(number)); + }, + fuzzyAsInt0(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals0(number, rounded) ? rounded : null; + }, + fuzzyRound0(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange0(number, min, max) { + if (A.fuzzyEquals0(number, min)) + return min; + if (A.fuzzyEquals0(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange0(number, min, max, $name) { + var result = A.fuzzyCheckRange0(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass0(num1, num2) { + var result; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + SpanExtensions_trimLeft0(_this) { + var t5, + t1 = _this._file$_start, + t2 = _this._end, + t3 = _this.file._decodedChars, + t4 = t3.length, + start = 0; + while (true) { + t5 = B.JSString_methods._codeUnitAt$1(A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2, t4))), 0, null), start); + if (!(t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight0(_this) { + var t5, + t1 = _this._file$_start, + t2 = _this._end, + t3 = _this.file._decodedChars, + end = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3, t1, t2), 0, null).length - 1, + t4 = t3.length; + while (true) { + t5 = B.JSString_methods.codeUnitAt$1(A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2, t4))), 0, null), end); + if (!(t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + unwrapValue(object) { + var value; + if (object != null) { + if (object instanceof A.Value0) + return object; + value = object.dartValue; + if (value != null && value instanceof A.Value0) + return value; + if (object instanceof self.Error) + throw A.wrapException(object); + } + throw A.wrapException(A.S(object) + " must be a Sass value type."); + }, + wrapValue(value) { + var t1; + if (value instanceof A.SassColor0) { + t1 = A.callConstructor($.$get$legacyColorClass(), [null, null, null, null, value]); + return t1; + } + if (value instanceof A.SassList0) { + t1 = A.callConstructor($.$get$legacyListClass(), [null, null, value]); + return t1; + } + if (value instanceof A.SassMap0) { + t1 = A.callConstructor($.$get$legacyMapClass(), [null, value]); + return t1; + } + if (value instanceof A.SassNumber0) { + t1 = A.callConstructor($.$get$legacyNumberClass(), [null, null, value]); + return t1; + } + if (value instanceof A.SassString0) { + t1 = A.callConstructor($.$get$legacyStringClass(), [null, value]); + return t1; + } + return value; + } + }, + J = { + makeDispatchRecord(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor(object) { + var proto, objectProto, $constructor, interceptor, t1, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + A.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); + } + $constructor = object.constructor; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; + } + if (interceptor != null) + return interceptor; + interceptor = A.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return B.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return B.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return B.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return B.UnknownJavaScriptObject_methods; + } + return B.UnknownJavaScriptObject_methods; + }, + JSArray_JSArray$fixed($length, $E) { + if ($length < 0 || $length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$allocateFixed($length, $E) { + if ($length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$growable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$allocateGrowable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$markFixed(allocation, $E) { + return J.JSArray_markFixedList(A._setArrayType(allocation, $E._eval$1("JSArray<0>"))); + }, + JSArray_markFixedList(list) { + list.fixed$length = Array; + return list; + }, + JSArray_markUnmodifiableList(list) { + list.fixed$length = Array; + list.immutable$list = Array; + return list; + }, + JSArray__compareAny(a, b) { + return J.compareTo$1$ns(a, b); + }, + JSString__isWhitespace(codeUnit) { + if (codeUnit < 256) + switch (codeUnit) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 133: + case 160: + return true; + default: + return false; + } + switch (codeUnit) { + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8232: + case 8233: + case 8239: + case 8287: + case 12288: + case 65279: + return true; + default: + return false; + } + }, + JSString__skipLeadingWhitespace(string, index) { + var t1, codeUnit; + for (t1 = string.length; index < t1;) { + codeUnit = B.JSString_methods._codeUnitAt$1(string, index); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + ++index; + } + return index; + }, + JSString__skipTrailingWhitespace(string, index) { + var index0, codeUnit; + for (; index > 0; index = index0) { + index0 = index - 1; + codeUnit = B.JSString_methods.codeUnitAt$1(string, index0); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + } + return index; + }, + getInterceptor$(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ansx(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$asx(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ax(receiver) { + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$n(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$ns(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$s(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$u(receiver) { + if (receiver == null) + return J.JSNull.prototype; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$x(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$z(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + set$Exception$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Exception(receiver, value); + }, + set$FALSE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$FALSE(receiver, value); + }, + set$Logger$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Logger(receiver, value); + }, + set$NULL$x(receiver, value) { + return J.getInterceptor$x(receiver).set$NULL(receiver, value); + }, + set$SassArgumentList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassArgumentList(receiver, value); + }, + set$SassBoolean$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassBoolean(receiver, value); + }, + set$SassColor$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassColor(receiver, value); + }, + set$SassFunction$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassFunction(receiver, value); + }, + set$SassList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassList(receiver, value); + }, + set$SassMap$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassMap(receiver, value); + }, + set$SassNumber$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassNumber(receiver, value); + }, + set$SassString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassString(receiver, value); + }, + set$TRUE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$TRUE(receiver, value); + }, + set$Value$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Value(receiver, value); + }, + set$cli_pkg_main_0_$x(receiver, value) { + return J.getInterceptor$x(receiver).set$cli_pkg_main_0_(receiver, value); + }, + set$compile$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compile(receiver, value); + }, + set$compileAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileAsync(receiver, value); + }, + set$compileString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileString(receiver, value); + }, + set$compileStringAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileStringAsync(receiver, value); + }, + set$context$x(receiver, value) { + return J.getInterceptor$x(receiver).set$context(receiver, value); + }, + set$dartValue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$dartValue(receiver, value); + }, + set$exitCode$x(receiver, value) { + return J.getInterceptor$x(receiver).set$exitCode(receiver, value); + }, + set$info$x(receiver, value) { + return J.getInterceptor$x(receiver).set$info(receiver, value); + }, + set$length$asx(receiver, value) { + return J.getInterceptor$asx(receiver).set$length(receiver, value); + }, + set$render$x(receiver, value) { + return J.getInterceptor$x(receiver).set$render(receiver, value); + }, + set$renderSync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$renderSync(receiver, value); + }, + set$sassFalse$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassFalse(receiver, value); + }, + set$sassNull$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassNull(receiver, value); + }, + set$sassTrue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassTrue(receiver, value); + }, + set$types$x(receiver, value) { + return J.getInterceptor$x(receiver).set$types(receiver, value); + }, + get$$prototype$x(receiver) { + return J.getInterceptor$x(receiver).get$$prototype(receiver); + }, + get$_dartException$x(receiver) { + return J.getInterceptor$x(receiver).get$_dartException(receiver); + }, + get$alertAscii$x(receiver) { + return J.getInterceptor$x(receiver).get$alertAscii(receiver); + }, + get$alertColor$x(receiver) { + return J.getInterceptor$x(receiver).get$alertColor(receiver); + }, + get$blue$x(receiver) { + return J.getInterceptor$x(receiver).get$blue(receiver); + }, + get$brackets$x(receiver) { + return J.getInterceptor$x(receiver).get$brackets(receiver); + }, + get$charset$x(receiver) { + return J.getInterceptor$x(receiver).get$charset(receiver); + }, + get$code$x(receiver) { + return J.getInterceptor$x(receiver).get$code(receiver); + }, + get$current$x(receiver) { + return J.getInterceptor$x(receiver).get$current(receiver); + }, + get$dartValue$x(receiver) { + return J.getInterceptor$x(receiver).get$dartValue(receiver); + }, + get$debug$x(receiver) { + return J.getInterceptor$x(receiver).get$debug(receiver); + }, + get$denominatorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$denominatorUnits(receiver); + }, + get$end$z(receiver) { + return J.getInterceptor$z(receiver).get$end(receiver); + }, + get$env$x(receiver) { + return J.getInterceptor$x(receiver).get$env(receiver); + }, + get$exitCode$x(receiver) { + return J.getInterceptor$x(receiver).get$exitCode(receiver); + }, + get$fiber$x(receiver) { + return J.getInterceptor$x(receiver).get$fiber(receiver); + }, + get$file$x(receiver) { + return J.getInterceptor$x(receiver).get$file(receiver); + }, + get$first$ax(receiver) { + return J.getInterceptor$ax(receiver).get$first(receiver); + }, + get$functions$x(receiver) { + return J.getInterceptor$x(receiver).get$functions(receiver); + }, + get$green$x(receiver) { + return J.getInterceptor$x(receiver).get$green(receiver); + }, + get$hashCode$(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); + }, + get$importer$x(receiver) { + return J.getInterceptor$x(receiver).get$importer(receiver); + }, + get$importers$x(receiver) { + return J.getInterceptor$x(receiver).get$importers(receiver); + }, + get$isEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isEmpty(receiver); + }, + get$isNotEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isNotEmpty(receiver); + }, + get$isTTY$x(receiver) { + return J.getInterceptor$x(receiver).get$isTTY(receiver); + }, + get$iterator$ax(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }, + get$keys$z(receiver) { + return J.getInterceptor$z(receiver).get$keys(receiver); + }, + get$last$ax(receiver) { + return J.getInterceptor$ax(receiver).get$last(receiver); + }, + get$length$asx(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }, + get$loadPaths$x(receiver) { + return J.getInterceptor$x(receiver).get$loadPaths(receiver); + }, + get$logger$x(receiver) { + return J.getInterceptor$x(receiver).get$logger(receiver); + }, + get$message$x(receiver) { + return J.getInterceptor$x(receiver).get$message(receiver); + }, + get$mtime$x(receiver) { + return J.getInterceptor$x(receiver).get$mtime(receiver); + }, + get$name$x(receiver) { + return J.getInterceptor$x(receiver).get$name(receiver); + }, + get$numeratorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$numeratorUnits(receiver); + }, + get$options$x(receiver) { + return J.getInterceptor$x(receiver).get$options(receiver); + }, + get$parent$z(receiver) { + return J.getInterceptor$z(receiver).get$parent(receiver); + }, + get$path$x(receiver) { + return J.getInterceptor$x(receiver).get$path(receiver); + }, + get$platform$x(receiver) { + return J.getInterceptor$x(receiver).get$platform(receiver); + }, + get$quietDeps$x(receiver) { + return J.getInterceptor$x(receiver).get$quietDeps(receiver); + }, + get$quotes$x(receiver) { + return J.getInterceptor$x(receiver).get$quotes(receiver); + }, + get$red$x(receiver) { + return J.getInterceptor$x(receiver).get$red(receiver); + }, + get$reversed$ax(receiver) { + return J.getInterceptor$ax(receiver).get$reversed(receiver); + }, + get$runtimeType$u(receiver) { + return J.getInterceptor$u(receiver).get$runtimeType(receiver); + }, + get$separator$x(receiver) { + return J.getInterceptor$x(receiver).get$separator(receiver); + }, + get$single$ax(receiver) { + return J.getInterceptor$ax(receiver).get$single(receiver); + }, + get$sourceMap$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMap(receiver); + }, + get$sourceMapIncludeSources$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMapIncludeSources(receiver); + }, + get$span$z(receiver) { + return J.getInterceptor$z(receiver).get$span(receiver); + }, + get$start$z(receiver) { + return J.getInterceptor$z(receiver).get$start(receiver); + }, + get$stderr$x(receiver) { + return J.getInterceptor$x(receiver).get$stderr(receiver); + }, + get$stdin$x(receiver) { + return J.getInterceptor$x(receiver).get$stdin(receiver); + }, + get$style$x(receiver) { + return J.getInterceptor$x(receiver).get$style(receiver); + }, + get$syntax$x(receiver) { + return J.getInterceptor$x(receiver).get$syntax(receiver); + }, + get$trace$z(receiver) { + return J.getInterceptor$z(receiver).get$trace(receiver); + }, + get$url$x(receiver) { + return J.getInterceptor$x(receiver).get$url(receiver); + }, + get$values$z(receiver) { + return J.getInterceptor$z(receiver).get$values(receiver); + }, + get$verbose$x(receiver) { + return J.getInterceptor$x(receiver).get$verbose(receiver); + }, + get$warn$x(receiver) { + return J.getInterceptor$x(receiver).get$warn(receiver); + }, + $add$ansx(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver + a0; + return J.getInterceptor$ansx(receiver).$add(receiver, a0); + }, + $eq$(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); + }, + $index$asx(receiver, a0) { + if (typeof a0 === "number") + if (receiver.constructor == Array || typeof receiver == "string" || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); + }, + $indexSet$ax(receiver, a0, a1) { + if (typeof a0 === "number") + if ((receiver.constructor == Array || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0] = a1; + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + }, + $set$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).$set$2(receiver, a0, a1); + }, + add$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).add$1(receiver, a0); + }, + addAll$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).addAll$1(receiver, a0); + }, + allMatches$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).allMatches$1(receiver, a0); + }, + allMatches$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); + }, + any$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).any$1(receiver, a0); + }, + apply$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).apply$2(receiver, a0, a1); + }, + asImmutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asImmutable$0(receiver); + }, + asMutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asMutable$0(receiver); + }, + canonicalize$4$baseImporter$baseUrl$forImport$x(receiver, a0, a1, a2, a3) { + return J.getInterceptor$x(receiver).canonicalize$4$baseImporter$baseUrl$forImport(receiver, a0, a1, a2, a3); + }, + cast$1$0$ax(receiver, $T1) { + return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); + }, + close$0$x(receiver) { + return J.getInterceptor$x(receiver).close$0(receiver); + }, + codeUnitAt$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); + }, + compareTo$1$ns(receiver, a0) { + return J.getInterceptor$ns(receiver).compareTo$1(receiver, a0); + }, + contains$1$asx(receiver, a0) { + return J.getInterceptor$asx(receiver).contains$1(receiver, a0); + }, + createInterface$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).createInterface$1(receiver, a0); + }, + elementAt$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); + }, + endsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).endsWith$1(receiver, a0); + }, + every$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).every$1(receiver, a0); + }, + existsSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).existsSync$1(receiver, a0); + }, + expand$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).expand$1$1(receiver, a0, $T1); + }, + fillRange$3$ax(receiver, a0, a1, a2) { + return J.getInterceptor$ax(receiver).fillRange$3(receiver, a0, a1, a2); + }, + fold$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).fold$2(receiver, a0, a1); + }, + forEach$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).forEach$1(receiver, a0); + }, + getTime$0$x(receiver) { + return J.getInterceptor$x(receiver).getTime$0(receiver); + }, + isDirectory$0$x(receiver) { + return J.getInterceptor$x(receiver).isDirectory$0(receiver); + }, + isFile$0$x(receiver) { + return J.getInterceptor$x(receiver).isFile$0(receiver); + }, + join$0$ax(receiver) { + return J.getInterceptor$ax(receiver).join$0(receiver); + }, + join$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).join$1(receiver, a0); + }, + listen$1$z(receiver, a0) { + return J.getInterceptor$z(receiver).listen$1(receiver, a0); + }, + map$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1); + }, + matchAsPrefix$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + }, + mkdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).mkdirSync$1(receiver, a0); + }, + noSuchMethod$1$(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + }, + on$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).on$2(receiver, a0, a1); + }, + readFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).readFileSync$2(receiver, a0, a1); + }, + readdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).readdirSync$1(receiver, a0); + }, + remove$1$z(receiver, a0) { + return J.getInterceptor$z(receiver).remove$1(receiver, a0); + }, + run$0$x(receiver) { + return J.getInterceptor$x(receiver).run$0(receiver); + }, + run$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).run$1(receiver, a0); + }, + setRange$4$ax(receiver, a0, a1, a2, a3) { + return J.getInterceptor$ax(receiver).setRange$4(receiver, a0, a1, a2, a3); + }, + skip$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).skip$1(receiver, a0); + }, + sort$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).sort$1(receiver, a0); + }, + startsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); + }, + statSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).statSync$1(receiver, a0); + }, + substring$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).substring$1(receiver, a0); + }, + substring$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); + }, + take$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).take$1(receiver, a0); + }, + then$1$1$x(receiver, a0, $T1) { + return J.getInterceptor$x(receiver).then$1$1(receiver, a0, $T1); + }, + then$1$2$onError$x(receiver, a0, a1, $T1) { + return J.getInterceptor$x(receiver).then$1$2$onError(receiver, a0, a1, $T1); + }, + then$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).then$2(receiver, a0, a1); + }, + toArray$0$x(receiver) { + return J.getInterceptor$x(receiver).toArray$0(receiver); + }, + toList$0$ax(receiver) { + return J.getInterceptor$ax(receiver).toList$0(receiver); + }, + toList$1$growable$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).toList$1$growable(receiver, a0); + }, + toRadixString$1$n(receiver, a0) { + return J.getInterceptor$n(receiver).toRadixString$1(receiver, a0); + }, + toSet$0$ax(receiver) { + return J.getInterceptor$ax(receiver).toSet$0(receiver); + }, + toString$0$(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); + }, + toString$1$color$(receiver, a0) { + return J.getInterceptor$(receiver).toString$1$color(receiver, a0); + }, + trim$0$s(receiver) { + return J.getInterceptor$s(receiver).trim$0(receiver); + }, + unlinkSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).unlinkSync$1(receiver, a0); + }, + watch$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).watch$2(receiver, a0, a1); + }, + where$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).where$1(receiver, a0); + }, + write$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).write$1(receiver, a0); + }, + writeFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).writeFileSync$2(receiver, a0, a1); + }, + yield$0$x(receiver) { + return J.getInterceptor$x(receiver).yield$0(receiver); + }, + Interceptor: function Interceptor() { + }, + JSBool: function JSBool() { + }, + JSNull: function JSNull() { + }, + JavaScriptObject: function JavaScriptObject() { + }, + LegacyJavaScriptObject: function LegacyJavaScriptObject() { + }, + PlainJavaScriptObject: function PlainJavaScriptObject() { + }, + UnknownJavaScriptObject: function UnknownJavaScriptObject() { + }, + JavaScriptFunction: function JavaScriptFunction() { + }, + JSArray: function JSArray(t0) { + this.$ti = t0; + }, + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; + }, + ArrayIterator: function ArrayIterator(t0, t1) { + var _ = this; + _._iterable = t0; + _._length = t1; + _._index = 0; + _._current = null; + }, + JSNumber: function JSNumber() { + }, + JSInt: function JSInt() { + }, + JSNumNotInt: function JSNumNotInt() { + }, + JSString: function JSString() { + } + }, + B = {}; + var holders = [A, J, B]; + var $ = {}; + A.JS_CONST.prototype = {}; + J.Interceptor.prototype = { + $eq(receiver, other) { + return receiver === other; + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + toString$0(receiver) { + return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; + }, + noSuchMethod$1(receiver, invocation) { + throw A.wrapException(A.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + } + }; + J.JSBool.prototype = { + toString$0(receiver) { + return String(receiver); + }, + get$hashCode(receiver) { + return receiver ? 519018 : 218159; + }, + $isbool: 1 + }; + J.JSNull.prototype = { + $eq(receiver, other) { + return null == other; + }, + toString$0(receiver) { + return "null"; + }, + get$hashCode(receiver) { + return 0; + }, + get$runtimeType(receiver) { + return B.Type_Null_Yyn; + }, + $isNull: 1 + }; + J.JavaScriptObject.prototype = {}; + J.LegacyJavaScriptObject.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + }, + $isPromise: 1, + $isJsSystemError: 1, + $is_NodeSassColor: 1, + $is_Channels: 1, + $isCompileOptions: 1, + $isCompileStringOptions: 1, + $isNodeCompileResult: 1, + $is_NodeException: 1, + $isFiber: 1, + $isJSFunction0: 1, + $isImmutableList: 1, + $isImmutableMap: 1, + $isNodeImporter0: 1, + $isNodeImporterResult0: 1, + $isNodeImporterResult1: 1, + $is_NodeSassList: 1, + $is_ConstructorOptions: 1, + $isWarnOptions: 1, + $isDebugOptions: 1, + $is_NodeSassMap: 1, + $is_NodeSassNumber: 1, + $is_ConstructorOptions0: 1, + $isJSClass0: 1, + $isRenderContextOptions0: 1, + $isRenderOptions: 1, + $isRenderResult: 1, + $is_NodeSassString: 1, + $is_ConstructorOptions1: 1, + $isJSUrl0: 1, + get$isTTY(obj) { + return obj.isTTY; + }, + get$write(obj) { + return obj.write; + }, + write$1(receiver, p0) { + return receiver.write(p0); + }, + createInterface$1(receiver, p0) { + return receiver.createInterface(p0); + }, + on$2(receiver, p0, p1) { + return receiver.on(p0, p1); + }, + get$close(obj) { + return obj.close; + }, + close$0(receiver) { + return receiver.close(); + }, + setPrompt$1(receiver, p0) { + return receiver.setPrompt(p0); + }, + get$length(obj) { + return obj.length; + }, + toString$0(receiver) { + return receiver.toString(); + }, + get$debug(obj) { + return obj.debug; + }, + debug$2(receiver, p0, p1) { + return receiver.debug(p0, p1); + }, + get$warn(obj) { + return obj.warn; + }, + warn$1(receiver, p0) { + return receiver.warn(p0); + }, + existsSync$1(receiver, p0) { + return receiver.existsSync(p0); + }, + mkdirSync$1(receiver, p0) { + return receiver.mkdirSync(p0); + }, + readdirSync$1(receiver, p0) { + return receiver.readdirSync(p0); + }, + readFileSync$2(receiver, p0, p1) { + return receiver.readFileSync(p0, p1); + }, + statSync$1(receiver, p0) { + return receiver.statSync(p0); + }, + unlinkSync$1(receiver, p0) { + return receiver.unlinkSync(p0); + }, + watch$2(receiver, p0, p1) { + return receiver.watch(p0, p1); + }, + writeFileSync$2(receiver, p0, p1) { + return receiver.writeFileSync(p0, p1); + }, + get$path(obj) { + return obj.path; + }, + isDirectory$0(receiver) { + return receiver.isDirectory(); + }, + isFile$0(receiver) { + return receiver.isFile(); + }, + get$mtime(obj) { + return obj.mtime; + }, + then$1$1(receiver, p0) { + return receiver.then(p0); + }, + then$2(receiver, p0, p1) { + return receiver.then(p0, p1); + }, + getTime$0(receiver) { + return receiver.getTime(); + }, + get$message(obj) { + return obj.message; + }, + message$1(receiver, p0) { + return receiver.message(p0); + }, + get$code(obj) { + return obj.code; + }, + get$syscall(obj) { + return obj.syscall; + }, + get$env(obj) { + return obj.env; + }, + get$exitCode(obj) { + return obj.exitCode; + }, + set$exitCode(obj, v) { + return obj.exitCode = v; + }, + get$platform(obj) { + return obj.platform; + }, + get$stderr(obj) { + return obj.stderr; + }, + get$stdin(obj) { + return obj.stdin; + }, + get$name(obj) { + return obj.name; + }, + push$1(receiver, p0) { + return receiver.push(p0); + }, + call$0(receiver) { + return receiver.call(); + }, + call$1(receiver, p0) { + return receiver.call(p0); + }, + call$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$3$1(receiver, p0) { + return receiver.call(p0); + }, + call$2$1(receiver, p0) { + return receiver.call(p0); + }, + call$1$1(receiver, p0) { + return receiver.call(p0); + }, + call$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$3$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$2$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$1$0(receiver) { + return receiver.call(); + }, + call$2$0(receiver) { + return receiver.call(); + }, + call$2$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$1$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + apply$2(receiver, p0, p1) { + return receiver.apply(p0, p1); + }, + get$file(obj) { + return obj.file; + }, + get$contents(obj) { + return obj.contents; + }, + get$options(obj) { + return obj.options; + }, + get$data(obj) { + return obj.data; + }, + get$includePaths(obj) { + return obj.includePaths; + }, + get$style(obj) { + return obj.style; + }, + get$indentType(obj) { + return obj.indentType; + }, + get$indentWidth(obj) { + return obj.indentWidth; + }, + get$linefeed(obj) { + return obj.linefeed; + }, + set$context(obj, v) { + return obj.context = v; + }, + get$$prototype(obj) { + return obj.prototype; + }, + get$dartValue(obj) { + return obj.dartValue; + }, + set$dartValue(obj, v) { + return obj.dartValue = v; + }, + get$red(obj) { + return obj.red; + }, + get$green(obj) { + return obj.green; + }, + get$blue(obj) { + return obj.blue; + }, + get$hue(obj) { + return obj.hue; + }, + get$saturation(obj) { + return obj.saturation; + }, + get$lightness(obj) { + return obj.lightness; + }, + get$whiteness(obj) { + return obj.whiteness; + }, + get$blackness(obj) { + return obj.blackness; + }, + get$alpha(obj) { + return obj.alpha; + }, + get$alertAscii(obj) { + return obj.alertAscii; + }, + get$alertColor(obj) { + return obj.alertColor; + }, + get$loadPaths(obj) { + return obj.loadPaths; + }, + get$quietDeps(obj) { + return obj.quietDeps; + }, + get$verbose(obj) { + return obj.verbose; + }, + get$charset(obj) { + return obj.charset; + }, + get$sourceMap(obj) { + return obj.sourceMap; + }, + get$sourceMapIncludeSources(obj) { + return obj.sourceMapIncludeSources; + }, + get$logger(obj) { + return obj.logger; + }, + get$importers(obj) { + return obj.importers; + }, + get$functions(obj) { + return obj.functions; + }, + get$syntax(obj) { + return obj.syntax; + }, + get$url(obj) { + return obj.url; + }, + get$importer(obj) { + return obj.importer; + }, + get$_dartException(obj) { + return obj._dartException; + }, + set$renderSync(obj, v) { + return obj.renderSync = v; + }, + set$compileString(obj, v) { + return obj.compileString = v; + }, + set$compileStringAsync(obj, v) { + return obj.compileStringAsync = v; + }, + set$compile(obj, v) { + return obj.compile = v; + }, + set$compileAsync(obj, v) { + return obj.compileAsync = v; + }, + set$info(obj, v) { + return obj.info = v; + }, + set$Exception(obj, v) { + return obj.Exception = v; + }, + set$Logger(obj, v) { + return obj.Logger = v; + }, + set$Value(obj, v) { + return obj.Value = v; + }, + set$SassArgumentList(obj, v) { + return obj.SassArgumentList = v; + }, + set$SassBoolean(obj, v) { + return obj.SassBoolean = v; + }, + set$SassColor(obj, v) { + return obj.SassColor = v; + }, + set$SassFunction(obj, v) { + return obj.SassFunction = v; + }, + set$SassList(obj, v) { + return obj.SassList = v; + }, + set$SassMap(obj, v) { + return obj.SassMap = v; + }, + set$SassNumber(obj, v) { + return obj.SassNumber = v; + }, + set$SassString(obj, v) { + return obj.SassString = v; + }, + set$sassNull(obj, v) { + return obj.sassNull = v; + }, + set$sassTrue(obj, v) { + return obj.sassTrue = v; + }, + set$sassFalse(obj, v) { + return obj.sassFalse = v; + }, + set$render(obj, v) { + return obj.render = v; + }, + set$types(obj, v) { + return obj.types = v; + }, + set$NULL(obj, v) { + return obj.NULL = v; + }, + set$TRUE(obj, v) { + return obj.TRUE = v; + }, + set$FALSE(obj, v) { + return obj.FALSE = v; + }, + get$current(obj) { + return obj.current; + }, + yield$0(receiver) { + return receiver.yield(); + }, + run$1$1(receiver, p0) { + return receiver.run(p0); + }, + run$1(receiver, p0) { + return receiver.run(p0); + }, + run$0(receiver) { + return receiver.run(); + }, + toArray$0(receiver) { + return receiver.toArray(); + }, + asMutable$0(receiver) { + return receiver.asMutable(); + }, + asImmutable$0(receiver) { + return receiver.asImmutable(); + }, + $set$2(receiver, p0, p1) { + return receiver.set(p0, p1); + }, + forEach$1(receiver, p0) { + return receiver.forEach(p0); + }, + get$canonicalize(obj) { + return obj.canonicalize; + }, + canonicalize$1(receiver, p0) { + return receiver.canonicalize(p0); + }, + get$load(obj) { + return obj.load; + }, + load$1(receiver, p0) { + return receiver.load(p0); + }, + get$findFileUrl(obj) { + return obj.findFileUrl; + }, + get$sourceMapUrl(obj) { + return obj.sourceMapUrl; + }, + get$separator(obj) { + return obj.separator; + }, + get$brackets(obj) { + return obj.brackets; + }, + get$numeratorUnits(obj) { + return obj.numeratorUnits; + }, + get$denominatorUnits(obj) { + return obj.denominatorUnits; + }, + get$indentedSyntax(obj) { + return obj.indentedSyntax; + }, + get$omitSourceMapUrl(obj) { + return obj.omitSourceMapUrl; + }, + get$outFile(obj) { + return obj.outFile; + }, + get$outputStyle(obj) { + return obj.outputStyle; + }, + get$fiber(obj) { + return obj.fiber; + }, + get$sourceMapContents(obj) { + return obj.sourceMapContents; + }, + get$sourceMapEmbed(obj) { + return obj.sourceMapEmbed; + }, + get$sourceMapRoot(obj) { + return obj.sourceMapRoot; + }, + set$cli_pkg_main_0_(obj, v) { + return obj.cli_pkg_main_0_ = v; + }, + get$quotes(obj) { + return obj.quotes; + } + }; + J.PlainJavaScriptObject.prototype = {}; + J.UnknownJavaScriptObject.prototype = {}; + J.JavaScriptFunction.prototype = { + toString$0(receiver) { + var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; + if (dartClosure == null) + return this.super$LegacyJavaScriptObject$toString(receiver); + return "JavaScript function for " + A.S(J.toString$0$(dartClosure)); + }, + $isFunction: 1 + }; + J.JSArray.prototype = { + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + add$1(receiver, value) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("add")); + receiver.push(value); + }, + removeAt$1(receiver, index) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeAt")); + t1 = receiver.length; + if (index >= t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + return receiver.splice(index, 1)[0]; + }, + insert$2(receiver, index, value) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("insert")); + t1 = receiver.length; + if (index > t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + receiver.splice(index, 0, value); + }, + insertAll$2(receiver, index, iterable) { + var insertionLength, end; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("insertAll")); + A.RangeError_checkValueInInterval(index, 0, receiver.length, "index"); + if (!type$.EfficientLengthIterable_dynamic._is(iterable)) + iterable = J.toList$0$ax(iterable); + insertionLength = J.get$length$asx(iterable); + receiver.length = receiver.length + insertionLength; + end = index + insertionLength; + this.setRange$4(receiver, end, receiver.length, receiver, index); + this.setRange$3(receiver, index, end, iterable); + }, + removeLast$0(receiver) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeLast")); + if (receiver.length === 0) + throw A.wrapException(A.diagnoseIndexError(receiver, -1)); + return receiver.pop(); + }, + _removeWhere$2(receiver, test, removeMatching) { + var i, element, t1, retained = [], + end = receiver.length; + for (i = 0; i < end; ++i) { + element = receiver[i]; + if (!test.call$1(element)) + retained.push(element); + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + t1 = retained.length; + if (t1 === end) + return; + this.set$length(receiver, t1); + for (i = 0; i < retained.length; ++i) + receiver[i] = retained[i]; + }, + where$1(receiver, f) { + return new A.WhereIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("WhereIterable<1>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + addAll$1(receiver, collection) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("addAll")); + if (Array.isArray(collection)) { + this._addAllFromArray$1(receiver, collection); + return; + } + for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();) + receiver.push(t1.get$current(t1)); + }, + _addAllFromArray$1(receiver, array) { + var i, + len = array.length; + if (len === 0) + return; + if (receiver === array) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + for (i = 0; i < len; ++i) + receiver.push(array[i]); + }, + clear$0(receiver) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("clear")); + receiver.length = 0; + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + join$1(receiver, separator) { + var i, + list = A.List_List$filled(receiver.length, "", false, type$.String); + for (i = 0; i < receiver.length; ++i) + list[i] = A.S(receiver[i]); + return list.join(separator); + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + take$1(receiver, n) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(n, "count", type$.int), A._arrayInstanceType(receiver)._precomputed1); + }, + skip$1(receiver, n) { + return A.SubListIterable$(receiver, n, null, A._arrayInstanceType(receiver)._precomputed1); + }, + fold$1$2(receiver, initialValue, combine) { + var value, i, + $length = receiver.length; + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, receiver[i]); + if (receiver.length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return value; + }, + fold$2($receiver, initialValue, combine) { + return this.fold$1$2($receiver, initialValue, combine, type$.dynamic); + }, + elementAt$1(receiver, index) { + return receiver[index]; + }, + sublist$2(receiver, start, end) { + var end0 = receiver.length; + if (start > end0) + throw A.wrapException(A.RangeError$range(start, 0, end0, "start", null)); + if (end == null) + end = end0; + else if (end < start || end > end0) + throw A.wrapException(A.RangeError$range(end, start, end0, "end", null)); + if (start === end) + return A._setArrayType([], A._arrayInstanceType(receiver)); + return A._setArrayType(receiver.slice(start, end), A._arrayInstanceType(receiver)); + }, + sublist$1($receiver, start) { + return this.sublist$2($receiver, start, null); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, receiver.length); + return A.SubListIterable$(receiver, start, end, A._arrayInstanceType(receiver)._precomputed1); + }, + get$first(receiver) { + if (receiver.length > 0) + return receiver[0]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(receiver) { + var t1 = receiver.length; + if (t1 > 0) + return receiver[t1 - 1]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(receiver) { + var t1 = receiver.length; + if (t1 === 1) + return receiver[0]; + if (t1 === 0) + throw A.wrapException(A.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_tooMany()); + }, + removeRange$2(receiver, start, end) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeRange")); + A.RangeError_checkValidRange(start, end, receiver.length); + receiver.splice(start, end - start); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherList, otherStart, t1, i; + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("setRange")); + A.RangeError_checkValidRange(start, end, receiver.length); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (type$.List_dynamic._is(iterable)) { + otherList = iterable; + otherStart = skipCount; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + else + for (i = 0; i < $length; ++i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + }, + setRange$3($receiver, start, end, iterable) { + return this.setRange$4($receiver, start, end, iterable, 0); + }, + fillRange$3(receiver, start, end, fillValue) { + var i; + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("fill range")); + A.RangeError_checkValidRange(start, end, receiver.length); + A._arrayInstanceType(receiver)._precomputed1._as(fillValue); + for (i = start; i < end; ++i) + receiver[i] = fillValue; + }, + any$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (test.call$1(receiver[i])) + return true; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (!test.call$1(receiver[i])) + return false; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A._arrayInstanceType(receiver)._eval$1("ReversedListIterable<1>")); + }, + sort$1(receiver, compare) { + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("sort")); + A.Sort_sort(receiver, compare == null ? J._interceptors_JSArray__compareAny$closure() : compare); + }, + sort$0($receiver) { + return this.sort$1($receiver, null); + }, + indexOf$1(receiver, element) { + var i, + $length = receiver.length; + if (0 >= $length) + return -1; + for (i = 0; i < $length; ++i) + if (J.$eq$(receiver[i], element)) + return i; + return -1; + }, + contains$1(receiver, other) { + var i; + for (i = 0; i < receiver.length; ++i) + if (J.$eq$(receiver[i], other)) + return true; + return false; + }, + get$isEmpty(receiver) { + return receiver.length === 0; + }, + get$isNotEmpty(receiver) { + return receiver.length !== 0; + }, + toString$0(receiver) { + return A.IterableBase_iterableToFullString(receiver, "[", "]"); + }, + toList$1$growable(receiver, growable) { + var t1 = A._setArrayType(receiver.slice(0), A._arrayInstanceType(receiver)); + return t1; + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(receiver) { + return A.LinkedHashSet_LinkedHashSet$from(receiver, A._arrayInstanceType(receiver)._precomputed1); + }, + get$iterator(receiver) { + return new J.ArrayIterator(receiver, receiver.length); + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + get$length(receiver) { + return receiver.length; + }, + set$length(receiver, newLength) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("set length")); + if (newLength < 0) + throw A.wrapException(A.RangeError$range(newLength, 0, null, "newLength", null)); + if (newLength > receiver.length) + A._arrayInstanceType(receiver)._precomputed1._as(null); + receiver.length = newLength; + }, + $index(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("indexed set")); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $add(receiver, other) { + var t1 = A.List_List$of(receiver, true, A._arrayInstanceType(receiver)._precomputed1); + this.addAll$1(t1, other); + return t1; + }, + indexWhere$1(receiver, test) { + var i; + if (0 >= receiver.length) + return -1; + for (i = 0; i < receiver.length; ++i) + if (test.call$1(receiver[i])) + return i; + return -1; + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + J.JSUnmodifiableArray.prototype = {}; + J.ArrayIterator.prototype = { + get$current(_) { + var t1 = this._current; + return t1 == null ? A._instanceType(this)._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._iterable, + $length = t1.length; + if (_this._length !== $length) + throw A.wrapException(A.throwConcurrentModificationError(t1)); + t2 = _this._index; + if (t2 >= $length) { + _this._current = null; + return false; + } + _this._current = t1[t2]; + _this._index = t2 + 1; + return true; + } + }; + J.JSNumber.prototype = { + compareTo$1(receiver, b) { + var bIsNegative; + if (receiver < b) + return -1; + else if (receiver > b) + return 1; + else if (receiver === b) { + if (receiver === 0) { + bIsNegative = this.get$isNegative(b); + if (this.get$isNegative(receiver) === bIsNegative) + return 0; + if (this.get$isNegative(receiver)) + return -1; + return 1; + } + return 0; + } else if (isNaN(receiver)) { + if (isNaN(b)) + return 0; + return 1; + } else + return -1; + }, + get$isNegative(receiver) { + return receiver === 0 ? 1 / receiver < 0 : receiver < 0; + }, + ceil$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated + 1; + } + } else if (receiver >= -2147483648) + return receiver | 0; + d = Math.ceil(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".ceil()")); + }, + floor$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) + return receiver | 0; + } else if (receiver >= -2147483648) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated - 1; + } + d = Math.floor(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".floor()")); + }, + round$0(receiver) { + if (receiver > 0) { + if (receiver !== 1 / 0) + return Math.round(receiver); + } else if (receiver > -1 / 0) + return 0 - Math.round(0 - receiver); + throw A.wrapException(A.UnsupportedError$("" + receiver + ".round()")); + }, + clamp$2(receiver, lowerLimit, upperLimit) { + if (B.JSInt_methods.compareTo$1(lowerLimit, upperLimit) > 0) + throw A.wrapException(A.argumentErrorValue(lowerLimit)); + if (this.compareTo$1(receiver, lowerLimit) < 0) + return lowerLimit; + if (this.compareTo$1(receiver, upperLimit) > 0) + return upperLimit; + return receiver; + }, + toRadixString$1(receiver, radix) { + var result, match, exponent, t1; + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", null)); + result = receiver.toString(radix); + if (B.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41) + return result; + match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); + if (match == null) + A.throwExpression(A.UnsupportedError$("Unexpected toString result: " + result)); + result = match[1]; + exponent = +match[3]; + t1 = match[2]; + if (t1 != null) { + result += t1; + exponent -= t1.length; + } + return result + B.JSString_methods.$mul("0", exponent); + }, + toString$0(receiver) { + if (receiver === 0 && 1 / receiver < 0) + return "-0.0"; + else + return "" + receiver; + }, + get$hashCode(receiver) { + var absolute, floorLog2, factor, scaled, + intValue = receiver | 0; + if (receiver === intValue) + return intValue & 536870911; + absolute = Math.abs(receiver); + floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; + factor = Math.pow(2, floorLog2); + scaled = absolute < 1 ? absolute / factor : factor / absolute; + return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; + }, + $add(receiver, other) { + return receiver + other; + }, + $mod(receiver, other) { + var result = receiver % other; + if (result === 0) + return 0; + if (result > 0) + return result; + if (other < 0) + return result - other; + else + return result + other; + }, + $tdiv(receiver, other) { + if ((receiver | 0) === receiver) + if (other >= 1 || other < -1) + return receiver / other | 0; + return this._tdivSlow$1(receiver, other); + }, + _tdivFast$1(receiver, other) { + return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); + }, + _tdivSlow$1(receiver, other) { + var quotient = receiver / other; + if (quotient >= -2147483648 && quotient <= 2147483647) + return quotient | 0; + if (quotient > 0) { + if (quotient !== 1 / 0) + return Math.floor(quotient); + } else if (quotient > -1 / 0) + return Math.ceil(quotient); + throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); + }, + _shrOtherPositive$1(receiver, other) { + var t1; + if (receiver > 0) + t1 = this._shrBothPositive$1(receiver, other); + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + _shrReceiverPositive$1(receiver, other) { + if (0 > other) + throw A.wrapException(A.argumentErrorValue(other)); + return this._shrBothPositive$1(receiver, other); + }, + _shrBothPositive$1(receiver, other) { + return other > 31 ? 0 : receiver >>> other; + }, + $isComparable: 1, + $isdouble: 1, + $isnum: 1 + }; + J.JSInt.prototype = {$isint: 1}; + J.JSNumNotInt.prototype = {}; + J.JSString.prototype = { + codeUnitAt$1(receiver, index) { + if (index < 0) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + if (index >= receiver.length) + A.throwExpression(A.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + _codeUnitAt$1(receiver, index) { + if (index >= receiver.length) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + allMatches$2(receiver, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._StringAllMatchesIterable(string, receiver, start); + }, + allMatches$1($receiver, string) { + return this.allMatches$2($receiver, string, 0); + }, + matchAsPrefix$2(receiver, string, start) { + var t1, i, _null = null; + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); + t1 = receiver.length; + if (start + t1 > string.length) + return _null; + for (i = 0; i < t1; ++i) + if (this.codeUnitAt$1(string, start + i) !== this._codeUnitAt$1(receiver, i)) + return _null; + return new A.StringMatch(start, receiver); + }, + $add(receiver, other) { + return receiver + other; + }, + endsWith$1(receiver, other) { + var otherLength = other.length, + t1 = receiver.length; + if (otherLength > t1) + return false; + return other === this.substring$1(receiver, t1 - otherLength); + }, + replaceFirst$2(receiver, from, to) { + A.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); + return A.stringReplaceFirstUnchecked(receiver, from, to, 0); + }, + split$1(receiver, pattern) { + if (typeof pattern == "string") + return A._setArrayType(receiver.split(pattern), type$.JSArray_String); + else if (pattern instanceof A.JSSyntaxRegExp && pattern.get$_nativeAnchoredVersion().exec("").length - 2 === 0) + return A._setArrayType(receiver.split(pattern._nativeRegExp), type$.JSArray_String); + else + return this._defaultSplit$1(receiver, pattern); + }, + replaceRange$3(receiver, start, end, replacement) { + var e = A.RangeError_checkValidRange(start, end, receiver.length); + return A.stringReplaceRangeUnchecked(receiver, start, e, replacement); + }, + _defaultSplit$1(receiver, pattern) { + var t1, start, $length, match, matchStart, matchEnd, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) { + match = t1.get$current(t1); + matchStart = match.get$start(match); + matchEnd = match.get$end(match); + $length = matchEnd - matchStart; + if ($length === 0 && start === matchStart) + continue; + result.push(this.substring$2(receiver, start, matchStart)); + start = matchEnd; + } + if (start < receiver.length || $length > 0) + result.push(this.substring$1(receiver, start)); + return result; + }, + startsWith$2(receiver, pattern, index) { + var endIndex; + if (index < 0 || index > receiver.length) + throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + endIndex = index + pattern.length; + if (endIndex > receiver.length) + return false; + return pattern === receiver.substring(index, endIndex); + } + return J.matchAsPrefix$2$s(pattern, receiver, index) != null; + }, + startsWith$1($receiver, pattern) { + return this.startsWith$2($receiver, pattern, 0); + }, + substring$2(receiver, start, end) { + return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); + }, + substring$1($receiver, start) { + return this.substring$2($receiver, start, null); + }, + trim$0(receiver) { + var startIndex, t1, endIndex0, + result = receiver.trim(), + endIndex = result.length; + if (endIndex === 0) + return result; + if (this._codeUnitAt$1(result, 0) === 133) { + startIndex = J.JSString__skipLeadingWhitespace(result, 1); + if (startIndex === endIndex) + return ""; + } else + startIndex = 0; + t1 = endIndex - 1; + endIndex0 = this.codeUnitAt$1(result, t1) === 133 ? J.JSString__skipTrailingWhitespace(result, t1) : endIndex; + if (startIndex === 0 && endIndex0 === endIndex) + return result; + return result.substring(startIndex, endIndex0); + }, + trimRight$0(receiver) { + var result, endIndex, t1; + if (typeof receiver.trimRight != "undefined") { + result = receiver.trimRight(); + endIndex = result.length; + if (endIndex === 0) + return result; + t1 = endIndex - 1; + if (this.codeUnitAt$1(result, t1) === 133) + endIndex = J.JSString__skipTrailingWhitespace(result, t1); + } else { + endIndex = J.JSString__skipTrailingWhitespace(receiver, receiver.length); + result = receiver; + } + if (endIndex === result.length) + return result; + if (endIndex === 0) + return ""; + return result.substring(0, endIndex); + }, + $mul(receiver, times) { + var s, result; + if (0 >= times) + return ""; + if (times === 1 || receiver.length === 0) + return receiver; + if (times !== times >>> 0) + throw A.wrapException(B.C_OutOfMemoryError); + for (s = receiver, result = ""; true;) { + if ((times & 1) === 1) + result = s + result; + times = times >>> 1; + if (times === 0) + break; + s += s; + } + return result; + }, + padLeft$2(receiver, width, padding) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return this.$mul(padding, delta) + receiver; + }, + padRight$1(receiver, width) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return receiver + this.$mul(" ", delta); + }, + indexOf$2(receiver, pattern, start) { + var t1; + if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + t1 = receiver.indexOf(pattern, start); + return t1; + }, + indexOf$1($receiver, pattern) { + return this.indexOf$2($receiver, pattern, 0); + }, + lastIndexOf$2(receiver, pattern, start) { + var t1, t2, i; + if (start == null) + start = receiver.length; + else if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + t1 = pattern.length; + t2 = receiver.length; + if (start + t1 > t2) + start = t2 - t1; + return receiver.lastIndexOf(pattern, start); + } + for (t1 = J.getInterceptor$s(pattern), i = start; i >= 0; --i) + if (t1.matchAsPrefix$2(pattern, receiver, i) != null) + return i; + return -1; + }, + lastIndexOf$1($receiver, pattern) { + return this.lastIndexOf$2($receiver, pattern, null); + }, + contains$2(receiver, other, startIndex) { + var t1 = receiver.length; + if (startIndex > t1) + throw A.wrapException(A.RangeError$range(startIndex, 0, t1, null, null)); + return A.stringContainsUnchecked(receiver, other, startIndex); + }, + contains$1($receiver, other) { + return this.contains$2($receiver, other, 0); + }, + get$isNotEmpty(receiver) { + return receiver.length !== 0; + }, + compareTo$1(receiver, other) { + var t1; + if (receiver === other) + t1 = 0; + else + t1 = receiver < other ? -1 : 1; + return t1; + }, + toString$0(receiver) { + return receiver; + }, + get$hashCode(receiver) { + var t1, hash, i; + for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { + hash = hash + receiver.charCodeAt(i) & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + hash ^= hash >> 6; + } + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + get$length(receiver) { + return receiver.length; + }, + $isComparable: 1, + $isString: 1 + }; + A._CastIterableBase.prototype = { + get$iterator(_) { + var t1 = A._instanceType(this); + return new A.CastIterator(J.get$iterator$ax(this.get$_source()), t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("CastIterator<1,2>")); + }, + get$length(_) { + return J.get$length$asx(this.get$_source()); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$_source()); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$_source()); + }, + skip$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.skip$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + take$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.take$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + elementAt$1(_, index) { + return A._instanceType(this)._rest[1]._as(J.elementAt$1$ax(this.get$_source(), index)); + }, + get$first(_) { + return A._instanceType(this)._rest[1]._as(J.get$first$ax(this.get$_source())); + }, + get$last(_) { + return A._instanceType(this)._rest[1]._as(J.get$last$ax(this.get$_source())); + }, + get$single(_) { + return A._instanceType(this)._rest[1]._as(J.get$single$ax(this.get$_source())); + }, + contains$1(_, other) { + return J.contains$1$asx(this.get$_source(), other); + }, + toString$0(_) { + return J.toString$0$(this.get$_source()); + } + }; + A.CastIterator.prototype = { + moveNext$0() { + return this._source.moveNext$0(); + }, + get$current(_) { + var t1 = this._source; + return this.$ti._rest[1]._as(t1.get$current(t1)); + } + }; + A.CastIterable.prototype = { + get$_source() { + return this._source; + } + }; + A._EfficientLengthCastIterable.prototype = {$isEfficientLengthIterable: 1}; + A._CastListBase.prototype = { + $index(_, index) { + return this.$ti._rest[1]._as(J.$index$asx(this._source, index)); + }, + $indexSet(_, index, value) { + J.$indexSet$ax(this._source, index, this.$ti._precomputed1._as(value)); + }, + set$length(_, $length) { + J.set$length$asx(this._source, $length); + }, + add$1(_, value) { + J.add$1$ax(this._source, this.$ti._precomputed1._as(value)); + }, + sort$1(_, compare) { + var t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare); + J.sort$1$ax(this._source, t1); + }, + setRange$4(_, start, end, iterable, skipCount) { + var t1 = this.$ti; + J.setRange$4$ax(this._source, start, end, A.CastIterable_CastIterable(iterable, t1._rest[1], t1._precomputed1), skipCount); + }, + fillRange$3(_, start, end, fillValue) { + J.fillRange$3$ax(this._source, start, end, this.$ti._precomputed1._as(fillValue)); + }, + $isEfficientLengthIterable: 1, + $isList: 1 + }; + A._CastListBase_sort_closure.prototype = { + call$2(v1, v2) { + var t1 = this.$this.$ti._rest[1]; + return this.compare.call$2(t1._as(v1), t1._as(v2)); + }, + $signature() { + return this.$this.$ti._eval$1("int(1,1)"); + } + }; + A.CastList.prototype = { + cast$1$0(_, $R) { + return new A.CastList(this._source, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + get$_source() { + return this._source; + } + }; + A.CastSet.prototype = { + add$1(_, value) { + return this._source.add$1(0, this.$ti._precomputed1._as(value)); + }, + addAll$1(_, elements) { + var t1 = this.$ti; + this._source.addAll$1(0, A.CastIterable_CastIterable(elements, t1._rest[1], t1._precomputed1)); + }, + difference$1(other) { + var t1, _this = this; + if (_this._emptySet != null) + return _this._conditionalAdd$2(other, false); + t1 = _this.$ti; + return new A.CastSet(_this._source.difference$1(other), null, t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("CastSet<1,2>")); + }, + _conditionalAdd$2(other, otherContains) { + var t3, castElement, + emptySet = this._emptySet, + t1 = this.$ti, + t2 = t1._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t2) : emptySet.call$1$0(t2); + for (t2 = this._source, t2 = t2.get$iterator(t2), t3 = other._source, t1 = t1._rest[1]; t2.moveNext$0();) { + castElement = t1._as(t2.get$current(t2)); + if (otherContains === t3.contains$1(0, castElement)) + result.add$1(0, castElement); + } + return result; + }, + toSet$0(_) { + var emptySet = this._emptySet, + t1 = this.$ti._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t1) : emptySet.call$1$0(t1); + result.addAll$1(0, this); + return result; + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_source() { + return this._source; + } + }; + A.CastMap.prototype = { + cast$2$0(_, RK, RV) { + var t1 = this.$ti; + return new A.CastMap(this._source, t1._eval$1("@<1>")._bind$1(t1._rest[1])._bind$1(RK)._bind$1(RV)._eval$1("CastMap<1,2,3,4>")); + }, + containsKey$1(key) { + return this._source.containsKey$1(key); + }, + $index(_, key) { + return this.$ti._eval$1("4?")._as(this._source.$index(0, key)); + }, + $indexSet(_, key, value) { + var t1 = this.$ti; + this._source.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); + }, + addAll$1(_, other) { + var t1 = this.$ti; + this._source.addAll$1(0, new A.CastMap(other, t1._eval$1("@<3>")._bind$1(t1._rest[3])._bind$1(t1._precomputed1)._bind$1(t1._rest[1])._eval$1("CastMap<1,2,3,4>"))); + }, + remove$1(_, key) { + return this.$ti._eval$1("4?")._as(this._source.remove$1(0, key)); + }, + forEach$1(_, f) { + this._source.forEach$1(0, new A.CastMap_forEach_closure(this, f)); + }, + get$keys(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$keys(t1), t2._precomputed1, t2._rest[2]); + }, + get$values(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$values(t1), t2._rest[1], t2._rest[3]); + }, + get$length(_) { + var t1 = this._source; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._source; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._source; + return t1.get$isNotEmpty(t1); + }, + get$entries(_) { + var t1 = this._source; + return t1.get$entries(t1).map$1$1(0, new A.CastMap_entries_closure(this), this.$ti._eval$1("MapEntry<3,4>")); + } + }; + A.CastMap_forEach_closure.prototype = { + call$2(key, value) { + var t1 = this.$this.$ti; + this.f.call$2(t1._rest[2]._as(key), t1._rest[3]._as(value)); + }, + $signature() { + return this.$this.$ti._eval$1("~(1,2)"); + } + }; + A.CastMap_entries_closure.prototype = { + call$1(e) { + var t1 = this.$this.$ti, + t2 = t1._rest[3]; + return new A.MapEntry(t1._rest[2]._as(e.key), t2._as(e.value), t1._eval$1("@<3>")._bind$1(t2)._eval$1("MapEntry<1,2>")); + }, + $signature() { + return this.$this.$ti._eval$1("MapEntry<3,4>(MapEntry<1,2>)"); + } + }; + A.LateError.prototype = { + toString$0(_) { + return "LateInitializationError: " + this._message; + } + }; + A.CodeUnits.prototype = { + get$length(_) { + return this.__internal$_string.length; + }, + $index(_, i) { + return B.JSString_methods.codeUnitAt$1(this.__internal$_string, i); + } + }; + A.nullFuture_closure.prototype = { + call$0() { + return A.Future_Future$value(null, type$.Null); + }, + $signature: 2 + }; + A.SentinelValue.prototype = {}; + A.EfficientLengthIterable.prototype = {}; + A.ListIterable.prototype = { + get$iterator(_) { + return new A.ListIterator(this, this.get$length(this)); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$first(_) { + if (this.get$length(this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.elementAt$1(0, 0); + }, + get$last(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return _this.elementAt$1(0, _this.get$length(_this) - 1); + }, + get$single(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return _this.elementAt$1(0, 0); + }, + contains$1(_, element) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (J.$eq$(_this.elementAt$1(0, i), element)) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + every$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (!test.call$1(_this.elementAt$1(0, i))) + return false; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return true; + }, + any$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (test.call$1(_this.elementAt$1(0, i))) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + join$1(_, separator) { + var first, t1, i, _this = this, + $length = _this.get$length(_this); + if (separator.length !== 0) { + if ($length === 0) + return ""; + first = A.S(_this.elementAt$1(0, 0)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + for (t1 = first, i = 1; i < $length; ++i) { + t1 = t1 + separator + A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + for (i = 0, t1 = ""; i < $length; ++i) { + t1 += A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + where$1(_, test) { + return this.super$Iterable$where(0, test); + }, + map$1$1(_, toElement, $T) { + return new A.MappedListIterable(this, toElement, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + reduce$1(_, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + if ($length === 0) + throw A.wrapException(A.IterableElementError_noElement()); + value = _this.elementAt$1(0, 0); + for (i = 1; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$1$2(_, initialValue, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$2($receiver, initialValue, combine) { + return this.fold$1$2($receiver, initialValue, combine, type$.dynamic); + }, + skip$1(_, count) { + return A.SubListIterable$(this, count, null, A._instanceType(this)._eval$1("ListIterable.E")); + }, + take$1(_, count) { + return A.SubListIterable$(this, 0, A.checkNotNullable(count, "count", type$.int), A._instanceType(this)._eval$1("ListIterable.E")); + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, true, A._instanceType(this)._eval$1("ListIterable.E")); + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(_) { + var i, _this = this, + result = A.LinkedHashSet_LinkedHashSet(A._instanceType(_this)._eval$1("ListIterable.E")); + for (i = 0; i < _this.get$length(_this); ++i) + result.add$1(0, _this.elementAt$1(0, i)); + return result; + } + }; + A.SubListIterable.prototype = { + SubListIterable$3(_iterable, _start, _endOrLength, $E) { + var endOrLength, + t1 = this.__internal$_start; + A.RangeError_checkNotNegative(t1, "start"); + endOrLength = this._endOrLength; + if (endOrLength != null) { + A.RangeError_checkNotNegative(endOrLength, "end"); + if (t1 > endOrLength) + throw A.wrapException(A.RangeError$range(t1, 0, endOrLength, "start", null)); + } + }, + get$_endIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength > $length) + return $length; + return endOrLength; + }, + get$_startIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + t1 = this.__internal$_start; + if (t1 > $length) + return $length; + return t1; + }, + get$length(_) { + var endOrLength, + $length = J.get$length$asx(this.__internal$_iterable), + t1 = this.__internal$_start; + if (t1 >= $length) + return 0; + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength >= $length) + return $length - t1; + return endOrLength - t1; + }, + elementAt$1(_, index) { + var _this = this, + realIndex = _this.get$_startIndex() + index; + if (index < 0 || realIndex >= _this.get$_endIndex()) + throw A.wrapException(A.IndexError$(index, _this, "index", null, null)); + return J.elementAt$1$ax(_this.__internal$_iterable, realIndex); + }, + skip$1(_, count) { + var newStart, endOrLength, _this = this; + A.RangeError_checkNotNegative(count, "count"); + newStart = _this.__internal$_start + count; + endOrLength = _this._endOrLength; + if (endOrLength != null && newStart >= endOrLength) + return new A.EmptyIterable(_this.$ti._eval$1("EmptyIterable<1>")); + return A.SubListIterable$(_this.__internal$_iterable, newStart, endOrLength, _this.$ti._precomputed1); + }, + take$1(_, count) { + var endOrLength, t1, newEnd, _this = this; + A.RangeError_checkNotNegative(count, "count"); + endOrLength = _this._endOrLength; + t1 = _this.__internal$_start; + newEnd = t1 + count; + if (endOrLength == null) + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + else { + if (endOrLength < newEnd) + return _this; + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + } + }, + toList$1$growable(_, growable) { + var $length, result, i, _this = this, + start = _this.__internal$_start, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + end = t2.get$length(t1), + endOrLength = _this._endOrLength; + if (endOrLength != null && endOrLength < end) + end = endOrLength; + $length = end - start; + if ($length <= 0) { + t1 = _this.$ti._precomputed1; + return growable ? J.JSArray_JSArray$growable(0, t1) : J.JSArray_JSArray$fixed(0, t1); + } + result = A.List_List$filled($length, t2.elementAt$1(t1, start), growable, _this.$ti._precomputed1); + for (i = 1; i < $length; ++i) { + result[i] = t2.elementAt$1(t1, start + i); + if (t2.get$length(t1) < end) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return result; + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + } + }; + A.ListIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? A._instanceType(this)._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t3, _this = this, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + $length = t2.get$length(t1); + if (_this.__internal$_length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + t3 = _this.__internal$_index; + if (t3 >= $length) { + _this.__internal$_current = null; + return false; + } + _this.__internal$_current = t2.elementAt$1(t1, t3); + ++_this.__internal$_index; + return true; + } + }; + A.MappedIterable.prototype = { + get$iterator(_) { + return new A.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + }, + get$length(_) { + return J.get$length$asx(this.__internal$_iterable); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.__internal$_iterable); + }, + get$first(_) { + return this._f.call$1(J.get$first$ax(this.__internal$_iterable)); + }, + get$last(_) { + return this._f.call$1(J.get$last$ax(this.__internal$_iterable)); + }, + get$single(_) { + return this._f.call$1(J.get$single$ax(this.__internal$_iterable)); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this.__internal$_iterable, index)); + } + }; + A.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1}; + A.MappedIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._iterator; + if (t1.moveNext$0()) { + _this.__internal$_current = _this._f.call$1(t1.get$current(t1)); + return true; + } + _this.__internal$_current = null; + return false; + }, + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? A._instanceType(this)._rest[1]._as(t1) : t1; + } + }; + A.MappedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this._source, index)); + } + }; + A.WhereIterable.prototype = { + get$iterator(_) { + return new A.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + }, + map$1$1(_, toElement, $T) { + return new A.MappedIterable(this, toElement, this.$ti._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + } + }; + A.WhereIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) + if (t2.call$1(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.ExpandIterable.prototype = { + get$iterator(_) { + return new A.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, B.C_EmptyIterator); + } + }; + A.ExpandIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? A._instanceType(this)._rest[1]._as(t1) : t1; + }, + moveNext$0() { + var t2, t3, _this = this, + t1 = _this._currentExpansion; + if (t1 == null) + return false; + for (t2 = _this._iterator, t3 = _this._f; !t1.moveNext$0();) { + _this.__internal$_current = null; + if (t2.moveNext$0()) { + _this._currentExpansion = null; + t1 = J.get$iterator$ax(t3.call$1(t2.get$current(t2))); + _this._currentExpansion = t1; + } else + return false; + } + t1 = _this._currentExpansion; + _this.__internal$_current = t1.get$current(t1); + return true; + } + }; + A.TakeIterable.prototype = { + get$iterator(_) { + return new A.TakeIterator(J.get$iterator$ax(this.__internal$_iterable), this._takeCount); + } + }; + A.EfficientLengthTakeIterable.prototype = { + get$length(_) { + var iterableLength = J.get$length$asx(this.__internal$_iterable), + t1 = this._takeCount; + if (iterableLength > t1) + return t1; + return iterableLength; + }, + $isEfficientLengthIterable: 1 + }; + A.TakeIterator.prototype = { + moveNext$0() { + if (--this._remaining >= 0) + return this._iterator.moveNext$0(); + this._remaining = -1; + return false; + }, + get$current(_) { + var t1; + if (this._remaining < 0) { + A._instanceType(this)._precomputed1._as(null); + return null; + } + t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipIterable.prototype = { + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.SkipIterable(this.__internal$_iterable, this._skipCount + count, A._instanceType(this)._eval$1("SkipIterable<1>")); + }, + get$iterator(_) { + return new A.SkipIterator(J.get$iterator$ax(this.__internal$_iterable), this._skipCount); + } + }; + A.EfficientLengthSkipIterable.prototype = { + get$length(_) { + var $length = J.get$length$asx(this.__internal$_iterable) - this._skipCount; + if ($length >= 0) + return $length; + return 0; + }, + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.EfficientLengthSkipIterable(this.__internal$_iterable, this._skipCount + count, this.$ti); + }, + $isEfficientLengthIterable: 1 + }; + A.SkipIterator.prototype = { + moveNext$0() { + var t1, i; + for (t1 = this._iterator, i = 0; i < this._skipCount; ++i) + t1.moveNext$0(); + this._skipCount = 0; + return t1.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipWhileIterable.prototype = { + get$iterator(_) { + return new A.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + } + }; + A.SkipWhileIterator.prototype = { + moveNext$0() { + var t1, t2, _this = this; + if (!_this._hasSkipped) { + _this._hasSkipped = true; + for (t1 = _this._iterator, t2 = _this._f; t1.moveNext$0();) + if (!t2.call$1(t1.get$current(t1))) + return true; + } + return _this._iterator.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.EmptyIterable.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$isEmpty(_) { + return true; + }, + get$length(_) { + return 0; + }, + get$first(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + elementAt$1(_, index) { + throw A.wrapException(A.RangeError$range(index, 0, 0, "index", null)); + }, + contains$1(_, element) { + return false; + }, + every$1(_, test) { + return true; + }, + join$1(_, separator) { + return ""; + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + where$1(_, test) { + return this; + }, + map$1$1(_, toElement, $T) { + return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); + }, + skip$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + take$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + toList$1$growable(_, growable) { + var t1 = J.JSArray_JSArray$growable(0, this.$ti._precomputed1); + return t1; + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet(this.$ti._precomputed1); + } + }; + A.EmptyIterator.prototype = { + moveNext$0() { + return false; + }, + get$current(_) { + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A.FollowedByIterable.prototype = { + get$iterator(_) { + return new A.FollowedByIterator(J.get$iterator$ax(this.__internal$_first), this._second); + }, + get$length(_) { + var t1 = this._second; + return J.get$length$asx(this.__internal$_first) + t1.get$length(t1); + }, + get$isEmpty(_) { + var t1; + if (J.get$isEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isEmpty(t1); + } else + t1 = false; + return t1; + }, + get$isNotEmpty(_) { + var t1; + if (!J.get$isNotEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = true; + return t1; + }, + contains$1(_, value) { + return J.contains$1$asx(this.__internal$_first, value) || this._second.contains$1(0, value); + }, + get$first(_) { + var t1, + iterator = J.get$iterator$ax(this.__internal$_first); + if (iterator.moveNext$0()) + return iterator.get$current(iterator); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var last, + t1 = this._second, + iterator = t1.get$iterator(t1); + if (iterator.moveNext$0()) { + last = iterator.get$current(iterator); + for (; iterator.moveNext$0();) + last = iterator.get$current(iterator); + return last; + } + return J.get$last$ax(this.__internal$_first); + } + }; + A.EfficientLengthFollowedByIterable.prototype = { + elementAt$1(_, index) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1), + firstLength = t2.get$length(t1); + if (index < firstLength) + return t2.elementAt$1(t1, index); + return this._second.elementAt$1(0, index - firstLength); + }, + get$first(_) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1); + if (t2.get$isNotEmpty(t1)) + return t2.get$first(t1); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var t1 = this._second; + if (t1.get$isNotEmpty(t1)) + return t1.get$last(t1); + return J.get$last$ax(this.__internal$_first); + }, + $isEfficientLengthIterable: 1 + }; + A.FollowedByIterator.prototype = { + moveNext$0() { + var t1, _this = this; + if (_this._currentIterator.moveNext$0()) + return true; + t1 = _this._nextIterable; + if (t1 != null) { + t1 = t1.get$iterator(t1); + _this._currentIterator = t1; + _this._nextIterable = null; + return t1.moveNext$0(); + } + return false; + }, + get$current(_) { + var t1 = this._currentIterator; + return t1.get$current(t1); + } + }; + A.WhereTypeIterable.prototype = { + get$iterator(_) { + return new A.WhereTypeIterator(J.get$iterator$ax(this._source), this.$ti._eval$1("WhereTypeIterator<1>")); + } + }; + A.WhereTypeIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._source, t2 = this.$ti._precomputed1; t1.moveNext$0();) + if (t2._is(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._source; + return this.$ti._precomputed1._as(t1.get$current(t1)); + } + }; + A.FixedLengthListMixin.prototype = { + set$length(receiver, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of a fixed-length list")); + }, + add$1(receiver, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); + } + }; + A.UnmodifiableListMixin.prototype = { + $indexSet(_, index, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + set$length(_, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of an unmodifiable list")); + }, + add$1(_, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); + }, + sort$1(_, compare) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + setRange$4(_, start, end, iterable, skipCount) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + fillRange$3(_, start, end, fillValue) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + } + }; + A.UnmodifiableListBase.prototype = {}; + A.ReversedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + var t1 = this._source, + t2 = J.getInterceptor$asx(t1); + return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); + } + }; + A.Symbol.prototype = { + get$hashCode(_) { + var hash = this._hashCode; + if (hash != null) + return hash; + hash = 664597 * J.get$hashCode$(this.__internal$_name) & 536870911; + this._hashCode = hash; + return hash; + }, + toString$0(_) { + return 'Symbol("' + A.S(this.__internal$_name) + '")'; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Symbol && this.__internal$_name == other.__internal$_name; + }, + $isSymbol0: 1 + }; + A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; + A.ConstantMapView.prototype = {}; + A.ConstantMap.prototype = { + cast$2$0(_, RK, RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._precomputed1, t1._rest[1], RK, RV); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $indexSet(_, key, val) { + A.ConstantMap__throwUnmodifiable(); + }, + remove$1(_, key) { + A.ConstantMap__throwUnmodifiable(); + }, + addAll$1(_, other) { + A.ConstantMap__throwUnmodifiable(); + }, + get$entries(_) { + return this.entries$body$ConstantMap(0, A._instanceType(this)._eval$1("MapEntry<1,2>")); + }, + entries$body$ConstantMap($async$_, $async$type) { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var _ = $async$_; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, key; + return function $async$get$entries($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.get$keys($async$self), t1 = t1.get$iterator(t1), t2 = A._instanceType($async$self), t2 = t2._eval$1("@<1>")._bind$1(t2._rest[1])._eval$1("MapEntry<1,2>"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + key = t1.get$current(t1); + $async$goto = 4; + return new A.MapEntry(key, $async$self.$index(0, key), t2); + case 4: + // after yield + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, $async$type); + }, + $isMap: 1 + }; + A.ConstantStringMap.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + containsKey$1(key) { + if (typeof key != "string") + return false; + if ("__proto__" === key) + return false; + return this._jsObject.hasOwnProperty(key); + }, + $index(_, key) { + if (!this.containsKey$1(key)) + return null; + return this._jsObject[key]; + }, + forEach$1(_, f) { + var t1, t2, i, key, + keys = this.__js_helper$_keys; + for (t1 = keys.length, t2 = this._jsObject, i = 0; i < t1; ++i) { + key = keys[i]; + f.call$2(key, t2[key]); + } + }, + get$keys(_) { + return new A._ConstantMapKeyIterable(this, this.$ti._eval$1("_ConstantMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = this.$ti; + return A.MappedIterable_MappedIterable(this.__js_helper$_keys, new A.ConstantStringMap_values_closure(this), t1._precomputed1, t1._rest[1]); + } + }; + A.ConstantStringMap_values_closure.prototype = { + call$1(key) { + return this.$this._jsObject[key]; + }, + $signature() { + return this.$this.$ti._eval$1("2(1)"); + } + }; + A._ConstantMapKeyIterable.prototype = { + get$iterator(_) { + var t1 = this.__js_helper$_map.__js_helper$_keys; + return new J.ArrayIterator(t1, t1.length); + }, + get$length(_) { + return this.__js_helper$_map.__js_helper$_keys.length; + } + }; + A.GeneralConstantMap.prototype = { + _getMap$0() { + var t1, t2, t3, _this = this, + backingMap = _this.$map; + if (backingMap == null) { + t1 = _this.$ti; + t2 = t1._precomputed1; + t3 = A.GeneralConstantMap__typeTest(t2); + backingMap = A.LinkedHashMap_LinkedHashMap(null, A._js_helper_GeneralConstantMap__constantMapHashCode$closure(), t3, t2, t1._rest[1]); + A.fillLiteralMap(_this._jsData, backingMap); + _this.$map = backingMap; + } + return backingMap; + }, + containsKey$1(key) { + return this._getMap$0().containsKey$1(key); + }, + $index(_, key) { + return this._getMap$0().$index(0, key); + }, + forEach$1(_, f) { + this._getMap$0().forEach$1(0, f); + }, + get$keys(_) { + var t1 = this._getMap$0(); + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = this._getMap$0(); + return t1.get$values(t1); + }, + get$length(_) { + return this._getMap$0().__js_helper$_length; + } + }; + A.GeneralConstantMap__typeTest_closure.prototype = { + call$1(o) { + return this.T._is(o); + }, + $signature: 9 + }; + A.Instantiation.prototype = { + Instantiation$1(_genericClosure) { + if (false) + A.instantiatedGenericFunctionType(0, 0); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Instantiation && this._genericClosure.$eq(0, other._genericClosure) && A.getRuntimeType(this) === A.getRuntimeType(other); + }, + get$hashCode(_) { + return A.Object_hash(this._genericClosure, A.getRuntimeType(this), B.C_SentinelValue); + }, + toString$0(_) { + var t1 = B.JSArray_methods.join$1(this.get$_types(), ", "); + return this._genericClosure.toString$0(0) + " with " + ("<" + t1 + ">"); + } + }; + A.Instantiation1.prototype = { + get$_types() { + return [A.createRuntimeType(this.$ti._precomputed1)]; + }, + call$0() { + return this._genericClosure.call$1$0(this.$ti._rest[0]); + }, + call$2(a0, a1) { + return this._genericClosure.call$1$2(a0, a1, this.$ti._rest[0]); + }, + call$3(a0, a1, a2) { + return this._genericClosure.call$1$3(a0, a1, a2, this.$ti._rest[0]); + }, + call$4(a0, a1, a2, a3) { + return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti._rest[0]); + }, + $signature() { + return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); + } + }; + A.JSInvocationMirror.prototype = { + get$memberName() { + var t1 = this.__js_helper$_memberName; + return t1; + }, + get$positionalArguments() { + var t1, argumentCount, list, index, _this = this; + if (_this.__js_helper$_kind === 1) + return B.List_empty11; + t1 = _this._arguments; + argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; + if (argumentCount === 0) + return B.List_empty11; + list = []; + for (index = 0; index < argumentCount; ++index) + list.push(t1[index]); + return J.JSArray_markUnmodifiableList(list); + }, + get$namedArguments() { + var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, _this = this; + if (_this.__js_helper$_kind !== 0) + return B.Map_empty4; + t1 = _this._namedArgumentNames; + namedArgumentCount = t1.length; + t2 = _this._arguments; + namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; + if (namedArgumentCount === 0) + return B.Map_empty4; + map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); + for (i = 0; i < namedArgumentCount; ++i) + map.$indexSet(0, new A.Symbol(t1[i]), t2[namedArgumentsStartIndex + i]); + return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); + } + }; + A.Primitives_functionNoSuchMethod_closure.prototype = { + call$2($name, argument) { + var t1 = this._box_0; + t1.names = t1.names + "$" + $name; + this.namedArgumentList.push($name); + this.$arguments.push(argument); + ++t1.argumentCount; + }, + $signature: 225 + }; + A.TypeErrorDecoder.prototype = { + matchTypeError$1(message) { + var result, t1, _this = this, + match = new RegExp(_this._pattern).exec(message); + if (match == null) + return null; + result = Object.create(null); + t1 = _this._arguments; + if (t1 !== -1) + result.arguments = match[t1 + 1]; + t1 = _this._argumentsExpr; + if (t1 !== -1) + result.argumentsExpr = match[t1 + 1]; + t1 = _this._expr; + if (t1 !== -1) + result.expr = match[t1 + 1]; + t1 = _this._method; + if (t1 !== -1) + result.method = match[t1 + 1]; + t1 = _this._receiver; + if (t1 !== -1) + result.receiver = match[t1 + 1]; + return result; + } + }; + A.NullError.prototype = { + toString$0(_) { + var t1 = this._method; + if (t1 == null) + return "NoSuchMethodError: " + this.__js_helper$_message; + return "NoSuchMethodError: method not found: '" + t1 + "' on null"; + } + }; + A.JsNoSuchMethodError.prototype = { + toString$0(_) { + var t2, _this = this, + _s38_ = "NoSuchMethodError: method not found: '", + t1 = _this._method; + if (t1 == null) + return "NoSuchMethodError: " + _this.__js_helper$_message; + t2 = _this._receiver; + if (t2 == null) + return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; + } + }; + A.UnknownJsTypeError.prototype = { + toString$0(_) { + var t1 = this.__js_helper$_message; + return t1.length === 0 ? "Error" : "Error: " + t1; + } + }; + A.NullThrownFromJavaScriptException.prototype = { + toString$0(_) { + return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; + }, + $isException: 1 + }; + A.ExceptionAndStackTrace.prototype = {}; + A._StackTrace.prototype = { + toString$0(_) { + var trace, + t1 = this._trace; + if (t1 != null) + return t1; + t1 = this._exception; + trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; + return this._trace = trace == null ? "" : trace; + }, + $isStackTrace: 1 + }; + A.Closure.prototype = { + toString$0(_) { + var $constructor = this.constructor, + $name = $constructor == null ? null : $constructor.name; + return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; + }, + $isFunction: 1, + get$$call() { + return this; + }, + "call*": "call$1", + $requiredArgCount: 1, + $defaultValues: null + }; + A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; + A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; + A.TearOffClosure.prototype = {}; + A.StaticClosure.prototype = { + toString$0(_) { + var $name = this.$static_name; + if ($name == null) + return "Closure of unknown static method"; + return "Closure '" + A.unminifyOrTag($name) + "'"; + } + }; + A.BoundClosure.prototype = { + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + if (!(other instanceof A.BoundClosure)) + return false; + return this.$_target === other.$_target && this._receiver === other._receiver; + }, + get$hashCode(_) { + return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; + }, + toString$0(_) { + return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); + } + }; + A.RuntimeError.prototype = { + toString$0(_) { + return "RuntimeError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._Required.prototype = {}; + A.JsLinkedHashMap.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this.__js_helper$_length !== 0; + }, + get$keys(_) { + return new A.LinkedHashMapKeyIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(this, t1._eval$1("LinkedHashMapKeyIterable<1>")), new A.JsLinkedHashMap_values_closure(this), t1._precomputed1, t1._rest[1]); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string") { + strings = this._strings; + if (strings == null) + return false; + return strings[key] != null; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this._nums; + if (nums == null) + return false; + return nums[key] != null; + } else + return this.internalContainsKey$1(key); + }, + internalContainsKey$1(key) { + var rest = this.__js_helper$_rest; + if (rest == null) + return false; + return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(key)], key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A.JsLinkedHashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, cell, t1, nums, _null = null; + if (typeof key == "string") { + strings = this._strings; + if (strings == null) + return _null; + cell = strings[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this._nums; + if (nums == null) + return _null; + cell = nums[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else + return this.internalGet$1(key); + }, + internalGet$1(key) { + var bucket, index, + rest = this.__js_helper$_rest; + if (rest == null) + return null; + bucket = rest[this.internalComputeHashCode$1(key)]; + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + return bucket[index].hashMapCellValue; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string") { + strings = _this._strings; + _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value); + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = _this._nums; + _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value); + } else + _this.internalSet$2(key, value); + }, + internalSet$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + rest = _this.__js_helper$_rest = _this._newHashTable$0(); + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._newLinkedCell$2(key, value)]; + else { + index = _this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].hashMapCellValue = value; + else + bucket.push(_this._newLinkedCell$2(key, value)); + } + }, + putIfAbsent$2(key, ifAbsent) { + var t1, value, _this = this; + if (_this.containsKey$1(key)) { + t1 = _this.$index(0, key); + return t1 == null ? A._instanceType(_this)._rest[1]._as(t1) : t1; + } + value = ifAbsent.call$0(); + _this.$indexSet(0, key, value); + return value; + }, + remove$1(_, key) { + var _this = this; + if (typeof key == "string") + return _this.__js_helper$_removeHashTableEntry$2(_this._strings, key); + else if (typeof key == "number" && (key & 0x3fffffff) === key) + return _this.__js_helper$_removeHashTableEntry$2(_this._nums, key); + else + return _this.internalRemove$1(key); + }, + internalRemove$1(key) { + var hash, bucket, index, cell, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + return null; + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + index = _this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + cell = bucket.splice(index, 1)[0]; + _this.__js_helper$_unlinkCell$1(cell); + if (bucket.length === 0) + delete rest[hash]; + return cell.hashMapCellValue; + }, + clear$0(_) { + var _this = this; + if (_this.__js_helper$_length > 0) { + _this._strings = _this._nums = _this.__js_helper$_rest = _this._first = _this._last = null; + _this.__js_helper$_length = 0; + _this._modified$0(); + } + }, + forEach$1(_, action) { + var _this = this, + cell = _this._first, + modifications = _this._modifications; + for (; cell != null;) { + action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); + if (modifications !== _this._modifications) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + cell = cell._next; + } + }, + _addHashTableEntry$3(table, key, value) { + var cell = table[key]; + if (cell == null) + table[key] = this._newLinkedCell$2(key, value); + else + cell.hashMapCellValue = value; + }, + __js_helper$_removeHashTableEntry$2(table, key) { + var cell; + if (table == null) + return null; + cell = table[key]; + if (cell == null) + return null; + this.__js_helper$_unlinkCell$1(cell); + delete table[key]; + return cell.hashMapCellValue; + }, + _modified$0() { + this._modifications = this._modifications + 1 & 1073741823; + }, + _newLinkedCell$2(key, value) { + var t1, _this = this, + cell = new A.LinkedHashMapCell(key, value); + if (_this._first == null) + _this._first = _this._last = cell; + else { + t1 = _this._last; + t1.toString; + cell._previous = t1; + _this._last = t1._next = cell; + } + ++_this.__js_helper$_length; + _this._modified$0(); + return cell; + }, + __js_helper$_unlinkCell$1(cell) { + var _this = this, + previous = cell._previous, + next = cell._next; + if (previous == null) + _this._first = next; + else + previous._next = next; + if (next == null) + _this._last = previous; + else + next._previous = previous; + --_this.__js_helper$_length; + _this._modified$0(); + }, + internalComputeHashCode$1(key) { + return J.get$hashCode$(key) & 0x3fffffff; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + _newHashTable$0() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + } + }; + A.JsLinkedHashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = t1.$index(0, each); + return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); + } + }; + A.JsLinkedHashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A.LinkedHashMapCell.prototype = {}; + A.LinkedHashMapKeyIterable.prototype = { + get$length(_) { + return this.__js_helper$_map.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_map.__js_helper$_length === 0; + }, + get$iterator(_) { + var t1 = this.__js_helper$_map, + t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications); + t2._cell = t1._first; + return t2; + }, + contains$1(_, element) { + return this.__js_helper$_map.containsKey$1(element); + } + }; + A.LinkedHashMapKeyIterator.prototype = { + get$current(_) { + return this.__js_helper$_current; + }, + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this._cell; + if (cell == null) { + _this.__js_helper$_current = null; + return false; + } else { + _this.__js_helper$_current = cell.hashMapCellKey; + _this._cell = cell._next; + return true; + } + } + }; + A.initHooks_closure.prototype = { + call$1(o) { + return this.getTag(o); + }, + $signature: 94 + }; + A.initHooks_closure0.prototype = { + call$2(o, tag) { + return this.getUnknownTag(o, tag); + }, + $signature: 519 + }; + A.initHooks_closure1.prototype = { + call$1(tag) { + return this.prototypeForTag(tag); + }, + $signature: 354 + }; + A.JSSyntaxRegExp.prototype = { + toString$0(_) { + return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; + }, + get$_nativeGlobalVersion() { + var _this = this, + t1 = _this._nativeGlobalRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeGlobalRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); + }, + get$_nativeAnchoredVersion() { + var _this = this, + t1 = _this._nativeAnchoredRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeAnchoredRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern + "|()", t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); + }, + firstMatch$1(string) { + var m = this._nativeRegExp.exec(string); + if (m == null) + return null; + return new A._MatchImplementation(m); + }, + allMatches$2(_, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._AllMatchesIterable(this, string, start); + }, + allMatches$1($receiver, string) { + return this.allMatches$2($receiver, string, 0); + }, + _execGlobal$2(string, start) { + var match, + regexp = this.get$_nativeGlobalVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + return new A._MatchImplementation(match); + }, + _execAnchored$2(string, start) { + var match, + regexp = this.get$_nativeAnchoredVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + if (match.pop() != null) + return null; + return new A._MatchImplementation(match); + }, + matchAsPrefix$2(_, string, start) { + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, null, null)); + return this._execAnchored$2(string, start); + } + }; + A._MatchImplementation.prototype = { + get$start(_) { + return this._match.index; + }, + get$end(_) { + var t1 = this._match; + return t1.index + t1[0].length; + }, + $isMatch: 1, + $isRegExpMatch: 1 + }; + A._AllMatchesIterable.prototype = { + get$iterator(_) { + return new A._AllMatchesIterator(this._re, this._string, this._start); + } + }; + A._AllMatchesIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + return t1 == null ? type$.RegExpMatch._as(t1) : t1; + }, + moveNext$0() { + var t1, t2, t3, match, nextIndex, _this = this, + string = _this._string; + if (string == null) + return false; + t1 = _this._nextIndex; + t2 = string.length; + if (t1 <= t2) { + t3 = _this._regExp; + match = t3._execGlobal$2(string, t1); + if (match != null) { + _this.__js_helper$_current = match; + nextIndex = match.get$end(match); + if (match._match.index === nextIndex) { + if (t3._nativeRegExp.unicode) { + t1 = _this._nextIndex; + t3 = t1 + 1; + if (t3 < t2) { + t1 = B.JSString_methods.codeUnitAt$1(string, t1); + if (t1 >= 55296 && t1 <= 56319) { + t1 = B.JSString_methods.codeUnitAt$1(string, t3); + t1 = t1 >= 56320 && t1 <= 57343; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + nextIndex = (t1 ? nextIndex + 1 : nextIndex) + 1; + } + _this._nextIndex = nextIndex; + return true; + } + } + _this._string = _this.__js_helper$_current = null; + return false; + } + }; + A.StringMatch.prototype = { + get$end(_) { + return this.start + this.pattern.length; + }, + $isMatch: 1, + get$start(receiver) { + return this.start; + } + }; + A._StringAllMatchesIterable.prototype = { + get$iterator(_) { + return new A._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); + }, + get$first(_) { + var t1 = this._pattern, + index = this._input.indexOf(t1, this.__js_helper$_index); + if (index >= 0) + return new A.StringMatch(index, t1); + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A._StringAllMatchesIterator.prototype = { + moveNext$0() { + var index, end, _this = this, + t1 = _this.__js_helper$_index, + t2 = _this._pattern, + t3 = t2.length, + t4 = _this._input, + t5 = t4.length; + if (t1 + t3 > t5) { + _this.__js_helper$_current = null; + return false; + } + index = t4.indexOf(t2, t1); + if (index < 0) { + _this.__js_helper$_index = t5 + 1; + _this.__js_helper$_current = null; + return false; + } + end = index + t3; + _this.__js_helper$_current = new A.StringMatch(index, t2); + _this.__js_helper$_index = end === _this.__js_helper$_index ? end + 1 : end; + return true; + }, + get$current(_) { + var t1 = this.__js_helper$_current; + t1.toString; + return t1; + } + }; + A._Cell.prototype = { + _readLocal$0() { + var t1 = this._value; + if (t1 === this) + throw A.wrapException(new A.LateError("Local '" + this.__late_helper$_name + "' has not been initialized.")); + return t1; + } + }; + A.NativeTypedData.prototype = { + _invalidPosition$3(receiver, position, $length, $name) { + var t1 = A.RangeError$range(position, 0, $length, $name, null); + throw A.wrapException(t1); + }, + _checkPosition$3(receiver, position, $length, $name) { + if (position >>> 0 !== position || position > $length) + this._invalidPosition$3(receiver, position, $length, $name); + } + }; + A.NativeTypedArray.prototype = { + get$length(receiver) { + return receiver.length; + }, + _setRangeFast$4(receiver, start, end, source, skipCount) { + var count, sourceLength, + targetLength = receiver.length; + this._checkPosition$3(receiver, start, targetLength, "start"); + this._checkPosition$3(receiver, end, targetLength, "end"); + if (start > end) + throw A.wrapException(A.RangeError$range(start, 0, end, null, null)); + count = end - start; + if (skipCount < 0) + throw A.wrapException(A.ArgumentError$(skipCount, null)); + sourceLength = source.length; + if (sourceLength - skipCount < count) + throw A.wrapException(A.StateError$("Not enough elements")); + if (skipCount !== 0 || sourceLength !== count) + source = source.subarray(skipCount, skipCount + count); + receiver.set(source, start); + }, + $isJavaScriptIndexingBehavior: 1 + }; + A.NativeTypedArrayOfDouble.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + if (type$.NativeTypedArrayOfDouble._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListMixin$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeTypedArrayOfInt.prototype = { + $indexSet(receiver, index, value) { + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + if (type$.NativeTypedArrayOfInt._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListMixin$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeInt16List.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + A.NativeInt32List.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + A.NativeInt8List.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + A.NativeUint16List.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + A.NativeUint32List.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + } + }; + A.NativeUint8ClampedList.prototype = { + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + A.NativeUint8List.prototype = { + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + $isNativeUint8List: 1, + $isUint8List: 1 + }; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A.Rti.prototype = { + _eval$1(recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + }, + _bind$1(typeOrTuple) { + return A._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + A._FunctionParameters.prototype = {}; + A._Type.prototype = { + toString$0(_) { + return A._rtiToString(this._rti, null); + }, + $isType: 1 + }; + A._Error.prototype = { + toString$0(_) { + return this.__rti$_message; + } + }; + A._TypeError.prototype = { + get$message(_) { + return this.__rti$_message; + }, + $isTypeError: 1 + }; + A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1(_) { + var t1 = this._box_0, + f = t1.storedCallback; + t1.storedCallback = null; + f.call$0(); + }, + $signature: 76 + }; + A._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1(callback) { + var t1, t2; + this._box_0.storedCallback = callback; + t1 = this.div; + t2 = this.span; + t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); + }, + $signature: 27 + }; + A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._TimerImpl.prototype = { + _TimerImpl$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); + }, + _TimerImpl$periodic$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("Periodic timer.")); + }, + cancel$0() { + if (self.setTimeout != null) { + var t1 = this._handle; + if (t1 == null) + return; + if (this._once) + self.clearTimeout(t1); + else + self.clearInterval(t1); + this._handle = null; + } else + throw A.wrapException(A.UnsupportedError$("Canceling a timer.")); + } + }; + A._TimerImpl_internalCallback.prototype = { + call$0() { + var t1 = this.$this; + t1._handle = null; + t1._tick = 1; + this.callback.call$0(); + }, + $signature: 0 + }; + A._TimerImpl$periodic_closure.prototype = { + call$0() { + var duration, _this = this, + t1 = _this.$this, + tick = t1._tick + 1, + t2 = _this.milliseconds; + if (t2 > 0) { + duration = Date.now() - _this.start; + if (duration > (tick + 1) * t2) + tick = B.JSInt_methods.$tdiv(duration, t2); + } + t1._tick = tick; + _this.callback.call$1(t1); + }, + $signature: 1 + }; + A._AsyncAwaitCompleter.prototype = { + complete$1(value) { + var t1, _this = this; + if (value == null) + _this.$ti._precomputed1._as(value); + if (!_this.isSync) + _this._future._asyncComplete$1(value); + else { + t1 = _this._future; + if (_this.$ti._eval$1("Future<1>")._is(value)) + t1._chainFuture$1(value); + else + t1._completeWithValue$1(value); + } + }, + completeError$2(e, st) { + var t1 = this._future; + if (this.isSync) + t1._completeError$2(e, st); + else + t1._asyncCompleteError$2(e, st); + } + }; + A._awaitOnObject_closure.prototype = { + call$1(result) { + return this.bodyFunction.call$2(0, result); + }, + $signature: 139 + }; + A._awaitOnObject_closure0.prototype = { + call$2(error, stackTrace) { + this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, stackTrace)); + }, + $signature: 260 + }; + A._wrapJsFunctionForAsync_closure.prototype = { + call$2(errorCode, result) { + this.$protected(errorCode, result); + }, + $signature: 308 + }; + A._IterationMarker.prototype = { + toString$0(_) { + return "IterationMarker(" + this.state + ", " + A.S(this.value) + ")"; + } + }; + A._SyncStarIterator.prototype = { + get$current(_) { + var nested = this._nestedIterator; + if (nested == null) + return this._async$_current; + return nested.get$current(nested); + }, + moveNext$0() { + var t1, value, state, suspendedBodies, inner, _this = this; + for (; true;) { + t1 = _this._nestedIterator; + if (t1 != null) + if (t1.moveNext$0()) + return true; + else + _this._nestedIterator = null; + value = function(body, SUCCESS, ERROR) { + var errorValue, + errorCode = SUCCESS; + while (true) + try { + return body(errorCode, errorValue); + } catch (error) { + errorValue = error; + errorCode = ERROR; + } + }(_this._body, 0, 1); + if (value instanceof A._IterationMarker) { + state = value.state; + if (state === 2) { + suspendedBodies = _this._suspendedBodies; + if (suspendedBodies == null || suspendedBodies.length === 0) { + _this._async$_current = null; + return false; + } + _this._body = suspendedBodies.pop(); + continue; + } else { + t1 = value.value; + if (state === 3) + throw t1; + else { + inner = J.get$iterator$ax(t1); + if (inner instanceof A._SyncStarIterator) { + t1 = _this._suspendedBodies; + if (t1 == null) + t1 = _this._suspendedBodies = []; + t1.push(_this._body); + _this._body = inner._body; + continue; + } else { + _this._nestedIterator = inner; + continue; + } + } + } + } else { + _this._async$_current = value; + return true; + } + } + return false; + } + }; + A._SyncStarIterable.prototype = { + get$iterator(_) { + return new A._SyncStarIterator(this._outerHelper()); + } + }; + A.AsyncError.prototype = { + toString$0(_) { + return A.S(this.error); + }, + $isError: 1, + get$stackTrace() { + return this.stackTrace; + } + }; + A.Future_wait_handleError.prototype = { + call$2(theError, theStackTrace) { + var _this = this, + t1 = _this._box_0, + t2 = --t1.remaining; + if (t1.values != null) { + t1.values = null; + if (t1.remaining === 0 || _this.eagerError) + _this._future._completeError$2(theError, theStackTrace); + else { + _this.error._value = theError; + _this.stackTrace._value = theStackTrace; + } + } else if (t2 === 0 && !_this.eagerError) + _this._future._completeError$2(_this.error._readLocal$0(), _this.stackTrace._readLocal$0()); + }, + $signature: 64 + }; + A.Future_wait_closure.prototype = { + call$1(value) { + var valueList, _this = this, + t1 = _this._box_0; + --t1.remaining; + valueList = t1.values; + if (valueList != null) { + J.$indexSet$ax(valueList, _this.pos, value); + if (t1.remaining === 0) + _this._future._completeWithValue$1(A.List_List$from(valueList, true, _this.T)); + } else if (t1.remaining === 0 && !_this.eagerError) + _this._future._completeError$2(_this.error._readLocal$0(), _this.stackTrace._readLocal$0()); + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A._Completer.prototype = { + completeError$2(error, stackTrace) { + var replacement; + A.checkNotNullable(error, "error", type$.Object); + if ((this.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + this._completeError$2(error, stackTrace); + }, + completeError$1(error) { + return this.completeError$2(error, null); + } + }; + A._AsyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._asyncComplete$1(value); + }, + complete$0() { + return this.complete$1(null); + }, + _completeError$2(error, stackTrace) { + this.future._asyncCompleteError$2(error, stackTrace); + } + }; + A._SyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._complete$1(value); + }, + _completeError$2(error, stackTrace) { + this.future._completeError$2(error, stackTrace); + } + }; + A._FutureListener.prototype = { + matchesErrorTest$1(asyncError) { + if ((this.state & 15) !== 6) + return true; + return this.result._zone.runUnary$2$2(this.callback, asyncError.error, type$.bool, type$.Object); + }, + handleError$1(asyncError) { + var exception, + errorCallback = this.errorCallback, + result = null, + t1 = type$.dynamic, + t2 = type$.Object, + t3 = asyncError.error, + t4 = this.result._zone; + if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) + result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); + else + result = t4.runUnary$2$2(errorCallback, t3, t1, t2); + try { + t1 = result; + return t1; + } catch (exception) { + if (type$.TypeError._is(A.unwrapException(exception))) { + if ((this.state & 1) !== 0) + throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); + throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); + } else + throw exception; + } + } + }; + A._Future.prototype = { + then$1$2$onError(_, f, onError, $R) { + var result, t1, + currentZone = $.Zone__current; + if (currentZone === B.C__RootZone) { + if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) + throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); + } else { + f = currentZone.registerUnaryCallback$2$1(f, $R._eval$1("0/"), this.$ti._precomputed1); + if (onError != null) + onError = A._registerErrorHandler(onError, currentZone); + } + result = new A._Future($.Zone__current, $R._eval$1("_Future<0>")); + t1 = onError == null ? 1 : 3; + this._addListener$1(new A._FutureListener(result, t1, f, onError, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); + return result; + }, + then$1$1($receiver, f, $R) { + return this.then$1$2$onError($receiver, f, null, $R); + }, + _thenAwait$1$2(f, onError, $E) { + var result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new A._FutureListener(result, 3, f, onError, this.$ti._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); + return result; + }, + whenComplete$1(action) { + var t1 = this.$ti, + t2 = $.Zone__current, + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + action = t2.registerCallback$1$1(action, type$.dynamic); + this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); + return result; + }, + _setErrorObject$1(error) { + this._state = this._state & 1 | 16; + this._resultOrListeners = error; + }, + _cloneResult$1(source) { + this._state = source._state & 30 | this._state & 1; + this._resultOrListeners = source._resultOrListeners; + }, + _addListener$1(listener) { + var _this = this, + t1 = _this._state; + if (t1 <= 3) { + listener._nextListener = _this._resultOrListeners; + _this._resultOrListeners = listener; + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._addListener$1(listener); + return; + } + _this._cloneResult$1(t1); + } + _this._zone.scheduleMicrotask$1(new A._Future__addListener_closure(_this, listener)); + } + }, + _prependListeners$1(listeners) { + var t1, existingListeners, next, cursor, next0, _this = this, _box_0 = {}; + _box_0.listeners = listeners; + if (listeners == null) + return; + t1 = _this._state; + if (t1 <= 3) { + existingListeners = _this._resultOrListeners; + _this._resultOrListeners = listeners; + if (existingListeners != null) { + next = listeners._nextListener; + for (cursor = listeners; next != null; cursor = next, next = next0) + next0 = next._nextListener; + cursor._nextListener = existingListeners; + } + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._prependListeners$1(listeners); + return; + } + _this._cloneResult$1(t1); + } + _box_0.listeners = _this._reverseListeners$1(listeners); + _this._zone.scheduleMicrotask$1(new A._Future__prependListeners_closure(_box_0, _this)); + } + }, + _removeListeners$0() { + var current = this._resultOrListeners; + this._resultOrListeners = null; + return this._reverseListeners$1(current); + }, + _reverseListeners$1(listeners) { + var current, prev, next; + for (current = listeners, prev = null; current != null; prev = current, current = next) { + next = current._nextListener; + current._nextListener = prev; + } + return prev; + }, + _chainForeignFuture$1(source) { + var e, s, exception, _this = this; + _this._state ^= 2; + try { + source.then$1$2$onError(0, new A._Future__chainForeignFuture_closure(_this), new A._Future__chainForeignFuture_closure0(_this), type$.Null); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A.scheduleMicrotask(new A._Future__chainForeignFuture_closure1(_this, e, s)); + } + }, + _complete$1(value) { + var listeners, _this = this, + t1 = _this.$ti; + if (t1._eval$1("Future<1>")._is(value)) + if (t1._is(value)) + A._Future__chainCoreFuture(value, _this); + else + _this._chainForeignFuture$1(value); + else { + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + } + }, + _completeWithValue$1(value) { + var _this = this, + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + }, + _completeError$2(error, stackTrace) { + var listeners = this._removeListeners$0(); + this._setErrorObject$1(A.AsyncError$(error, stackTrace)); + A._Future__propagateToListeners(this, listeners); + }, + _asyncComplete$1(value) { + if (this.$ti._eval$1("Future<1>")._is(value)) { + this._chainFuture$1(value); + return; + } + this._asyncCompleteWithValue$1(value); + }, + _asyncCompleteWithValue$1(value) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteWithValue_closure(this, value)); + }, + _chainFuture$1(value) { + var _this = this; + if (_this.$ti._is(value)) { + if ((value._state & 16) !== 0) { + _this._state ^= 2; + _this._zone.scheduleMicrotask$1(new A._Future__chainFuture_closure(_this, value)); + } else + A._Future__chainCoreFuture(value, _this); + return; + } + _this._chainForeignFuture$1(value); + }, + _asyncCompleteError$2(error, stackTrace) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteError_closure(this, error, stackTrace)); + }, + $isFuture: 1 + }; + A._Future__addListener_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this.listener); + }, + $signature: 0 + }; + A._Future__prependListeners_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this._box_0.listeners); + }, + $signature: 0 + }; + A._Future__chainForeignFuture_closure.prototype = { + call$1(value) { + var error, stackTrace, exception, + t1 = this.$this; + t1._state ^= 2; + try { + t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); + } catch (exception) { + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); + t1._completeError$2(error, stackTrace); + } + }, + $signature: 76 + }; + A._Future__chainForeignFuture_closure0.prototype = { + call$2(error, stackTrace) { + this.$this._completeError$2(error, stackTrace); + }, + $signature: 73 + }; + A._Future__chainForeignFuture_closure1.prototype = { + call$0() { + this.$this._completeError$2(this.e, this.s); + }, + $signature: 0 + }; + A._Future__asyncCompleteWithValue_closure.prototype = { + call$0() { + this.$this._completeWithValue$1(this.value); + }, + $signature: 0 + }; + A._Future__chainFuture_closure.prototype = { + call$0() { + A._Future__chainCoreFuture(this.value, this.$this); + }, + $signature: 0 + }; + A._Future__asyncCompleteError_closure.prototype = { + call$0() { + this.$this._completeError$2(this.error, this.stackTrace); + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0() { + var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; + try { + t1 = _this._box_0.listener; + completeResult = t1.result._zone.run$1$1(0, t1.callback, type$.dynamic); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this.hasError && _this._box_1.source._resultOrListeners.error === e; + t2 = _this._box_0; + if (t1) + t2.listenerValueOrError = _this._box_1.source._resultOrListeners; + else + t2.listenerValueOrError = A.AsyncError$(e, s); + t2.listenerHasError = true; + return; + } + if (completeResult instanceof A._Future && (completeResult._state & 24) !== 0) { + if ((completeResult._state & 16) !== 0) { + t1 = _this._box_0; + t1.listenerValueOrError = completeResult._resultOrListeners; + t1.listenerHasError = true; + } + return; + } + if (type$.Future_dynamic._is(completeResult)) { + originalSource = _this._box_1.source; + t1 = _this._box_0; + t1.listenerValueOrError = J.then$1$1$x(completeResult, new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); + t1.listenerHasError = false; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1(_) { + return this.originalSource; + }, + $signature: 279 + }; + A._Future__propagateToListeners_handleValueCallback.prototype = { + call$0() { + var e, s, t1, t2, t3, exception; + try { + t1 = this._box_0; + t2 = t1.listener; + t3 = t2.$ti; + t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t2.callback, this.sourceResult, t3._eval$1("2/"), t3._precomputed1); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = this._box_0; + t1.listenerValueOrError = A.AsyncError$(e, s); + t1.listenerHasError = true; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleError.prototype = { + call$0() { + var asyncError, e, s, t1, exception, t2, _this = this; + try { + asyncError = _this._box_1.source._resultOrListeners; + t1 = _this._box_0; + if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { + t1.listenerValueOrError = t1.listener.handleError$1(asyncError); + t1.listenerHasError = false; + } + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this._box_1.source._resultOrListeners; + t2 = _this._box_0; + if (t1.error === e) + t2.listenerValueOrError = t1; + else + t2.listenerValueOrError = A.AsyncError$(e, s); + t2.listenerHasError = true; + } + }, + $signature: 0 + }; + A._AsyncCallbackEntry.prototype = {}; + A.Stream.prototype = { + get$isBroadcast() { + return false; + }, + get$length(_) { + var t1 = {}, + future = new A._Future($.Zone__current, type$._Future_int); + t1.count = 0; + this.listen$4$cancelOnError$onDone$onError(0, new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); + return future; + } + }; + A.Stream_Stream$fromFuture_closure.prototype = { + call$1(value) { + var t1 = this.controller; + t1._async$_add$1(value); + t1._closeUnchecked$0(); + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A.Stream_Stream$fromFuture_closure0.prototype = { + call$2(error, stackTrace) { + var t1 = this.controller; + t1._addError$2(error, stackTrace); + t1._closeUnchecked$0(); + }, + $signature: 292 + }; + A.Stream_length_closure.prototype = { + call$1(_) { + ++this._box_0.count; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(Stream.T)"); + } + }; + A.Stream_length_closure0.prototype = { + call$0() { + this.future._complete$1(this._box_0.count); + }, + $signature: 0 + }; + A.StreamTransformerBase.prototype = {}; + A._StreamController.prototype = { + get$stream() { + return new A._ControllerStream(this, A._instanceType(this)._eval$1("_ControllerStream<1>")); + }, + get$_pendingEvents() { + if ((this._state & 8) === 0) + return this._varData; + return this._varData.varData; + }, + _ensurePendingEvents$0() { + var events, state, _this = this; + if ((_this._state & 8) === 0) { + events = _this._varData; + return events == null ? _this._varData = new A._PendingEvents() : events; + } + state = _this._varData; + events = state.varData; + return events == null ? state.varData = new A._PendingEvents() : events; + }, + get$_subscription() { + var varData = this._varData; + return (this._state & 8) !== 0 ? varData.varData : varData; + }, + _badEventState$0() { + if ((this._state & 4) !== 0) + return new A.StateError("Cannot add event after closing"); + return new A.StateError("Cannot add event while adding a stream"); + }, + addStream$2$cancelOnError(source, cancelOnError) { + var t2, t3, t4, _this = this, + t1 = _this._state; + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + if ((t1 & 2) !== 0) { + t1 = new A._Future($.Zone__current, type$._Future_dynamic); + t1._asyncComplete$1(null); + return t1; + } + t1 = _this._varData; + t2 = new A._Future($.Zone__current, type$._Future_dynamic); + t3 = source.listen$4$cancelOnError$onDone$onError(0, _this.get$_async$_add(), false, _this.get$_close(), _this.get$_addError()); + t4 = _this._state; + if ((t4 & 1) !== 0 ? (_this.get$_subscription()._state & 4) !== 0 : (t4 & 2) === 0) + t3.pause$0(0); + _this._varData = new A._StreamControllerAddStreamState(t1, t2, t3); + _this._state |= 8; + return t2; + }, + _ensureDoneFuture$0() { + var t1 = this._doneFuture; + if (t1 == null) + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); + return t1; + }, + add$1(_, value) { + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + this._async$_add$1(value); + }, + addError$2(error, stackTrace) { + var replacement; + A.checkNotNullable(error, "error", type$.Object); + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + this._addError$2(error, stackTrace); + }, + addError$1(error) { + return this.addError$2(error, null); + }, + close$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 4) !== 0) + return _this._ensureDoneFuture$0(); + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + _this._closeUnchecked$0(); + return _this._ensureDoneFuture$0(); + }, + _closeUnchecked$0() { + var t1 = this._state |= 4; + if ((t1 & 1) !== 0) + this._sendDone$0(); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); + }, + _async$_add$1(value) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendData$1(value); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value)); + }, + _addError$2(error, stackTrace) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendError$2(error, stackTrace); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var addState = this._varData; + this._varData = addState.varData; + this._state &= 4294967287; + addState.addStreamFuture._asyncComplete$1(null); + }, + _subscribe$4(onData, onError, onDone, cancelOnError) { + var subscription, pendingEvents, t1, addState, _this = this; + if ((_this._state & 3) !== 0) + throw A.wrapException(A.StateError$("Stream has already been listened to.")); + subscription = A._ControllerSubscription$(_this, onData, onError, onDone, cancelOnError, A._instanceType(_this)._precomputed1); + pendingEvents = _this.get$_pendingEvents(); + t1 = _this._state |= 1; + if ((t1 & 8) !== 0) { + addState = _this._varData; + addState.varData = subscription; + addState.addSubscription.resume$0(0); + } else + _this._varData = subscription; + subscription._setPendingEvents$1(pendingEvents); + subscription._guardCallback$1(new A._StreamController__subscribe_closure(_this)); + return subscription; + }, + _recordCancel$1(subscription) { + var onCancel, cancelResult, e, s, exception, result0, t1, _this = this, result = null; + if ((_this._state & 8) !== 0) + result = _this._varData.cancel$0(); + _this._varData = null; + _this._state = _this._state & 4294967286 | 2; + onCancel = _this.onCancel; + if (onCancel != null) + if (result == null) + try { + cancelResult = onCancel.call$0(); + if (type$.Future_void._is(cancelResult)) + result = cancelResult; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + result0 = new A._Future($.Zone__current, type$._Future_void); + result0._asyncCompleteError$2(e, s); + result = result0; + } + else + result = result.whenComplete$1(onCancel); + t1 = new A._StreamController__recordCancel_complete(_this); + if (result != null) + result = result.whenComplete$1(t1); + else + t1.call$0(); + return result; + }, + _recordPause$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.pause$0(0); + A._runGuarded(this.onPause); + }, + _recordResume$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.resume$0(0); + A._runGuarded(this.onResume); + }, + $isEventSink: 1, + set$onPause(val) { + return this.onPause = val; + }, + set$onResume(val) { + return this.onResume = val; + }, + set$onCancel(val) { + return this.onCancel = val; + } + }; + A._StreamController__subscribe_closure.prototype = { + call$0() { + A._runGuarded(this.$this.onListen); + }, + $signature: 0 + }; + A._StreamController__recordCancel_complete.prototype = { + call$0() { + var doneFuture = this.$this._doneFuture; + if (doneFuture != null && (doneFuture._state & 30) === 0) + doneFuture._asyncComplete$1(null); + }, + $signature: 0 + }; + A._SyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._async$_add$1(data); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addError$2(error, stackTrace); + }, + _sendDone$0() { + this.get$_subscription()._close$0(); + } + }; + A._AsyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._addPending$1(new A._DelayedData(data)); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _sendDone$0() { + this.get$_subscription()._addPending$1(B.C__DelayedDone); + } + }; + A._AsyncStreamController.prototype = {}; + A._SyncStreamController.prototype = {}; + A._ControllerStream.prototype = { + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return other instanceof A._ControllerStream && other._controller === this._controller; + } + }; + A._ControllerSubscription.prototype = { + _async$_onCancel$0() { + return this._controller._recordCancel$1(this); + }, + _async$_onPause$0() { + this._controller._recordPause$1(this); + }, + _async$_onResume$0() { + this._controller._recordResume$1(this); + } + }; + A._AddStreamState.prototype = { + cancel$0() { + var cancel = this.addSubscription.cancel$0(); + return cancel.whenComplete$1(new A._AddStreamState_cancel_closure(this)); + } + }; + A._AddStreamState_cancel_closure.prototype = { + call$0() { + this.$this.addStreamFuture._asyncComplete$1(null); + }, + $signature: 1 + }; + A._StreamControllerAddStreamState.prototype = {}; + A._BufferingStreamSubscription.prototype = { + _setPendingEvents$1(pendingEvents) { + var _this = this; + if (pendingEvents == null) + return; + _this._pending = pendingEvents; + if (pendingEvents.lastPendingEvent != null) { + _this._state = (_this._state | 64) >>> 0; + pendingEvents.schedule$1(_this); + } + }, + pause$1(_, resumeSignal) { + var t2, t3, _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t2 = (t1 + 128 | 4) >>> 0; + _this._state = t2; + if (t1 < 128) { + t3 = _this._pending; + if (t3 != null) + if (t3._state === 1) + t3._state = 3; + } + if ((t1 & 4) === 0 && (t2 & 32) === 0) + _this._guardCallback$1(_this.get$_async$_onPause()); + }, + pause$0($receiver) { + return this.pause$1($receiver, null); + }, + resume$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + if (t1 >= 128) { + t1 = _this._state = t1 - 128; + if (t1 < 128) + if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent != null) + _this._pending.schedule$1(_this); + else { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + if ((t1 & 32) === 0) + _this._guardCallback$1(_this.get$_async$_onResume()); + } + } + }, + cancel$0() { + var _this = this, + t1 = (_this._state & 4294967279) >>> 0; + _this._state = t1; + if ((t1 & 8) === 0) + _this._cancel$0(); + t1 = _this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + _cancel$0() { + var t2, _this = this, + t1 = _this._state = (_this._state | 8) >>> 0; + if ((t1 & 64) !== 0) { + t2 = _this._pending; + if (t2._state === 1) + t2._state = 3; + } + if ((t1 & 32) === 0) + _this._pending = null; + _this._cancelFuture = _this._async$_onCancel$0(); + }, + _async$_add$1(data) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 32) + this._sendData$1(data); + else + this._addPending$1(new A._DelayedData(data)); + }, + _addError$2(error, stackTrace) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 32) + this._sendError$2(error, stackTrace); + else + this._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t1 = (t1 | 2) >>> 0; + _this._state = t1; + if (t1 < 32) + _this._sendDone$0(); + else + _this._addPending$1(B.C__DelayedDone); + }, + _async$_onPause$0() { + }, + _async$_onResume$0() { + }, + _async$_onCancel$0() { + return null; + }, + _addPending$1($event) { + var t1, _this = this, + pending = _this._pending; + if (pending == null) + pending = _this._pending = new A._PendingEvents(); + pending.add$1(0, $event); + t1 = _this._state; + if ((t1 & 64) === 0) { + t1 = (t1 | 64) >>> 0; + _this._state = t1; + if (t1 < 128) + pending.schedule$1(_this); + } + }, + _sendData$1(data) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 32) >>> 0; + _this._zone.runUnaryGuarded$1$2(_this._onData, data, A._instanceType(_this)._eval$1("_BufferingStreamSubscription.T")); + _this._state = (_this._state & 4294967263) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _sendError$2(error, stackTrace) { + var cancelFuture, _this = this, + t1 = _this._state, + t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); + if ((t1 & 1) !== 0) { + _this._state = (t1 | 16) >>> 0; + _this._cancel$0(); + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t2); + else + t2.call$0(); + } else { + t2.call$0(); + _this._checkState$1((t1 & 4) !== 0); + } + }, + _sendDone$0() { + var cancelFuture, _this = this, + t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); + _this._cancel$0(); + _this._state = (_this._state | 16) >>> 0; + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t1); + else + t1.call$0(); + }, + _guardCallback$1(callback) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 32) >>> 0; + callback.call$0(); + _this._state = (_this._state & 4294967263) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1(wasInputPaused) { + var t2, isInputPaused, _this = this, + t1 = _this._state; + if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._state = (t1 & 4294967231) >>> 0; + if ((t1 & 4) !== 0) + if (t1 < 128) { + t2 = _this._pending; + t2 = t2 == null ? null : t2.lastPendingEvent == null; + t2 = t2 !== false; + } else + t2 = false; + else + t2 = false; + if (t2) { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + } + } + for (; true; wasInputPaused = isInputPaused) { + if ((t1 & 8) !== 0) { + _this._pending = null; + return; + } + isInputPaused = (t1 & 4) !== 0; + if (wasInputPaused === isInputPaused) + break; + _this._state = (t1 ^ 32) >>> 0; + if (isInputPaused) + _this._async$_onPause$0(); + else + _this._async$_onResume$0(); + t1 = (_this._state & 4294967263) >>> 0; + _this._state = t1; + } + if ((t1 & 64) !== 0 && t1 < 128) + _this._pending.schedule$1(_this); + }, + $isStreamSubscription: 1 + }; + A._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0() { + var onError, t3, t4, + t1 = this.$this, + t2 = t1._state; + if ((t2 & 8) !== 0 && (t2 & 16) === 0) + return; + t1._state = (t2 | 32) >>> 0; + onError = t1._onError; + t2 = this.error; + t3 = type$.Object; + t4 = t1._zone; + if (type$.void_Function_Object_StackTrace._is(onError)) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); + else + t4.runUnaryGuarded$1$2(onError, t2, t3); + t1._state = (t1._state & 4294967263) >>> 0; + }, + $signature: 0 + }; + A._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._state; + if ((t2 & 16) === 0) + return; + t1._state = (t2 | 42) >>> 0; + t1._zone.runGuarded$1(t1._onDone); + t1._state = (t1._state & 4294967263) >>> 0; + }, + $signature: 0 + }; + A._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + return this._controller._subscribe$4(onData, onError, onDone, cancelOnError === true); + }, + listen$1($receiver, onData) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, null, null); + }, + listen$3$onDone$onError($receiver, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, onDone, onError); + } + }; + A._DelayedEvent.prototype = { + get$next() { + return this.next; + }, + set$next(val) { + return this.next = val; + } + }; + A._DelayedData.prototype = { + perform$1(dispatch) { + dispatch._sendData$1(this.value); + } + }; + A._DelayedError.prototype = { + perform$1(dispatch) { + dispatch._sendError$2(this.error, this.stackTrace); + } + }; + A._DelayedDone.prototype = { + perform$1(dispatch) { + dispatch._sendDone$0(); + }, + get$next() { + return null; + }, + set$next(_) { + throw A.wrapException(A.StateError$("No events after a done.")); + } + }; + A._PendingEvents.prototype = { + schedule$1(dispatch) { + var _this = this, + t1 = _this._state; + if (t1 === 1) + return; + if (t1 >= 1) { + _this._state = 1; + return; + } + A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); + _this._state = 1; + }, + add$1(_, $event) { + var _this = this, + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + lastEvent.set$next($event); + _this.lastPendingEvent = $event; + } + } + }; + A._PendingEvents_schedule_closure.prototype = { + call$0() { + var $event, nextEvent, + t1 = this.$this, + oldState = t1._state; + t1._state = 0; + if (oldState === 3) + return; + $event = t1.firstPendingEvent; + nextEvent = $event.get$next(); + t1.firstPendingEvent = nextEvent; + if (nextEvent == null) + t1.lastPendingEvent = null; + $event.perform$1(this.dispatch); + }, + $signature: 0 + }; + A._StreamIterator.prototype = { + get$current(_) { + if (this._async$_hasValue) + return this._stateData; + return null; + }, + moveNext$0() { + var future, _this = this, + subscription = _this._subscription; + if (subscription != null) { + if (_this._async$_hasValue) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + _this._async$_hasValue = false; + subscription.resume$0(0); + return future; + } + throw A.wrapException(A.StateError$("Already waiting for next.")); + } + return _this._initializeOrDone$0(); + }, + _initializeOrDone$0() { + var future, subscription, _this = this, + stateData = _this._stateData; + if (stateData != null) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + subscription = stateData.listen$4$cancelOnError$onDone$onError(0, _this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); + if (_this._stateData != null) + _this._subscription = subscription; + return future; + } + return $.$get$Future__falseFuture(); + }, + cancel$0() { + var _this = this, + subscription = _this._subscription, + stateData = _this._stateData; + _this._stateData = null; + if (subscription != null) { + _this._subscription = null; + if (!_this._async$_hasValue) + stateData._asyncComplete$1(false); + else + _this._async$_hasValue = false; + return subscription.cancel$0(); + } + return $.$get$Future__nullFuture(); + }, + _onData$1(data) { + var moveNextFuture, t1, _this = this; + if (_this._subscription == null) + return; + moveNextFuture = _this._stateData; + _this._stateData = data; + _this._async$_hasValue = true; + moveNextFuture._complete$1(true); + if (_this._async$_hasValue) { + t1 = _this._subscription; + if (t1 != null) + t1.pause$0(0); + } + }, + _onError$2(error, stackTrace) { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeError$2(error, stackTrace); + else + moveNextFuture._asyncCompleteError$2(error, stackTrace); + }, + _onDone$0() { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeWithValue$1(false); + else + moveNextFuture._asyncCompleteWithValue$1(false); + } + }; + A._ForwardingStream.prototype = { + get$isBroadcast() { + return this._async$_source.get$isBroadcast(); + }, + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var t1 = this.$ti, + t2 = t1._rest[1], + t3 = $.Zone__current, + t4 = cancelOnError === true ? 1 : 0, + t5 = A._BufferingStreamSubscription__registerDataHandler(t3, onData, t2), + t6 = A._BufferingStreamSubscription__registerErrorHandler(t3, onError), + t7 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + t2 = new A._ForwardingStreamSubscription(this, t5, t6, t3.registerCallback$1$1(t7, type$.void), t3, t4, t1._eval$1("@<1>")._bind$1(t2)._eval$1("_ForwardingStreamSubscription<1,2>")); + t2._subscription = this._async$_source.listen$3$onDone$onError(0, t2.get$_handleData(), t2.get$_handleDone(), t2.get$_handleError()); + return t2; + }, + listen$1($receiver, onData) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, null, null); + }, + listen$3$onDone$onError($receiver, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, onDone, onError); + } + }; + A._ForwardingStreamSubscription.prototype = { + _async$_add$1(data) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_add(data); + }, + _addError$2(error, stackTrace) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_addError(error, stackTrace); + }, + _async$_onPause$0() { + var t1 = this._subscription; + if (t1 != null) + t1.pause$0(0); + }, + _async$_onResume$0() { + var t1 = this._subscription; + if (t1 != null) + t1.resume$0(0); + }, + _async$_onCancel$0() { + var subscription = this._subscription; + if (subscription != null) { + this._subscription = null; + return subscription.cancel$0(); + } + return null; + }, + _handleData$1(data) { + this._stream._handleData$2(data, this); + }, + _handleError$2(error, stackTrace) { + this._addError$2(error, stackTrace); + }, + _handleDone$0() { + this._close$0(); + } + }; + A._ExpandStream.prototype = { + _handleData$2(inputEvent, sink) { + var value, e, s, t1, exception, error, stackTrace, replacement; + try { + for (t1 = J.get$iterator$ax(this._expand.call$1(inputEvent)); t1.moveNext$0();) { + value = t1.get$current(t1); + sink._async$_add$1(value); + } + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + error = e; + stackTrace = s; + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } + sink._addError$2(error, stackTrace); + } + } + }; + A._ZoneFunction.prototype = {}; + A._ZoneSpecification.prototype = {$isZoneSpecification: 1}; + A._ZoneDelegate.prototype = {$isZoneDelegate: 1}; + A._Zone.prototype = { + _processUncaughtError$3(zone, error, stackTrace) { + var handler, parentDelegate, parentZone, currentZone, e, s, t1, exception, + implementation = this.get$_handleUncaughtError(), + implZone = implementation.zone; + if (implZone === B.C__RootZone) { + A._rootHandleError(error, stackTrace); + return; + } + handler = implementation.$function; + parentDelegate = implZone.get$_parentDelegate(); + t1 = J.get$parent$z(implZone); + t1.toString; + parentZone = t1; + currentZone = $.Zone__current; + try { + $.Zone__current = parentZone; + handler.call$5(implZone, parentDelegate, zone, error, stackTrace); + $.Zone__current = currentZone; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current = currentZone; + t1 = error === e ? stackTrace : s; + parentZone._processUncaughtError$3(implZone, e, t1); + } + }, + $isZone: 1 + }; + A._CustomZone.prototype = { + get$_delegate() { + var t1 = this._delegateCache; + return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + return this.parent.get$_delegate(); + }, + get$errorZone() { + return this._handleUncaughtError.zone; + }, + runGuarded$1(f) { + var e, s, exception; + try { + this.run$1$1(0, f, type$.void); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runUnaryGuarded$1$2(f, arg, $T) { + var e, s, exception; + try { + this.runUnary$2$2(f, arg, type$.void, $T); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { + var e, s, exception; + try { + this.runBinary$3$3(f, arg1, arg2, type$.void, T1, T2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._CustomZone_bindCallback_closure(this, this.registerCallback$1$1(f, $R), $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1(f, $R, $T), $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(f, type$.void)); + }, + $index(_, key) { + var value, + t1 = this._async$_map, + result = t1.$index(0, key); + if (result != null || t1.containsKey$1(key)) + return result; + value = this.parent.$index(0, key); + if (value != null) + t1.$indexSet(0, key, value); + return value; + }, + handleUncaughtError$2(error, stackTrace) { + this._processUncaughtError$3(this, error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + var implementation = this._fork, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, specification, zoneValues); + }, + run$1$1(_, f) { + var implementation = this._run, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + runUnary$2$2(f, arg) { + var implementation = this._runUnary, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + var implementation = this._runBinary, + t1 = implementation.zone; + return implementation.$function.call$6(t1, t1.get$_parentDelegate(), this, f, arg1, arg2); + }, + registerCallback$1$1(callback) { + var implementation = this._registerCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerUnaryCallback$2$1(callback) { + var implementation = this._registerUnaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerBinaryCallback$3$1(callback) { + var implementation = this._registerBinaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + errorCallback$2(error, stackTrace) { + var implementation, implementationZone; + A.checkNotNullable(error, "error", type$.Object); + implementation = this._errorCallback; + implementationZone = implementation.zone; + if (implementationZone === B.C__RootZone) + return null; + return implementation.$function.call$5(implementationZone, implementationZone.get$_parentDelegate(), this, error, stackTrace); + }, + scheduleMicrotask$1(f) { + var implementation = this._scheduleMicrotask, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + createTimer$2(duration, f) { + var implementation = this._createTimer, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, duration, f); + }, + print$1(line) { + var implementation = this._print, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, line); + }, + get$_run() { + return this._run; + }, + get$_runUnary() { + return this._runUnary; + }, + get$_runBinary() { + return this._runBinary; + }, + get$_registerCallback() { + return this._registerCallback; + }, + get$_registerUnaryCallback() { + return this._registerUnaryCallback; + }, + get$_registerBinaryCallback() { + return this._registerBinaryCallback; + }, + get$_errorCallback() { + return this._errorCallback; + }, + get$_scheduleMicrotask() { + return this._scheduleMicrotask; + }, + get$_createTimer() { + return this._createTimer; + }, + get$_createPeriodicTimer() { + return this._createPeriodicTimer; + }, + get$_print() { + return this._print; + }, + get$_fork() { + return this._fork; + }, + get$_handleUncaughtError() { + return this._handleUncaughtError; + }, + get$parent(receiver) { + return this.parent; + }, + get$_async$_map() { + return this._async$_map; + } + }; + A._CustomZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.registered, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._CustomZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.registered, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._CustomZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.registered); + }, + $signature: 0 + }; + A._rootHandleError_closure.prototype = { + call$0() { + var t1 = this.error, + t2 = this.stackTrace; + A.checkNotNullable(t1, "error", type$.Object); + A.checkNotNullable(t2, "stackTrace", type$.StackTrace); + A.Error__throw(t1, t2); + }, + $signature: 0 + }; + A._RootZone.prototype = { + get$_run() { + return B._ZoneFunction__RootZone__rootRun; + }, + get$_runUnary() { + return B._ZoneFunction__RootZone__rootRunUnary; + }, + get$_runBinary() { + return B._ZoneFunction__RootZone__rootRunBinary; + }, + get$_registerCallback() { + return B._ZoneFunction__RootZone__rootRegisterCallback; + }, + get$_registerUnaryCallback() { + return B._ZoneFunction_Eeh; + }, + get$_registerBinaryCallback() { + return B._ZoneFunction_7G2; + }, + get$_errorCallback() { + return B._ZoneFunction__RootZone__rootErrorCallback; + }, + get$_scheduleMicrotask() { + return B._ZoneFunction__RootZone__rootScheduleMicrotask; + }, + get$_createTimer() { + return B._ZoneFunction__RootZone__rootCreateTimer; + }, + get$_createPeriodicTimer() { + return B._ZoneFunction_3bB; + }, + get$_print() { + return B._ZoneFunction__RootZone__rootPrint; + }, + get$_fork() { + return B._ZoneFunction__RootZone__rootFork; + }, + get$_handleUncaughtError() { + return B._ZoneFunction_NMc; + }, + get$parent(_) { + return null; + }, + get$_async$_map() { + return $.$get$_RootZone__rootMap(); + }, + get$_delegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$errorZone() { + return this; + }, + runGuarded$1(f) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$0(); + return; + } + A._rootRun(null, null, this, f); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runUnaryGuarded$1$2(f, arg) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$1(arg); + return; + } + A._rootRunUnary(null, null, this, f, arg); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$2(arg1, arg2); + return; + } + A._rootRunBinary(null, null, this, f, arg1, arg2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._RootZone_bindCallback_closure(this, f, $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._RootZone_bindUnaryCallback_closure(this, f, $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._RootZone_bindCallbackGuarded_closure(this, f); + }, + $index(_, key) { + return null; + }, + handleUncaughtError$2(error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + return A._rootFork(null, null, this, specification, zoneValues); + }, + run$1$1(_, f) { + if ($.Zone__current === B.C__RootZone) + return f.call$0(); + return A._rootRun(null, null, this, f); + }, + runUnary$2$2(f, arg) { + if ($.Zone__current === B.C__RootZone) + return f.call$1(arg); + return A._rootRunUnary(null, null, this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + if ($.Zone__current === B.C__RootZone) + return f.call$2(arg1, arg2); + return A._rootRunBinary(null, null, this, f, arg1, arg2); + }, + registerCallback$1$1(f) { + return f; + }, + registerUnaryCallback$2$1(f) { + return f; + }, + registerBinaryCallback$3$1(f) { + return f; + }, + errorCallback$2(error, stackTrace) { + return null; + }, + scheduleMicrotask$1(f) { + A._rootScheduleMicrotask(null, null, this, f); + }, + createTimer$2(duration, f) { + return A.Timer__createTimer(duration, f); + }, + print$1(line) { + A.printString(line); + } + }; + A._RootZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.f, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._RootZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.f, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._RootZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.f); + }, + $signature: 0 + }; + A._HashMap.prototype = { + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + get$keys(_) { + return new A._HashMapKeyIterable(this, A._instanceType(this)._eval$1("_HashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A._HashMapKeyIterable(this, t1._eval$1("_HashMapKeyIterable<1>")), new A._HashMap_values_closure(this), t1._precomputed1, t1._rest[1]); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + return strings == null ? false : strings[key] != null; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + return nums == null ? false : nums[key] != null; + } else + return this._containsKey$1(key); + }, + _containsKey$1(key) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A._HashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, t1, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); + return t1; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); + return t1; + } else + return this._get$1(key); + }, + _get$1(key) { + var bucket, index, + rest = this._collection$_rest; + if (rest == null) + return null; + bucket = this._getBucket$2(rest, key); + index = this._findBucketIndex$2(bucket, key); + return index < 0 ? null : bucket[index + 1]; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string" && key !== "__proto__") { + strings = _this._collection$_strings; + _this._collection$_addHashTableEntry$3(strings == null ? _this._collection$_strings = A._HashMap__newHashTable() : strings, key, value); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = _this._collection$_nums; + _this._collection$_addHashTableEntry$3(nums == null ? _this._collection$_nums = A._HashMap__newHashTable() : nums, key, value); + } else + _this._set$2(key, value); + }, + _set$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._HashMap__newHashTable(); + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) { + A._HashMap__setTableEntry(rest, hash, [key, value]); + ++_this._collection$_length; + _this._keys = null; + } else { + index = _this._findBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index + 1] = value; + else { + bucket.push(key, value); + ++_this._collection$_length; + _this._keys = null; + } + } + }, + remove$1(_, key) { + var t1; + if (typeof key == "string" && key !== "__proto__") + return this._removeHashTableEntry$2(this._collection$_strings, key); + else { + t1 = this._remove$1(key); + return t1; + } + }, + _remove$1(key) { + var hash, bucket, index, result, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return null; + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, key); + if (index < 0) + return null; + --_this._collection$_length; + _this._keys = null; + result = bucket.splice(index, 2)[1]; + if (0 === bucket.length) + delete rest[hash]; + return result; + }, + forEach$1(_, action) { + var $length, t1, i, key, t2, _this = this, + keys = _this._computeKeys$0(); + for ($length = keys.length, t1 = A._instanceType(_this)._rest[1], i = 0; i < $length; ++i) { + key = keys[i]; + t2 = _this.$index(0, key); + action.call$2(key, t2 == null ? t1._as(t2) : t2); + if (keys !== _this._keys) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _computeKeys$0() { + var strings, names, entries, index, i, nums, rest, bucket, $length, i0, _this = this, + result = _this._keys; + if (result != null) + return result; + result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); + strings = _this._collection$_strings; + if (strings != null) { + names = Object.getOwnPropertyNames(strings); + entries = names.length; + for (index = 0, i = 0; i < entries; ++i) { + result[index] = names[i]; + ++index; + } + } else + index = 0; + nums = _this._collection$_nums; + if (nums != null) { + names = Object.getOwnPropertyNames(nums); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = +names[i]; + ++index; + } + } + rest = _this._collection$_rest; + if (rest != null) { + names = Object.getOwnPropertyNames(rest); + entries = names.length; + for (i = 0; i < entries; ++i) { + bucket = rest[names[i]]; + $length = bucket.length; + for (i0 = 0; i0 < $length; i0 += 2) { + result[index] = bucket[i0]; + ++index; + } + } + } + return _this._keys = result; + }, + _collection$_addHashTableEntry$3(table, key, value) { + if (table[key] == null) { + ++this._collection$_length; + this._keys = null; + } + A._HashMap__setTableEntry(table, key, value); + }, + _removeHashTableEntry$2(table, key) { + var value; + if (table != null && table[key] != null) { + value = A._HashMap__getTableEntry(table, key); + delete table[key]; + --this._collection$_length; + this._keys = null; + return value; + } else + return null; + }, + _computeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, + _getBucket$2(table, key) { + return table[this._computeHashCode$1(key)]; + }, + _findBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) + if (J.$eq$(bucket[i], key)) + return i; + return -1; + } + }; + A._HashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = t1.$index(0, each); + return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); + } + }; + A._HashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A._IdentityHashMap.prototype = { + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) { + t1 = bucket[i]; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A._HashMapKeyIterable.prototype = { + get$length(_) { + return this._map._collection$_length; + }, + get$isEmpty(_) { + return this._map._collection$_length === 0; + }, + get$iterator(_) { + var t1 = this._map; + return new A._HashMapKeyIterator(t1, t1._computeKeys$0()); + }, + contains$1(_, element) { + return this._map.containsKey$1(element); + } + }; + A._HashMapKeyIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? A._instanceType(this)._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + keys = _this._keys, + offset = _this._offset, + t1 = _this._map; + if (keys !== t1._keys) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (offset >= keys.length) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = keys[offset]; + _this._offset = offset + 1; + return true; + } + } + }; + A._LinkedIdentityHashMap.prototype = { + internalComputeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i].hashMapCellKey; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A._LinkedCustomHashMap.prototype = { + $index(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalGet(key); + }, + $indexSet(_, key, value) { + this.super$JsLinkedHashMap$internalSet(key, value); + }, + containsKey$1(key) { + if (!this._validKey.call$1(key)) + return false; + return this.super$JsLinkedHashMap$internalContainsKey(key); + }, + remove$1(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalRemove(key); + }, + internalComputeHashCode$1(key) { + return this._hashCode.call$1(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, t1, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (t1 = this._equals, i = 0; i < $length; ++i) + if (t1.call$2(bucket[i].hashMapCellKey, key)) + return i; + return -1; + } + }; + A._LinkedCustomHashMap_closure.prototype = { + call$1(v) { + return this.K._is(v); + }, + $signature: 137 + }; + A._LinkedHashSet.prototype = { + _newSet$0() { + return new A._LinkedHashSet(A._instanceType(this)._eval$1("_LinkedHashSet<1>")); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedHashSet($R._eval$1("_LinkedHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + get$iterator(_) { + var t1 = new A._LinkedHashSetIterator(this, this._collection$_modifications); + t1._collection$_cell = this._collection$_first; + return t1; + }, + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + contains$1(_, object) { + var strings, nums; + if (typeof object == "string" && object !== "__proto__") { + strings = this._collection$_strings; + if (strings == null) + return false; + return strings[object] != null; + } else if (typeof object == "number" && (object & 1073741823) === object) { + nums = this._collection$_nums; + if (nums == null) + return false; + return nums[object] != null; + } else + return this._contains$1(object); + }, + _contains$1(object) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; + }, + get$first(_) { + var first = this._collection$_first; + if (first == null) + throw A.wrapException(A.StateError$("No elements")); + return first._element; + }, + get$last(_) { + var last = this._collection$_last; + if (last == null) + throw A.wrapException(A.StateError$("No elements")); + return last._element; + }, + add$1(_, element) { + var strings, nums, _this = this; + if (typeof element == "string" && element !== "__proto__") { + strings = _this._collection$_strings; + return _this._collection$_addHashTableEntry$2(strings == null ? _this._collection$_strings = A._LinkedHashSet__newHashTable() : strings, element); + } else if (typeof element == "number" && (element & 1073741823) === element) { + nums = _this._collection$_nums; + return _this._collection$_addHashTableEntry$2(nums == null ? _this._collection$_nums = A._LinkedHashSet__newHashTable() : nums, element); + } else + return _this._add$1(element); + }, + _add$1(element) { + var hash, bucket, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._LinkedHashSet__newHashTable(); + hash = _this._computeHashCode$1(element); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._collection$_newLinkedCell$1(element)]; + else { + if (_this._findBucketIndex$2(bucket, element) >= 0) + return false; + bucket.push(_this._collection$_newLinkedCell$1(element)); + } + return true; + }, + remove$1(_, object) { + var _this = this; + if (typeof object == "string" && object !== "__proto__") + return _this._removeHashTableEntry$2(_this._collection$_strings, object); + else if (typeof object == "number" && (object & 1073741823) === object) + return _this._removeHashTableEntry$2(_this._collection$_nums, object); + else + return _this._remove$1(object); + }, + _remove$1(object) { + var hash, bucket, index, cell, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return false; + hash = _this._computeHashCode$1(object); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, object); + if (index < 0) + return false; + cell = bucket.splice(index, 1)[0]; + if (0 === bucket.length) + delete rest[hash]; + _this._unlinkCell$1(cell); + return true; + }, + _collection$_addHashTableEntry$2(table, element) { + if (table[element] != null) + return false; + table[element] = this._collection$_newLinkedCell$1(element); + return true; + }, + _removeHashTableEntry$2(table, element) { + var cell; + if (table == null) + return false; + cell = table[element]; + if (cell == null) + return false; + this._unlinkCell$1(cell); + delete table[element]; + return true; + }, + _collection$_modified$0() { + this._collection$_modifications = this._collection$_modifications + 1 & 1073741823; + }, + _collection$_newLinkedCell$1(element) { + var t1, _this = this, + cell = new A._LinkedHashSetCell(element); + if (_this._collection$_first == null) + _this._collection$_first = _this._collection$_last = cell; + else { + t1 = _this._collection$_last; + t1.toString; + cell._collection$_previous = t1; + _this._collection$_last = t1._collection$_next = cell; + } + ++_this._collection$_length; + _this._collection$_modified$0(); + return cell; + }, + _unlinkCell$1(cell) { + var _this = this, + previous = cell._collection$_previous, + next = cell._collection$_next; + if (previous == null) + _this._collection$_first = next; + else + previous._collection$_next = next; + if (next == null) + _this._collection$_last = previous; + else + next._collection$_previous = previous; + --_this._collection$_length; + _this._collection$_modified$0(); + }, + _computeHashCode$1(element) { + return J.get$hashCode$(element) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i]._element, element)) + return i; + return -1; + } + }; + A._LinkedIdentityHashSet.prototype = { + _newSet$0() { + return new A._LinkedIdentityHashSet(this.$ti); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedIdentityHashSet($R._eval$1("_LinkedIdentityHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i]._element; + if (t1 == null ? element == null : t1 === element) + return i; + } + return -1; + } + }; + A._LinkedHashSetCell.prototype = {}; + A._LinkedHashSetIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? A._instanceType(this)._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + cell = _this._collection$_cell, + t1 = _this._set; + if (_this._collection$_modifications !== t1._collection$_modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (cell == null) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = cell._element; + _this._collection$_cell = cell._collection$_next; + return true; + } + } + }; + A.UnmodifiableListView.prototype = { + cast$1$0(_, $R) { + return new A.UnmodifiableListView(J.cast$1$0$ax(this._collection$_source, $R), $R._eval$1("UnmodifiableListView<0>")); + }, + get$length(_) { + return J.get$length$asx(this._collection$_source); + }, + $index(_, index) { + return J.elementAt$1$ax(this._collection$_source, index); + } + }; + A.HashMap_HashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 153 + }; + A.IterableBase.prototype = {}; + A.LinkedHashMap_LinkedHashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 153 + }; + A.ListBase.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1}; + A.ListMixin.prototype = { + get$iterator(receiver) { + return new A.ListIterator(receiver, this.get$length(receiver)); + }, + elementAt$1(receiver, index) { + return this.$index(receiver, index); + }, + get$isEmpty(receiver) { + return this.get$length(receiver) === 0; + }, + get$isNotEmpty(receiver) { + return !this.get$isEmpty(receiver); + }, + get$first(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, 0); + }, + get$last(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, this.get$length(receiver) - 1); + }, + get$single(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (this.get$length(receiver) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return this.$index(receiver, 0); + }, + contains$1(receiver, element) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (J.$eq$(this.$index(receiver, i), element)) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (!test.call$1(this.$index(receiver, i))) + return false; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + any$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (test.call$1(this.$index(receiver, i))) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + lastWhere$2$orElse(receiver, test, orElse) { + var i, element, + $length = this.get$length(receiver); + for (i = $length - 1; i >= 0; --i) { + element = this.$index(receiver, i); + if (test.call$1(element)) + return element; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + if (orElse != null) + return orElse.call$0(); + throw A.wrapException(A.IterableElementError_noElement()); + }, + join$1(receiver, separator) { + var t1; + if (this.get$length(receiver) === 0) + return ""; + t1 = A.StringBuffer__writeAll("", receiver, separator); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + where$1(receiver, test) { + return new A.WhereIterable(receiver, test, A.instanceType(receiver)._eval$1("WhereIterable")); + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + skip$1(receiver, count) { + return A.SubListIterable$(receiver, count, null, A.instanceType(receiver)._eval$1("ListMixin.E")); + }, + take$1(receiver, count) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(count, "count", type$.int), A.instanceType(receiver)._eval$1("ListMixin.E")); + }, + toList$1$growable(receiver, growable) { + var t1, first, result, i, _this = this; + if (_this.get$isEmpty(receiver)) { + t1 = J.JSArray_JSArray$growable(0, A.instanceType(receiver)._eval$1("ListMixin.E")); + return t1; + } + first = _this.$index(receiver, 0); + result = A.List_List$filled(_this.get$length(receiver), first, true, A.instanceType(receiver)._eval$1("ListMixin.E")); + for (i = 1; i < _this.get$length(receiver); ++i) + result[i] = _this.$index(receiver, i); + return result; + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(receiver) { + var i, + result = A.LinkedHashSet_LinkedHashSet(A.instanceType(receiver)._eval$1("ListMixin.E")); + for (i = 0; i < this.get$length(receiver); ++i) + result.add$1(0, this.$index(receiver, i)); + return result; + }, + add$1(receiver, element) { + var t1 = this.get$length(receiver); + this.set$length(receiver, t1 + 1); + this.$indexSet(receiver, t1, element); + }, + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A.instanceType(receiver)._eval$1("@")._bind$1($R)._eval$1("CastList<1,2>")); + }, + sort$1(receiver, compare) { + A.Sort_sort(receiver, compare == null ? A.collection_ListMixin__compareAny$closure() : compare); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListMixin.E")); + }, + fillRange$3(receiver, start, end, fill) { + var i, + value = fill == null ? A.instanceType(receiver)._eval$1("ListMixin.E")._as(fill) : fill; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + for (i = start; i < end; ++i) + this.$indexSet(receiver, i, value); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherStart, otherList, t1, i; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (A.instanceType(receiver)._eval$1("List")._is(iterable)) { + otherStart = skipCount; + otherList = iterable; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + else + for (i = 0; i < $length; ++i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A.instanceType(receiver)._eval$1("ReversedListIterable")); + }, + toString$0(receiver) { + return A.IterableBase_iterableToFullString(receiver, "[", "]"); + } + }; + A.MapBase.prototype = {}; + A.MapBase_mapToString_closure.prototype = { + call$2(k, v) { + var t2, + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = t1._contents += A.S(k); + t1._contents = t2 + ": "; + t1._contents += A.S(v); + }, + $signature: 165 + }; + A.MapMixin.prototype = { + cast$2$0(_, RK, RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._eval$1("MapMixin.K"), t1._eval$1("MapMixin.V"), RK, RV); + }, + forEach$1(_, action) { + var t1, t2, key, t3, _this = this; + for (t1 = J.get$iterator$ax(_this.get$keys(_this)), t2 = A._instanceType(_this)._eval$1("MapMixin.V"); t1.moveNext$0();) { + key = t1.get$current(t1); + t3 = _this.$index(0, key); + action.call$2(key, t3 == null ? t2._as(t3) : t3); + } + }, + addAll$1(_, other) { + other.forEach$1(0, new A.MapMixin_addAll_closure(this)); + }, + get$entries(_) { + var _this = this; + return J.map$1$1$ax(_this.get$keys(_this), new A.MapMixin_entries_closure(_this), A._instanceType(_this)._eval$1("MapEntry")); + }, + containsKey$1(key) { + return J.contains$1$asx(this.get$keys(this), key); + }, + get$length(_) { + return J.get$length$asx(this.get$keys(this)); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$keys(this)); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$keys(this)); + }, + get$values(_) { + var t1 = A._instanceType(this); + return new A._MapBaseValueIterable(this, t1._eval$1("@")._bind$1(t1._eval$1("MapMixin.V"))._eval$1("_MapBaseValueIterable<1,2>")); + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $isMap: 1 + }; + A.MapMixin_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(MapMixin.K,MapMixin.V)"); + } + }; + A.MapMixin_entries_closure.prototype = { + call$1(key) { + var t1 = this.$this, + t2 = t1.$index(0, key); + if (t2 == null) + t2 = A._instanceType(t1)._eval$1("MapMixin.V")._as(t2); + t1 = A._instanceType(t1); + return new A.MapEntry(key, t2, t1._eval$1("@")._bind$1(t1._eval$1("MapMixin.V"))._eval$1("MapEntry<1,2>")); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("MapEntry(MapMixin.K)"); + } + }; + A.UnmodifiableMapBase.prototype = {}; + A._MapBaseValueIterable.prototype = { + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$first(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$first$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$single(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$single$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$last(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$last$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$iterator(_) { + var t1 = this._map; + return new A._MapBaseValueIterator(J.get$iterator$ax(t1.get$keys(t1)), t1); + } + }; + A._MapBaseValueIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._keys; + if (t1.moveNext$0()) { + _this._collection$_current = _this._map.$index(0, t1.get$current(t1)); + return true; + } + _this._collection$_current = null; + return false; + }, + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? A._instanceType(this)._rest[1]._as(t1) : t1; + } + }; + A._UnmodifiableMapMixin.prototype = { + $indexSet(_, key, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + addAll$1(_, other) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + } + }; + A.MapView.prototype = { + cast$2$0(_, RK, RV) { + return this._map.cast$2$0(0, RK, RV); + }, + $index(_, key) { + return this._map.$index(0, key); + }, + $indexSet(_, key, value) { + this._map.$indexSet(0, key, value); + }, + addAll$1(_, other) { + this._map.addAll$1(0, other); + }, + containsKey$1(key) { + return this._map.containsKey$1(key); + }, + forEach$1(_, action) { + this._map.forEach$1(0, action); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$keys(_) { + var t1 = this._map; + return t1.get$keys(t1); + }, + remove$1(_, key) { + return this._map.remove$1(0, key); + }, + toString$0(_) { + return this._map.toString$0(0); + }, + get$values(_) { + var t1 = this._map; + return t1.get$values(t1); + }, + get$entries(_) { + var t1 = this._map; + return t1.get$entries(t1); + }, + $isMap: 1 + }; + A.UnmodifiableMapView.prototype = { + cast$2$0(_, RK, RV) { + return new A.UnmodifiableMapView(this._map.cast$2$0(0, RK, RV), RK._eval$1("@<0>")._bind$1(RV)._eval$1("UnmodifiableMapView<1,2>")); + } + }; + A.ListQueue.prototype = { + get$iterator(_) { + var _this = this; + return new A._ListQueueIterator(_this, _this._collection$_tail, _this._modificationCount, _this._collection$_head); + }, + get$isEmpty(_) { + return this._collection$_head === this._collection$_tail; + }, + get$length(_) { + return (this._collection$_tail - this._collection$_head & this._collection$_table.length - 1) >>> 0; + }, + get$first(_) { + var _this = this, + t1 = _this._collection$_head; + if (t1 === _this._collection$_tail) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._collection$_table[t1]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$last(_) { + var _this = this, + t1 = _this._collection$_head, + t2 = _this._collection$_tail; + if (t1 === t2) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._collection$_table; + t1 = t1[(t2 - 1 & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$single(_) { + var t1, _this = this; + if (_this._collection$_head === _this._collection$_tail) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + t1 = _this._collection$_table[_this._collection$_head]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + elementAt$1(_, index) { + var t1, _this = this; + A.RangeError_checkValidIndex(index, _this, null); + t1 = _this._collection$_table; + t1 = t1[(_this._collection$_head + index & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + toList$1$growable(_, growable) { + var t1, list, t2, t3, i, t4, _this = this, + mask = _this._collection$_table.length - 1, + $length = (_this._collection$_tail - _this._collection$_head & mask) >>> 0; + if ($length === 0) { + t1 = J.JSArray_JSArray$growable(0, _this.$ti._precomputed1); + return t1; + } + t1 = _this.$ti._precomputed1; + list = A.List_List$filled($length, _this.get$first(_this), true, t1); + for (t2 = _this._collection$_table, t3 = _this._collection$_head, i = 0; i < $length; ++i) { + t4 = t2[(t3 + i & mask) >>> 0]; + list[i] = t4 == null ? t1._as(t4) : t4; + } + return list; + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + add$1(_, value) { + this._add$1(value); + }, + addAll$1(_, elements) { + var addCount, $length, t2, t3, t4, newTable, endSpace, preSpace, _this = this, + t1 = _this.$ti; + if (t1._eval$1("List<1>")._is(elements)) { + addCount = J.get$length$asx(elements); + $length = _this.get$length(_this); + t2 = $length + addCount; + t3 = _this._collection$_table; + t4 = t3.length; + if (t2 >= t4) { + newTable = A.List_List$filled(A.ListQueue__nextPowerOf2(t2 + B.JSInt_methods._shrOtherPositive$1(t2, 1)), null, false, t1._eval$1("1?")); + _this._collection$_tail = _this._collection$_writeToList$1(newTable); + _this._collection$_table = newTable; + _this._collection$_head = 0; + B.JSArray_methods.setRange$4(newTable, $length, t2, elements, 0); + _this._collection$_tail += addCount; + } else { + t1 = _this._collection$_tail; + endSpace = t4 - t1; + if (addCount < endSpace) { + B.JSArray_methods.setRange$4(t3, t1, t1 + addCount, elements, 0); + _this._collection$_tail += addCount; + } else { + preSpace = addCount - endSpace; + B.JSArray_methods.setRange$4(t3, t1, t1 + endSpace, elements, 0); + B.JSArray_methods.setRange$4(_this._collection$_table, 0, preSpace, elements, endSpace); + _this._collection$_tail = preSpace; + } + } + ++_this._modificationCount; + } else + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + _this._add$1(t1.get$current(t1)); + }, + clear$0(_) { + var t2, t3, _this = this, + i = _this._collection$_head, + t1 = _this._collection$_tail; + if (i !== t1) { + for (t2 = _this._collection$_table, t3 = t2.length - 1; i !== t1; i = (i + 1 & t3) >>> 0) + t2[i] = null; + _this._collection$_head = _this._collection$_tail = 0; + ++_this._modificationCount; + } + }, + toString$0(_) { + return A.IterableBase_iterableToFullString(this, "{", "}"); + }, + addFirst$1(value) { + var _this = this, + t1 = _this._collection$_head, + t2 = _this._collection$_table; + t1 = _this._collection$_head = (t1 - 1 & t2.length - 1) >>> 0; + t2[t1] = value; + if (t1 === _this._collection$_tail) + _this._collection$_grow$0(); + ++_this._modificationCount; + }, + removeFirst$0() { + var t2, result, _this = this, + t1 = _this._collection$_head; + if (t1 === _this._collection$_tail) + throw A.wrapException(A.IterableElementError_noElement()); + ++_this._modificationCount; + t2 = _this._collection$_table; + result = t2[t1]; + if (result == null) + result = _this.$ti._precomputed1._as(result); + t2[t1] = null; + _this._collection$_head = (t1 + 1 & t2.length - 1) >>> 0; + return result; + }, + removeLast$0(_) { + var result, _this = this, + t1 = _this._collection$_head, + t2 = _this._collection$_tail; + if (t1 === t2) + throw A.wrapException(A.IterableElementError_noElement()); + ++_this._modificationCount; + t1 = _this._collection$_table; + t2 = _this._collection$_tail = (t2 - 1 & t1.length - 1) >>> 0; + result = t1[t2]; + if (result == null) + result = _this.$ti._precomputed1._as(result); + t1[t2] = null; + return result; + }, + _add$1(element) { + var _this = this, + t1 = _this._collection$_table, + t2 = _this._collection$_tail; + t1[t2] = element; + t1 = (t2 + 1 & t1.length - 1) >>> 0; + _this._collection$_tail = t1; + if (_this._collection$_head === t1) + _this._collection$_grow$0(); + ++_this._modificationCount; + }, + _collection$_grow$0() { + var _this = this, + newTable = A.List_List$filled(_this._collection$_table.length * 2, null, false, _this.$ti._eval$1("1?")), + t1 = _this._collection$_table, + t2 = _this._collection$_head, + split = t1.length - t2; + B.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + B.JSArray_methods.setRange$4(newTable, split, split + _this._collection$_head, _this._collection$_table, 0); + _this._collection$_head = 0; + _this._collection$_tail = _this._collection$_table.length; + _this._collection$_table = newTable; + }, + _collection$_writeToList$1(target) { + var $length, firstPartSize, _this = this, + t1 = _this._collection$_head, + t2 = _this._collection$_tail, + t3 = _this._collection$_table; + if (t1 <= t2) { + $length = t2 - t1; + B.JSArray_methods.setRange$4(target, 0, $length, t3, t1); + return $length; + } else { + firstPartSize = t3.length - t1; + B.JSArray_methods.setRange$4(target, 0, firstPartSize, t3, t1); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this._collection$_tail, _this._collection$_table, 0); + return _this._collection$_tail + firstPartSize; + } + }, + $isQueue: 1 + }; + A._ListQueueIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? A._instanceType(this)._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._queue; + if (_this._modificationCount !== t1._modificationCount) + A.throwExpression(A.ConcurrentModificationError$(t1)); + t2 = _this._collection$_position; + if (t2 === _this._collection$_end) { + _this._collection$_current = null; + return false; + } + t1 = t1._collection$_table; + _this._collection$_current = t1[t2]; + _this._collection$_position = (t2 + 1 & t1.length - 1) >>> 0; + return true; + } + }; + A.SetMixin.prototype = { + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + addAll$1(_, elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.add$1(0, t1.get$current(t1)); + }, + removeAll$1(elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.remove$1(0, t1.get$current(t1)); + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, true, A._instanceType(this)._precomputed1); + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + map$1$1(_, f, $T) { + return new A.EfficientLengthMappedIterable(this, f, A._instanceType(this)._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + }, + get$single(_) { + var it, _this = this; + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + it = _this.get$iterator(_this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + toString$0(_) { + return A.IterableBase_iterableToFullString(this, "{", "}"); + }, + where$1(_, f) { + return new A.WhereIterable(this, f, A._instanceType(this)._eval$1("WhereIterable<1>")); + }, + join$1(_, separator) { + var t1, + iterator = this.get$iterator(this); + if (!iterator.moveNext$0()) + return ""; + if (separator === "") { + t1 = ""; + do + t1 += A.S(iterator.get$current(iterator)); + while (iterator.moveNext$0()); + } else { + t1 = "" + A.S(iterator.get$current(iterator)); + for (; iterator.moveNext$0();) + t1 = t1 + separator + A.S(iterator.get$current(iterator)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + take$1(_, n) { + return A.TakeIterable_TakeIterable(this, n, A._instanceType(this)._precomputed1); + }, + skip$1(_, n) { + return A.SkipIterable_SkipIterable(this, n, A._instanceType(this)._precomputed1); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + elementAt$1(_, index) { + var t1, elementIndex, element, _s5_ = "index"; + A.checkNotNullable(index, _s5_, type$.int); + A.RangeError_checkNotNegative(index, _s5_); + for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { + element = t1.get$current(t1); + if (index === elementIndex) + return element; + ++elementIndex; + } + throw A.wrapException(A.IndexError$(index, this, _s5_, null, elementIndex)); + } + }; + A._SetBase.prototype = { + difference$1(other) { + var t1, t2, element, + result = this._newSet$0(); + for (t1 = this.get$iterator(this), t2 = other._source; t1.moveNext$0();) { + element = t1.get$current(t1); + if (!t2.contains$1(0, element)) + result.add$1(0, element); + } + return result; + }, + intersection$1(other) { + var t1, t2, element, + result = this._newSet$0(); + for (t1 = this.get$iterator(this), t2 = other._baseMap; t1.moveNext$0();) { + element = t1.get$current(t1); + if (t2.containsKey$1(element)) + result.add$1(0, element); + } + return result; + }, + toSet$0(_) { + var t1 = this._newSet$0(); + t1.addAll$1(0, this); + return t1; + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isSet: 1 + }; + A._UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + addAll$1(_, elements) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + remove$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + } + }; + A._UnmodifiableSet.prototype = { + _newSet$0() { + return A.LinkedHashSet_LinkedHashSet(this.$ti._precomputed1); + }, + contains$1(_, element) { + return this._map.containsKey$1(element); + }, + get$iterator(_) { + var t1 = this._map; + return J.get$iterator$ax(t1.get$keys(t1)); + }, + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + } + }; + A._ListBase_Object_ListMixin.prototype = {}; + A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; + A.__SetBase_Object_SetMixin.prototype = {}; + A.__UnmodifiableSet__SetBase__UnmodifiableSetMixin.prototype = {}; + A.Utf8Decoder__decoder_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: true}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 92 + }; + A.Utf8Decoder__decoderNonfatal_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: false}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 92 + }; + A.AsciiCodec.prototype = { + encode$1(source) { + return B.AsciiEncoder_127.convert$1(source); + }, + get$encoder() { + return B.AsciiEncoder_127; + } + }; + A._UnicodeSubsetEncoder.prototype = { + convert$1(string) { + var t1, i, codeUnit, + $length = A.RangeError_checkValidRange(0, null, string.length) - 0, + result = new Uint8Array($length); + for (t1 = ~this._subsetMask, i = 0; i < $length; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(string, i); + if ((codeUnit & t1) !== 0) + throw A.wrapException(A.ArgumentError$value(string, "string", "Contains invalid characters.")); + result[i] = codeUnit; + } + return result; + } + }; + A.AsciiEncoder.prototype = {}; + A.Base64Codec.prototype = { + get$encoder() { + return B.C_Base64Encoder; + }, + normalize$3(source, start, end) { + var inverseAlphabet, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t1, t2, endLength, $length, + _s31_ = "Invalid base64 encoding length "; + end = A.RangeError_checkValidRange(start, end, source.length); + inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); + for (i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { + i0 = i + 1; + char = B.JSString_methods._codeUnitAt$1(source, i); + if (char === 37) { + i1 = i0 + 2; + if (i1 <= end) { + digit1 = A.hexDigitValue(B.JSString_methods._codeUnitAt$1(source, i0)); + digit2 = A.hexDigitValue(B.JSString_methods._codeUnitAt$1(source, i0 + 1)); + char0 = digit1 * 16 + digit2 - (digit2 & 256); + if (char0 === 37) + char0 = -1; + i0 = i1; + } else + char0 = -1; + } else + char0 = char; + if (0 <= char0 && char0 <= 127) { + value = inverseAlphabet[char0]; + if (value >= 0) { + char0 = B.JSString_methods.codeUnitAt$1(string$.ABCDEF, value); + if (char0 === char) + continue; + char = char0; + } else { + if (value === -1) { + if (firstPadding < 0) { + t1 = buffer == null ? null : buffer._contents.length; + if (t1 == null) + t1 = 0; + firstPadding = t1 + (i - sliceStart); + firstPaddingSourceIndex = i; + } + ++paddingCount; + if (char === 61) + continue; + } + char = char0; + } + if (value !== -2) { + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t2 = t1._contents += B.JSString_methods.substring$2(source, sliceStart, i); + t1._contents = t2 + A.Primitives_stringFromCharCode(char); + sliceStart = i0; + continue; + } + } + throw A.wrapException(A.FormatException$("Invalid base64 data", source, i)); + } + if (buffer != null) { + t1 = buffer._contents += B.JSString_methods.substring$2(source, sliceStart, end); + t2 = t1.length; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); + else { + endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + for (; endLength < 4;) { + t1 += "="; + buffer._contents = t1; + ++endLength; + } + } + t1 = buffer._contents; + return B.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); + } + $length = end - start; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); + else { + endLength = B.JSInt_methods.$mod($length, 4); + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + if (endLength > 1) + source = B.JSString_methods.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); + } + return source; + } + }; + A.Base64Encoder.prototype = { + convert$1(input) { + var t1 = J.getInterceptor$asx(input); + if (t1.get$isEmpty(input)) + return ""; + t1 = new A._Base64Encoder(string$.ABCDEF).encode$4(input, 0, t1.get$length(input), true); + t1.toString; + return A.String_String$fromCharCodes(t1, 0, null); + }, + startChunkedConversion$1(sink) { + return new A._Utf8Base64EncoderSink(new A._Utf8StringSinkAdapter(new A._Utf8Decoder(false), sink, sink._stringSink), new A._Base64Encoder(string$.ABCDEF)); + } + }; + A._Base64Encoder.prototype = { + createBuffer$1(bufferLength) { + return new Uint8Array(bufferLength); + }, + encode$4(bytes, start, end, isLast) { + var output, _this = this, + byteCount = (_this._convert$_state & 3) + (end - start), + fullChunks = B.JSInt_methods._tdivFast$1(byteCount, 3), + bufferLength = fullChunks * 4; + if (isLast && byteCount - fullChunks * 3 > 0) + bufferLength += 4; + output = _this.createBuffer$1(bufferLength); + _this._convert$_state = A._Base64Encoder_encodeChunk(_this._alphabet, bytes, start, end, isLast, output, 0, _this._convert$_state); + if (bufferLength > 0) + return output; + return null; + } + }; + A._Base64EncoderSink.prototype = { + add$1(_, source) { + this._convert$_add$4(source, 0, source.get$length(source), false); + } + }; + A._Utf8Base64EncoderSink.prototype = { + _convert$_add$4(source, start, end, isLast) { + var buffer = this._encoder.encode$4(source, start, end, isLast); + if (buffer != null) + this._sink.addSlice$4(buffer, 0, buffer.length, isLast); + } + }; + A.ByteConversionSink.prototype = {}; + A.ByteConversionSinkBase.prototype = {}; + A.ChunkedConversionSink.prototype = {}; + A.Codec.prototype = { + encode$1(input) { + return this.get$encoder().convert$1(input); + } + }; + A.Converter.prototype = {}; + A.Encoding.prototype = {}; + A.JsonUnsupportedObjectError.prototype = { + toString$0(_) { + var safeString = A.Error_safeToString(this.unsupportedObject); + return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; + } + }; + A.JsonCyclicError.prototype = { + toString$0(_) { + return "Cyclic error in JSON stringify"; + } + }; + A.JsonCodec.prototype = { + encode$2$toEncodable(value, toEncodable) { + var t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + return t1; + }, + get$encoder() { + return B.JsonEncoder_null; + } + }; + A.JsonEncoder.prototype = { + convert$1(object) { + var t1, + output = new A.StringBuffer(""), + stringifier = A._JsonStringStringifier$(output, this._toEncodable); + stringifier.writeObject$1(object); + t1 = output._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._JsonStringifier.prototype = { + writeStringContent$1(s) { + var offset, i, charCode, t1, t2, _this = this, + $length = s.length; + for (offset = 0, i = 0; i < $length; ++i) { + charCode = B.JSString_methods._codeUnitAt$1(s, i); + if (charCode > 92) { + if (charCode >= 55296) { + t1 = charCode & 64512; + if (t1 === 55296) { + t2 = i + 1; + t2 = !(t2 < $length && (B.JSString_methods._codeUnitAt$1(s, t2) & 64512) === 56320); + } else + t2 = false; + if (!t2) + if (t1 === 56320) { + t1 = i - 1; + t1 = !(t1 >= 0 && (B.JSString_methods.codeUnitAt$1(s, t1) & 64512) === 55296); + } else + t1 = false; + else + t1 = true; + if (t1) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(117); + _this.writeCharCode$1(100); + t1 = charCode >>> 8 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + } + } + continue; + } + if (charCode < 32) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + switch (charCode) { + case 8: + _this.writeCharCode$1(98); + break; + case 9: + _this.writeCharCode$1(116); + break; + case 10: + _this.writeCharCode$1(110); + break; + case 12: + _this.writeCharCode$1(102); + break; + case 13: + _this.writeCharCode$1(114); + break; + default: + _this.writeCharCode$1(117); + _this.writeCharCode$1(48); + _this.writeCharCode$1(48); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + break; + } + } else if (charCode === 34 || charCode === 92) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(charCode); + } + } + if (offset === 0) + _this.writeString$1(s); + else if (offset < $length) + _this.writeStringSlice$3(s, offset, $length); + }, + _checkCycle$1(object) { + var t1, t2, i, t3; + for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + if (object == null ? t3 == null : object === t3) + throw A.wrapException(new A.JsonCyclicError(object, null)); + } + t1.push(object); + }, + writeObject$1(object) { + var customJson, e, t1, exception, _this = this; + if (_this.writeJsonValue$1(object)) + return; + _this._checkCycle$1(object); + try { + customJson = _this._toEncodable.call$1(object); + if (!_this.writeJsonValue$1(customJson)) { + t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw A.wrapException(t1); + } + _this._seen.pop(); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw A.wrapException(t1); + } + }, + writeJsonValue$1(object) { + var success, _this = this; + if (typeof object == "number") { + if (!isFinite(object)) + return false; + _this.writeNumber$1(object); + return true; + } else if (object === true) { + _this.writeString$1("true"); + return true; + } else if (object === false) { + _this.writeString$1("false"); + return true; + } else if (object == null) { + _this.writeString$1("null"); + return true; + } else if (typeof object == "string") { + _this.writeString$1('"'); + _this.writeStringContent$1(object); + _this.writeString$1('"'); + return true; + } else if (type$.List_dynamic._is(object)) { + _this._checkCycle$1(object); + _this.writeList$1(object); + _this._seen.pop(); + return true; + } else if (type$.Map_dynamic_dynamic._is(object)) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + _this._seen.pop(); + return success; + } else + return false; + }, + writeList$1(list) { + var t1, i, _this = this; + _this.writeString$1("["); + t1 = J.getInterceptor$asx(list); + if (t1.get$isNotEmpty(list)) { + _this.writeObject$1(t1.$index(list, 0)); + for (i = 1; i < t1.get$length(list); ++i) { + _this.writeString$1(","); + _this.writeObject$1(t1.$index(list, i)); + } + } + _this.writeString$1("]"); + }, + writeMap$1(map) { + var t1, keyValueList, i, separator, _this = this, _box_0 = {}; + if (map.get$isEmpty(map)) { + _this.writeString$1("{}"); + return true; + } + t1 = map.get$length(map) * 2; + keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); + i = _box_0.i = 0; + _box_0.allStringKeys = true; + map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + if (!_box_0.allStringKeys) + return false; + _this.writeString$1("{"); + for (separator = '"'; i < t1; i += 2, separator = ',"') { + _this.writeString$1(separator); + _this.writeStringContent$1(A._asString(keyValueList[i])); + _this.writeString$1('":'); + _this.writeObject$1(keyValueList[i + 1]); + } + _this.writeString$1("}"); + return true; + } + }; + A._JsonStringifier_writeMap_closure.prototype = { + call$2(key, value) { + var t1, t2, t3, i; + if (typeof key != "string") + this._box_0.allStringKeys = false; + t1 = this.keyValueList; + t2 = this._box_0; + t3 = t2.i; + i = t2.i = t3 + 1; + t1[t3] = key; + t2.i = i + 1; + t1[i] = value; + }, + $signature: 165 + }; + A._JsonStringStringifier.prototype = { + get$_partialResult() { + var t1 = this._sink._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + writeNumber$1(number) { + this._sink._contents += B.JSNumber_methods.toString$0(number); + }, + writeString$1(string) { + this._sink._contents += string; + }, + writeStringSlice$3(string, start, end) { + this._sink._contents += B.JSString_methods.substring$2(string, start, end); + }, + writeCharCode$1(charCode) { + this._sink._contents += A.Primitives_stringFromCharCode(charCode); + } + }; + A.StringConversionSinkBase.prototype = {}; + A.StringConversionSinkMixin.prototype = { + add$1(_, str) { + this.addSlice$4(str, 0, str.length, false); + } + }; + A._StringSinkConversionSink.prototype = { + close$0(_) { + }, + addSlice$4(str, start, end, isLast) { + var t1, i; + if (start !== 0 || end !== str.length) + for (t1 = this._stringSink, i = start; i < end; ++i) + t1._contents += A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(str, i)); + else + this._stringSink._contents += str; + if (isLast) + this.close$0(0); + }, + add$1(_, str) { + this._stringSink._contents += str; + } + }; + A._StringCallbackSink.prototype = { + close$0(_) { + var t1 = this._stringSink, + t2 = t1._contents; + t1._contents = ""; + this._convert$_callback.call$1(t2.charCodeAt(0) == 0 ? t2 : t2); + }, + asUtf8Sink$1(allowMalformed) { + return new A._Utf8StringSinkAdapter(new A._Utf8Decoder(allowMalformed), this, this._stringSink); + } + }; + A._Utf8StringSinkAdapter.prototype = { + close$0(_) { + this._decoder.flush$1(this._stringSink); + this._sink.close$0(0); + }, + add$1(_, chunk) { + this.addSlice$4(chunk, 0, J.get$length$asx(chunk), false); + }, + addSlice$4(codeUnits, startIndex, endIndex, isLast) { + this._stringSink._contents += this._decoder.convertGeneral$4(codeUnits, startIndex, endIndex, false); + if (isLast) + this.close$0(0); + } + }; + A.Utf8Codec.prototype = { + get$encoder() { + return B.C_Utf8Encoder; + } + }; + A.Utf8Encoder.prototype = { + convert$1(string) { + var t1, t2, encoder, + end = A.RangeError_checkValidRange(0, null, string.length), + $length = end - 0; + if ($length === 0) + return new Uint8Array(0); + t1 = $length * 3; + t2 = new Uint8Array(t1); + encoder = new A._Utf8Encoder(t2); + if (encoder._fillBuffer$3(string, 0, end) !== end) { + B.JSString_methods.codeUnitAt$1(string, end - 1); + encoder._writeReplacementCharacter$0(); + } + return new Uint8Array(t2.subarray(0, A._checkValidRange(0, encoder._bufferIndex, t1))); + } + }; + A._Utf8Encoder.prototype = { + _writeReplacementCharacter$0() { + var _this = this, + t1 = _this._convert$_buffer, + t2 = _this._bufferIndex, + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = 239; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = 191; + _this._bufferIndex = t2 + 1; + t1[t2] = 189; + }, + _writeSurrogate$2(leadingSurrogate, nextCodeUnit) { + var rune, t1, t2, t3, _this = this; + if ((nextCodeUnit & 64512) === 56320) { + rune = 65536 + ((leadingSurrogate & 1023) << 10) | nextCodeUnit & 1023; + t1 = _this._convert$_buffer; + t2 = _this._bufferIndex; + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = rune >>> 18 | 240; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = rune >>> 12 & 63 | 128; + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = rune >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + t1[t3] = rune & 63 | 128; + return true; + } else { + _this._writeReplacementCharacter$0(); + return false; + } + }, + _fillBuffer$3(str, start, end) { + var t1, t2, stringIndex, codeUnit, t3, stringIndex0, t4, _this = this; + if (start !== end && (B.JSString_methods.codeUnitAt$1(str, end - 1) & 64512) === 55296) + --end; + for (t1 = _this._convert$_buffer, t2 = t1.length, stringIndex = start; stringIndex < end; ++stringIndex) { + codeUnit = B.JSString_methods._codeUnitAt$1(str, stringIndex); + if (codeUnit <= 127) { + t3 = _this._bufferIndex; + if (t3 >= t2) + break; + _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit; + } else { + t3 = codeUnit & 64512; + if (t3 === 55296) { + if (_this._bufferIndex + 4 > t2) + break; + stringIndex0 = stringIndex + 1; + if (_this._writeSurrogate$2(codeUnit, B.JSString_methods._codeUnitAt$1(str, stringIndex0))) + stringIndex = stringIndex0; + } else if (t3 === 56320) { + if (_this._bufferIndex + 3 > t2) + break; + _this._writeReplacementCharacter$0(); + } else if (codeUnit <= 2047) { + t3 = _this._bufferIndex; + t4 = t3 + 1; + if (t4 >= t2) + break; + _this._bufferIndex = t4; + t1[t3] = codeUnit >>> 6 | 192; + _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit & 63 | 128; + } else { + t3 = _this._bufferIndex; + if (t3 + 2 >= t2) + break; + t4 = _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit >>> 12 | 224; + t3 = _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit & 63 | 128; + } + } + } + return stringIndex; + } + }; + A.Utf8Decoder.prototype = { + convert$1(codeUnits) { + var t1 = this._allowMalformed, + result = A.Utf8Decoder__convertIntercepted(t1, codeUnits, 0, null); + if (result != null) + return result; + return new A._Utf8Decoder(t1).convertGeneral$4(codeUnits, 0, null, true); + } + }; + A._Utf8Decoder.prototype = { + convertGeneral$4(codeUnits, start, maybeEnd, single) { + var bytes, errorOffset, result, t1, message, _this = this, + end = A.RangeError_checkValidRange(start, maybeEnd, J.get$length$asx(codeUnits)); + if (start === end) + return ""; + if (type$.Uint8List._is(codeUnits)) { + bytes = codeUnits; + errorOffset = 0; + } else { + bytes = A._Utf8Decoder__makeUint8List(codeUnits, start, end); + end -= start; + errorOffset = start; + start = 0; + } + result = _this._convertRecursive$4(bytes, start, end, single); + t1 = _this._convert$_state; + if ((t1 & 1) !== 0) { + message = A._Utf8Decoder_errorDescription(t1); + _this._convert$_state = 0; + throw A.wrapException(A.FormatException$(message, codeUnits, errorOffset + _this._charOrIndex)); + } + return result; + }, + _convertRecursive$4(bytes, start, end, single) { + var mid, s1, _this = this; + if (end - start > 1000) { + mid = B.JSInt_methods._tdivFast$1(start + end, 2); + s1 = _this._convertRecursive$4(bytes, start, mid, false); + if ((_this._convert$_state & 1) !== 0) + return s1; + return s1 + _this._convertRecursive$4(bytes, mid, end, single); + } + return _this.decodeGeneral$4(bytes, start, end, single); + }, + flush$1(sink) { + var state = this._convert$_state; + this._convert$_state = 0; + if (state <= 32) + return; + if (this.allowMalformed) + sink._contents += A.Primitives_stringFromCharCode(65533); + else + throw A.wrapException(A.FormatException$(A._Utf8Decoder_errorDescription(77), null, null)); + }, + decodeGeneral$4(bytes, start, end, single) { + var t1, type, t2, i0, markEnd, i1, m, _this = this, _65533 = 65533, + state = _this._convert$_state, + char = _this._charOrIndex, + buffer = new A.StringBuffer(""), + i = start + 1, + byte = bytes[start]; + $label0$0: + for (t1 = _this.allowMalformed; true;) { + for (; true; i = i0) { + type = B.JSString_methods._codeUnitAt$1("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE", byte) & 31; + char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0; + state = B.JSString_methods._codeUnitAt$1(" \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA", state + type); + if (state === 0) { + buffer._contents += A.Primitives_stringFromCharCode(char); + if (i === end) + break $label0$0; + break; + } else if ((state & 1) !== 0) { + if (t1) + switch (state) { + case 69: + case 67: + buffer._contents += A.Primitives_stringFromCharCode(_65533); + break; + case 65: + buffer._contents += A.Primitives_stringFromCharCode(_65533); + --i; + break; + default: + t2 = buffer._contents += A.Primitives_stringFromCharCode(_65533); + buffer._contents = t2 + A.Primitives_stringFromCharCode(_65533); + break; + } + else { + _this._convert$_state = state; + _this._charOrIndex = i - 1; + return ""; + } + state = 0; + } + if (i === end) + break $label0$0; + i0 = i + 1; + byte = bytes[i]; + } + i0 = i + 1; + byte = bytes[i]; + if (byte < 128) { + while (true) { + if (!(i0 < end)) { + markEnd = end; + break; + } + i1 = i0 + 1; + byte = bytes[i0]; + if (byte >= 128) { + markEnd = i1 - 1; + i0 = i1; + break; + } + i0 = i1; + } + if (markEnd - i < 20) + for (m = i; m < markEnd; ++m) + buffer._contents += A.Primitives_stringFromCharCode(bytes[m]); + else + buffer._contents += A.String_String$fromCharCodes(bytes, i, markEnd); + if (markEnd === end) + break $label0$0; + i = i0; + } else + i = i0; + } + if (single && state > 32) + if (t1) + buffer._contents += A.Primitives_stringFromCharCode(_65533); + else { + _this._convert$_state = 77; + _this._charOrIndex = end; + return ""; + } + _this._convert$_state = state; + _this._charOrIndex = char; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.NoSuchMethodError_toString_closure.prototype = { + call$2(key, value) { + var t1 = this.sb, + t2 = this._box_0, + t3 = t1._contents += t2.comma; + t3 += key.__internal$_name; + t1._contents = t3; + t1._contents = t3 + ": "; + t1._contents += A.Error_safeToString(value); + t2.comma = ", "; + }, + $signature: 316 + }; + A.DateTime.prototype = { + add$1(_, duration) { + return A.DateTime$_withValue(B.JSInt_methods.$add(this._core$_value, duration.get$inMilliseconds()), false); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.DateTime && this._core$_value === other._core$_value && true; + }, + compareTo$1(_, other) { + return B.JSInt_methods.compareTo$1(this._core$_value, other._core$_value); + }, + get$hashCode(_) { + var t1 = this._core$_value; + return (t1 ^ B.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; + }, + toString$0(_) { + var _this = this, + y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), + m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), + d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), + h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), + min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), + sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), + ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)); + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms; + }, + $isComparable: 1 + }; + A.Duration.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Duration && this._duration === other._duration; + }, + get$hashCode(_) { + return B.JSInt_methods.get$hashCode(this._duration); + }, + compareTo$1(_, other) { + return B.JSInt_methods.compareTo$1(this._duration, other._duration); + }, + toString$0(_) { + var minutes, minutesPadding, seconds, secondsPadding, + microseconds = this._duration, + sign = microseconds < 0 ? "-" : "", + hours = B.JSInt_methods._tdivFast$1(microseconds, 3600000000); + microseconds %= 3600000000; + if (microseconds < 0) + microseconds = -microseconds; + minutes = B.JSInt_methods._tdivFast$1(microseconds, 60000000); + microseconds %= 60000000; + minutesPadding = minutes < 10 ? "0" : ""; + seconds = B.JSInt_methods._tdivFast$1(microseconds, 1000000); + secondsPadding = seconds < 10 ? "0" : ""; + return sign + Math.abs(hours) + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds % 1000000), 6, "0"); + }, + $isComparable: 1 + }; + A._Enum.prototype = {}; + A.Error.prototype = { + get$stackTrace() { + return A.getTraceFromException(this.$thrownJsError); + } + }; + A.AssertionError.prototype = { + toString$0(_) { + var t1 = this.message; + if (t1 != null) + return "Assertion failed: " + A.Error_safeToString(t1); + return "Assertion failed"; + }, + get$message(receiver) { + return this.message; + } + }; + A.TypeError.prototype = {}; + A.NullThrownError.prototype = { + toString$0(_) { + return "Throw of null."; + } + }; + A.ArgumentError.prototype = { + get$_errorName() { + return "Invalid argument" + (!this._hasValue ? "(s)" : ""); + }, + get$_errorExplanation() { + return ""; + }, + toString$0(_) { + var _this = this, + $name = _this.name, + nameString = $name == null ? "" : " (" + $name + ")", + message = _this.message, + messageString = message == null ? "" : ": " + A.S(message), + prefix = _this.get$_errorName() + nameString + messageString; + if (!_this._hasValue) + return prefix; + return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.invalidValue); + }, + get$message(receiver) { + return this.message; + } + }; + A.RangeError.prototype = { + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + var explanation, + start = this.start, + end = this.end; + if (start == null) + explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; + else if (end == null) + explanation = ": Not greater than or equal to " + A.S(start); + else if (end > start) + explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); + else + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); + return explanation; + } + }; + A.IndexError.prototype = { + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + if (this.invalidValue < 0) + return ": index must not be negative"; + var t1 = this.length; + if (t1 === 0) + return ": no indices are valid"; + return ": index should be less than " + t1; + }, + $isRangeError: 1, + get$length(receiver) { + return this.length; + } + }; + A.NoSuchMethodError.prototype = { + toString$0(_) { + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new A.StringBuffer(""); + _box_0.comma = ""; + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = sb._contents += A.Error_safeToString(argument); + _box_0.comma = ", "; + } + _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = A.Error_safeToString(_this._core$_receiver); + actualParameters = sb.toString$0(0); + return "NoSuchMethodError: method not found: '" + _this._memberName.__internal$_name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; + } + }; + A.UnsupportedError.prototype = { + toString$0(_) { + return "Unsupported operation: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.UnimplementedError.prototype = { + toString$0(_) { + return "UnimplementedError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.StateError.prototype = { + toString$0(_) { + return "Bad state: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.ConcurrentModificationError.prototype = { + toString$0(_) { + var t1 = this.modifiedObject; + if (t1 == null) + return "Concurrent modification during iteration."; + return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; + } + }; + A.OutOfMemoryError.prototype = { + toString$0(_) { + return "Out of Memory"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A.StackOverflowError.prototype = { + toString$0(_) { + return "Stack Overflow"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A.CyclicInitializationError.prototype = { + toString$0(_) { + return "Reading static variable '" + this.variableName + "' during its initialization"; + } + }; + A._Exception.prototype = { + toString$0(_) { + return "Exception: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.FormatException.prototype = { + toString$0(_) { + var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, end, start, prefix, postfix, + message = this.message, + report = "" !== message ? "FormatException: " + message : "FormatException", + offset = this.offset, + source = this.source; + if (typeof source == "string") { + if (offset != null) + t1 = offset < 0 || offset > source.length; + else + t1 = false; + if (t1) + offset = null; + if (offset == null) { + if (source.length > 78) + source = B.JSString_methods.substring$2(source, 0, 75) + "..."; + return report + "\n" + source; + } + for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { + char = B.JSString_methods._codeUnitAt$1(source, i); + if (char === 10) { + if (lineStart !== i || !previousCharWasCR) + ++lineNum; + lineStart = i + 1; + previousCharWasCR = false; + } else if (char === 13) { + ++lineNum; + lineStart = i + 1; + previousCharWasCR = true; + } + } + report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); + lineEnd = source.length; + for (i = offset; i < lineEnd; ++i) { + char = B.JSString_methods.codeUnitAt$1(source, i); + if (char === 10 || char === 13) { + lineEnd = i; + break; + } + } + if (lineEnd - lineStart > 78) + if (offset - lineStart < 75) { + end = lineStart + 75; + start = lineStart; + prefix = ""; + postfix = "..."; + } else { + if (lineEnd - offset < 75) { + start = lineEnd - 75; + end = lineEnd; + postfix = ""; + } else { + start = offset - 36; + end = offset + 36; + postfix = "..."; + } + prefix = "..."; + } + else { + end = lineEnd; + start = lineStart; + prefix = ""; + postfix = ""; + } + return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + } else + return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.Iterable.prototype = { + cast$1$0(_, $R) { + return A.CastIterable_CastIterable(this, A._instanceType(this)._eval$1("Iterable.E"), $R); + }, + followedBy$1(_, other) { + var _this = this, + t1 = A._instanceType(_this); + if (t1._eval$1("EfficientLengthIterable")._is(_this)) + return A.FollowedByIterable_FollowedByIterable$firstEfficient(_this, other, t1._eval$1("Iterable.E")); + return new A.FollowedByIterable(_this, other, t1._eval$1("FollowedByIterable")); + }, + map$1$1(_, toElement, $T) { + return A.MappedIterable_MappedIterable(this, toElement, A._instanceType(this)._eval$1("Iterable.E"), $T); + }, + where$1(_, test) { + return new A.WhereIterable(this, test, A._instanceType(this)._eval$1("WhereIterable")); + }, + expand$1$1(_, toElements, $T) { + return new A.ExpandIterable(this, toElements, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + contains$1(_, element) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (J.$eq$(t1.get$current(t1), element)) + return true; + return false; + }, + fold$1$2(_, initialValue, combine) { + var t1, value; + for (t1 = this.get$iterator(this), value = initialValue; t1.moveNext$0();) + value = combine.call$2(value, t1.get$current(t1)); + return value; + }, + fold$2($receiver, initialValue, combine) { + return this.fold$1$2($receiver, initialValue, combine, type$.dynamic); + }, + join$1(_, separator) { + var t1, + iterator = this.get$iterator(this); + if (!iterator.moveNext$0()) + return ""; + if (separator === "") { + t1 = ""; + do + t1 += A.S(J.toString$0$(iterator.get$current(iterator))); + while (iterator.moveNext$0()); + } else { + t1 = "" + A.S(J.toString$0$(iterator.get$current(iterator))); + for (; iterator.moveNext$0();) + t1 = t1 + separator + A.S(J.toString$0$(iterator.get$current(iterator))); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, growable, A._instanceType(this)._eval$1("Iterable.E")); + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, A._instanceType(this)._eval$1("Iterable.E")); + }, + get$length(_) { + var count, + it = this.get$iterator(this); + for (count = 0; it.moveNext$0();) + ++count; + return count; + }, + get$isEmpty(_) { + return !this.get$iterator(this).moveNext$0(); + }, + get$isNotEmpty(_) { + return !this.get$isEmpty(this); + }, + take$1(_, count) { + return A.TakeIterable_TakeIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skip$1(_, count) { + return A.SkipIterable_SkipIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skipWhile$1(_, test) { + return new A.SkipWhileIterable(this, test, A._instanceType(this)._eval$1("SkipWhileIterable")); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + get$single(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + result = it.get$current(it); + if (it.moveNext$0()) + throw A.wrapException(A.IterableElementError_tooMany()); + return result; + }, + elementAt$1(_, index) { + var t1, elementIndex, element; + A.RangeError_checkNotNegative(index, "index"); + for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { + element = t1.get$current(t1); + if (index === elementIndex) + return element; + ++elementIndex; + } + throw A.wrapException(A.IndexError$(index, this, "index", null, elementIndex)); + }, + toString$0(_) { + return A.IterableBase_iterableToShortString(this, "(", ")"); + } + }; + A._GeneratorIterable.prototype = { + elementAt$1(_, index) { + A.RangeError_checkValidIndex(index, this, null); + return this._generator.call$1(index); + }, + get$length(receiver) { + return this.length; + } + }; + A.Iterator.prototype = {}; + A.MapEntry.prototype = { + toString$0(_) { + return "MapEntry(" + A.S(this.key) + ": " + A.S(this.value) + ")"; + } + }; + A.Null.prototype = { + get$hashCode(_) { + return A.Object.prototype.get$hashCode.call(this, this); + }, + toString$0(_) { + return "null"; + } + }; + A.Object.prototype = {$isObject: 1, + $eq(_, other) { + return this === other; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this); + }, + toString$0(_) { + return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; + }, + noSuchMethod$1(_, invocation) { + throw A.wrapException(A.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + }, + get$runtimeType(_) { + var rti = this instanceof A.Closure ? A.closureFunctionType(this) : null; + return A.createRuntimeType(rti == null ? A.instanceType(this) : rti); + }, + toString() { + return this.toString$0(this); + } + }; + A._StringStackTrace.prototype = { + toString$0(_) { + return this._stackTrace; + }, + $isStackTrace: 1 + }; + A.Runes.prototype = { + get$iterator(_) { + return new A.RuneIterator(this.string); + }, + get$last(_) { + var code, previousCode, + t1 = this.string, + t2 = t1.length; + if (t2 === 0) + throw A.wrapException(A.StateError$("No elements.")); + code = B.JSString_methods.codeUnitAt$1(t1, t2 - 1); + if ((code & 64512) === 56320 && t2 > 1) { + previousCode = B.JSString_methods.codeUnitAt$1(t1, t2 - 2); + if ((previousCode & 64512) === 55296) + return A._combineSurrogatePair(previousCode, code); + } + return code; + } + }; + A.RuneIterator.prototype = { + get$current(_) { + return this._currentCodePoint; + }, + moveNext$0() { + var codeUnit, nextPosition, nextCodeUnit, _this = this, + t1 = _this._position = _this._nextPosition, + t2 = _this.string, + t3 = t2.length; + if (t1 === t3) { + _this._currentCodePoint = -1; + return false; + } + codeUnit = B.JSString_methods._codeUnitAt$1(t2, t1); + nextPosition = t1 + 1; + if ((codeUnit & 64512) === 55296 && nextPosition < t3) { + nextCodeUnit = B.JSString_methods._codeUnitAt$1(t2, nextPosition); + if ((nextCodeUnit & 64512) === 56320) { + _this._nextPosition = nextPosition + 1; + _this._currentCodePoint = A._combineSurrogatePair(codeUnit, nextCodeUnit); + return true; + } + } + _this._nextPosition = nextPosition; + _this._currentCodePoint = codeUnit; + return true; + } + }; + A.StringBuffer.prototype = { + get$length(_) { + return this._contents.length; + }, + write$1(_, obj) { + this._contents += A.S(obj); + }, + writeCharCode$1(charCode) { + this._contents += A.Primitives_stringFromCharCode(charCode); + }, + toString$0(_) { + var t1 = this._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.Uri__parseIPv4Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); + }, + $signature: 328 + }; + A.Uri_parseIPv6Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); + }, + $signature: 337 + }; + A.Uri_parseIPv6Address_parseHex.prototype = { + call$2(start, end) { + var value; + if (end - start > 4) + this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); + value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); + if (value < 0 || value > 65535) + this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); + return value; + }, + $signature: 338 + }; + A._Uri.prototype = { + get$_text() { + var t1, t2, t3, t4, _this = this, + value = _this.___Uri__text_FI; + if (value === $) { + t1 = _this.scheme; + t2 = t1.length !== 0 ? "" + t1 + ":" : ""; + t3 = _this._host; + t4 = t3 == null; + if (!t4 || t1 === "file") { + t1 = t2 + "//"; + t2 = _this._userInfo; + if (t2.length !== 0) + t1 = t1 + t2 + "@"; + if (!t4) + t1 += t3; + t2 = _this._port; + if (t2 != null) + t1 = t1 + ":" + A.S(t2); + } else + t1 = t2; + t1 += _this.path; + t2 = _this._query; + if (t2 != null) + t1 = t1 + "?" + t2; + t2 = _this._fragment; + if (t2 != null) + t1 = t1 + "#" + t2; + value !== $ && A.throwUnnamedLateFieldADI(); + value = _this.___Uri__text_FI = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return value; + }, + get$pathSegments() { + var pathToSplit, result, _this = this, + value = _this.___Uri_pathSegments_FI; + if (value === $) { + pathToSplit = _this.path; + if (pathToSplit.length !== 0 && B.JSString_methods._codeUnitAt$1(pathToSplit, 0) === 47) + pathToSplit = B.JSString_methods.substring$1(pathToSplit, 1); + result = pathToSplit.length === 0 ? B.List_empty : A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(pathToSplit.split("/"), type$.JSArray_String), A.core_Uri_decodeComponent$closure(), type$.MappedListIterable_String_dynamic), type$.String); + _this.___Uri_pathSegments_FI !== $ && A.throwUnnamedLateFieldADI(); + value = _this.___Uri_pathSegments_FI = result; + } + return value; + }, + get$hashCode(_) { + var result, _this = this, + value = _this.___Uri_hashCode_FI; + if (value === $) { + result = B.JSString_methods.get$hashCode(_this.get$_text()); + _this.___Uri_hashCode_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Uri_hashCode_FI = result; + value = result; + } + return value; + }, + get$userInfo() { + return this._userInfo; + }, + get$host() { + var host = this._host; + if (host == null) + return ""; + if (B.JSString_methods.startsWith$1(host, "[")) + return B.JSString_methods.substring$2(host, 1, host.length - 1); + return host; + }, + get$port(_) { + var t1 = this._port; + return t1 == null ? A._Uri__defaultPort(this.scheme) : t1; + }, + get$query() { + var t1 = this._query; + return t1 == null ? "" : t1; + }, + get$fragment() { + var t1 = this._fragment; + return t1 == null ? "" : t1; + }, + isScheme$1(scheme) { + var thisScheme = this.scheme; + if (scheme.length !== thisScheme.length) + return false; + return A._caseInsensitiveCompareStart(scheme, thisScheme, 0) >= 0; + }, + _mergePaths$2(base, reference) { + var backCount, refStart, baseEnd, newEnd, delta, t1; + for (backCount = 0, refStart = 0; B.JSString_methods.startsWith$2(reference, "../", refStart);) { + refStart += 3; + ++backCount; + } + baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); + while (true) { + if (!(baseEnd > 0 && backCount > 0)) + break; + newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); + if (newEnd < 0) + break; + delta = baseEnd - newEnd; + t1 = delta !== 2; + if (!t1 || delta === 3) + if (B.JSString_methods.codeUnitAt$1(base, newEnd + 1) === 46) + t1 = !t1 || B.JSString_methods.codeUnitAt$1(base, newEnd + 2) === 46; + else + t1 = false; + else + t1 = false; + if (t1) + break; + --backCount; + baseEnd = newEnd; + } + return B.JSString_methods.replaceRange$3(base, baseEnd + 1, null, B.JSString_methods.substring$1(reference, refStart - 3 * backCount)); + }, + resolve$1(reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, packageNameEnd, packageName, mergedPath, t1, _this = this, _null = null; + if (reference.get$scheme().length !== 0) { + targetScheme = reference.get$scheme(); + if (reference.get$hasAuthority()) { + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = reference.get$hasPort() ? reference.get$port(reference) : _null; + } else { + targetPort = _null; + targetHost = targetPort; + targetUserInfo = ""; + } + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + } else { + targetScheme = _this.scheme; + if (reference.get$hasAuthority()) { + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = A._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : _null, targetScheme); + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + } else { + targetUserInfo = _this._userInfo; + targetHost = _this._host; + targetPort = _this._port; + targetPath = _this.path; + if (reference.get$path(reference) === "") + targetQuery = reference.get$hasQuery() ? reference.get$query() : _this._query; + else { + packageNameEnd = A._Uri__packageNameEnd(_this, targetPath); + if (packageNameEnd > 0) { + packageName = B.JSString_methods.substring$2(targetPath, 0, packageNameEnd); + targetPath = reference.get$hasAbsolutePath() ? packageName + A._Uri__removeDotSegments(reference.get$path(reference)) : packageName + A._Uri__removeDotSegments(_this._mergePaths$2(B.JSString_methods.substring$1(targetPath, packageName.length), reference.get$path(reference))); + } else if (reference.get$hasAbsolutePath()) + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + else if (targetPath.length === 0) + if (targetHost == null) + targetPath = targetScheme.length === 0 ? reference.get$path(reference) : A._Uri__removeDotSegments(reference.get$path(reference)); + else + targetPath = A._Uri__removeDotSegments("/" + reference.get$path(reference)); + else { + mergedPath = _this._mergePaths$2(targetPath, reference.get$path(reference)); + t1 = targetScheme.length === 0; + if (!t1 || targetHost != null || B.JSString_methods.startsWith$1(targetPath, "/")) + targetPath = A._Uri__removeDotSegments(mergedPath); + else + targetPath = A._Uri__normalizeRelativePath(mergedPath, !t1 || targetHost != null); + } + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + } + } + } + return A._Uri$_internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, reference.get$hasFragment() ? reference.get$fragment() : _null); + }, + get$hasAuthority() { + return this._host != null; + }, + get$hasPort() { + return this._port != null; + }, + get$hasQuery() { + return this._query != null; + }, + get$hasFragment() { + return this._fragment != null; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$1(this.path, "/"); + }, + toFilePath$0() { + var pathSegments, _this = this, + t1 = _this.scheme; + if (t1 !== "" && t1 !== "file") + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + t1 + " URI")); + t1 = _this._query; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + t1 = _this._fragment; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + t1 = $.$get$_Uri__isWindowsCached(); + if (t1) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._host != null && _this.get$host() !== "") + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + pathSegments = _this.get$pathSegments(); + A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); + t1 = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return t1; + }, + toString$0(_) { + return this.get$_text(); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (_this === other) + return true; + if (type$.Uri._is(other)) + if (_this.scheme === other.get$scheme()) + if (_this._host != null === other.get$hasAuthority()) + if (_this._userInfo === other.get$userInfo()) + if (_this.get$host() === other.get$host()) + if (_this.get$port(_this) === other.get$port(other)) + if (_this.path === other.get$path(other)) { + t1 = _this._query; + t2 = t1 == null; + if (!t2 === other.get$hasQuery()) { + if (t2) + t1 = ""; + if (t1 === other.get$query()) { + t1 = _this._fragment; + t2 = t1 == null; + if (!t2 === other.get$hasFragment()) { + if (t2) + t1 = ""; + t1 = t1 === other.get$fragment(); + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + else + t1 = false; + else + t1 = false; + else + t1 = false; + else + t1 = false; + else + t1 = false; + else + t1 = false; + return t1; + }, + $isUri: 1, + get$scheme() { + return this.scheme; + }, + get$path(receiver) { + return this.path; + } + }; + A._Uri__makePath_closure.prototype = { + call$1(s) { + return A._Uri__uriEncode(B.List_qg40, s, B.C_Utf8Codec, false); + }, + $signature: 5 + }; + A.UriData.prototype = { + get$uri() { + var t2, queryIndex, end, query, _this = this, _null = null, + t1 = _this._uriCache; + if (t1 == null) { + t1 = _this._text; + t2 = _this._separatorIndices[0] + 1; + queryIndex = B.JSString_methods.indexOf$2(t1, "?", t2); + end = t1.length; + if (queryIndex >= 0) { + query = A._Uri__normalizeOrSubstring(t1, queryIndex + 1, end, B.List_CVk, false); + end = queryIndex; + } else + query = _null; + t1 = _this._uriCache = new A._DataUri("data", "", _null, _null, A._Uri__normalizeOrSubstring(t1, t2, end, B.List_qg4, false), query, _null); + } + return t1; + }, + toString$0(_) { + var t1 = this._text; + return this._separatorIndices[0] === -1 ? "data:" + t1 : t1; + } + }; + A._createTables_build.prototype = { + call$2(state, defaultTransition) { + var t1 = this.tables[state]; + B.NativeUint8List_methods.fillRange$3(t1, 0, 96, defaultTransition); + return t1; + }, + $signature: 366 + }; + A._createTables_setChars.prototype = { + call$3(target, chars, transition) { + var t1, i; + for (t1 = chars.length, i = 0; i < t1; ++i) + target[B.JSString_methods._codeUnitAt$1(chars, i) ^ 96] = transition; + }, + $signature: 197 + }; + A._createTables_setRange.prototype = { + call$3(target, range, transition) { + var i, n; + for (i = B.JSString_methods._codeUnitAt$1(range, 0), n = B.JSString_methods._codeUnitAt$1(range, 1); i <= n; ++i) + target[(i ^ 96) >>> 0] = transition; + }, + $signature: 197 + }; + A._SimpleUri.prototype = { + get$hasAuthority() { + return this._hostStart > 0; + }, + get$hasPort() { + return this._hostStart > 0 && this._portStart + 1 < this._pathStart; + }, + get$hasQuery() { + return this._queryStart < this._fragmentStart; + }, + get$hasFragment() { + return this._fragmentStart < this._uri.length; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$2(this._uri, "/", this._pathStart); + }, + get$scheme() { + var t1 = this._schemeCache; + return t1 == null ? this._schemeCache = this._computeScheme$0() : t1; + }, + _computeScheme$0() { + var t2, _this = this, + t1 = _this._schemeEnd; + if (t1 <= 0) + return ""; + t2 = t1 === 4; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return "http"; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return "https"; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "file")) + return "file"; + if (t1 === 7 && B.JSString_methods.startsWith$1(_this._uri, "package")) + return "package"; + return B.JSString_methods.substring$2(_this._uri, 0, t1); + }, + get$userInfo() { + var t1 = this._hostStart, + t2 = this._schemeEnd + 3; + return t1 > t2 ? B.JSString_methods.substring$2(this._uri, t2, t1 - 1) : ""; + }, + get$host() { + var t1 = this._hostStart; + return t1 > 0 ? B.JSString_methods.substring$2(this._uri, t1, this._portStart) : ""; + }, + get$port(_) { + var t1, _this = this; + if (_this.get$hasPort()) + return A.int_parse(B.JSString_methods.substring$2(_this._uri, _this._portStart + 1, _this._pathStart), null); + t1 = _this._schemeEnd; + if (t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return 80; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return 443; + return 0; + }, + get$path(_) { + return B.JSString_methods.substring$2(this._uri, this._pathStart, this._queryStart); + }, + get$query() { + var t1 = this._queryStart, + t2 = this._fragmentStart; + return t1 < t2 ? B.JSString_methods.substring$2(this._uri, t1 + 1, t2) : ""; + }, + get$fragment() { + var t1 = this._fragmentStart, + t2 = this._uri; + return t1 < t2.length ? B.JSString_methods.substring$1(t2, t1 + 1) : ""; + }, + get$pathSegments() { + var parts, i, + start = this._pathStart, + end = this._queryStart, + t1 = this._uri; + if (B.JSString_methods.startsWith$2(t1, "/", start)) + ++start; + if (start === end) + return B.List_empty; + parts = A._setArrayType([], type$.JSArray_String); + for (i = start; i < end; ++i) + if (B.JSString_methods.codeUnitAt$1(t1, i) === 47) { + parts.push(B.JSString_methods.substring$2(t1, start, i)); + start = i + 1; + } + parts.push(B.JSString_methods.substring$2(t1, start, end)); + return A.List_List$unmodifiable(parts, type$.String); + }, + _isPort$1(port) { + var portDigitStart = this._portStart + 1; + return portDigitStart + port.length === this._pathStart && B.JSString_methods.startsWith$2(this._uri, port, portDigitStart); + }, + removeFragment$0() { + var _this = this, + t1 = _this._fragmentStart, + t2 = _this._uri; + if (t1 >= t2.length) + return _this; + return new A._SimpleUri(B.JSString_methods.substring$2(t2, 0, t1), _this._schemeEnd, _this._hostStart, _this._portStart, _this._pathStart, _this._queryStart, t1, _this._schemeCache); + }, + resolve$1(reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + if (reference instanceof A._SimpleUri) + return this._simpleMerge$2(this, reference); + return this._toNonSimple$0().resolveUri$1(reference); + }, + _simpleMerge$2(base, ref) { + var t2, t3, t4, isSimple, delta, refStart, basePathStart, packageNameEnd, basePathStart0, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert, + t1 = ref._schemeEnd; + if (t1 > 0) + return ref; + t2 = ref._hostStart; + if (t2 > 0) { + t3 = base._schemeEnd; + if (t3 <= 0) + return ref; + t4 = t3 === 4; + if (t4 && B.JSString_methods.startsWith$1(base._uri, "file")) + isSimple = ref._pathStart !== ref._queryStart; + else if (t4 && B.JSString_methods.startsWith$1(base._uri, "http")) + isSimple = !ref._isPort$1("80"); + else + isSimple = !(t3 === 5 && B.JSString_methods.startsWith$1(base._uri, "https")) || !ref._isPort$1("443"); + if (isSimple) { + delta = t3 + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, delta) + B.JSString_methods.substring$1(ref._uri, t1 + 1), t3, t2 + delta, ref._portStart + delta, ref._pathStart + delta, ref._queryStart + delta, ref._fragmentStart + delta, base._schemeCache); + } else + return this._toNonSimple$0().resolveUri$1(ref); + } + refStart = ref._pathStart; + t1 = ref._queryStart; + if (refStart === t1) { + t2 = ref._fragmentStart; + if (t1 < t2) { + t3 = base._queryStart; + delta = t3 - t1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); + } + t1 = ref._uri; + if (t2 < t1.length) { + t3 = base._fragmentStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); + } + return base.removeFragment$0(); + } + t2 = ref._uri; + if (B.JSString_methods.startsWith$2(t2, "/", refStart)) { + basePathStart = base._pathStart; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + basePathStart0 = packageNameEnd > 0 ? packageNameEnd : basePathStart; + delta = basePathStart0 - refStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, basePathStart0) + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, basePathStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseStart = base._pathStart; + baseEnd = base._queryStart; + if (baseStart === baseEnd && base._hostStart > 0) { + for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) + refStart += 3; + delta = baseStart - refStart + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseUri = base._uri; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + if (packageNameEnd >= 0) + baseStart0 = packageNameEnd; + else + for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) + baseStart0 += 3; + backCount = 0; + while (true) { + refStart0 = refStart + 3; + if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) + break; + ++backCount; + refStart = refStart0; + } + for (insert = ""; baseEnd > baseStart0;) { + --baseEnd; + if (B.JSString_methods.codeUnitAt$1(baseUri, baseEnd) === 47) { + if (backCount === 0) { + insert = "/"; + break; + } + --backCount; + insert = "/"; + } + } + if (baseEnd === baseStart0 && base._schemeEnd <= 0 && !B.JSString_methods.startsWith$2(baseUri, "/", baseStart)) { + refStart -= backCount * 3; + insert = ""; + } + delta = baseEnd - refStart + insert.length; + return new A._SimpleUri(B.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + }, + toFilePath$0() { + var t2, t3, _this = this, + t1 = _this._schemeEnd; + if (t1 >= 0) { + t2 = !(t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "file")); + t1 = t2; + } else + t1 = false; + if (t1) + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + _this.get$scheme() + " URI")); + t1 = _this._queryStart; + t2 = _this._uri; + if (t1 < t2.length) { + if (t1 < _this._fragmentStart) + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + } + t3 = $.$get$_Uri__isWindowsCached(); + if (t3) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._hostStart < _this._portStart) + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + t1 = B.JSString_methods.substring$2(t2, _this._pathStart, t1); + } + return t1; + }, + get$hashCode(_) { + var t1 = this._hashCodeCache; + return t1 == null ? this._hashCodeCache = B.JSString_methods.get$hashCode(this._uri) : t1; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return type$.Uri._is(other) && this._uri === other.toString$0(0); + }, + _toNonSimple$0() { + var _this = this, _null = null, + t1 = _this.get$scheme(), + t2 = _this.get$userInfo(), + t3 = _this._hostStart > 0 ? _this.get$host() : _null, + t4 = _this.get$hasPort() ? _this.get$port(_this) : _null, + t5 = _this._uri, + t6 = _this._queryStart, + t7 = B.JSString_methods.substring$2(t5, _this._pathStart, t6), + t8 = _this._fragmentStart; + t6 = t6 < t8 ? _this.get$query() : _null; + return A._Uri$_internal(t1, t2, t3, t4, t7, t6, t8 < t5.length ? _this.get$fragment() : _null); + }, + toString$0(_) { + return this._uri; + }, + $isUri: 1 + }; + A._DataUri.prototype = {}; + A.Expando.prototype = { + toString$0(_) { + return "Expando:null"; + } + }; + A._convertDataTree__convert.prototype = { + call$1(o) { + var convertedMap, key, convertedList, + t1 = this._convertedObjects; + if (t1.containsKey$1(o)) + return t1.$index(0, o); + if (type$.Map_dynamic_dynamic._is(o)) { + convertedMap = {}; + t1.$indexSet(0, o, convertedMap); + for (t1 = J.get$iterator$ax(o.get$keys(o)); t1.moveNext$0();) { + key = t1.get$current(t1); + convertedMap[key] = this.call$1(o.$index(0, key)); + } + return convertedMap; + } else if (type$.Iterable_dynamic._is(o)) { + convertedList = []; + t1.$indexSet(0, o, convertedList); + B.JSArray_methods.addAll$1(convertedList, J.map$1$1$ax(o, this, type$.dynamic)); + return convertedList; + } else + return o; + }, + $signature: 490 + }; + A._JSRandom.prototype = { + nextInt$1(max) { + if (max <= 0 || max > 4294967296) + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); + return Math.random() * max >>> 0; + }, + nextDouble$0() { + return Math.random(); + } + }; + A.ArgParser.prototype = { + addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, defaultsTo, help, hide, negatable) { + var _null = null; + this._addOption$12$aliases$hide$negatable($name, abbr, help, _null, _null, _null, defaultsTo, _null, B.OptionType_nMZ, B.List_empty, hide, negatable); + }, + addFlag$2$hide($name, hide) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, null, hide, true); + }, + addFlag$2$help($name, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, true); + }, + addFlag$3$defaultsTo$help($name, defaultsTo, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, defaultsTo, help, false, true); + }, + addFlag$3$help$negatable($name, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, negatable); + }, + addFlag$4$abbr$help$negatable($name, abbr, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, negatable); + }, + addFlag$3$abbr$help($name, abbr, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, true); + }, + addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, hide, valueHelp) { + this._addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, null, defaultsTo, null, B.OptionType_YwU, B.List_empty, hide, false); + }, + addOption$2$hide($name, hide) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, null, null, null, null, hide, null); + }, + addOption$6$abbr$allowed$defaultsTo$help$valueHelp($name, abbr, allowed, defaultsTo, help, valueHelp) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, false, valueHelp); + }, + addOption$4$allowed$defaultsTo$help($name, allowed, defaultsTo, help) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, null, allowed, defaultsTo, help, false, null); + }, + addMultiOption$5$abbr$help$splitCommas$valueHelp($name, abbr, help, splitCommas, valueHelp) { + var t1 = A._setArrayType([], type$.JSArray_String); + this._addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, null, null, t1, null, B.OptionType_qyr, B.List_empty, false, false); + }, + _addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, negatable, splitCommas) { + var existing, t2, option, _i, _this = this, _null = null, + t1 = A._setArrayType([$name], type$.JSArray_String); + B.JSArray_methods.addAll$1(t1, aliases); + if (B.JSArray_methods.any$1(t1, new A.ArgParser__addOption_closure(_this))) + throw A.wrapException(A.ArgumentError$('Duplicate option or alias "' + $name + '".', _null)); + t1 = abbr != null; + if (t1) { + existing = _this.findByAbbreviation$1(abbr); + if (existing != null) + throw A.wrapException(A.ArgumentError$('Abbreviation "' + abbr + '" is already used by "' + existing.name + '".', _null)); + } + t2 = allowed == null ? _null : A.List_List$unmodifiable(allowed, type$.String); + option = new A.Option($name, abbr, help, valueHelp, t2, _null, defaultsTo, negatable, callback, type, splitCommas == null ? type === B.OptionType_qyr : splitCommas, false, hide); + if ($name.length === 0) + A.throwExpression(A.ArgumentError$("Name cannot be empty.", _null)); + else if (B.JSString_methods.startsWith$1($name, "-")) + A.throwExpression(A.ArgumentError$("Name " + $name + ' cannot start with "-".', _null)); + t2 = $.$get$Option__invalidChars()._nativeRegExp; + if (t2.test($name)) + A.throwExpression(A.ArgumentError$('Name "' + $name + '" contains invalid characters.', _null)); + if (t1) { + if (abbr.length !== 1) + A.throwExpression(A.ArgumentError$("Abbreviation must be null or have length 1.", _null)); + else if (abbr === "-") + A.throwExpression(A.ArgumentError$('Abbreviation cannot be "-".', _null)); + if (t2.test(abbr)) + A.throwExpression(A.ArgumentError$("Abbreviation is an invalid character.", _null)); + } + _this._arg_parser$_options.$indexSet(0, $name, option); + _this._optionsAndSeparators.push(option); + for (t1 = _this._aliases, _i = 0; false; ++_i) + t1.$indexSet(0, aliases[_i], $name); + }, + _addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, false, null); + }, + _addOption$12$aliases$hide$negatable($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, negatable) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, negatable, null); + }, + _addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, splitCommas) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, false, splitCommas); + }, + findByAbbreviation$1(abbr) { + var t1, t2; + for (t1 = this.options._map, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2.abbr === abbr) + return t2; + } + return null; + }, + findByNameOrAlias$1($name) { + var t1 = this._aliases.$index(0, $name); + if (t1 == null) + t1 = $name; + return this.options._map.$index(0, t1); + } + }; + A.ArgParser__addOption_closure.prototype = { + call$1($name) { + return this.$this.findByNameOrAlias$1($name) != null; + }, + $signature: 8 + }; + A.ArgParserException.prototype = {}; + A.ArgResults.prototype = { + $index(_, $name) { + var t1 = this._parser.options._map; + if (!t1.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "' + $name + '".', null)); + t1 = t1.$index(0, $name); + t1.toString; + return t1.valueOrDefault$1(this._parsed.$index(0, $name)); + }, + wasParsed$1($name) { + if (!this._parser.options._map.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "' + $name + '".', null)); + return this._parsed.containsKey$1($name); + } + }; + A.Option.prototype = { + valueOrDefault$1(value) { + var t1; + if (value != null) + return value; + if (this.type === B.OptionType_qyr) { + t1 = this.defaultsTo; + return t1 == null ? A._setArrayType([], type$.JSArray_String) : t1; + } + return this.defaultsTo; + } + }; + A.OptionType.prototype = {}; + A.Parser0.prototype = { + parse$0() { + var commandResults, commandName, commandParser, error, t1, t3, t4, t5, t6, t7, t8, command, exception, _this = this, + t2 = _this._args; + t2.toList$0(0); + commandResults = null; + for (t3 = _this._parser$_rest, t4 = _this._grammar, t5 = t4.commands, t6 = t2.$ti._precomputed1; !t2.get$isEmpty(t2);) { + t7 = t2._collection$_head; + if (t7 === t2._collection$_tail) + A.throwExpression(A.IterableElementError_noElement()); + t7 = t2._collection$_table[t7]; + t8 = t7 == null; + if ((t8 ? t6._as(t7) : t7) === "--") { + t2.removeFirst$0(); + break; + } + if (t8) + t7 = t6._as(t7); + command = t5._map.$index(0, t7); + if (command != null) { + if (t3.length !== 0) + A.throwExpression(A.ArgParserException$("Cannot specify arguments before a command.", null)); + commandName = t2.removeFirst$0(); + t5 = type$.JSArray_String; + t6 = A._setArrayType([], t5); + B.JSArray_methods.addAll$1(t6, t3); + commandParser = new A.Parser0(commandName, _this, command, t2, t6, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + try { + commandResults = commandParser.parse$0(); + } catch (exception) { + t2 = A.unwrapException(exception); + if (t2 instanceof A.ArgParserException) { + error = t2; + t2 = error.message; + t1 = A._setArrayType([commandName], t5); + J.addAll$1$ax(t1, error.commands); + throw A.wrapException(A.ArgParserException$(t2, t1)); + } else + throw exception; + } + B.JSArray_methods.clear$0(t3); + break; + } + if (_this._parseSoloOption$0()) + continue; + if (_this._parseAbbreviation$1(_this)) + continue; + if (_this._parseLongOption$0()) + continue; + t3.push(t2.removeFirst$0()); + } + t4.options._map.forEach$1(0, new A.Parser_parse_closure(_this)); + B.JSArray_methods.addAll$1(t3, t2); + t2.clear$0(0); + return new A.ArgResults(t4, _this._results, _this._commandName, new A.UnmodifiableListView(t3, type$.UnmodifiableListView_String)); + }, + _readNextArgAsValue$1(option) { + var t1 = this._args; + if (t1.get$isEmpty(t1)) + A.throwExpression(A.ArgParserException$('Missing argument for "' + option.name + '".', null)); + this._setOption$3(this._results, option, t1.get$first(t1)); + t1.removeFirst$0(); + }, + _parseSoloOption$0() { + var opt, + t1 = this._args; + if (t1.get$first(t1).length !== 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(t1), "-")) + return false; + opt = t1.get$first(t1)[1]; + if (!A._isLetterOrDigit(B.JSString_methods._codeUnitAt$1(opt, 0))) + return false; + this._handleSoloOption$1(opt); + return true; + }, + _handleSoloOption$1(opt) { + var t1, _this = this, + option = _this._grammar.findByAbbreviation$1(opt); + if (option == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$('Could not find an option or flag "-' + opt + '".', null)); + t1._handleSoloOption$1(opt); + return true; + } + _this._args.removeFirst$0(); + if (option.type === B.OptionType_nMZ) + _this._results.$indexSet(0, option.name, true); + else + _this._readNextArgAsValue$1(option); + return true; + }, + _parseAbbreviation$1(innermostCommand) { + var t2, index, t3, t4, lettersAndDigits, rest, + t1 = this._args; + if (t1.get$first(t1).length < 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(t1), "-")) + return false; + t2 = t1.$ti._precomputed1; + index = 1; + while (true) { + t3 = t1._collection$_head; + if (t3 === t1._collection$_tail) + A.throwExpression(A.IterableElementError_noElement()); + t3 = t1._collection$_table[t3]; + t4 = t3 == null; + if (index < (t4 ? t2._as(t3) : t3).length) { + t3 = B.JSString_methods._codeUnitAt$1(t4 ? t2._as(t3) : t3, index); + if (!(t3 >= 65 && t3 <= 90)) + if (!(t3 >= 97 && t3 <= 122)) + t3 = t3 >= 48 && t3 <= 57; + else + t3 = true; + else + t3 = true; + } else + t3 = false; + if (!t3) + break; + ++index; + } + if (index === 1) + return false; + lettersAndDigits = B.JSString_methods.substring$2(t1.get$first(t1), 1, index); + rest = B.JSString_methods.substring$1(t1.get$first(t1), index); + if (B.JSString_methods.contains$1(rest, "\n") || B.JSString_methods.contains$1(rest, "\r")) + return false; + this._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + }, + _handleAbbreviation$3(lettersAndDigits, rest, innermostCommand) { + var t1, i, i0, _this = this, + c = B.JSString_methods.substring$2(lettersAndDigits, 0, 1), + first = _this._grammar.findByAbbreviation$1(c); + if (first == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(string$.Could_ + c + '".', null)); + t1._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + } else if (first.type !== B.OptionType_nMZ) + _this._setOption$3(_this._results, first, B.JSString_methods.substring$1(lettersAndDigits, 1) + rest); + else { + t1 = B.JSString_methods.substring$1(lettersAndDigits, 1); + if (rest !== "") + A.throwExpression(A.ArgParserException$('Option "-' + c + '" is a flag and cannot handle value "' + t1 + rest + '".', null)); + for (t1 = lettersAndDigits.length, i = 0; i < t1; i = i0) { + i0 = i + 1; + innermostCommand._parseShortFlag$1(B.JSString_methods.substring$2(lettersAndDigits, i, i0)); + } + } + _this._args.removeFirst$0(); + return true; + }, + _parseShortFlag$1(c) { + var t1, + option = this._grammar.findByAbbreviation$1(c); + if (option == null) { + t1 = this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(string$.Could_ + c + '".', null)); + t1._parseShortFlag$1(c); + return; + } + if (option.type !== B.OptionType_nMZ) + A.throwExpression(A.ArgParserException$('Option "-' + c + '" must be a flag to be in a collapsed "-".', null)); + this._results.$indexSet(0, option.name, true); + }, + _parseLongOption$0() { + var index, t2, $name, t3, i, t4, t5, value, + t1 = this._args; + if (!B.JSString_methods.startsWith$1(t1.get$first(t1), "--")) + return false; + index = B.JSString_methods.indexOf$1(t1.get$first(t1), "="); + t2 = index === -1; + $name = t2 ? B.JSString_methods.substring$1(t1.get$first(t1), 2) : B.JSString_methods.substring$2(t1.get$first(t1), 2, index); + for (t3 = $name.length, i = 0; i !== t3; ++i) { + t4 = B.JSString_methods._codeUnitAt$1($name, i); + if (!(t4 >= 65 && t4 <= 90)) + if (!(t4 >= 97 && t4 <= 122)) + t5 = t4 >= 48 && t4 <= 57; + else + t5 = true; + else + t5 = true; + if (!(t5 || t4 === 45 || t4 === 95)) + return false; + } + value = t2 ? null : B.JSString_methods.substring$1(t1.get$first(t1), index + 1); + if (value != null) + t1 = B.JSString_methods.contains$1(value, "\n") || B.JSString_methods.contains$1(value, "\r"); + else + t1 = false; + if (t1) + return false; + this._handleLongOption$2($name, value); + return true; + }, + _handleLongOption$2($name, value) { + var _this = this, _null = null, + _s32_ = 'Could not find an option named "', + t1 = _this._grammar, + option = t1.findByNameOrAlias$1($name); + if (option != null) { + _this._args.removeFirst$0(); + if (option.type === B.OptionType_nMZ) { + if (value != null) + A.throwExpression(A.ArgParserException$('Flag option "' + $name + '" should not be given a value.', _null)); + _this._results.$indexSet(0, option.name, true); + } else if (value != null) + _this._setOption$3(_this._results, option, value); + else + _this._readNextArgAsValue$1(option); + } else if (B.JSString_methods.startsWith$1($name, "no-")) { + option = t1.findByNameOrAlias$1(B.JSString_methods.substring$1($name, 3)); + if (option == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(_s32_ + $name + '".', _null)); + t1._handleLongOption$2($name, value); + return true; + } + _this._args.removeFirst$0(); + if (option.type !== B.OptionType_nMZ) + A.throwExpression(A.ArgParserException$('Cannot negate non-flag option "' + $name + '".', _null)); + if (!option.negatable) + A.throwExpression(A.ArgParserException$('Cannot negate option "' + $name + '".', _null)); + _this._results.$indexSet(0, option.name, false); + } else { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(_s32_ + $name + '".', _null)); + t1._handleLongOption$2($name, value); + return true; + } + return true; + }, + _setOption$3(results, option, value) { + var list, t1, t2, t3, _i, element; + if (option.type !== B.OptionType_qyr) { + this._validateAllowed$2(option, value); + results.$indexSet(0, option.name, value); + return; + } + list = results.putIfAbsent$2(option.name, new A.Parser__setOption_closure()); + if (option.splitCommas) + for (t1 = value.split(","), t2 = t1.length, t3 = J.getInterceptor$ax(list), _i = 0; _i < t2; ++_i) { + element = t1[_i]; + this._validateAllowed$2(option, element); + t3.add$1(list, element); + } + else { + this._validateAllowed$2(option, value); + J.add$1$ax(list, value); + } + }, + _validateAllowed$2(option, value) { + var t1 = option.allowed; + if (t1 == null) + return; + if (!B.JSArray_methods.contains$1(t1, value)) + A.throwExpression(A.ArgParserException$('"' + value + '" is not an allowed value for option "' + option.name + '".', null)); + } + }; + A.Parser_parse_closure.prototype = { + call$2($name, option) { + var parsedOption = this.$this._results.$index(0, $name), + callback = option.callback; + if (callback == null) + return; + callback.call$1(option.valueOrDefault$1(parsedOption)); + }, + $signature: 500 + }; + A.Parser__setOption_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_String); + }, + $signature: 48 + }; + A._Usage.prototype = { + get$_columnWidths() { + var result, _this = this, + value = _this.___Usage__columnWidths_FI; + if (value === $) { + result = _this._calculateColumnWidths$0(); + _this.___Usage__columnWidths_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Usage__columnWidths_FI = result; + value = result; + } + return value; + }, + generate$0() { + var t1, t2, t3, t4, _i, optionOrSeparator, t5, _this = this; + for (t1 = _this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.Option, t4 = _this._buffer, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + optionOrSeparator = t1[_i]; + if (typeof optionOrSeparator == "string") { + t5 = t4._contents; + t4._contents = (t5.length !== 0 ? t4._contents = t5 + "\n\n" : t5) + optionOrSeparator; + _this._newlinesNeeded = 1; + continue; + } + t3._as(optionOrSeparator); + if (optionOrSeparator.hide) + continue; + _this._writeOption$1(optionOrSeparator); + } + t1 = t4._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeOption$1(option) { + var allowedNames, t2, t3, t4, _i, $name, t5, _this = this, + t1 = option.abbr; + _this._write$2(0, t1 == null ? "" : "-" + t1 + ", "); + t1 = _this._longOption$1(option); + _this._write$2(1, t1); + t1 = option.help; + if (t1 != null) + _this._write$2(2, t1); + t1 = option.allowedHelp; + if (t1 != null) { + allowedNames = J.toList$0$ax(t1.get$keys(t1)); + B.JSArray_methods.sort$0(allowedNames); + _this._newline$0(); + for (t2 = allowedNames.length, t3 = option.defaultsTo, t4 = type$.List_dynamic._is(t3), _i = 0; _i < allowedNames.length; allowedNames.length === t2 || (0, A.throwConcurrentModificationError)(allowedNames), ++_i) { + $name = allowedNames[_i]; + t5 = (t4 ? B.JSArray_methods.contains$1(t3, $name) : t3 === $name) ? " (default)" : ""; + _this._write$2(1, " [" + $name + "]" + t5); + t5 = t1.$index(0, $name); + t5.toString; + _this._write$2(2, t5); + } + _this._newline$0(); + } else if (option.allowed != null) + _this._write$2(2, _this._buildAllowedList$1(option)); + else { + t1 = option.type; + if (t1 === B.OptionType_nMZ) { + if (option.defaultsTo === true) + _this._write$2(2, "(defaults to on)"); + } else if (t1 === B.OptionType_qyr) { + t1 = option.defaultsTo; + if (t1 != null && J.get$isNotEmpty$asx(t1)) { + type$.List_dynamic._as(t1); + _this._write$2(2, "(defaults to " + new A.MappedListIterable(t1, new A._Usage__writeOption_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"); + } + } else { + t1 = option.defaultsTo; + if (t1 != null) + _this._write$2(2, '(defaults to "' + A.S(t1) + '")'); + } + } + }, + _longOption$1(option) { + var t1 = option.name, + result = option.negatable ? "--[no-]" + t1 : "--" + t1; + t1 = option.valueHelp; + return t1 != null ? result + ("=<" + t1 + ">") : result; + }, + _calculateColumnWidths$0() { + var t1, t2, t3, abbr, title, _i, option, t4, t5, t6, t7, t8; + for (t1 = this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.List_dynamic, abbr = 0, title = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + option = t1[_i]; + if (!(option instanceof A.Option)) + continue; + if (option.hide) + continue; + t4 = option.abbr; + abbr = Math.max(abbr, (t4 == null ? "" : "-" + t4 + ", ").length); + t4 = this._longOption$1(option); + title = Math.max(title, t4.length); + t4 = option.allowedHelp; + if (t4 != null) + for (t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = option.defaultsTo, t6 = t3._is(t5); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t8 = (t6 ? B.JSArray_methods.contains$1(t5, t7) : t5 === t7) ? " (default)" : ""; + title = Math.max(title, (" [" + t7 + "]" + t8).length); + } + } + return A._setArrayType([abbr, title + 4], type$.JSArray_int); + }, + _newline$0() { + ++this._newlinesNeeded; + this._currentColumn = 0; + }, + _write$2(column, text) { + var t1, _i, + lines = A._setArrayType(text.split("\n"), type$.JSArray_String); + this.get$_columnWidths(); + while (true) { + if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$first(lines)) === "")) + break; + B.JSArray_methods.removeAt$1(lines, 0); + } + while (true) { + if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$last(lines)) === "")) + break; + lines.pop(); + } + for (t1 = lines.length, _i = 0; _i < lines.length; lines.length === t1 || (0, A.throwConcurrentModificationError)(lines), ++_i) + this._writeLine$2(column, lines[_i]); + }, + _writeLine$2(column, text) { + var t1, t2, _this = this; + for (t1 = _this._buffer; t2 = _this._newlinesNeeded, t2 > 0;) { + t1._contents += "\n"; + _this._newlinesNeeded = t2 - 1; + } + for (; t2 = _this._currentColumn, t2 !== column;) { + if (t2 < 2) + t1._contents += B.JSString_methods.$mul(" ", _this.get$_columnWidths()[_this._currentColumn]); + else + t1._contents += "\n"; + _this._currentColumn = (_this._currentColumn + 1) % 3; + } + _this.get$_columnWidths(); + if (column < 2) + t1._contents += B.JSString_methods.padRight$1(text, _this.get$_columnWidths()[column]); + else + t1._contents += text; + _this._currentColumn = (_this._currentColumn + 1) % 3; + if (column === 2) + ++_this._newlinesNeeded; + }, + _buildAllowedList$1(option) { + var t2, t3, first, _i, allowed, + t1 = option.defaultsTo, + isDefault = type$.List_dynamic._is(t1) ? B.JSArray_methods.get$contains(t1) : new A._Usage__buildAllowedList_closure(option); + t1 = "" + "["; + for (t2 = option.allowed, t3 = t2.length, first = true, _i = 0; _i < t3; ++_i, first = false) { + allowed = t2[_i]; + if (!first) + t1 += ", "; + t1 += A.S(allowed); + if (isDefault.call$1(allowed)) + t1 += " (default)"; + } + t1 += "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Usage__writeOption_closure.prototype = { + call$1(value) { + return '"' + A.S(value) + '"'; + }, + $signature: 86 + }; + A._Usage__buildAllowedList_closure.prototype = { + call$1(value) { + return value === this.option.defaultsTo; + }, + $signature: 137 + }; + A.ErrorResult.prototype = { + complete$1(completer) { + completer.completeError$2(this.error, this.stackTrace); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.error) ^ A.Primitives_objectHashCode(this.stackTrace) ^ 492929599) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ErrorResult && J.$eq$(this.error, other.error) && this.stackTrace === other.stackTrace; + }, + $isResult: 1 + }; + A.ValueResult.prototype = { + complete$1(completer) { + completer.complete$1(this.value); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.value) ^ 842997089) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ValueResult && J.$eq$(this.value, other.value); + }, + $isResult: 1 + }; + A.StreamCompleter.prototype = { + setSourceStream$1(sourceStream) { + var t1 = this._stream_completer$_stream; + if (t1._sourceStream != null) + throw A.wrapException(A.StateError$("Source stream already set")); + t1._sourceStream = sourceStream; + if (t1._stream_completer$_controller != null) + t1._linkStreamToController$0(); + }, + setError$2(error, stackTrace) { + var t1 = this.$ti._precomputed1; + this.setSourceStream$1(A.Stream_Stream$fromFuture(A.Future_Future$error(error, stackTrace, t1), t1)); + }, + setError$1(error) { + return this.setError$2(error, null); + } + }; + A._CompleterStream.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var sourceStream, t1, _this = this, _null = null; + if (_this._stream_completer$_controller == null) { + sourceStream = _this._sourceStream; + if (sourceStream != null && !sourceStream.get$isBroadcast()) + return sourceStream.listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + if (_this._stream_completer$_controller == null) + _this._stream_completer$_controller = A.StreamController_StreamController(_null, _null, _null, _null, true, _this.$ti._precomputed1); + if (_this._sourceStream != null) + _this._linkStreamToController$0(); + } + t1 = _this._stream_completer$_controller; + t1.toString; + return new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + }, + listen$1($receiver, onData) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, null, null); + }, + listen$3$onDone$onError($receiver, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError($receiver, onData, null, onDone, onError); + }, + _linkStreamToController$0() { + var t2, + t1 = this._stream_completer$_controller; + t1.toString; + t2 = this._sourceStream; + t2.toString; + t1.addStream$2$cancelOnError(t2, false).whenComplete$1(t1.get$close(t1)); + } + }; + A.StreamGroup.prototype = { + add$1(_, stream) { + var t1, _this = this; + if (_this._closed) + throw A.wrapException(A.StateError$("Can't add a Stream to a closed StreamGroup.")); + t1 = _this._stream_group$_state; + if (t1 === B._StreamGroupState_dormant) + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure()); + else if (t1 === B._StreamGroupState_canceled) + return stream.listen$1(0, null).cancel$0(); + else + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure0(_this, stream)); + return null; + }, + remove$1(_, stream) { + var t1 = this._subscriptions, + subscription = t1.remove$1(0, stream), + future = subscription == null ? null : subscription.cancel$0(); + if (t1.__js_helper$_length === 0) + if (this._closed) { + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + A.scheduleMicrotask(t1.get$close(t1)); + } + return future; + }, + _onListen$0() { + var stream, t1, t2, t3, _i, entry, exception, onError, _this = this; + _this._stream_group$_state = B._StreamGroupState_listening; + for (t1 = _this._subscriptions, t2 = A.List_List$of(t1.get$entries(t1), true, _this.$ti._eval$1("MapEntry,StreamSubscription<1>?>")), t3 = t2.length, _i = 0; _i < t3; ++_i) { + entry = t2[_i]; + if (entry.value != null) + continue; + stream = entry.key; + try { + t1.$indexSet(0, stream, _this._listenToStream$1(stream)); + } catch (exception) { + t1 = _this._onCancel$0(); + if (t1 != null) { + onError = new A.StreamGroup__onListen_closure(); + t2 = t1.$ti; + t3 = $.Zone__current; + if (t3 !== B.C__RootZone) + onError = A._registerErrorHandler(onError, t3); + t1._addListener$1(new A._FutureListener(new A._Future(t3, t2), 2, null, onError, t2._eval$1("@<1>")._bind$1(t2._precomputed1)._eval$1("_FutureListener<1,2>"))); + } + throw exception; + } + } + }, + _onPause$0() { + var t1, t2, t3; + this._stream_group$_state = B._StreamGroupState_paused; + for (t1 = this._subscriptions, t1 = t1.get$values(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f), t2 = A._instanceType(t1)._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).pause$0(0); + } + }, + _onResume$0() { + var t1, t2, t3; + this._stream_group$_state = B._StreamGroupState_listening; + for (t1 = this._subscriptions, t1 = t1.get$values(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f), t2 = A._instanceType(t1)._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).resume$0(0); + } + }, + _onCancel$0() { + var t1, t2, futures; + this._stream_group$_state = B._StreamGroupState_canceled; + t1 = this._subscriptions; + t2 = A.IterableNullableExtension_whereNotNull(t1.get$entries(t1).map$1$1(0, new A.StreamGroup__onCancel_closure(this), type$.nullable_Future_void), type$.Future_void); + futures = A.List_List$of(t2, true, t2.$ti._eval$1("Iterable.E")); + t1.clear$0(0); + return futures.length === 0 ? null : A.Future_wait(futures, type$.void); + }, + _listenToStream$1(stream) { + var subscription, + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + subscription = stream.listen$3$onDone$onError(0, t1.get$add(t1), new A.StreamGroup__listenToStream_closure(this, stream), t1.get$addError()); + if (this._stream_group$_state === B._StreamGroupState_paused) + subscription.pause$0(0); + return subscription; + } + }; + A.StreamGroup_add_closure.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.StreamGroup_add_closure0.prototype = { + call$0() { + return this.$this._listenToStream$1(this.stream); + }, + $signature() { + return this.$this.$ti._eval$1("StreamSubscription<1>()"); + } + }; + A.StreamGroup__onListen_closure.prototype = { + call$1(_) { + }, + $signature: 76 + }; + A.StreamGroup__onCancel_closure.prototype = { + call$1(entry) { + var t1, exception, + subscription = entry.value; + try { + if (subscription != null) { + t1 = subscription.cancel$0(); + return t1; + } + t1 = J.listen$1$z(entry.key, null).cancel$0(); + return t1; + } catch (exception) { + return null; + } + }, + $signature() { + return this.$this.$ti._eval$1("Future<~>?(MapEntry,StreamSubscription<1>?>)"); + } + }; + A.StreamGroup__listenToStream_closure.prototype = { + call$0() { + return this.$this.remove$1(0, this.stream); + }, + $signature: 0 + }; + A._StreamGroupState.prototype = { + toString$0(_) { + return this.name; + } + }; + A.StreamQueue.prototype = { + _updateRequests$0() { + var t1, t2, t3, t4, _this = this; + for (t1 = _this._requestQueue, t2 = _this._eventQueue, t3 = t1.$ti._precomputed1; !t1.get$isEmpty(t1);) { + t4 = t1._collection$_head; + if (t4 === t1._collection$_tail) + A.throwExpression(A.IterableElementError_noElement()); + t4 = t1._collection$_table[t4]; + if (t4 == null) + t4 = t3._as(t4); + if (t4.update$2(t2, _this._isDone)) + t1.removeFirst$0(); + else + return; + } + if (!_this._isDone) + _this._stream_queue$_subscription.pause$0(0); + }, + _ensureListening$0() { + var t1, _this = this; + if (_this._isDone) + return; + t1 = _this._stream_queue$_subscription; + if (t1 == null) + _this._stream_queue$_subscription = _this._stream_queue$_source.listen$3$onDone$onError(0, new A.StreamQueue__ensureListening_closure(_this), new A.StreamQueue__ensureListening_closure0(_this), new A.StreamQueue__ensureListening_closure1(_this)); + else + t1.resume$0(0); + }, + _addResult$1(result) { + ++this._eventsReceived; + this._eventQueue._queue_list$_add$1(result); + this._updateRequests$0(); + }, + _addRequest$1(request) { + var _this = this, + t1 = _this._requestQueue; + if (t1._collection$_head === t1._collection$_tail) { + if (request.update$2(_this._eventQueue, _this._isDone)) + return; + _this._ensureListening$0(); + } + t1._add$1(request); + } + }; + A.StreamQueue__ensureListening_closure.prototype = { + call$1(data) { + var t1 = this.$this; + t1._addResult$1(new A.ValueResult(data, t1.$ti._eval$1("ValueResult<1>"))); + }, + $signature() { + return this.$this.$ti._eval$1("~(1)"); + } + }; + A.StreamQueue__ensureListening_closure1.prototype = { + call$2(error, stackTrace) { + this.$this._addResult$1(new A.ErrorResult(error, stackTrace)); + }, + $signature: 73 + }; + A.StreamQueue__ensureListening_closure0.prototype = { + call$0() { + var t1 = this.$this; + t1._stream_queue$_subscription = null; + t1._isDone = true; + t1._updateRequests$0(); + }, + $signature: 0 + }; + A._NextRequest.prototype = { + update$2(events, isDone) { + if (!events.get$isEmpty(events)) { + events.removeFirst$0().complete$1(this._completer); + return true; + } + if (isDone) { + this._completer.completeError$2(new A.StateError("No elements"), A.StackTrace_current()); + return true; + } + return false; + }, + $is_EventRequest: 1 + }; + A.Repl.prototype = {}; + A.alwaysValid_closure.prototype = { + call$1(text) { + return true; + }, + $signature: 8 + }; + A.ReplAdapter.prototype = { + runAsync$0() { + var rl, runController, _this = this, t1 = {}, + t2 = J.get$isTTY$x(self.process.stdin), + output = (t2 == null ? false : t2) ? self.process.stdout : null; + t2 = _this.repl.prompt; + rl = J.createInterface$1$x($.$get$readline(), {input: self.process.stdin, output: output, prompt: t2}); + _this.rl = rl; + t1.statement = ""; + t1.prompt = t2; + runController = A._Cell$(); + runController._value = A.StreamController_StreamController(_this.get$exit(_this), new A.ReplAdapter_runAsync_closure(t1, _this, rl, runController), null, null, false, type$.String); + return runController._readLocal$0().get$stream(); + }, + exit$0(_) { + var t1 = this.rl; + if (t1 != null) + J.close$0$x(t1); + this.rl = null; + } + }; + A.ReplAdapter_runAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$currentError, $async$self = this, lineController, lineQueue, line, error, stackTrace, t1, t2, t3, t4, $prompt, prompt0, t5, t6, t7, t8, t9, line0, toZone, statement, exception, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 3; + lineController = A.StreamController_StreamController(null, null, null, null, false, type$.String); + t1 = lineController; + t2 = A.QueueList$(null, type$.Result_String); + t3 = A.ListQueue$(type$._EventRequest_dynamic); + lineQueue = new A.StreamQueue(new A._ControllerStream(t1, A.instanceType(t1)._eval$1("_ControllerStream<1>")), t2, t3, type$.StreamQueue_String); + t1 = $async$self.rl; + t2 = J.getInterceptor$x(t1); + t2.on$2(t1, "line", A.allowInterop(new A.ReplAdapter_runAsync__closure(lineController))); + t3 = $async$self._box_0, t4 = $async$self.$this.repl, $prompt = t4.continuation, prompt0 = t4.prompt, t5 = $async$self.runController, t6 = t5.__late_helper$_name; + case 6: + // for condition + // trivial condition + t7 = J.get$isTTY$x(self.process.stdin); + if (t7 == null ? false : t7) + J.write$1$x(self.process.stdout, t3.prompt); + t7 = lineQueue; + t8 = A.instanceType(t7); + t9 = new A._Future($.Zone__current, t8._eval$1("_Future<1>")); + t7._addRequest$1(new A._NextRequest(new A._AsyncCompleter(t9, t8._eval$1("_AsyncCompleter<1>")), t8._eval$1("_NextRequest<1>"))); + $async$goto = 8; + return A._asyncAwait(t9, $async$call$0); + case 8: + // returning from await. + line = $async$result; + t7 = J.get$isTTY$x(self.process.stdin); + if (!(t7 == null ? false : t7)) { + line0 = t3.prompt + A.S(line); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + statement = B.JSString_methods.$add(t3.statement, line); + t3.statement = statement; + if (t4.validator.call$1(statement)) { + t7 = t5._value; + if (t7 === t5) + A.throwExpression(A.LateError$localNI(t6)); + J.add$1$ax(t7, t3.statement); + t3.statement = ""; + t3.prompt = prompt0; + t2.setPrompt$1(t1, prompt0); + } else { + t3.statement += "\n"; + t3.prompt = $prompt; + t2.setPrompt$1(t1, $prompt); + } + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$handler = 1; + // goto after finally + $async$goto = 5; + break; + case 3: + // catch + $async$handler = 2; + $async$exception = $async$currentError; + error = A.unwrapException($async$exception); + stackTrace = A.getTraceFromException($async$exception); + t1 = $async$self.runController; + t1._readLocal$0().addError$2(error, stackTrace); + $async$goto = 9; + return A._asyncAwait($async$self.$this.exit$0(0), $async$call$0); + case 9: + // returning from await. + J.close$0$x(t1._readLocal$0()); + // goto after finally + $async$goto = 5; + break; + case 2: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 5: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A.ReplAdapter_runAsync__closure.prototype = { + call$1(value) { + return this.lineController.add$1(0, A._asString(value)); + }, + $signature: 139 + }; + A.Stdin.prototype = {}; + A.Stdout.prototype = {}; + A.ReadlineModule.prototype = {}; + A.ReadlineOptions.prototype = {}; + A.ReadlineInterface.prototype = {}; + A.EmptyUnmodifiableSet.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$length(_) { + return 0; + }, + contains$1(_, element) { + return false; + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin.prototype = {}; + A.DefaultEquality.prototype = {}; + A.IterableEquality.prototype = { + equals$2(_, elements1, elements2) { + var it1, it2, hasNext; + if (elements1 === elements2) + return true; + it1 = J.get$iterator$ax(elements1); + it2 = J.get$iterator$ax(elements2); + for (; true;) { + hasNext = it1.moveNext$0(); + if (hasNext !== it2.moveNext$0()) + return false; + if (!hasNext) + return true; + if (!J.$eq$(it1.get$current(it1), it2.get$current(it2))) + return false; + } + } + }; + A.ListEquality.prototype = { + equals$2(_, list1, list2) { + var t1, $length, t2, i; + if (list1 == null ? list2 == null : list1 === list2) + return true; + if (list1 == null || list2 == null) + return false; + t1 = J.getInterceptor$asx(list1); + $length = t1.get$length(list1); + t2 = J.getInterceptor$asx(list2); + if ($length !== t2.get$length(list2)) + return false; + for (i = 0; i < $length; ++i) + if (!J.$eq$(t1.$index(list1, i), t2.$index(list2, i))) + return false; + return true; + }, + hash$1(list) { + var hash, i; + for (hash = 0, i = 0; i < list.length; ++i) { + hash = hash + J.get$hashCode$(list[i]) & 2147483647; + hash = hash + (hash << 10 >>> 0) & 2147483647; + hash ^= hash >>> 6; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A._MapEntry.prototype = { + get$hashCode(_) { + return 3 * J.get$hashCode$(this.key) + 7 * J.get$hashCode$(this.value) & 2147483647; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._MapEntry && J.$eq$(this.key, other.key) && J.$eq$(this.value, other.value); + } + }; + A.MapEquality.prototype = { + equals$2(_, map1, map2) { + var equalElementCounts, t1, key, entry, count; + if (map1 === map2) + return true; + if (map1.get$length(map1) !== map2.get$length(map2)) + return false; + equalElementCounts = A.HashMap_HashMap(type$._MapEntry, type$.int); + for (t1 = J.get$iterator$ax(map1.get$keys(map1)); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map1.$index(0, key)); + count = equalElementCounts.$index(0, entry); + equalElementCounts.$indexSet(0, entry, (count == null ? 0 : count) + 1); + } + for (t1 = J.get$iterator$ax(map2.get$keys(map2)); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map2.$index(0, key)); + count = equalElementCounts.$index(0, entry); + if (count == null || count === 0) + return false; + equalElementCounts.$indexSet(0, entry, count - 1); + } + return true; + }, + hash$1(map) { + var t1, t2, hash, key, keyHash, t3; + for (t1 = J.get$iterator$ax(map.get$keys(map)), t2 = A._instanceType(this)._rest[1], hash = 0; t1.moveNext$0();) { + key = t1.get$current(t1); + keyHash = J.get$hashCode$(key); + t3 = map.$index(0, key); + hash = hash + 3 * keyHash + 7 * J.get$hashCode$(t3 == null ? t2._as(t3) : t3) & 2147483647; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A.QueueList.prototype = { + add$1(_, element) { + this._queue_list$_add$1(element); + }, + addAll$1(_, iterable) { + var addCount, $length, t1, endSpace, t2, preSpace, _this = this; + if (type$.List_dynamic._is(iterable)) { + addCount = J.get$length$asx(iterable); + $length = _this.get$length(_this); + t1 = $length + addCount; + if (t1 >= J.get$length$asx(_this._table)) { + _this._preGrow$1(t1); + J.setRange$4$ax(_this._table, $length, t1, iterable, 0); + _this.set$_tail(_this.get$_tail() + addCount); + } else { + endSpace = J.get$length$asx(_this._table) - _this.get$_tail(); + t1 = _this._table; + t2 = J.getInterceptor$ax(t1); + if (addCount < endSpace) { + t2.setRange$4(t1, _this.get$_tail(), _this.get$_tail() + addCount, iterable, 0); + _this.set$_tail(_this.get$_tail() + addCount); + } else { + preSpace = addCount - endSpace; + t2.setRange$4(t1, _this.get$_tail(), _this.get$_tail() + endSpace, iterable, 0); + J.setRange$4$ax(_this._table, 0, preSpace, iterable, endSpace); + _this.set$_tail(preSpace); + } + } + } else + for (t1 = J.get$iterator$ax(iterable); t1.moveNext$0();) + _this._queue_list$_add$1(t1.get$current(t1)); + }, + cast$1$0(_, $T) { + return new A._CastQueueList(this, J.cast$1$0$ax(this._table, $T), -1, -1, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("_CastQueueList<1,2>")); + }, + toString$0(_) { + return A.IterableBase_iterableToFullString(this, "{", "}"); + }, + addFirst$1(element) { + var _this = this; + _this.set$_head((_this.get$_head() - 1 & J.get$length$asx(_this._table) - 1) >>> 0); + J.$indexSet$ax(_this._table, _this.get$_head(), element); + if (_this.get$_head() === _this.get$_tail()) + _this._grow$0(); + }, + removeFirst$0() { + var result, _this = this; + if (_this.get$_head() === _this.get$_tail()) + throw A.wrapException(A.StateError$("No element")); + result = J.$index$asx(_this._table, _this.get$_head()); + if (result == null) + result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); + J.$indexSet$ax(_this._table, _this.get$_head(), null); + _this.set$_head((_this.get$_head() + 1 & J.get$length$asx(_this._table) - 1) >>> 0); + return result; + }, + get$length(_) { + return (this.get$_tail() - this.get$_head() & J.get$length$asx(this._table) - 1) >>> 0; + }, + set$length(_, value) { + var delta, newTail, t1, t2, _this = this; + if (value < 0) + throw A.wrapException(A.RangeError$("Length " + value + " may not be negative.")); + if (value > _this.get$length(_this) && !A._instanceType(_this)._eval$1("QueueList.E")._is(null)) + throw A.wrapException(A.UnsupportedError$("The length can only be increased when the element type is nullable, but the current element type is `" + A.createRuntimeType(A._instanceType(_this)._eval$1("QueueList.E")).toString$0(0) + "`.")); + delta = value - _this.get$length(_this); + if (delta >= 0) { + if (J.get$length$asx(_this._table) <= value) + _this._preGrow$1(value); + _this.set$_tail((_this.get$_tail() + delta & J.get$length$asx(_this._table) - 1) >>> 0); + return; + } + newTail = _this.get$_tail() + delta; + t1 = _this._table; + if (newTail >= 0) + J.fillRange$3$ax(t1, newTail, _this.get$_tail(), null); + else { + newTail += J.get$length$asx(t1); + J.fillRange$3$ax(_this._table, 0, _this.get$_tail(), null); + t1 = _this._table; + t2 = J.getInterceptor$asx(t1); + t2.fillRange$3(t1, newTail, t2.get$length(t1), null); + } + _this.set$_tail(newTail); + }, + $index(_, index) { + var t1, _this = this; + if (index < 0 || index >= _this.get$length(_this)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(_this) + ").")); + t1 = J.$index$asx(_this._table, (_this.get$_head() + index & J.get$length$asx(_this._table) - 1) >>> 0); + return t1 == null ? A._instanceType(_this)._eval$1("QueueList.E")._as(t1) : t1; + }, + $indexSet(_, index, value) { + var _this = this; + if (index < 0 || index >= _this.get$length(_this)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(_this) + ").")); + J.$indexSet$ax(_this._table, (_this.get$_head() + index & J.get$length$asx(_this._table) - 1) >>> 0, value); + }, + _queue_list$_add$1(element) { + var _this = this; + J.$indexSet$ax(_this._table, _this.get$_tail(), element); + _this.set$_tail((_this.get$_tail() + 1 & J.get$length$asx(_this._table) - 1) >>> 0); + if (_this.get$_head() === _this.get$_tail()) + _this._grow$0(); + }, + _grow$0() { + var _this = this, + newTable = A.List_List$filled(J.get$length$asx(_this._table) * 2, null, false, A._instanceType(_this)._eval$1("QueueList.E?")), + split = J.get$length$asx(_this._table) - _this.get$_head(); + B.JSArray_methods.setRange$4(newTable, 0, split, _this._table, _this.get$_head()); + B.JSArray_methods.setRange$4(newTable, split, split + _this.get$_head(), _this._table, 0); + _this.set$_head(0); + _this.set$_tail(J.get$length$asx(_this._table)); + _this._table = newTable; + }, + _writeToList$1(target) { + var $length, firstPartSize, _this = this; + if (_this.get$_head() <= _this.get$_tail()) { + $length = _this.get$_tail() - _this.get$_head(); + B.JSArray_methods.setRange$4(target, 0, $length, _this._table, _this.get$_head()); + return $length; + } else { + firstPartSize = J.get$length$asx(_this._table) - _this.get$_head(); + B.JSArray_methods.setRange$4(target, 0, firstPartSize, _this._table, _this.get$_head()); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this.get$_tail(), _this._table, 0); + return _this.get$_tail() + firstPartSize; + } + }, + _preGrow$1(newElementCount) { + var _this = this, + newTable = A.List_List$filled(A.QueueList__nextPowerOf2(newElementCount + B.JSInt_methods._shrOtherPositive$1(newElementCount, 1)), null, false, A._instanceType(_this)._eval$1("QueueList.E?")); + _this.set$_tail(_this._writeToList$1(newTable)); + _this._table = newTable; + _this.set$_head(0); + }, + $isEfficientLengthIterable: 1, + $isQueue: 1, + $isIterable: 1, + $isList: 1, + get$_head() { + return this._head; + }, + get$_tail() { + return this._tail; + }, + set$_head(val) { + return this._head = val; + }, + set$_tail(val) { + return this._tail = val; + } + }; + A._CastQueueList.prototype = { + get$_head() { + return this._queue_list$_delegate.get$_head(); + }, + set$_head(value) { + this._queue_list$_delegate.set$_head(value); + }, + get$_tail() { + return this._queue_list$_delegate.get$_tail(); + }, + set$_tail(value) { + this._queue_list$_delegate.set$_tail(value); + } + }; + A._QueueList_Object_ListMixin.prototype = {}; + A.UnmodifiableSetView.prototype = {}; + A.UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A.UnmodifiableSetMixin__throw(); + }, + addAll$1(_, elements) { + return A.UnmodifiableSetMixin__throw(); + } + }; + A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin.prototype = {}; + A._DelegatingIterableBase.prototype = { + contains$1(_, element) { + return J.contains$1$asx(this.get$_base(), element); + }, + elementAt$1(_, index) { + return J.elementAt$1$ax(this.get$_base(), index); + }, + get$first(_) { + return J.get$first$ax(this.get$_base()); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$_base()); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$_base()); + }, + get$iterator(_) { + return J.get$iterator$ax(this.get$_base()); + }, + join$1(_, separator) { + return J.join$1$ax(this.get$_base(), separator); + }, + join$0($receiver) { + return this.join$1($receiver, ""); + }, + get$last(_) { + return J.get$last$ax(this.get$_base()); + }, + get$length(_) { + return J.get$length$asx(this.get$_base()); + }, + map$1$1(_, f, $T) { + return J.map$1$1$ax(this.get$_base(), f, $T); + }, + get$single(_) { + return J.get$single$ax(this.get$_base()); + }, + skip$1(_, n) { + return J.skip$1$ax(this.get$_base(), n); + }, + take$1(_, n) { + return J.take$1$ax(this.get$_base(), n); + }, + toList$1$growable(_, growable) { + return J.toList$1$growable$ax(this.get$_base(), true); + }, + toList$0($receiver) { + return this.toList$1$growable($receiver, true); + }, + toSet$0(_) { + return J.toSet$0$ax(this.get$_base()); + }, + where$1(_, test) { + return J.where$1$ax(this.get$_base(), test); + }, + toString$0(_) { + return J.toString$0$(this.get$_base()); + }, + $isIterable: 1 + }; + A.DelegatingSet.prototype = { + add$1(_, value) { + return this._base.add$1(0, value); + }, + addAll$1(_, elements) { + this._base.addAll$1(0, elements); + }, + toSet$0(_) { + return new A.DelegatingSet(this._base.toSet$0(0), A._instanceType(this)._eval$1("DelegatingSet<1>")); + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_base() { + return this._base; + } + }; + A.MapKeySet.prototype = { + get$_base() { + var t1 = this._baseMap; + return t1.get$keys(t1); + }, + contains$1(_, element) { + return this._baseMap.containsKey$1(element); + }, + get$isEmpty(_) { + var t1 = this._baseMap; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._baseMap; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._baseMap; + return t1.get$length(t1); + }, + toString$0(_) { + return A.IterableBase_iterableToFullString(this, "{", "}"); + }, + difference$1(other) { + return J.where$1$ax(this.get$_base(), new A.MapKeySet_difference_closure(this, other)).toSet$0(0); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A.MapKeySet_difference_closure.prototype = { + call$1(element) { + return !this.other._source.contains$1(0, element); + }, + $signature() { + return this.$this.$ti._eval$1("bool(1)"); + } + }; + A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin.prototype = {}; + A.BufferModule.prototype = {}; + A.BufferConstants.prototype = {}; + A.Buffer.prototype = {}; + A.ConsoleModule.prototype = {}; + A.Console.prototype = {}; + A.EventEmitter.prototype = {}; + A.FS.prototype = {}; + A.FSConstants.prototype = {}; + A.FSWatcher.prototype = {}; + A.ReadStream.prototype = {}; + A.ReadStreamOptions.prototype = {}; + A.WriteStream.prototype = {}; + A.WriteStreamOptions.prototype = {}; + A.FileOptions.prototype = {}; + A.StatOptions.prototype = {}; + A.MkdirOptions.prototype = {}; + A.RmdirOptions.prototype = {}; + A.WatchOptions.prototype = {}; + A.WatchFileOptions.prototype = {}; + A.Stats.prototype = {}; + A.Promise.prototype = {}; + A.Date.prototype = {}; + A.JsError.prototype = {}; + A.Atomics.prototype = {}; + A.Modules.prototype = {}; + A.Module1.prototype = {}; + A.Net.prototype = {}; + A.Socket.prototype = {}; + A.NetAddress.prototype = {}; + A.NetServer.prototype = {}; + A.NodeJsError.prototype = {}; + A.JsAssertionError.prototype = {}; + A.JsRangeError.prototype = {}; + A.JsReferenceError.prototype = {}; + A.JsSyntaxError.prototype = {}; + A.JsTypeError.prototype = {}; + A.JsSystemError.prototype = {}; + A.Process.prototype = {}; + A.CPUUsage.prototype = {}; + A.Release.prototype = {}; + A.StreamModule.prototype = {}; + A.Readable.prototype = {}; + A.Writable.prototype = {}; + A.Duplex.prototype = {}; + A.Transform.prototype = {}; + A.WritableOptions.prototype = {}; + A.ReadableOptions.prototype = {}; + A.Immediate.prototype = {}; + A.Timeout.prototype = {}; + A.TTY.prototype = {}; + A.TTYReadStream.prototype = {}; + A.TTYWriteStream.prototype = {}; + A.Util.prototype = {}; + A.promiseToFuture_closure.prototype = { + call$1(value) { + this.completer.complete$1(value); + }, + $signature: 76 + }; + A.promiseToFuture_closure0.prototype = { + call$1(error) { + this.completer.completeError$1(error); + }, + $signature: 76 + }; + A.futureToPromise_closure.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure(resolve, this.T), reject, type$.dynamic); + }, + $signature: 289 + }; + A.futureToPromise__closure.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature() { + return this.T._eval$1("@(0)"); + } + }; + A.Context.prototype = { + absolute$7(part1, part2, part3, part4, part5, part6, part7) { + var t1; + A._validateArgList("absolute", A._setArrayType([part1, part2, part3, part4, part5, part6, part7], type$.JSArray_nullable_String)); + if (part2 == null) { + t1 = this.style; + t1 = t1.rootLength$1(part1) > 0 && !t1.isRootRelative$1(part1); + } else + t1 = false; + if (t1) + return part1; + t1 = this._context$_current; + return this.join$8(0, t1 == null ? A.current() : t1, part1, part2, part3, part4, part5, part6, part7); + }, + absolute$1(part1) { + return this.absolute$7(part1, null, null, null, null, null, null); + }, + dirname$1(path) { + var t1, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.removeTrailingSeparators$0(); + t1 = parsed.parts; + t2 = t1.length; + if (t2 === 0) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + if (t2 === 1) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + B.JSArray_methods.removeLast$0(t1); + parsed.separators.pop(); + parsed.removeTrailingSeparators$0(); + return parsed.toString$0(0); + }, + join$8(_, part1, part2, part3, part4, part5, part6, part7, part8) { + var parts = A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8], type$.JSArray_nullable_String); + A._validateArgList("join", parts); + return this.joinAll$1(new A.WhereTypeIterable(parts, type$.WhereTypeIterable_String)); + }, + join$2($receiver, part1, part2) { + return this.join$8($receiver, part1, part2, null, null, null, null, null, null); + }, + joinAll$1(parts) { + var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path; + for (t1 = parts.get$iterator(parts), t2 = new A.WhereIterator(t1, new A.Context_joinAll_closure()), t3 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t2.moveNext$0();) { + t5 = t1.get$current(t1); + if (t3.isRootRelative$1(t5) && isAbsoluteAndNotRootRelative) { + parsed = A.ParsedPath_ParsedPath$parse(t5, t3); + path = t4.charCodeAt(0) == 0 ? t4 : t4; + t4 = B.JSString_methods.substring$2(path, 0, t3.rootLength$2$withDrive(path, true)); + parsed.root = t4; + if (t3.needsSeparator$1(t4)) + parsed.separators[0] = t3.get$separator(t3); + t4 = "" + parsed.toString$0(0); + } else if (t3.rootLength$1(t5) > 0) { + isAbsoluteAndNotRootRelative = !t3.isRootRelative$1(t5); + t4 = "" + t5; + } else { + if (!(t5.length !== 0 && t3.containsSeparator$1(t5[0]))) + if (needsSeparator) + t4 += t3.get$separator(t3); + t4 += t5; + } + needsSeparator = t3.needsSeparator$1(t5); + } + return t4.charCodeAt(0) == 0 ? t4 : t4; + }, + split$1(_, path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this.style), + t1 = parsed.parts, + t2 = A._arrayInstanceType(t1)._eval$1("WhereIterable<1>"); + t2 = A.List_List$of(new A.WhereIterable(t1, new A.Context_split_closure(), t2), true, t2._eval$1("Iterable.E")); + parsed.parts = t2; + t1 = parsed.root; + if (t1 != null) + B.JSArray_methods.insert$2(t2, 0, t1); + return parsed.parts; + }, + canonicalize$1(_, path) { + var t1, parsed; + path = this.absolute$1(path); + t1 = this.style; + if (t1 !== $.$get$Style_windows() && !this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, t1); + parsed.normalize$1$canonicalize(true); + return parsed.toString$0(0); + }, + normalize$1(path) { + var parsed; + if (!this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.normalize$0(); + return parsed.toString$0(0); + }, + _needsNormalization$1(path) { + var i, start, previous, t2, t3, previousPrevious, codeUnit, t4, + t1 = this.style, + root = t1.rootLength$1(path); + if (root !== 0) { + if (t1 === $.$get$Style_windows()) + for (i = 0; i < root; ++i) + if (B.JSString_methods._codeUnitAt$1(path, i) === 47) + return true; + start = root; + previous = 47; + } else { + start = 0; + previous = null; + } + for (t2 = new A.CodeUnits(path).__internal$_string, t3 = t2.length, i = start, previousPrevious = null; i < t3; ++i, previousPrevious = previous, previous = codeUnit) { + codeUnit = B.JSString_methods.codeUnitAt$1(t2, i); + if (t1.isSeparator$1(codeUnit)) { + if (t1 === $.$get$Style_windows() && codeUnit === 47) + return true; + if (previous != null && t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t4 = previousPrevious == null || previousPrevious === 46 || t1.isSeparator$1(previousPrevious); + else + t4 = false; + if (t4) + return true; + } + } + if (previous == null) + return true; + if (t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t1 = previousPrevious == null || t1.isSeparator$1(previousPrevious) || previousPrevious === 46; + else + t1 = false; + if (t1) + return true; + return false; + }, + relative$2$from(path, from) { + var fromParsed, pathParsed, t2, t3, _this = this, + _s26_ = 'Unable to find a path to "', + t1 = from == null; + if (t1 && _this.style.rootLength$1(path) <= 0) + return _this.normalize$1(path); + if (t1) { + t1 = _this._context$_current; + from = t1 == null ? A.current() : t1; + } else + from = _this.absolute$1(from); + t1 = _this.style; + if (t1.rootLength$1(from) <= 0 && t1.rootLength$1(path) > 0) + return _this.normalize$1(path); + if (t1.rootLength$1(path) <= 0 || t1.isRootRelative$1(path)) + path = _this.absolute$1(path); + if (t1.rootLength$1(path) <= 0 && t1.rootLength$1(from) > 0) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + fromParsed = A.ParsedPath_ParsedPath$parse(from, t1); + fromParsed.normalize$0(); + pathParsed = A.ParsedPath_ParsedPath$parse(path, t1); + pathParsed.normalize$0(); + t2 = fromParsed.parts; + if (t2.length !== 0 && J.$eq$(t2[0], ".")) + return pathParsed.toString$0(0); + t2 = fromParsed.root; + t3 = pathParsed.root; + if (t2 != t3) + t2 = t2 == null || t3 == null || !t1.pathsEqual$2(t2, t3); + else + t2 = false; + if (t2) + return pathParsed.toString$0(0); + while (true) { + t2 = fromParsed.parts; + if (t2.length !== 0) { + t3 = pathParsed.parts; + t2 = t3.length !== 0 && t1.pathsEqual$2(t2[0], t3[0]); + } else + t2 = false; + if (!t2) + break; + B.JSArray_methods.removeAt$1(fromParsed.parts, 0); + B.JSArray_methods.removeAt$1(fromParsed.separators, 1); + B.JSArray_methods.removeAt$1(pathParsed.parts, 0); + B.JSArray_methods.removeAt$1(pathParsed.separators, 1); + } + t2 = fromParsed.parts; + if (t2.length !== 0 && J.$eq$(t2[0], "..")) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + t2 = type$.String; + B.JSArray_methods.insertAll$2(pathParsed.parts, 0, A.List_List$filled(fromParsed.parts.length, "..", false, t2)); + t3 = pathParsed.separators; + t3[0] = ""; + B.JSArray_methods.insertAll$2(t3, 1, A.List_List$filled(fromParsed.parts.length, t1.get$separator(t1), false, t2)); + t1 = pathParsed.parts; + t2 = t1.length; + if (t2 === 0) + return "."; + if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { + B.JSArray_methods.removeLast$0(pathParsed.parts); + t1 = pathParsed.separators; + t1.pop(); + t1.pop(); + t1.push(""); + } + pathParsed.root = ""; + pathParsed.removeTrailingSeparators$0(); + return pathParsed.toString$0(0); + }, + relative$1(path) { + return this.relative$2$from(path, null); + }, + _isWithinOrEquals$2($parent, child) { + var relative, t1, parentIsAbsolute, childIsAbsolute, childIsRootRelative, parentIsRootRelative, result, exception, _this = this; + $parent = $parent; + child = child; + t1 = _this.style; + parentIsAbsolute = t1.rootLength$1($parent) > 0; + childIsAbsolute = t1.rootLength$1(child) > 0; + if (parentIsAbsolute && !childIsAbsolute) { + child = _this.absolute$1(child); + if (t1.isRootRelative$1($parent)) + $parent = _this.absolute$1($parent); + } else if (childIsAbsolute && !parentIsAbsolute) { + $parent = _this.absolute$1($parent); + if (t1.isRootRelative$1(child)) + child = _this.absolute$1(child); + } else if (childIsAbsolute && parentIsAbsolute) { + childIsRootRelative = t1.isRootRelative$1(child); + parentIsRootRelative = t1.isRootRelative$1($parent); + if (childIsRootRelative && !parentIsRootRelative) + child = _this.absolute$1(child); + else if (parentIsRootRelative && !childIsRootRelative) + $parent = _this.absolute$1($parent); + } + result = _this._isWithinOrEqualsFast$2($parent, child); + if (result !== B._PathRelation_inconclusive) + return result; + relative = null; + try { + relative = _this.relative$2$from(child, $parent); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.PathException) + return B._PathRelation_different; + else + throw exception; + } + if (t1.rootLength$1(relative) > 0) + return B._PathRelation_different; + if (J.$eq$(relative, ".")) + return B._PathRelation_equal; + if (J.$eq$(relative, "..")) + return B._PathRelation_different; + return J.get$length$asx(relative) >= 3 && J.startsWith$1$s(relative, "..") && t1.isSeparator$1(J.codeUnitAt$1$s(relative, 2)) ? B._PathRelation_different : B._PathRelation_within; + }, + _isWithinOrEqualsFast$2($parent, child) { + var t1, parentRootLength, childRootLength, i, t2, t3, childIndex, parentIndex, lastCodeUnit, lastParentSeparator, parentCodeUnit, childCodeUnit, parentIndex0, direction, _this = this; + if ($parent === ".") + $parent = ""; + t1 = _this.style; + parentRootLength = t1.rootLength$1($parent); + childRootLength = t1.rootLength$1(child); + if (parentRootLength !== childRootLength) + return B._PathRelation_different; + for (i = 0; i < parentRootLength; ++i) + if (!t1.codeUnitsEqual$2(B.JSString_methods._codeUnitAt$1($parent, i), B.JSString_methods._codeUnitAt$1(child, i))) + return B._PathRelation_different; + t2 = child.length; + t3 = $parent.length; + childIndex = childRootLength; + parentIndex = parentRootLength; + lastCodeUnit = 47; + lastParentSeparator = null; + while (true) { + if (!(parentIndex < t3 && childIndex < t2)) + break; + c$0: { + parentCodeUnit = B.JSString_methods.codeUnitAt$1($parent, parentIndex); + childCodeUnit = B.JSString_methods.codeUnitAt$1(child, childIndex); + if (t1.codeUnitsEqual$2(parentCodeUnit, childCodeUnit)) { + if (t1.isSeparator$1(parentCodeUnit)) + lastParentSeparator = parentIndex; + ++parentIndex; + ++childIndex; + lastCodeUnit = parentCodeUnit; + break c$0; + } + if (t1.isSeparator$1(parentCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } else if (t1.isSeparator$1(childCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + break c$0; + } + if (parentCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++parentIndex; + if (parentIndex === t3) + break; + parentCodeUnit = B.JSString_methods.codeUnitAt$1($parent, parentIndex); + if (t1.isSeparator$1(parentCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } + if (parentCodeUnit === 46) { + ++parentIndex; + if (parentIndex === t3 || t1.isSeparator$1(B.JSString_methods.codeUnitAt$1($parent, parentIndex))) + return B._PathRelation_inconclusive; + } + } + if (childCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + if (childIndex === t2) + break; + childCodeUnit = B.JSString_methods.codeUnitAt$1(child, childIndex); + if (t1.isSeparator$1(childCodeUnit)) { + ++childIndex; + break c$0; + } + if (childCodeUnit === 46) { + ++childIndex; + if (childIndex === t2 || t1.isSeparator$1(B.JSString_methods.codeUnitAt$1(child, childIndex))) + return B._PathRelation_inconclusive; + } + } + if (_this._pathDirection$2(child, childIndex) !== B._PathDirection_988) + return B._PathRelation_inconclusive; + if (_this._pathDirection$2($parent, parentIndex) !== B._PathDirection_988) + return B._PathRelation_inconclusive; + return B._PathRelation_different; + } + } + if (childIndex === t2) { + if (parentIndex === t3 || t1.isSeparator$1(B.JSString_methods.codeUnitAt$1($parent, parentIndex))) + lastParentSeparator = parentIndex; + else if (lastParentSeparator == null) + lastParentSeparator = Math.max(0, parentRootLength - 1); + direction = _this._pathDirection$2($parent, lastParentSeparator); + if (direction === B._PathDirection_8Gl) + return B._PathRelation_equal; + return direction === B._PathDirection_ZGD ? B._PathRelation_inconclusive : B._PathRelation_different; + } + direction = _this._pathDirection$2(child, childIndex); + if (direction === B._PathDirection_8Gl) + return B._PathRelation_equal; + if (direction === B._PathDirection_ZGD) + return B._PathRelation_inconclusive; + return t1.isSeparator$1(B.JSString_methods.codeUnitAt$1(child, childIndex)) || t1.isSeparator$1(lastCodeUnit) ? B._PathRelation_within : B._PathRelation_different; + }, + _pathDirection$2(path, index) { + var t1, t2, i, depth, reachedRoot, i0, t3; + for (t1 = path.length, t2 = this.style, i = index, depth = 0, reachedRoot = false; i < t1;) { + while (true) { + if (!(i < t1 && t2.isSeparator$1(B.JSString_methods.codeUnitAt$1(path, i)))) + break; + ++i; + } + if (i === t1) + break; + i0 = i; + while (true) { + if (!(i0 < t1 && !t2.isSeparator$1(B.JSString_methods.codeUnitAt$1(path, i0)))) + break; + ++i0; + } + t3 = i0 - i; + if (!(t3 === 1 && B.JSString_methods.codeUnitAt$1(path, i) === 46)) + if (t3 === 2 && B.JSString_methods.codeUnitAt$1(path, i) === 46 && B.JSString_methods.codeUnitAt$1(path, i + 1) === 46) { + --depth; + if (depth < 0) + break; + if (depth === 0) + reachedRoot = true; + } else + ++depth; + if (i0 === t1) + break; + i = i0 + 1; + } + if (depth < 0) + return B._PathDirection_ZGD; + if (depth === 0) + return B._PathDirection_8Gl; + if (reachedRoot) + return B._PathDirection_FIw; + return B._PathDirection_988; + }, + hash$1(path) { + var result, parsed, t1, _this = this; + path = _this.absolute$1(path); + result = _this._hashFast$1(path); + if (result != null) + return result; + parsed = A.ParsedPath_ParsedPath$parse(path, _this.style); + parsed.normalize$0(); + t1 = _this._hashFast$1(parsed.toString$0(0)); + t1.toString; + return t1; + }, + _hashFast$1(path) { + var t1, t2, hash, beginning, wasSeparator, i, codeUnit, t3, next; + for (t1 = path.length, t2 = this.style, hash = 4603, beginning = true, wasSeparator = true, i = 0; i < t1; ++i) { + codeUnit = t2.canonicalizeCodeUnit$1(B.JSString_methods._codeUnitAt$1(path, i)); + if (t2.isSeparator$1(codeUnit)) { + wasSeparator = true; + continue; + } + if (codeUnit === 46 && wasSeparator) { + t3 = i + 1; + if (t3 === t1) + break; + next = B.JSString_methods._codeUnitAt$1(path, t3); + if (t2.isSeparator$1(next)) + continue; + if (!beginning) + if (next === 46) { + t3 = i + 2; + t3 = t3 === t1 || t2.isSeparator$1(B.JSString_methods._codeUnitAt$1(path, t3)); + } else + t3 = false; + else + t3 = false; + if (t3) + return null; + } + hash = ((hash & 67108863) * 33 ^ codeUnit) >>> 0; + beginning = false; + wasSeparator = false; + } + return hash; + }, + withoutExtension$1(path) { + var i, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + for (i = parsed.parts.length - 1; i >= 0; --i) + if (J.get$length$asx(parsed.parts[i]) !== 0) { + parsed.parts[i] = parsed._splitExtension$0()[0]; + break; + } + return parsed.toString$0(0); + }, + toUri$1(path) { + var t2, + t1 = this.style; + if (t1.rootLength$1(path) <= 0) + return t1.relativePathToUri$1(path); + else { + t2 = this._context$_current; + return t1.absolutePathToUri$1(this.join$2(0, t2 == null ? A.current() : t2, path)); + } + }, + prettyUri$1(uri) { + var path, rel, _this = this, + typedUri = A._parseUri(uri); + if (typedUri.get$scheme() === "file" && _this.style === $.$get$Style_url()) + return typedUri.toString$0(0); + else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && _this.style !== $.$get$Style_url()) + return typedUri.toString$0(0); + path = _this.normalize$1(_this.style.pathFromUri$1(A._parseUri(typedUri))); + rel = _this.relative$1(path); + return _this.split$1(0, rel).length > _this.split$1(0, path).length ? path : rel; + } + }; + A.Context_joinAll_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 8 + }; + A.Context_split_closure.prototype = { + call$1(part) { + return part.length !== 0; + }, + $signature: 8 + }; + A._validateArgList_closure.prototype = { + call$1(arg) { + return arg == null ? "null" : '"' + arg + '"'; + }, + $signature: 290 + }; + A._PathDirection.prototype = { + toString$0(_) { + return this.name; + } + }; + A._PathRelation.prototype = { + toString$0(_) { + return this.name; + } + }; + A.InternalStyle.prototype = { + getRoot$1(path) { + var $length = this.rootLength$1(path); + if ($length > 0) + return B.JSString_methods.substring$2(path, 0, $length); + return this.isRootRelative$1(path) ? path[0] : null; + }, + relativePathToUri$1(path) { + var segments, _null = null, + t1 = path.length; + if (t1 === 0) + return A._Uri__Uri(_null, _null, _null, _null); + segments = A.Context_Context(this).split$1(0, path); + if (this.isSeparator$1(B.JSString_methods.codeUnitAt$1(path, t1 - 1))) + B.JSArray_methods.add$1(segments, ""); + return A._Uri__Uri(_null, _null, segments, _null); + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + return codeUnit1 === codeUnit2; + }, + pathsEqual$2(path1, path2) { + return path1 === path2; + }, + canonicalizeCodeUnit$1(codeUnit) { + return codeUnit; + }, + canonicalizePart$1(part) { + return part; + } + }; + A.ParsedPath.prototype = { + get$basename() { + var _this = this, + t1 = type$.String, + copy = new A.ParsedPath(_this.style, _this.root, _this.isRootRelative, A.List_List$from(_this.parts, true, t1), A.List_List$from(_this.separators, true, t1)); + copy.removeTrailingSeparators$0(); + t1 = copy.parts; + if (t1.length === 0) { + t1 = _this.root; + return t1 == null ? "" : t1; + } + return B.JSArray_methods.get$last(t1); + }, + get$hasTrailingSeparator() { + var t1 = this.parts; + if (t1.length !== 0) + t1 = J.$eq$(B.JSArray_methods.get$last(t1), "") || !J.$eq$(B.JSArray_methods.get$last(this.separators), ""); + else + t1 = false; + return t1; + }, + removeTrailingSeparators$0() { + var t1, t2, _this = this; + while (true) { + t1 = _this.parts; + if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) + break; + B.JSArray_methods.removeLast$0(_this.parts); + _this.separators.pop(); + } + t1 = _this.separators; + t2 = t1.length; + if (t2 !== 0) + t1[t2 - 1] = ""; + }, + normalize$1$canonicalize(canonicalize) { + var t1, t2, t3, leadingDoubles, _i, part, t4, _this = this, + newParts = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.parts, t2 = t1.length, t3 = _this.style, leadingDoubles = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + part = t1[_i]; + t4 = J.getInterceptor$(part); + if (!(t4.$eq(part, ".") || t4.$eq(part, ""))) + if (t4.$eq(part, "..")) + if (newParts.length !== 0) + newParts.pop(); + else + ++leadingDoubles; + else + newParts.push(canonicalize ? t3.canonicalizePart$1(part) : part); + } + if (_this.root == null) + B.JSArray_methods.insertAll$2(newParts, 0, A.List_List$filled(leadingDoubles, "..", false, type$.String)); + if (newParts.length === 0 && _this.root == null) + newParts.push("."); + _this.parts = newParts; + _this.separators = A.List_List$filled(newParts.length + 1, t3.get$separator(t3), true, type$.String); + t1 = _this.root; + if (t1 == null || newParts.length === 0 || !t3.needsSeparator$1(t1)) + _this.separators[0] = ""; + t1 = _this.root; + if (t1 != null && t3 === $.$get$Style_windows()) { + if (canonicalize) + t1 = _this.root = t1.toLowerCase(); + t1.toString; + _this.root = A.stringReplaceAllUnchecked(t1, "/", "\\"); + } + _this.removeTrailingSeparators$0(); + }, + normalize$0() { + return this.normalize$1$canonicalize(false); + }, + toString$0(_) { + var i, _this = this, + t1 = _this.root; + t1 = t1 != null ? "" + t1 : ""; + for (i = 0; i < _this.parts.length; ++i) + t1 = t1 + A.S(_this.separators[i]) + A.S(_this.parts[i]); + t1 += A.S(B.JSArray_methods.get$last(_this.separators)); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _kthLastIndexOf$3(path, character, k) { + var index, count, leftMostIndexedCharacter; + for (index = path.length - 1, count = 0, leftMostIndexedCharacter = 0; index >= 0; --index) + if (path[index] === character) { + ++count; + if (count === k) + return index; + leftMostIndexedCharacter = index; + } + return leftMostIndexedCharacter; + }, + _splitExtension$1(level) { + var t1, file, lastDot; + if (level <= 0) + throw A.wrapException(A.RangeError$value(level, "level", "level's value must be greater than 0")); + t1 = this.parts; + t1 = new A.CastList(t1, A._arrayInstanceType(t1)._eval$1("CastList<1,String?>")); + file = t1.lastWhere$2$orElse(t1, new A.ParsedPath__splitExtension_closure(), new A.ParsedPath__splitExtension_closure0()); + if (file == null) + return A._setArrayType(["", ""], type$.JSArray_String); + if (file === "..") + return A._setArrayType(["..", ""], type$.JSArray_String); + lastDot = this._kthLastIndexOf$3(file, ".", level); + if (lastDot <= 0) + return A._setArrayType([file, ""], type$.JSArray_String); + return A._setArrayType([B.JSString_methods.substring$2(file, 0, lastDot), B.JSString_methods.substring$1(file, lastDot)], type$.JSArray_String); + }, + _splitExtension$0() { + return this._splitExtension$1(1); + } + }; + A.ParsedPath__splitExtension_closure.prototype = { + call$1(p) { + return p !== ""; + }, + $signature: 166 + }; + A.ParsedPath__splitExtension_closure0.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.PathException.prototype = { + toString$0(_) { + return "PathException: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.PathMap.prototype = {}; + A.PathMap__create_closure.prototype = { + call$2(path1, path2) { + if (path1 == null) + return path2 == null; + if (path2 == null) + return false; + return this._box_0.context._isWithinOrEquals$2(path1, path2) === B._PathRelation_equal; + }, + $signature: 299 + }; + A.PathMap__create_closure0.prototype = { + call$1(path) { + return path == null ? 0 : this._box_0.context.hash$1(path); + }, + $signature: 307 + }; + A.PathMap__create_closure1.prototype = { + call$1(path) { + return typeof path == "string" || path == null; + }, + $signature: 137 + }; + A.Style.prototype = { + toString$0(_) { + return this.get$name(this); + } + }; + A.PosixStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + return t1 !== 0 && B.JSString_methods.codeUnitAt$1(path, t1 - 1) !== 47; + }, + rootLength$2$withDrive(path, withDrive) { + if (path.length !== 0 && B.JSString_methods._codeUnitAt$1(path, 0) === 47) + return 1; + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return false; + }, + pathFromUri$1(uri) { + var t1; + if (uri.get$scheme() === "" || uri.get$scheme() === "file") { + t1 = uri.get$path(uri); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + } + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + }, + absolutePathToUri$1(path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.parts; + if (t1.length === 0) + B.JSArray_methods.addAll$1(t1, A._setArrayType(["", ""], type$.JSArray_String)); + else if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(null, null, parsed.parts, "file"); + }, + get$name() { + return "posix"; + }, + get$separator() { + return "/"; + } + }; + A.UrlStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + if (B.JSString_methods.codeUnitAt$1(path, t1 - 1) !== 47) + return true; + return B.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; + }, + rootLength$2$withDrive(path, withDrive) { + var i, codeUnit, index, t2, + t1 = path.length; + if (t1 === 0) + return 0; + if (B.JSString_methods._codeUnitAt$1(path, 0) === 47) + return 1; + for (i = 0; i < t1; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(path, i); + if (codeUnit === 47) + return 0; + if (codeUnit === 58) { + if (i === 0) + return 0; + index = B.JSString_methods.indexOf$2(path, "/", B.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); + if (index <= 0) + return t1; + if (!withDrive || t1 < index + 3) + return index; + if (!B.JSString_methods.startsWith$1(path, "file://")) + return index; + if (!A.isDriveLetter(path, index + 1)) + return index; + t2 = index + 3; + return t1 === t2 ? t2 : index + 4; + } + } + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return path.length !== 0 && B.JSString_methods._codeUnitAt$1(path, 0) === 47; + }, + pathFromUri$1(uri) { + return uri.toString$0(0); + }, + relativePathToUri$1(path) { + return A.Uri_parse(path); + }, + absolutePathToUri$1(path) { + return A.Uri_parse(path); + }, + get$name() { + return "url"; + }, + get$separator() { + return "/"; + } + }; + A.WindowsStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47 || codeUnit === 92; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + t1 = B.JSString_methods.codeUnitAt$1(path, t1 - 1); + return !(t1 === 47 || t1 === 92); + }, + rootLength$2$withDrive(path, withDrive) { + var t2, index, + t1 = path.length; + if (t1 === 0) + return 0; + t2 = B.JSString_methods._codeUnitAt$1(path, 0); + if (t2 === 47) + return 1; + if (t2 === 92) { + if (t1 < 2 || B.JSString_methods._codeUnitAt$1(path, 1) !== 92) + return 1; + index = B.JSString_methods.indexOf$2(path, "\\", 2); + if (index > 0) { + index = B.JSString_methods.indexOf$2(path, "\\", index + 1); + if (index > 0) + return index; + } + return t1; + } + if (t1 < 3) + return 0; + if (!A.isAlphabetic(t2)) + return 0; + if (B.JSString_methods._codeUnitAt$1(path, 1) !== 58) + return 0; + t1 = B.JSString_methods._codeUnitAt$1(path, 2); + if (!(t1 === 47 || t1 === 92)) + return 0; + return 3; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return this.rootLength$1(path) === 1; + }, + pathFromUri$1(uri) { + var path, t1; + if (uri.get$scheme() !== "" && uri.get$scheme() !== "file") + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + path = uri.get$path(uri); + if (uri.get$host() === "") { + if (path.length >= 3 && B.JSString_methods.startsWith$1(path, "/") && A.isDriveLetter(path, 1)) + path = B.JSString_methods.replaceFirst$2(path, "/", ""); + } else + path = "\\\\" + uri.get$host() + path; + t1 = A.stringReplaceAllUnchecked(path, "/", "\\"); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + }, + absolutePathToUri$1(path) { + var rootParts, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.root; + t1.toString; + if (B.JSString_methods.startsWith$1(t1, "\\\\")) { + rootParts = new A.WhereIterable(A._setArrayType(t1.split("\\"), type$.JSArray_String), new A.WindowsStyle_absolutePathToUri_closure(), type$.WhereIterable_String); + B.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(rootParts)); + if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(rootParts.get$first(rootParts), null, parsed.parts, "file"); + } else { + if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + t1 = parsed.parts; + t2 = parsed.root; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "/", ""); + B.JSArray_methods.insert$2(t1, 0, A.stringReplaceAllUnchecked(t2, "\\", "")); + return A._Uri__Uri(null, null, parsed.parts, "file"); + } + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + var upperCase1; + if (codeUnit1 === codeUnit2) + return true; + if (codeUnit1 === 47) + return codeUnit2 === 92; + if (codeUnit1 === 92) + return codeUnit2 === 47; + if ((codeUnit1 ^ codeUnit2) !== 32) + return false; + upperCase1 = codeUnit1 | 32; + return upperCase1 >= 97 && upperCase1 <= 122; + }, + pathsEqual$2(path1, path2) { + var t1, i; + if (path1 === path2) + return true; + t1 = path1.length; + if (t1 !== path2.length) + return false; + for (i = 0; i < t1; ++i) + if (!this.codeUnitsEqual$2(B.JSString_methods._codeUnitAt$1(path1, i), B.JSString_methods._codeUnitAt$1(path2, i))) + return false; + return true; + }, + canonicalizeCodeUnit$1(codeUnit) { + if (codeUnit === 47) + return 92; + if (codeUnit < 65) + return codeUnit; + if (codeUnit > 90) + return codeUnit; + return codeUnit | 32; + }, + canonicalizePart$1(part) { + return part.toLowerCase(); + }, + get$name() { + return "windows"; + }, + get$separator() { + return "\\"; + } + }; + A.WindowsStyle_absolutePathToUri_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 8 + }; + A.CssMediaQuery.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_unrepresentable; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$condition(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_empty; + else + return B._SingletonCssMediaQueryMergeResult_unrepresentable; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_) || t6 || A.equalsIgnoreCase(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_unrepresentable; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_unrepresentable; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_unrepresentable; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase(t5, _s3_)) { + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_empty; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$type(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? "" + (t1 + " ") : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult.prototype = { + toString$0(_) { + return this._media_query$_name; + } + }; + A.MediaQuerySuccessfulMergeResult.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.ModifiableCssAtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild(child); + }, + $isCssAtRule: 1, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssComment.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssImport.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssKeyframeBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssMediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$(this.queries, this.span); + }, + $isCssMediaRule: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssNode.prototype = { + get$hasFollowingSibling() { + var t2, + t1 = this._parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListMixin.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false); + }, + $signature: 136 + }; + A.ModifiableCssParentNode.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._parent = this; + t1 = this._children; + child._indexInParent = t1.length; + t1.push(child); + }, + $isCssParentNode: 1, + get$children(receiver) { + return this.children; + } + }; + A.ModifiableCssStyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$(this.selector, this.span, this.originalSelector); + }, + $isCssStyleRule: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$(this.span); + }, + $isCssStylesheet: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssSupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$(this.condition, this.span); + }, + $isCssSupportsRule: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssValue.prototype = { + toString$0(_) { + return A.serializeSelector(this.value, true); + }, + $isCssValue: 1, + $isAstNode: 1, + get$value(receiver) { + return this.value; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssNode.prototype = { + toString$0(_) { + return A.serialize(this, true, null, true, null, false, null, true).css; + } + }; + A.CssParentNode.prototype = {}; + A._IsInvisibleVisitor.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && B.JSString_methods._codeUnitAt$1(comment.text, 2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule.selector.value; + return (this.includeBogus ? t1.accept$1(B._IsInvisibleVisitor_true) : t1.accept$1(B._IsInvisibleVisitor_false)) || this.super$EveryCssVisitor$visitCssStyleRule(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor.prototype = {}; + A.CssStylesheet.prototype = { + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssValue.prototype = { + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode: 1, + get$value(receiver) { + return this.value; + }, + get$span(receiver) { + return this.span; + } + }; + A.AstNode.prototype = {}; + A._FakeAstNode.prototype = { + get$span(_) { + return this._callback.call$0(); + }, + $isAstNode: 1 + }; + A.Argument.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration.prototype = { + get$spanWithName() { + var t3, t4, + t1 = this.span, + t2 = t1.file, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), + i = A.FileLocation$_(t2, t1._file$_start).offset - 1; + while (true) { + if (i > 0) { + t3 = B.JSString_methods.codeUnitAt$1(text, i); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = B.JSString_methods.codeUnitAt$1(text, i); + if (!(t3 === 95 || A.isAlphabetic0(t3) || t3 >= 128 || A.isDigit(t3) || t3 === 45)) + return t1; + --i; + while (true) { + if (i >= 0) { + t3 = B.JSString_methods.codeUnitAt$1(text, i); + if (t3 !== 95) { + if (!(t3 >= 97 && t3 <= 122)) + t4 = t3 >= 65 && t3 <= 90; + else + t4 = true; + t4 = t4 || t3 >= 128; + } else + t4 = true; + if (!t4) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = i + 1; + t4 = B.JSString_methods.codeUnitAt$1(text, t3); + if (!(t4 === 95 || A.isAlphabetic0(t4) || t4 >= 128)) + return t1; + return A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, + _s10_ = "invocation", + _s8_ = "argument"; + for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + t4 = argument.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$("Argument " + _this._originalArgumentName$1(t4) + string$.x20was_p, null)); + } else { + t4 = argument.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (argument.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$("Missing argument " + _this._originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restArgument != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(names) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$("Only " + t2 + " " + t1 + A.pluralize(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$("No " + A.pluralize(_s8_, unknownNames._collection$_length, null) + " named " + A.S(A.toSentence(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure0(), type$.Object), "or")) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _originalArgumentName$1($name) { + var t1, text, t2, _i, argument, t3, t4, end, _null = null; + if ($name === this.restArgument) { + t1 = this.span; + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, _null); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (argument.name === $name) { + t1 = argument.defaultValue; + t2 = argument.span; + t3 = t2.file; + t4 = t2._file$_start; + t2 = t2._end; + if (t1 == null) { + t1 = t3._decodedChars; + t1 = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + } else { + t1 = t3._decodedChars; + text = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', _null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument; + for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + if (t3.containsKey$1(argument.name)) + return false; + } else if (t3.containsKey$1(argument.name)) + ++namedUsed; + else if (argument.defaultValue == null) + return false; + } + if (this.restArgument != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + A.S(t2[_i])); + t2 = this.restArgument; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration_verify_closure.prototype = { + call$1(argument) { + return argument.name; + }, + $signature: 309 + }; + A.ArgumentDeclaration_verify_closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A.ArgumentInvocation.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, t4, _this = this, + t1 = A.List_List$of(_this.positional, true, type$.Object); + for (t2 = _this.named, t3 = J.get$iterator$ax(t2.get$keys(t2)); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t1.push("$" + t4 + ": " + A.S(t2.$index(0, t4))); + } + t2 = _this.rest; + if (t2 != null) + t1.push(t2.toString$0(0) + "..."); + t2 = _this.keywordRest; + if (t2 != null) + t1.push(t2.toString$0(0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.AtRootQuery.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._all) + return !_this.include; + if (type$.CssStyleRule._is(node)) + return _this._at_root_query$_rule !== _this.include; + if (type$.CssMediaRule._is(node)) + return _this.excludesName$1("media"); + if (type$.CssSupportsRule._is(node)) + return _this.excludesName$1("supports"); + if (type$.CssAtRule._is(node)) { + t1 = node.name; + return _this.excludesName$1(t1.get$value(t1).toLowerCase()); + } + return false; + }, + excludesName$1($name) { + var t1 = this._all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.ConfiguredVariable.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.BinaryOperationExpression.prototype = { + get$span(_) { + var right, + left = this.left; + for (; left instanceof A.BinaryOperationExpression;) + left = left.left; + right = this.right; + for (; right instanceof A.BinaryOperationExpression;) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, right, rightNeedsParens, _this = this, + left = _this.left, + leftNeedsParens = left instanceof A.BinaryOperationExpression && left.operator.precedence < _this.operator.precedence, + t1 = leftNeedsParens ? "" + A.Primitives_stringFromCharCode(40) : ""; + t1 += left.toString$0(0); + if (leftNeedsParens) + t1 += A.Primitives_stringFromCharCode(41); + t2 = _this.operator; + t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); + right = _this.right; + rightNeedsParens = right instanceof A.BinaryOperationExpression && right.operator.precedence <= t2.precedence; + if (rightNeedsParens) + t1 += A.Primitives_stringFromCharCode(40); + t1 += right.toString$0(0); + if (rightNeedsParens) + t1 += A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isExpression: 1 + }; + A.BinaryOperator.prototype = { + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.CalculationExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitCalculationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name + "(" + B.JSArray_methods.join$1(this.$arguments, ", ") + ")"; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.CalculationExpression__verifyArguments_closure.prototype = { + call$1(arg) { + A.CalculationExpression__verify(arg); + return arg; + }, + $signature: 311 + }; + A.ColorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(this.value, true, true); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.FunctionExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.IfExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedFunctionExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.hasBrackets, + t2 = t1 ? "" + A.Primitives_stringFromCharCode(91) : "", + t3 = _this.contents, + t4 = _this.separator === B.ListSeparator_rXA ? ", " : " "; + t4 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t4); + t1 = t1 ? t4 + A.Primitives_stringFromCharCode(93) : t4; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list0$_elementNeedsParens$1(expression) { + var t1; + if (expression instanceof A.ListExpression) { + if (expression.contents.length < 2) + return false; + if (expression.hasBrackets) + return false; + t1 = expression.separator; + return this.separator === B.ListSeparator_rXA ? t1 === B.ListSeparator_rXA : t1 !== B.ListSeparator_undecided_null_undecided; + } + if (this.separator !== B.ListSeparator_EVt) + return false; + if (expression instanceof A.UnaryOperationExpression) { + t1 = expression.operator; + return t1 === B.UnaryOperator_gg4 || t1 === B.UnaryOperator_TLI; + } + return false; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure.prototype = { + call$1(element) { + return this.$this._list0$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 135 + }; + A.MapExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.pairs; + return "(" + new A.MappedListIterable(t1, new A.MapExpression_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.MapExpression_toString_closure.prototype = { + call$1(pair) { + return A.S(pair.item1) + ": " + A.S(pair.item2); + }, + $signature: 318 + }; + A.NullExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.NumberExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(A.SassNumber_SassNumber(this.value, this.unit), true, true); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParenthesizedExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.SelectorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.StringExpression.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, buffer, t5, t6, _i, value; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + A.Primitives_stringFromCharCode(quote); + for (t5 = t2.length, t6 = type$.Expression, _i = 0; _i < t5; ++_i) { + value = t2[_i]; + if (t6._is(value)) { + buffer._flushText$0(); + t4.push(value); + } else if (typeof value == "string") + A.StringExpression__quoteInnerText(value, quote, buffer, $static); + } + t3._contents += A.Primitives_stringFromCharCode(quote); + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + }, + $isAstNode: 1, + $isExpression: 1 + }; + A.SupportsExpression.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + }, + $isAstNode: 1, + $isExpression: 1 + }; + A.UnaryOperationExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_not ? t2 + A.Primitives_stringFromCharCode(32) : t2; + t1 += this.operand.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator.prototype = { + toString$0(_) { + return this.name; + } + }; + A.ValueExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(this.value, true, true); + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.VariableExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? "$" + t2 : t1 + ".$" + t2; + }, + $isAstNode: 1, + $isExpression: 1, + get$span(receiver) { + return this.span; + } + }; + A.DynamicImport.prototype = { + toString$0(_) { + return A.StringExpression_quoteText(this.urlString); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.StaticImport.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation.prototype = { + get$asPlain() { + var first, + t1 = this.contents, + t2 = t1.length; + if (t2 === 0) + return ""; + if (t2 > 1) + return null; + first = B.JSArray_methods.get$first(t1); + return typeof first == "string" ? first : null; + }, + get$initialPlain() { + var first = B.JSArray_methods.get$first(this.contents); + return typeof first == "string" ? first : ""; + }, + Interpolation$2(contents, span) { + var t1, t2, t3, i, t4, t5, + _s8_ = "contents"; + for (t1 = this.contents, t2 = t1.length, t3 = type$.Expression, i = 0; i < t2; ++i) { + t4 = t1[i]; + t5 = typeof t4 == "string"; + if (!t5 && !t3._is(t4)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, string$.May_on)); + if (i !== 0 && typeof t1[i - 1] == "string" && t5) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 46 + }; + A.AtRootRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + t1 = this.children; + return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CallableDeclaration.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, + t1 = this.$arguments; + t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; + t2 = this.children; + return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + } + }; + A.ContentRule.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(t1) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.DebugRule.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.Declaration.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t3, children, + buffer = new A.StringBuffer(""), + t1 = this.name, + t2 = "" + t1.toString$0(0); + buffer._contents = t2; + t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); + t3 = this.value; + if (t3 != null) { + t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; + buffer._contents = t1 + t3.toString$0(0); + } + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables, + t2 = this.children; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 5 + }; + A.ErrorRule.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.ExtendRule.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.ForRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through", + t3 = _this.children; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else { + if (hiddenMixinsAndFunctions != null) { + t2 = hiddenMixinsAndFunctions._base; + t2 = t2.get$isNotEmpty(t2); + } else + t2 = false; + if (t2) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); + for (t2 = variables._base, t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push("$" + t2.get$current(t2)); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.FunctionRule.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + } + }; + A.IfRule.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure(), type$.IfClause, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 335 + }; + A.IfRuleClause.prototype = {}; + A.IfRuleClause$__closure.prototype = { + call$1(child) { + var t1; + if (!(child instanceof A.VariableDeclaration)) + if (!(child instanceof A.FunctionRule)) + if (!(child instanceof A.MixinRule)) + t1 = child instanceof A.ImportRule && B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure()); + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + $signature: 202 + }; + A.IfRuleClause$___closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 217 + }; + A.IfClause.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImportRule.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.IncludeRule.prototype = { + get$spanWithoutContent() { + var t2, t3, + t1 = this.span; + if (!(this.content == null)) { + t2 = t1.file; + t3 = this.$arguments.span; + t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); + t1 = t3; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(t2)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.LoudComment.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + }, + $isAstNode: 1, + $isStatement: 1 + }; + A.MediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MixinRule.prototype = { + get$hasContent() { + var result, _this = this, + value = _this.__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor.visitChildren$1(_this.children), true); + _this.__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.$arguments; + if (!(t2.$arguments.length === 0 && t2.restArgument == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = this.children; + t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._HasContentVisitor.prototype = { + visitContentRule$1(_) { + return true; + } + }; + A.__HasContentVisitor_Object_StatementSearchVisitor.prototype = {}; + A.ParentStatement.prototype = {$isAstNode: 1, $isStatement: 1}; + A.ParentStatement_closure.prototype = { + call$1(child) { + var t1; + if (!(child instanceof A.VariableDeclaration)) + if (!(child instanceof A.FunctionRule)) + if (!(child instanceof A.MixinRule)) + t1 = child instanceof A.ImportRule && B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure()); + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + $signature: 202 + }; + A.ParentStatement__closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 217 + }; + A.ReturnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.SilentComment.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Stylesheet.prototype = { + Stylesheet$internal$3$plainCss(children, span, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._forwards, t4 = this._uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule) + t4.push(child); + else if (child instanceof A.ForwardRule) + t3.push(child); + else if (!(child instanceof A.SilentComment) && !(child instanceof A.LoudComment) && !(child instanceof A.VariableDeclaration)) + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return (t1 && B.JSArray_methods).join$1(t1, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.UseRule.prototype = { + UseRule$4$configuration(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + $isAstNode: 1, + $isStatement: 1, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsAnything.prototype = { + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration.prototype = { + get$isCustomProperty() { + var $name = this.name; + return $name instanceof A.StringExpression && !$name.hasQuotes && B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsFunction.prototype = { + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsInterpolation.prototype = { + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsNegation.prototype = { + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation || t1 instanceof A.SupportsOperation) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsOperation.prototype = { + toString$0(_) { + var _this = this; + return _this._operation$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation$_parenthesize$1(_this.right); + }, + _operation$_parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + t1 = condition instanceof A.SupportsOperation && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Selector.prototype = { + assertNotBogus$1$name($name) { + var t1; + if (!this.accept$1(B._IsBogusVisitor_true)) + return; + t1 = this.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, "$" + $name + ": " + (t1 + string$.x20is_nov), true); + }, + toString$0(_) { + var visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + this.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + } + }; + A._IsInvisibleVisitor0.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(placeholder) { + return true; + }, + visitPseudoSelector$1(pseudo) { + var t1, + selector = pseudo.selector; + if (selector == null) + return false; + if (pseudo.name === "not") + t1 = this.includeBogus && selector.accept$1(B._IsBogusVisitor_true); + else + t1 = this.visitSelectorList$1(selector); + return t1; + } + }; + A._IsBogusVisitor.prototype = { + visitComplexSelector$1(complex) { + var t2, t3, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = complex.leadingCombinators; + t3 = this.includeLeadingCombinator ? 0 : 1; + return t2.length > t3 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure(this)); + } + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false) : selector.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 45 + }; + A._IsUselessVisitor.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure(this)); + }, + visitPseudoSelector$1(pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 45 + }; + A.__IsBogusVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor.prototype = {}; + A.AttributeSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator.prototype = { + toString$0(_) { + return this._attribute$_text; + } + }; + A.ClassSelector.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector(this.name + suffix); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.Combinator.prototype = { + toString$0(_) { + return this._combinator$_text; + } + }; + A.ComplexSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure()); + _this.__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + if (this.leadingCombinators.length === 0) { + var t1 = this.components; + t1 = t1.length === 1 && B.JSArray_methods.get$first(t1).combinators.length === 0; + } else + t1 = false; + return t1 ? B.JSArray_methods.get$first(this.components).selector : null; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1, t2, t3, _this = this; + if (combinators.length === 0) + return _this; + else { + t1 = _this.components; + t2 = _this.leadingCombinators; + if (t1.length === 0) { + t1 = A.List_List$of(t2, true, type$.Combinator); + B.JSArray_methods.addAll$1(t1, combinators); + return A.ComplexSelector$(t1, B.List_empty2, _this.lineBreak || false); + } else { + t3 = A.List_List$of(A.IterableExtension_get_exceptLast(t1), true, type$.ComplexSelectorComponent); + t3.push(B.JSArray_methods.get$last(t1).withAdditionalCombinators$1(combinators)); + return A.ComplexSelector$(t2, t3, _this.lineBreak || false); + } + } + }, + concatenate$2$forceLineBreak(child, forceLineBreak) { + var t2, t3, t4, t5, _this = this, + t1 = child.leadingCombinators; + if (t1.length === 0) { + t1 = A.List_List$of(_this.components, true, type$.ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(_this.leadingCombinators, t1, t2); + } else { + t2 = _this.components; + t3 = _this.leadingCombinators; + t4 = child.components; + if (t2.length === 0) { + t2 = A.List_List$of(t3, true, type$.Combinator); + B.JSArray_methods.addAll$1(t2, t1); + return A.ComplexSelector$(t2, t4, _this.lineBreak || child.lineBreak || forceLineBreak); + } else { + t5 = A.List_List$of(A.IterableExtension_get_exceptLast(t2), true, type$.ComplexSelectorComponent); + t5.push(B.JSArray_methods.get$last(t2).withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t5, t4); + return A.ComplexSelector$(t3, t5, _this.lineBreak || child.lineBreak || forceLineBreak); + } + } + }, + concatenate$1(child) { + return this.concatenate$2$forceLineBreak(child, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 369 + }; + A.ComplexSelectorComponent.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2; + if (combinators.length === 0) + t1 = this; + else { + t1 = type$.Combinator; + t2 = A.List_List$of(this.combinators, true, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent(this.selector, A.List_List$unmodifiable(t2, t1)); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 452 + }; + A.CompoundSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure()); + _this.__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 484 + }; + A.IDSelector.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector(this.name + suffix); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure(this))) + return null; + return this.super$SimpleSelector$unify(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector) { + t1 = simple.name; + t1 = this.$this.name !== t1; + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.SelectorList.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_rXA, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, _i0, t7, + t1 = type$.JSArray_ComplexSelector, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (_i0 = 0; _i0 < t6; ++_i0) { + t7 = A.unifyComplex(A._setArrayType([complex1, t5[_i0]], t1)); + if (t7 != null) + B.JSArray_methods.addAll$1(t2, t7); + } + } + return t2.length === 0 ? null : A.SelectorList$(t2); + }, + resolveParentSelectors$2$implicitParent($parent, implicitParent) { + var t1, _this = this; + if ($parent == null) { + if (!B.JSArray_methods.any$1(_this.components, _this.get$_complexContainsParentSelector())) + return _this; + throw A.wrapException(A.SassScriptException$(string$.Top_le, null)); + } + t1 = _this.components; + return A.SelectorList$(A.flattenVertically(new A.MappedListIterable(t1, new A.SelectorList_resolveParentSelectors_closure(_this, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector)); + }, + resolveParentSelectors$1($parent) { + return this.resolveParentSelectors$2$implicitParent($parent, true); + }, + _complexContainsParentSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.SelectorList__complexContainsParentSelector_closure()); + }, + _resolveParentSelectorsCompound$2(component, $parent) { + var resolvedSimples, parentSelector, t1, + simples = component.selector.components, + containsSelectorPseudo = B.JSArray_methods.any$1(simples, new A.SelectorList__resolveParentSelectorsCompound_closure()); + if (!containsSelectorPseudo && !(B.JSArray_methods.get$first(simples) instanceof A.ParentSelector)) + return null; + resolvedSimples = containsSelectorPseudo ? new A.MappedListIterable(simples, new A.SelectorList__resolveParentSelectorsCompound_closure0($parent), A._arrayInstanceType(simples)._eval$1("MappedListIterable<1,SimpleSelector>")) : simples; + parentSelector = B.JSArray_methods.get$first(simples); + if (!(parentSelector instanceof A.ParentSelector)) + return A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(resolvedSimples), A.List_List$unmodifiable(component.combinators, type$.Combinator))], type$.JSArray_ComplexSelectorComponent), false)], type$.JSArray_ComplexSelector); + else if (simples.length === 1 && parentSelector.suffix == null) + return $parent.withAdditionalCombinators$1(component.combinators).components; + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__resolveParentSelectorsCompound_closure1(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>"))); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure.prototype = { + call$1(complex) { + var t3, t4, _i, component, t5, visitor, t6, t7, _i0, + t1 = type$.JSArray_Value, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString(t3[_i]._combinator$_text, false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + t5 = component.selector; + visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + t5.accept$1(visitor); + t5 = A._setArrayType([new A.SassString(visitor._serialize$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString(t6[_i0]._combinator$_text, false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$(t2, B.ListSeparator_EVt, false); + }, + $signature: 492 + }; + A.SelectorList_resolveParentSelectors_closure.prototype = { + call$1(complex) { + var t2, newComplexes, t3, t4, t5, t6, t7, t8, t9, _i, component, resolved, t10, result, t11, i, t12, _i0, newComplex, t13, _this = this, + _s56_ = string$.leadin, + t1 = _this.$this; + if (!t1._complexContainsParentSelector$1(complex)) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_resolveParentSelectors__closure(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + } + t2 = type$.JSArray_ComplexSelector; + newComplexes = A._setArrayType([], t2); + for (t3 = complex.components, t4 = t3.length, t5 = _this.parent, t6 = type$.Combinator, t7 = type$.ComplexSelectorComponent, t8 = complex.leadingCombinators, t9 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + resolved = t1._resolveParentSelectorsCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) { + t10 = A._setArrayType([component], t9); + result = A.List_List$from(t8, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t11 = result; + result = A.List_List$from(t10, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + if (t11.length === 0 && t10.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, null)); + newComplexes.push(new A.ComplexSelector(t11, t10, false)); + } else + for (i = 0; i < newComplexes.length; ++i) { + t10 = newComplexes[i]; + t11 = t10.leadingCombinators; + t12 = A.List_List$of(t10.components, true, t7); + t12.push(component); + t10 = t10.lineBreak || false; + result = A.List_List$from(t11, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t11 = result; + result = A.List_List$from(t12, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + if (t11.length === 0 && t12.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, null)); + newComplexes[i] = new A.ComplexSelector(t11, t12, t10); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, resolved); + else { + t10 = A._setArrayType([], t2); + for (t11 = newComplexes.length, t12 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t11 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t13 = t12.get$iterator(resolved); t13.moveNext$0();) + t10.push(newComplex.concatenate$1(t13.get$current(t13))); + } + newComplexes = t10; + } + } + return newComplexes; + }, + $signature: 493 + }; + A.SelectorList_resolveParentSelectors__closure.prototype = { + call$1(parentComplex) { + return parentComplex.concatenate$1(this.complex); + }, + $signature: 72 + }; + A.SelectorList__complexContainsParentSelector_closure.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A.SelectorList__complexContainsParentSelector__closure()); + }, + $signature: 45 + }; + A.SelectorList__complexContainsParentSelector__closure.prototype = { + call$1(simple) { + var selector; + if (simple instanceof A.ParentSelector) + return true; + if (!(simple instanceof A.PseudoSelector)) + return false; + selector = simple.selector; + return selector != null && B.JSArray_methods.any$1(selector.components, selector.get$_complexContainsParentSelector()); + }, + $signature: 14 + }; + A.SelectorList__resolveParentSelectorsCompound_closure.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector)) + return false; + selector = simple.selector; + return selector != null && B.JSArray_methods.any$1(selector.components, selector.get$_complexContainsParentSelector()); + }, + $signature: 14 + }; + A.SelectorList__resolveParentSelectorsCompound_closure0.prototype = { + call$1(simple) { + var selector, t1, t2, t3; + if (!(simple instanceof A.PseudoSelector)) + return simple; + selector = simple.selector; + if (selector == null) + return simple; + if (!B.JSArray_methods.any$1(selector.components, selector.get$_complexContainsParentSelector())) + return simple; + t1 = selector.resolveParentSelectors$2$implicitParent(this.parent, false); + t2 = simple.name; + t3 = simple.isClass; + return A.PseudoSelector$(t2, simple.argument, !t3, t1); + }, + $signature: 499 + }; + A.SelectorList__resolveParentSelectorsCompound_closure1.prototype = { + call$1(complex) { + var suffix, lastSimples, t2, t3, t4, last, + t1 = complex.components, + lastComponent = B.JSArray_methods.get$last(t1); + if (lastComponent.combinators.length !== 0) + throw A.wrapException(A.SassScriptException$('Parent "' + complex.toString$0(0) + '" is incompatible with this selector.', null)); + suffix = this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t2 = type$.SimpleSelector; + t3 = this.resolvedSimples; + t4 = J.getInterceptor$ax(t3); + if (suffix == null) { + t2 = A.List_List$of(lastSimples, true, t2); + B.JSArray_methods.addAll$1(t2, t4.skip$1(t3, 1)); + } else { + t2 = A.List_List$of(A.IterableExtension_get_exceptLast(lastSimples), true, t2); + t2.push(B.JSArray_methods.get$last(lastSimples).addSuffix$1(suffix)); + B.JSArray_methods.addAll$1(t2, t4.skip$1(t3, 1)); + } + last = A.CompoundSelector$(t2); + t2 = complex.leadingCombinators; + t1 = A.List_List$of(A.IterableExtension_get_exceptLast(t1), true, type$.ComplexSelectorComponent); + t1.push(new A.ComplexSelectorComponent(last, A.List_List$unmodifiable(this.component.combinators, type$.Combinator))); + return A.ComplexSelector$(t2, t1, complex.lineBreak); + }, + $signature: 72 + }; + A.SelectorList_withAdditionalCombinators_closure.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 72 + }; + A.ParentSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.PlaceholderSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector(this.name + suffix); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PseudoSelector.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this.__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure(_this).call$0(); + _this.__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix(suffix); + return A.PseudoSelector$(_this.name + suffix, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure())) + return null; + } else if (compound.length === 1) { + other = B.JSArray_methods.get$first(compound); + if (!(other instanceof A.UniversalSelector)) + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + else + t1 = false; + else + t1 = true; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, _this = this; + if (_this.super$SimpleSelector$isSuperselector(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector; + return A.compoundIsSuperselector(A.CompoundSelector$(A._setArrayType([_this], t1)), A.CompoundSelector$(A._setArrayType([other], t1)), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return (t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector)) >>> 0; + } + }; + A.PseudoSelector_specificity_closure.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector.prototype.get$specificity.call(t1); + } + }, + $signature: 12 + }; + A.PseudoSelector_specificity__closure.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 172 + }; + A.PseudoSelector_specificity__closure0.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 172 + }; + A.PseudoSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.QualifiedName.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.SimpleSelector.prototype = { + get$specificity() { + return 1000; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.SassScriptException$('Invalid parent selector "' + this.toString$0(0) + '"', null)); + }, + unify$1(compound) { + var other, t1, result, addedThis, _i, simple, _this = this; + if (compound.length === 1) { + other = B.JSArray_methods.get$first(compound); + if (!(other instanceof A.UniversalSelector)) + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + else + t1 = false; + else + t1 = true; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure(this.$this)); + }, + $signature: 16 + }; + A.SimpleSelector_isSuperselector__closure.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 14 + }; + A.TypeSelector.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector(new A.QualifiedName(t1.name + suffix, t1.namespace)); + }, + unify$1(compound) { + var unified, t1; + if (B.JSArray_methods.get$first(compound) instanceof A.UniversalSelector || B.JSArray_methods.get$first(compound) instanceof A.TypeSelector) { + unified = A.unifyUniversalAndElement(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2; + if (!this.super$SimpleSelector$isSuperselector(other)) + if (other instanceof A.TypeSelector) { + t1 = this.name; + t2 = other.name; + if (t1.name === t2.name) { + t1 = t1.namespace; + t1 = t1 === "*" || t1 == t2.namespace; + } else + t1 = false; + } else + t1 = false; + else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.UniversalSelector.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var unified, t1, _this = this, + first = B.JSArray_methods.get$first(compound); + if (first instanceof A.UniversalSelector || first instanceof A.TypeSelector) { + unified = A.unifyUniversalAndElement(_this, first); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + if (compound.length === 1) + if (first instanceof A.PseudoSelector) + t1 = first.isClass && first.name === "host" || first.get$isHostContext(); + else + t1 = false; + else + t1 = false; + if (t1) + return null; + } + t1 = _this.namespace; + if (t1 != null && t1 !== "*") { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + if (compound.length !== 0) + return compound; + return A._setArrayType([_this], type$.JSArray_SimpleSelector); + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A._compileStylesheet_closure0.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 5 + }; + A.AsyncEnvironment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment$_forwardedModules, + t2 = _this._async_environment$_nestedForwardedModules, + t3 = _this._async_environment$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_(_this._async_environment$_modules, _this._async_environment$_namespaceNodes, _this._async_environment$_globalModules, _this._async_environment$_importedModules, t1, t2, _this._async_environment$_allModules, t3, t4, t5, t6, _this._async_environment$_content); + }, + addModule$3$namespace(module, nodeWithSpan, namespace) { + var t1, t2, span, _this = this; + if (namespace == null) { + _this._async_environment$_globalModules.$indexSet(0, module, nodeWithSpan); + _this._async_environment$_allModules.push(module); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.get$first(_this._async_environment$_variables))); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (module.get$variables().containsKey$1(t2)) + throw A.wrapException(A.SassScriptException$(string$.This_ma + t2 + '".', null)); + } + } else { + t1 = _this._async_environment$_modules; + if (t1.containsKey$1(namespace)) { + t1 = _this._async_environment$_namespaceNodes.$index(0, namespace); + span = t1 == null ? null : t1.span; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @use"); + throw A.wrapException(A.MultiSpanSassScriptException$(string$.There_ + namespace + '".', "new @use", t1)); + } + t1.$indexSet(0, namespace, module); + _this._async_environment$_namespaceNodes.$indexSet(0, namespace, nodeWithSpan); + _this._async_environment$_allModules.push(module); + } + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.AsyncCallable); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules._modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, $name, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = J.get$iterator$ax(smaller.get$keys(smaller)), t2 = type === "variable"; t1.moveNext$0();) { + $name = t1.get$current(t1); + if (!larger.containsKey$1($name)) + continue; + if (t2 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(larger.$index(0, $name), smaller.$index(0, $name))) + continue; + if (t2) + $name = "$" + $name; + t1 = this._async_environment$_forwardedModules; + if (t1 == null) + span = null; + else { + t1 = t1.$index(0, oldModule); + span = t1 == null ? null : J.get$span$z(t1); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t1)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, t5, forwardedVariableNames, forwardedFunctionNames, forwardedMixinNames, _i, entry, shadowed, t6, _length, _list, _this = this, + forwarded = module._async_environment$_environment._async_environment$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules != null) { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + for (t2 = forwarded.get$entries(forwarded), t2 = t2.get$iterator(t2), t3 = _this._async_environment$_globalModules; t2.moveNext$0();) { + t4 = t2.get$current(t2); + t5 = t4.key; + if (!forwardedModules.containsKey$1(t5) || !t3.containsKey$1(t5)) + t1.$indexSet(0, t5, t4.value); + } + forwarded = t1; + } else + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + t1 = A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"); + t2 = t1._eval$1("ExpandIterable"); + t3 = t2._eval$1("Iterable.E"); + forwardedVariableNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure(), t2), t3); + forwardedFunctionNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure0(), t2), t3); + forwardedMixinNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure1(), t2), t3); + t2 = _this._async_environment$_variables; + t3 = t2.length; + if (t3 === 1) { + for (t1 = _this._async_environment$_importedModules, t3 = t1.get$entries(t1).toList$0(0), t4 = t3.length, t5 = type$.AsyncCallable, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + t1.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + t1.$indexSet(0, shadowed, entry.value); + } + } + for (t3 = forwardedModules.get$entries(forwardedModules).toList$0(0), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + forwardedModules.$indexSet(0, shadowed, entry.value); + } + } + t1.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t4 = _this._async_environment$_nestedForwardedModules; + if (t4 == null) { + _length = t3 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable); + for (t3 = type$.JSArray_Module_AsyncCallable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t3); + _this._async_environment$_nestedForwardedModules = _list; + t3 = _list; + } else + t3 = t4; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t3), new A.LinkedHashMapKeyIterable(forwarded, t1)); + } + for (t1 = A._LinkedHashSetIterator$(forwardedVariableNames, forwardedVariableNames._collection$_modifications), t3 = _this._async_environment$_variableIndices, t4 = _this._async_environment$_variableNodes, t5 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t6 = t1._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t2), t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(forwardedFunctionNames, forwardedFunctionNames._collection$_modifications), t2 = _this._async_environment$_functionIndices, t3 = _this._async_environment$_functions, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + for (t1 = A._LinkedHashSetIterator$(forwardedMixinNames, forwardedMixinNames._collection$_modifications), t2 = _this._async_environment$_mixinIndices, t3 = _this._async_environment$_mixins, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment$_variables[t1], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + t1 = J.$index$asx(_this._async_environment$_variables[index], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } + index = _this._async_environment$_variableIndex$1($name); + if (index == null) + return _this._async_environment$_getVariableFromGlobalModule$1($name); + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment$_variables[index], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment$_getVariableFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$1$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure($name), type$.Value); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment$_variableNodes[t1], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + t1 = J.$index$asx(_this._async_environment$_variableNodes[index], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } + index = _this._async_environment$_variableIndex$1($name); + if (index == null) + return _this._async_environment$_getVariableNodeFromGlobalModule$1($name); + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment$_variableNodes[index], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + }, + _async_environment$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, value; + for (t1 = this._async_environment$_importedModules, t2 = this._async_environment$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + value = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (value != null) + return value; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment$_variables).containsKey$1($name)) + return true; + return this._async_environment$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment$_variables.length === 1) { + _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure(_this, $name)); + t1 = _this._async_environment$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment$_fromOneModule$1$3($name, "variable", new A.AsyncEnvironment_setVariable_closure0($name), type$.Module_AsyncCallable); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment$_variableIndices.containsKey$1($name) && _this._async_environment$_variableIndex$1($name) == null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A.instanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure1(_this, $name)); + if (!_this._async_environment$_inSemiGlobalScope && index === 0) { + index = _this._async_environment$_variables.length - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + J.$indexSet$ax(_this._async_environment$_variables[index], $name, value); + J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment$_variables, + t2 = t1.length; + _this._async_environment$_lastVariableName = $name; + index = _this._async_environment$_lastVariableIndex = t2 - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) { + t1 = _this._async_environment$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment$_functionIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._async_environment$_functions[index], $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + } + index = _this._async_environment$_functionIndex$1($name); + if (index == null) + return _this._async_environment$_getFunctionFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment$_functions[index], $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + }, + _async_environment$_getFunctionFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$1$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure($name), type$.AsyncCallable); + }, + _async_environment$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment$_mixinIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._async_environment$_mixins[index], $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + } + index = _this._async_environment$_mixinIndex$1($name); + if (index == null) + return _this._async_environment$_getMixinFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment$_mixins[index], $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + }, + _async_environment$_getMixinFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$1$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure($name), type$.AsyncCallable); + }, + _async_environment$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment($content, callback); + }, + withContent$body$AsyncEnvironment($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment$_content; + $async$self._async_environment$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment$_inMixin; + $async$self._async_environment$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment$_inSemiGlobalScope; + $async$self._async_environment$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = $async$self._async_environment$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = $async$self._async_environment$_functions; + t5 = type$.AsyncCallable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment$_lastVariableIndex = $async$self._async_environment$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t1, t2, i, values, nodes, t3, t4, t5, t6, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + for (t1 = this._async_environment$_variables, t2 = this._async_environment$_variableNodes, i = 0; i < t1.length; ++i) { + values = t1[i]; + nodes = t2[i]; + for (t3 = values.get$entries(values), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.key; + t4 = t4.value; + t6 = nodes.$index(0, t5); + t6.toString; + configuration.$indexSet(0, t5, new A.ConfiguredValue(t4, null, t6)); + } + } + return new A.Configuration(configuration, null); + }, + toModule$2(css, extensionStore) { + return A._EnvironmentModule__EnvironmentModule0(this, css, extensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule0(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure())); + }, + _async_environment$_getModule$1(namespace) { + var module = this._async_environment$_modules.$index(0, namespace); + if (module != null) + return module; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment$_fromOneModule$1$3($name, type, callback, $T) { + var t1, t2, t3, t4, t5, value, identity, valueInModule, identityFromModule, spans, + nestedForwardedModules = this._async_environment$_nestedForwardedModules; + if (nestedForwardedModules != null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + value = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (value != null) + return value; + } + } + for (t1 = this._async_environment$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1._modifications); t1.moveNext$0();) { + value = callback.call$1(t1.__js_helper$_current); + if (value != null) + return value; + } + for (t1 = this._async_environment$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1._modifications), t3 = type$.AsyncCallable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + spans = t1.get$entries(t1).map$1$1(0, new A.AsyncEnvironment__fromOneModule_closure(callback, $T), type$.nullable_FileSpan); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t1 = spans.get$iterator(spans), t3 = "includes " + type; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t4 != null) + t2.$indexSet(0, t4, t3); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + } + }; + A.AsyncEnvironment_importForwards_closure.prototype = { + call$1(module) { + var t1 = module.get$variables(); + return t1.get$keys(t1); + }, + $signature: 133 + }; + A.AsyncEnvironment_importForwards_closure0.prototype = { + call$1(module) { + var t1 = module.get$functions(module); + return t1.get$keys(t1); + }, + $signature: 133 + }; + A.AsyncEnvironment_importForwards_closure1.prototype = { + call$1(module) { + var t1 = module.get$mixins(); + return t1.get$keys(t1); + }, + $signature: 133 + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 587 + }; + A.AsyncEnvironment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment$_lastVariableName = this.name; + return t1._async_environment$_lastVariableIndex = 0; + }, + $signature: 12 + }; + A.AsyncEnvironment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 258 + }; + A.AsyncEnvironment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment$_variables.length - 1 : t2; + }, + $signature: 12 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 187 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 187 + }; + A.AsyncEnvironment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 189 + }; + A.AsyncEnvironment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 189 + }; + A.AsyncEnvironment__fromOneModule_closure.prototype = { + call$1(entry) { + return A.NullableExtension_andThen(this.callback.call$1(entry.key), new A.AsyncEnvironment__fromOneModule__closure(entry, this.T)); + }, + $signature: 281 + }; + A.AsyncEnvironment__fromOneModule__closure.prototype = { + call$1(_) { + return J.get$span$z(this.entry.value); + }, + $signature() { + return this.T._eval$1("FileSpan(0)"); + } + }; + A._EnvironmentModule0.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + module = this._async_environment$_modulesByVariable.$index(0, $name); + if (module != null) { + module.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment$_environment; + t2 = t1._async_environment$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var newCssAndExtensionStore, _this = this, + t1 = _this.css; + if (J.get$isEmpty$asx(t1.get$children(t1))) + return _this; + newCssAndExtensionStore = A.cloneCssStylesheet(t1, _this.extensionStore); + return A._EnvironmentModule$_0(_this._async_environment$_environment, newCssAndExtensionStore.item1, newCssAndExtensionStore.item2, _this._async_environment$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.transitivelyContainsCss, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t1 = $.$get$context().prettyUri$1(t1); + } + return t1; + }, + $isModule: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure5.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 285 + }; + A._EnvironmentModule__EnvironmentModule_closure6.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 286 + }; + A._EnvironmentModule__EnvironmentModule_closure7.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 206 + }; + A._EnvironmentModule__EnvironmentModule_closure8.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 206 + }; + A._EnvironmentModule__EnvironmentModule_closure9.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 132 + }; + A._EnvironmentModule__EnvironmentModule_closure10.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 132 + }; + A.AsyncImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri), + $async$returnValue, $async$self = this, t1, relativeResult; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseImporter != null ? 3 : 4; + break; + case 3: + // then + t1 = type$.Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri; + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_relativeCanonicalizeCache, new A.Tuple4(url, forImport, baseImporter, baseUrl, t1), new A.AsyncImportCache_canonicalize_closure($async$self, baseUrl, url, baseImporter, forImport), t1, type$.nullable_Tuple3_AsyncImporter_Uri_Uri), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + t1 = type$.Tuple2_Uri_bool; + $async$goto = 6; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_canonicalizeCache, new A.Tuple2(url, forImport, t1), new A.AsyncImportCache_canonicalize_closure0($async$self, url, forImport), t1, type$.nullable_Tuple3_AsyncImporter_Uri_Uri), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache$_canonicalize$3(importer, url, forImport) { + return this._canonicalize$body$AsyncImportCache(importer, url, forImport); + }, + _canonicalize$body$AsyncImportCache(importer, url, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_import_cache$_canonicalize$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (forImport) { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__inImportRule, true], t1, t1), type$.FutureOr_nullable_Uri); + } else + t1 = importer.canonicalize$1(0, url); + $async$goto = 3; + return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$3); + case 3: + // returning from await. + result = $async$result; + if ((result == null ? null : result.get$scheme()) === "") + $async$self._async_import_cache$_logger.warn$2$deprecation(0, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + A.S(result) + string$.x2e_Rela, true); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache$_canonicalize$3, $async$completer); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this.importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl, quiet); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl, quiet) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this; + var $async$importCanonical$4$originalUrl$quiet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure($async$self, importer, canonicalUrl, originalUrl, quiet), type$.Uri, type$.nullable_Stylesheet), $async$importCanonical$4$originalUrl$quiet); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$4$originalUrl$quiet, $async$completer); + }, + humanize$1(canonicalUrl) { + var t2, url, + t1 = this._async_import_cache$_canonicalizeCache; + t1 = A.IterableNullableExtension_whereNotNull(t1.get$values(t1), type$.Tuple3_AsyncImporter_Uri_Uri); + t2 = t1.$ti; + url = A.minBy(new A.MappedIterable(new A.WhereIterable(t1, new A.AsyncImportCache_humanize_closure(canonicalUrl), t2._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure0(), t2._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure1()); + if (url == null) + return canonicalUrl; + t1 = $.$get$url(); + return url.resolve$1(A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t1.style).get$basename()); + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(t1); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri), + $async$returnValue, $async$self = this, canonicalUrl, t1, resolvedUrl; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.baseUrl; + resolvedUrl = t1 == null ? null : t1.resolveUri$1($async$self.url); + if (resolvedUrl == null) + resolvedUrl = $async$self.url; + t1 = $async$self.baseImporter; + $async$goto = 3; + return A._asyncAwait($async$self.$this._async_import_cache$_canonicalize$3(t1, resolvedUrl, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + canonicalUrl = $async$result; + if (canonicalUrl == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = new A.Tuple3(t1, canonicalUrl, resolvedUrl, type$.Tuple3_AsyncImporter_Uri_Uri); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 198 + }; + A.AsyncImportCache_canonicalize_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, importer, canonicalUrl; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this, t2 = t1._async_import_cache$_importers, t3 = t2.length, t4 = $async$self.url, t5 = $async$self.forImport, _i = 0; + case 3: + // for condition + if (!(_i < t2.length)) { + // goto after for + $async$goto = 5; + break; + } + importer = t2[_i]; + $async$goto = 6; + return A._asyncAwait(t1._async_import_cache$_canonicalize$3(importer, t4, t5), $async$call$0); + case 6: + // returning from await. + canonicalUrl = $async$result; + if (canonicalUrl != null) { + $async$returnValue = new A.Tuple3(importer, canonicalUrl, t4, type$.Tuple3_AsyncImporter_Uri_Uri); + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 198 + }; + A.AsyncImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 199 + }; + A.AsyncImportCache_importCanonical_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this, t2, t3, t4, t1, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.canonicalUrl; + $async$goto = 3; + return A._asyncAwait($async$self.importer.load$1(0, t1), $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t2 = $async$self.$this; + t2._async_import_cache$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = $async$self.originalUrl.resolveUri$1(t1); + $async$returnValue = A.Stylesheet_Stylesheet$parse(t3, t4, $async$self.quiet ? $.$get$Logger_quiet() : t2._async_import_cache$_logger, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 300 + }; + A.AsyncImportCache_humanize_closure.prototype = { + call$1(tuple) { + return tuple.item2.$eq(0, this.canonicalUrl); + }, + $signature: 304 + }; + A.AsyncImportCache_humanize_closure0.prototype = { + call$1(tuple) { + return tuple.item3; + }, + $signature: 305 + }; + A.AsyncImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 91 + }; + A.AsyncBuiltInCallable.prototype = { + callbackFor$2(positional, names) { + return new A.Tuple2(this._async_built_in$_arguments, this._async_built_in$_callback, type$.Tuple2_of_ArgumentDeclaration_and_FutureOr_Value_Function_List_Value); + }, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.AsyncBuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.callback.call$1($arguments), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 211 + }; + A.BuiltInCallable.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload.item1; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.$arguments.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable($name, this._overloads); + }, + $isCallable: 1, + $isAsyncCallable: 1, + $isAsyncBuiltInCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.BuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull; + }, + $signature: 4 + }; + A.PlainCssCallable.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isCallable: 1, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.UserDefinedCallable.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isCallable: 1, + $isAsyncCallable: 1 + }; + A._compileStylesheet_closure.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 5 + }; + A.CompileResult.prototype = {}; + A.Configuration.prototype = { + throughForward$1($forward) { + var prefix, shownVariables, hiddenVariables, t1, + newValues = this._values; + if (newValues.get$isEmpty(newValues)) + return B.Configuration_Map_empty_null; + prefix = $forward.prefix; + if (prefix != null) + newValues = new A.UnprefixedMapView(newValues, prefix, type$.UnprefixedMapView_ConfiguredValue); + shownVariables = $forward.shownVariables; + hiddenVariables = $forward.hiddenVariables; + if (shownVariables != null) + newValues = new A.LimitedMapView(newValues, shownVariables._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue); + else { + if (hiddenVariables != null) { + t1 = hiddenVariables._base; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = false; + if (t1) + newValues = A.LimitedMapView$blocklist(newValues, hiddenVariables, type$.String, type$.ConfiguredValue); + } + return this._withValues$1(newValues); + }, + _withValues$1(values) { + var t1 = this.__originalConfiguration; + return new A.Configuration(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t1 = this._values; + return "(" + t1.get$entries(t1).map$1$1(0, new A.Configuration_toString_closure(), type$.String).join$1(0, ", ") + ")"; + } + }; + A.Configuration_toString_closure.prototype = { + call$1(entry) { + return "$" + A.S(entry.key) + ": " + A.S(entry.value); + }, + $signature: 310 + }; + A.ExplicitConfiguration.prototype = { + _withValues$1(values) { + var t1 = this.__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue.prototype = { + toString$0(_) { + return A.serializeValue(this.value, true, true); + } + }; + A.Environment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._forwardedModules, + t2 = _this._nestedForwardedModules, + t3 = _this._variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_(_this._environment$_modules, _this._namespaceNodes, _this._globalModules, _this._importedModules, t1, t2, _this._allModules, t3, t4, t5, t6, _this._content); + }, + addModule$3$namespace(module, nodeWithSpan, namespace) { + var t1, t2, span, _this = this; + if (namespace == null) { + _this._globalModules.$indexSet(0, module, nodeWithSpan); + _this._allModules.push(module); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.get$first(_this._variables))); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (module.get$variables().containsKey$1(t2)) + throw A.wrapException(A.SassScriptException$(string$.This_ma + t2 + '".', null)); + } + } else { + t1 = _this._environment$_modules; + if (t1.containsKey$1(namespace)) { + t1 = _this._namespaceNodes.$index(0, namespace); + span = t1 == null ? null : t1.span; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @use"); + throw A.wrapException(A.MultiSpanSassScriptException$(string$.There_ + namespace + '".', "new @use", t1)); + } + t1.$indexSet(0, namespace, module); + _this._namespaceNodes.$indexSet(0, namespace, nodeWithSpan); + _this._allModules.push(module); + } + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.Callable); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules._modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, $name, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = J.get$iterator$ax(smaller.get$keys(smaller)), t2 = type === "variable"; t1.moveNext$0();) { + $name = t1.get$current(t1); + if (!larger.containsKey$1($name)) + continue; + if (t2 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(larger.$index(0, $name), smaller.$index(0, $name))) + continue; + if (t2) + $name = "$" + $name; + t1 = this._forwardedModules; + if (t1 == null) + span = null; + else { + t1 = t1.$index(0, oldModule); + span = t1 == null ? null : J.get$span$z(t1); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t1)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, t5, forwardedVariableNames, forwardedFunctionNames, forwardedMixinNames, _i, entry, shadowed, t6, _length, _list, _this = this, + forwarded = module._environment$_environment._forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._forwardedModules; + if (forwardedModules != null) { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + for (t2 = forwarded.get$entries(forwarded), t2 = t2.get$iterator(t2), t3 = _this._globalModules; t2.moveNext$0();) { + t4 = t2.get$current(t2); + t5 = t4.key; + if (!forwardedModules.containsKey$1(t5) || !t3.containsKey$1(t5)) + t1.$indexSet(0, t5, t4.value); + } + forwarded = t1; + } else + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + t1 = A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"); + t2 = t1._eval$1("ExpandIterable"); + t3 = t2._eval$1("Iterable.E"); + forwardedVariableNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure(), t2), t3); + forwardedFunctionNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure0(), t2), t3); + forwardedMixinNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure1(), t2), t3); + t2 = _this._variables; + t3 = t2.length; + if (t3 === 1) { + for (t1 = _this._importedModules, t3 = t1.get$entries(t1).toList$0(0), t4 = t3.length, t5 = type$.Callable, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + t1.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + t1.$indexSet(0, shadowed, entry.value); + } + } + for (t3 = forwardedModules.get$entries(forwardedModules).toList$0(0), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + forwardedModules.$indexSet(0, shadowed, entry.value); + } + } + t1.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t4 = _this._nestedForwardedModules; + if (t4 == null) { + _length = t3 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable); + for (t3 = type$.JSArray_Module_Callable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t3); + _this._nestedForwardedModules = _list; + t3 = _list; + } else + t3 = t4; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t3), new A.LinkedHashMapKeyIterable(forwarded, t1)); + } + for (t1 = A._LinkedHashSetIterator$(forwardedVariableNames, forwardedVariableNames._collection$_modifications), t3 = _this._variableIndices, t4 = _this._variableNodes, t5 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t6 = t1._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t2), t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(forwardedFunctionNames, forwardedFunctionNames._collection$_modifications), t2 = _this._functionIndices, t3 = _this._functions, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + for (t1 = A._LinkedHashSetIterator$(forwardedMixinNames, forwardedMixinNames._collection$_modifications), t2 = _this._mixinIndices, t3 = _this._mixins, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variables().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._variables[t1], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + t1 = J.$index$asx(_this._variables[index], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } + index = _this._variableIndex$1($name); + if (index == null) + return _this._getVariableFromGlobalModule$1($name); + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._variables[index], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _getVariableFromGlobalModule$1($name) { + return this._fromOneModule$1$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure($name), type$.Value); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._variableNodes[t1], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + t1 = J.$index$asx(_this._variableNodes[index], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } + index = _this._variableIndex$1($name); + if (index == null) + return _this._getVariableNodeFromGlobalModule$1($name); + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._variableNodes[index], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + }, + _getVariableNodeFromGlobalModule$1($name) { + var t1, t2, value; + for (t1 = this._importedModules, t2 = this._globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + value = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (value != null) + return value; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._variables).containsKey$1($name)) + return true; + return this._getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _variableIndex$1($name) { + var t1, i; + for (t1 = this._variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._variables.length === 1) { + _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure(_this, $name)); + t1 = _this._variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._fromOneModule$1$3($name, "variable", new A.Environment_setVariable_closure0($name), type$.Module_Callable); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._nestedForwardedModules; + if (nestedForwardedModules != null && !_this._variableIndices.containsKey$1($name) && _this._variableIndex$1($name) == null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A.instanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure1(_this, $name)); + if (!_this._inSemiGlobalScope && index === 0) { + index = _this._variables.length - 1; + _this._variableIndices.$indexSet(0, $name, index); + } + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + J.$indexSet$ax(_this._variables[index], $name, value); + J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._variables, + t2 = t1.length; + _this._lastVariableName = $name; + index = _this._lastVariableIndex = t2 - 1; + _this._variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) { + t1 = _this._getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._functionIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._functions[index], $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + } + index = _this._functionIndex$1($name); + if (index == null) + return _this._getFunctionFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._functions[index], $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + }, + _getFunctionFromGlobalModule$1($name) { + return this._fromOneModule$1$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure($name), type$.Callable); + }, + _functionIndex$1($name) { + var t1, i; + for (t1 = this._functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._mixinIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._mixins[index], $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + } + index = _this._mixinIndex$1($name); + if (index == null) + return _this._getMixinFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._mixins[index], $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + }, + _getMixinFromGlobalModule$1($name) { + return this._fromOneModule$1$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure($name), type$.Callable); + }, + _mixinIndex$1($name) { + var t1, i; + for (t1 = this._mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._inSemiGlobalScope; + wasInSemiGlobalScope = _this._inSemiGlobalScope; + _this._inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = _this._variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = _this._functions; + t5 = type$.Callable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + _this._lastVariableIndex = _this._lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + toImplicitConfiguration$0() { + var t1, t2, i, values, nodes, t3, t4, t5, t6, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + for (t1 = this._variables, t2 = this._variableNodes, i = 0; i < t1.length; ++i) { + values = t1[i]; + nodes = t2[i]; + for (t3 = values.get$entries(values), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.key; + t4 = t4.value; + t6 = nodes.$index(0, t5); + t6.toString; + configuration.$indexSet(0, t5, new A.ConfiguredValue(t4, null, t6)); + } + } + return new A.Configuration(configuration, null); + }, + toModule$2(css, extensionStore) { + return A._EnvironmentModule__EnvironmentModule(this, css, extensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toDummyModule_closure())); + }, + _getModule$1(namespace) { + var module = this._environment$_modules.$index(0, namespace); + if (module != null) + return module; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _fromOneModule$1$3($name, type, callback, $T) { + var t1, t2, t3, t4, t5, value, identity, valueInModule, identityFromModule, spans, + nestedForwardedModules = this._nestedForwardedModules; + if (nestedForwardedModules != null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + value = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (value != null) + return value; + } + } + for (t1 = this._importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1._modifications); t1.moveNext$0();) { + value = callback.call$1(t1.__js_helper$_current); + if (value != null) + return value; + } + for (t1 = this._globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1._modifications), t3 = type$.Callable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + spans = t1.get$entries(t1).map$1$1(0, new A.Environment__fromOneModule_closure(callback, $T), type$.nullable_FileSpan); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t1 = spans.get$iterator(spans), t3 = "includes " + type; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t4 != null) + t2.$indexSet(0, t4, t3); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + } + }; + A.Environment_importForwards_closure.prototype = { + call$1(module) { + var t1 = module.get$variables(); + return t1.get$keys(t1); + }, + $signature: 127 + }; + A.Environment_importForwards_closure0.prototype = { + call$1(module) { + var t1 = module.get$functions(module); + return t1.get$keys(t1); + }, + $signature: 127 + }; + A.Environment_importForwards_closure1.prototype = { + call$1(module) { + var t1 = module.get$mixins(); + return t1.get$keys(t1); + }, + $signature: 127 + }; + A.Environment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 313 + }; + A.Environment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._lastVariableName = this.name; + return t1._lastVariableIndex = 0; + }, + $signature: 12 + }; + A.Environment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 314 + }; + A.Environment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._variableIndex$1(this.name); + return t2 == null ? t1._variables.length - 1 : t2; + }, + $signature: 12 + }; + A.Environment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 247 + }; + A.Environment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 247 + }; + A.Environment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 248 + }; + A.Environment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 248 + }; + A.Environment__fromOneModule_closure.prototype = { + call$1(entry) { + return A.NullableExtension_andThen(this.callback.call$1(entry.key), new A.Environment__fromOneModule__closure(entry, this.T)); + }, + $signature: 319 + }; + A.Environment__fromOneModule__closure.prototype = { + call$1(_) { + return J.get$span$z(this.entry.value); + }, + $signature() { + return this.T._eval$1("FileSpan(0)"); + } + }; + A._EnvironmentModule.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + module = this._modulesByVariable.$index(0, $name); + if (module != null) { + module.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment$_environment; + t2 = t1._variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var newCssAndExtensionStore, _this = this, + t1 = _this.css; + if (J.get$isEmpty$asx(t1.get$children(t1))) + return _this; + newCssAndExtensionStore = A.cloneCssStylesheet(t1, _this.extensionStore); + return A._EnvironmentModule$_(_this._environment$_environment, newCssAndExtensionStore.item1, newCssAndExtensionStore.item2, _this._modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.transitivelyContainsCss, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t1 = $.$get$context().prettyUri$1(t1); + } + return t1; + }, + $isModule: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 322 + }; + A._EnvironmentModule__EnvironmentModule_closure0.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 323 + }; + A._EnvironmentModule__EnvironmentModule_closure1.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 252 + }; + A._EnvironmentModule__EnvironmentModule_closure2.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 252 + }; + A._EnvironmentModule__EnvironmentModule_closure3.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 125 + }; + A._EnvironmentModule__EnvironmentModule_closure4.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 125 + }; + A.SassException.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan(A.SourceSpanException.prototype.get$span.call(this, this), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, this); + }, + toString$1$color(_, color) { + var t2, _i, frame, t3, _this = this, + buffer = new A.StringBuffer(""), + t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, _this).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + t3 = buffer._contents += "\n"; + buffer._contents = t3 + (" " + A.S(frame)); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0($receiver) { + return this.toString$1$color($receiver, null); + }, + toCssString$0() { + var commentMessage, stringMessage, rune, + t1 = $._glyphs, + t2 = $._glyphs = B.C_AsciiGlyphSet, + t3 = this.toString$1$color(0, false); + t3 = A.stringReplaceAllUnchecked(t3, "*/", "*\u2215"); + commentMessage = A.stringReplaceAllUnchecked(t3, "\r\n", "\n"); + $._glyphs = t1 === B.C_AsciiGlyphSet ? t2 : B.C_UnicodeGlyphSet; + stringMessage = new A.StringBuffer(""); + for (t1 = new A.RuneIterator(A.serializeValue(new A.SassString(this.toString$1$color(0, false), true), true, true)); t1.moveNext$0();) { + rune = t1._currentCodePoint; + t2 = stringMessage._contents; + if (rune > 255) { + stringMessage._contents = t2 + A.Primitives_stringFromCharCode(92); + t2 = stringMessage._contents += B.JSInt_methods.toRadixString$1(rune, 16); + stringMessage._contents = t2 + A.Primitives_stringFromCharCode(32); + } else + stringMessage._contents = t2 + A.Primitives_stringFromCharCode(rune); + } + return "/* " + B.JSArray_methods.join$1(A._setArrayType(commentMessage.split("\n"), type$.JSArray_String), "\n * ") + ' */\n\nbody::before {\n font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",\n "Droid Sans Mono", monospace, monospace;\n white-space: pre;\n display: block;\n padding: 1em;\n margin-bottom: 1em;\n border-bottom: 2px solid black;\n content: ' + stringMessage.toString$0(0) + ";\n}"; + } + }; + A.MultiSpanSassException.prototype = { + toString$1$color(_, color) { + var t1, t2, _i, frame, _this = this, + useColor = color === true && true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, _this), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + buffer._contents += "\n"; + buffer._contents += " " + A.S(frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0($receiver) { + return this.toString$1$color($receiver, null); + } + }; + A.SassRuntimeException.prototype = { + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException.prototype = {$isSassRuntimeException: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, this); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.SassScriptException.prototype = { + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException.prototype = {}; + A._writeSourceMap_closure.prototype = { + call$1(url) { + return this.options.sourceMapUrl$2(0, A.Uri_parse(url), this.destination).toString$0(0); + }, + $signature: 5 + }; + A.ExecutableOptions.prototype = { + get$interactive() { + var result, _this = this, + value = _this.__ExecutableOptions_interactive_FI; + if (value === $) { + result = new A.ExecutableOptions_interactive_closure(_this).call$0(); + _this.__ExecutableOptions_interactive_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ExecutableOptions_interactive_FI = result; + value = result; + } + return value; + }, + get$color() { + var t1 = this._options; + return t1.wasParsed$1("color") ? A._asBool(t1.$index(0, "color")) : J.$eq$(self.process.stdout.isTTY, true); + }, + get$emitErrorCss() { + var t1 = A._asBoolQ(this._options.$index(0, "error-css")); + if (t1 == null) { + this._ensureSources$0(); + t1 = this._sourcesToDestinations; + t1 = t1.get$values(t1).any$1(0, new A.ExecutableOptions_emitErrorCss_closure()); + } + return t1; + }, + _ensureSources$0() { + var t1, stdin, t2, t3, $directories, t4, t5, colonArgs, positionalArgs, t6, t7, t8, message, target, source, destination, seen, sourceAndDestination, _this = this, _null = null, + _s18_ = 'Duplicate source "'; + if (_this._sourcesToDestinations != null) + return; + t1 = _this._options; + stdin = A._asBool(t1.$index(0, "stdin")); + t2 = t1.rest; + if (t2.get$length(t2) === 0 && !stdin) + A.ExecutableOptions__fail("Compile Sass to CSS."); + t3 = type$.String; + $directories = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (t4 = new A.ListIterator(t2, t2.get$length(t2)), t5 = A._instanceType(t4)._precomputed1, colonArgs = false, positionalArgs = false; t4.moveNext$0();) { + t6 = t4.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + t7 = t6.length; + if (t7 === 0) + A.ExecutableOptions__fail('Invalid argument "".'); + if (A.stringContainsUnchecked(t6, ":", 0)) { + if (t7 > 2) { + t8 = B.JSString_methods._codeUnitAt$1(t6, 0); + if (!(t8 >= 97 && t8 <= 122)) + t8 = t8 >= 65 && t8 <= 90; + else + t8 = true; + t8 = t8 && B.JSString_methods._codeUnitAt$1(t6, 1) === 58; + } else + t8 = false; + if (t8) { + if (2 > t7) + A.throwExpression(A.RangeError$range(2, 0, t7, _null, _null)); + t7 = A.stringContainsUnchecked(t6, ":", 2); + } else + t7 = true; + } else + t7 = false; + if (t7) + colonArgs = true; + else if (A.dirExists(t6)) + $directories.add$1(0, t6); + else + positionalArgs = true; + } + if (positionalArgs || t2.get$length(t2) === 0) { + if (colonArgs) + A.ExecutableOptions__fail('Positional and ":" arguments may not both be used.'); + else if (stdin) { + if (J.get$length$asx(t2._collection$_source) > 1) + A.ExecutableOptions__fail("Only one argument is allowed with --stdin."); + else if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed with --stdin."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed with --stdin."); + t1 = t2.get$length(t2) === 0 ? _null : t2.get$first(t2); + t2 = type$.dynamic; + t3 = type$.nullable_String; + _this._sourcesToDestinations = A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([null, t1], t2, t2), t3, t3); + } else { + t3 = t2._collection$_source; + t4 = J.getInterceptor$asx(t3); + if (t4.get$length(t3) > 2) + A.ExecutableOptions__fail("Only two positional args may be passed."); + else if ($directories._collection$_length !== 0) { + message = 'Directory "' + A.S($directories.get$first($directories)) + '" may not be a positional arg.'; + target = t2.get$last(t2); + A.ExecutableOptions__fail(J.$eq$($directories.get$first($directories), t2.get$first(t2)) && !A.fileExists(target) ? message + ('\nTo compile all CSS in "' + A.S($directories.get$first($directories)) + '" to "' + target + '", use `sass ' + A.S($directories.get$first($directories)) + ":" + target + "`.") : message); + } else { + source = J.$eq$(t2.get$first(t2), "-") ? _null : t2.get$first(t2); + destination = t4.get$length(t3) === 1 ? _null : t2.get$last(t2); + if (destination == null) + if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed when printing to stdout."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed when printing to stdout."); + t1 = A.PathMap__create(_null, type$.nullable_String); + t1.$indexSet(0, source, destination); + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, type$.PathMap_nullable_String), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + } + } + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = B.Map_empty5; + return; + } + if (stdin) + A.ExecutableOptions__fail('--stdin may not be used with ":" arguments.'); + seen = A.LinkedHashSet_LinkedHashSet$_empty(t3); + t1 = A.PathMap__create(_null, t3); + t4 = type$.PathMap_String; + t3 = A.PathMap__create(_null, t3); + for (t2 = new A.ListIterator(t2, t2.get$length(t2)), t5 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + if ($directories.contains$1(0, t6)) { + if (!seen.add$1(0, t6)) + A.ExecutableOptions__fail(_s18_ + t6 + '".'); + t3.$indexSet(0, t6, t6); + t1.addAll$1(0, _this._listSourceDirectory$2(t6, t6)); + continue; + } + sourceAndDestination = _this._splitSourceAndDestination$1(t6); + source = sourceAndDestination.item1; + destination = sourceAndDestination.item2; + if (!seen.add$1(0, source)) + A.ExecutableOptions__fail(_s18_ + source + '".'); + if (source === "-") + t1.$indexSet(0, _null, destination); + else if (A.dirExists(source)) { + t3.$indexSet(0, source, destination); + t1.addAll$1(0, _this._listSourceDirectory$2(source, destination)); + } else + t1.$indexSet(0, source, destination); + } + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, t4), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = new A.UnmodifiableMapView(new A.PathMap(t3, t4), type$.UnmodifiableMapView_of_nullable_String_and_String); + }, + _splitSourceAndDestination$1(argument) { + var t1, i, t2, t3, nextColon; + for (t1 = argument.length, i = 0; i < t1; ++i) { + if (i === 1) { + t2 = i - 1; + if (t1 > t2 + 2) { + t3 = B.JSString_methods.codeUnitAt$1(argument, t2); + if (!(t3 >= 97 && t3 <= 122)) + t3 = t3 >= 65 && t3 <= 90; + else + t3 = true; + t2 = t3 && B.JSString_methods.codeUnitAt$1(argument, t2 + 1) === 58; + } else + t2 = false; + } else + t2 = false; + if (t2) + continue; + if (B.JSString_methods._codeUnitAt$1(argument, i) === 58) { + t2 = i + 1; + nextColon = B.JSString_methods.indexOf$2(argument, ":", t2); + if (nextColon === i + 2) + if (t1 > t2 + 2) { + t1 = B.JSString_methods._codeUnitAt$1(argument, t2); + if (!(t1 >= 97 && t1 <= 122)) + t1 = t1 >= 65 && t1 <= 90; + else + t1 = true; + t1 = t1 && B.JSString_methods._codeUnitAt$1(argument, t2 + 1) === 58; + } else + t1 = false; + else + t1 = false; + if ((t1 ? B.JSString_methods.indexOf$2(argument, ":", nextColon + 1) : nextColon) !== -1) + A.ExecutableOptions__fail('"' + argument + '" may only contain one ":".'); + return new A.Tuple2(B.JSString_methods.substring$2(argument, 0, i), B.JSString_methods.substring$1(argument, t2), type$.Tuple2_String_String); + } + } + throw A.wrapException(A.ArgumentError$('Expected "' + argument + '" to contain a colon.', null)); + }, + _listSourceDirectory$2(source, destination) { + var t2, t3, t4, t5, t6, t7, parts, + t1 = type$.String; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = J.get$iterator$ax(A.listDir(source, true)), t3 = source === destination, t4 = type$.JSArray_nullable_String, t5 = type$.WhereTypeIterable_String; t2.moveNext$0();) { + t6 = t2.get$current(t2); + if (this._isEntrypoint$1(t6)) + t7 = !(t3 && A.ParsedPath_ParsedPath$parse(t6, $.$get$context().style)._splitExtension$1(1)[1] === ".css"); + else + t7 = false; + if (t7) { + t7 = $.$get$context(); + parts = A._setArrayType([destination, t7.withoutExtension$1(t7.relative$2$from(t6, source)) + ".css", null, null, null, null, null, null], t4); + A._validateArgList("join", parts); + t1.$indexSet(0, t6, t7.joinAll$1(new A.WhereTypeIterable(parts, t5))); + } + } + return t1; + }, + _isEntrypoint$1(path) { + var extension, + t1 = $.$get$context().style; + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(path, t1).get$basename(), "_")) + return false; + extension = A.ParsedPath_ParsedPath$parse(path, t1)._splitExtension$1(1)[1]; + return extension === ".scss" || extension === ".sass" || extension === ".css"; + }, + get$_writeToStdout() { + var t1, _this = this; + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + if (t1.get$length(t1) === 1) { + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + t1 = t1.get$values(t1); + t1 = t1.get$single(t1) == null; + } else + t1 = false; + return t1; + }, + get$emitSourceMap() { + var _this = this, + _s10_ = "source-map", + _s15_ = "source-map-urls", + _s13_ = "embed-sources", + _s16_ = "embed-source-map", + t1 = _this._options; + if (!A._asBool(t1.$index(0, _s10_))) + if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("--source-map-urls isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s13_)) + A.ExecutableOptions__fail("--embed-sources isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s16_)) + A.ExecutableOptions__fail("--embed-source-map isn't allowed with --no-source-map."); + if (!_this.get$_writeToStdout()) + return A._asBool(t1.$index(0, _s10_)); + if (J.$eq$(_this._ifParsed$1(_s15_), "relative")) + A.ExecutableOptions__fail("--source-map-urls=relative isn't allowed when printing to stdout."); + if (A._asBool(t1.$index(0, _s16_))) + return A._asBool(t1.$index(0, _s10_)); + else if (J.$eq$(_this._ifParsed$1(_s10_), true)) + A.ExecutableOptions__fail("When printing to stdout, --source-map requires --embed-source-map."); + else if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("When printing to stdout, --source-map-urls requires --embed-source-map."); + else if (A._asBool(t1.$index(0, _s13_))) + A.ExecutableOptions__fail("When printing to stdout, --embed-sources requires --embed-source-map."); + else + return false; + }, + sourceMapUrl$2(_, url, destination) { + var t1, path, t2, _null = null; + if (url.get$scheme().length !== 0 && url.get$scheme() !== "file") + return url; + t1 = $.$get$context(); + path = t1.style.pathFromUri$1(A._parseUri(url)); + if (J.$eq$(this._options.$index(0, "source-map-urls"), "relative") && !this.get$_writeToStdout()) { + destination.toString; + t2 = t1.relative$2$from(path, t1.dirname$1(destination)); + } else + t2 = t1.absolute$7(path, _null, _null, _null, _null, _null, _null); + return t1.toUri$1(t2); + }, + _ifParsed$1($name) { + var t1 = this._options; + return t1.wasParsed$1($name) ? t1.$index(0, $name) : null; + } + }; + A.ExecutableOptions__parser_closure.prototype = { + call$0() { + var t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Option), + t3 = [], + parser = new A.ArgParser(t2, A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new A.UnmodifiableMapView(t2, type$.UnmodifiableMapView_String_Option), new A.UnmodifiableMapView(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ArgParser), type$.UnmodifiableMapView_String_ArgParser), t3, true, null); + parser.addOption$2$hide("precision", true); + parser.addFlag$2$hide("async", true); + t3.push(A.ExecutableOptions__separator("Input and Output")); + parser.addFlag$2$help("stdin", "Read the stylesheet from stdin."); + parser.addFlag$2$help("indented", "Use the indented syntax for input from stdin."); + parser.addMultiOption$5$abbr$help$splitCommas$valueHelp("load-path", "I", "A path to use when resolving imports.\nMay be passed multiple times.", false, "PATH"); + t1 = type$.JSArray_String; + parser.addOption$6$abbr$allowed$defaultsTo$help$valueHelp("style", "s", A._setArrayType(["expanded", "compressed"], t1), "expanded", "Output style.", "NAME"); + parser.addFlag$3$defaultsTo$help("charset", true, "Emit a @charset or BOM for CSS with non-ASCII characters."); + parser.addFlag$3$defaultsTo$help("error-css", null, "When an error occurs, emit a stylesheet describing it.\nDefaults to true when compiling to a file."); + parser.addFlag$3$help$negatable("update", "Only compile out-of-date stylesheets.", false); + t3.push(A.ExecutableOptions__separator("Source Maps")); + parser.addFlag$3$defaultsTo$help("source-map", true, "Whether to generate source maps."); + parser.addOption$4$allowed$defaultsTo$help("source-map-urls", A._setArrayType(["relative", "absolute"], t1), "relative", "How to link from source maps to source files."); + parser.addFlag$3$defaultsTo$help("embed-sources", false, "Embed source file contents in source maps."); + parser.addFlag$3$defaultsTo$help("embed-source-map", false, "Embed source map contents in CSS."); + t3.push(A.ExecutableOptions__separator("Other")); + parser.addFlag$4$abbr$help$negatable("watch", "w", "Watch stylesheets and recompile when they change.", false); + parser.addFlag$2$help("poll", "Manually check for changes rather than using a native watcher.\nOnly valid with --watch."); + parser.addFlag$2$help("stop-on-error", "Don't compile more files once an error is encountered."); + parser.addFlag$4$abbr$help$negatable("interactive", "i", "Run an interactive SassScript shell.", false); + parser.addFlag$3$abbr$help("color", "c", "Whether to use terminal colors for messages."); + parser.addFlag$2$help("unicode", "Whether to use Unicode characters for messages."); + parser.addFlag$3$abbr$help("quiet", "q", "Don't print warnings."); + parser.addFlag$2$help("quiet-deps", "Don't print compiler warnings from dependencies.\nStylesheets imported through load paths count as dependencies."); + parser.addFlag$2$help("verbose", "Print all deprecation warnings even when they're repetitive."); + parser.addFlag$2$help("trace", "Print full Dart stack traces for exceptions."); + parser.addFlag$4$abbr$help$negatable("help", "h", "Print this usage information.", false); + parser.addFlag$3$help$negatable("version", "Print the version of Dart Sass.", false); + return parser; + }, + $signature: 589 + }; + A.ExecutableOptions_interactive_closure.prototype = { + call$0() { + var invalidOptions, _i, option, + t1 = this.$this._options; + if (!A._asBool(t1.$index(0, "interactive"))) + return false; + invalidOptions = ["stdin", "indented", "style", "source-map", "source-map-urls", "embed-sources", "embed-source-map", "update", "watch"]; + for (_i = 0; _i < 9; ++_i) { + option = invalidOptions[_i]; + if (!t1._parser.options._map.containsKey$1(option)) + A.throwExpression(A.ArgumentError$('Could not find an option named "' + option + '".', null)); + if (t1._parsed.containsKey$1(option)) + throw A.wrapException(A.UsageException$("--" + option + " isn't allowed with --interactive.")); + } + return true; + }, + $signature: 28 + }; + A.ExecutableOptions_emitErrorCss_closure.prototype = { + call$1(destination) { + return destination != null; + }, + $signature: 166 + }; + A.UsageException.prototype = {$isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.watch_closure.prototype = { + call$1(dir) { + for (; !A.dirExists(dir);) + dir = $.$get$context().dirname$1(dir); + return this.dirWatcher.watch$1(0, dir); + }, + $signature: 340 + }; + A._Watcher.prototype = { + compile$3$ifModified(_, source, destination, ifModified) { + return this.compile$body$_Watcher(0, source, destination, ifModified); + }, + compile$2($receiver, source, destination) { + return this.compile$3$ifModified($receiver, source, destination, false); + }, + compile$body$_Watcher(_, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, error0, stackTrace0, path, exception, t1, t2, $async$exception; + var $async$compile$3$ifModified = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(A.compileStylesheet($async$self._watch$_options, $async$self._graph, source, destination, ifModified), $async$compile$3$ifModified); + case 7: + // returning from await. + $async$returnValue = true; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = $async$self._watch$_options; + if (!t1.get$emitErrorCss()) + $async$self._delete$1(destination); + t1 = J.toString$1$color$(error, t1.get$color()); + t2 = A.getTrace(error); + $async$self._printError$2(t1, t2 == null ? stackTrace : t2); + J.set$exitCode$x(self.process, 65); + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } else if (t1 instanceof A.FileSystemException) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + path = error0.path; + t1 = path == null ? error0.message : "Error reading " + $.$get$context().relative$2$from(path, null) + ": " + error0.message + "."; + t2 = A.getTrace(error0); + $async$self._printError$2(t1, t2 == null ? stackTrace0 : t2); + J.set$exitCode$x(self.process, 66); + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$compile$3$ifModified, $async$completer); + }, + _delete$1(path) { + var buffer, t1, exception; + try { + A.deleteFile(path); + buffer = new A.StringBuffer(""); + t1 = this._watch$_options; + if (t1.get$color()) + buffer._contents += "\x1b[33m"; + buffer._contents += "Deleted " + path + "."; + if (t1.get$color()) + buffer._contents += "\x1b[0m"; + A.print(buffer); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + _printError$2(message, stackTrace) { + var t2, + t1 = $.$get$stderr(); + t1.writeln$1(message); + t2 = this._watch$_options._options; + if (A._asBool(t2.$index(0, "trace"))) { + t1.writeln$0(); + t1.writeln$1(B.JSString_methods.trimRight$0(A.Trace_Trace$from(stackTrace).get$terse().toString$0(0))); + } + if (!A._asBool(t2.$index(0, "stop-on-error"))) + t1.writeln$0(); + }, + watch$1(_, watcher) { + return this.watch$body$_Watcher(0, watcher); + }, + watch$body$_Watcher(_, watcher) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, $event, extension, success, success0, success1, t2, t1; + var $async$watch$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = watcher._group.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + t1 = new A._StreamIterator(A.checkNotNullable($async$self._debounceEvents$1(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>"))), "stream", type$.Object)); + $async$handler = 3; + t2 = $async$self._watch$_options._options; + case 6: + // for condition + $async$goto = 8; + return A._asyncAwait(t1.moveNext$0(), $async$watch$1); + case 8: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 7; + break; + } + $event = t1.get$current(t1); + extension = A.ParsedPath_ParsedPath$parse($event.path, $.$get$context().style)._splitExtension$1(1)[1]; + if (!J.$eq$(extension, ".sass") && !J.$eq$(extension, ".scss") && !J.$eq$(extension, ".css")) { + // goto for condition + $async$goto = 6; + break; + } + case 9: + // switch + switch ($event.type) { + case B.ChangeType_modify: + // goto case + $async$goto = 11; + break; + case B.ChangeType_add: + // goto case + $async$goto = 12; + break; + case B.ChangeType_remove: + // goto case + $async$goto = 13; + break; + default: + // goto after switch + $async$goto = 10; + break; + } + break; + case 11: + // case + $async$goto = 14; + return A._asyncAwait($async$self._handleModify$1($event.path), $async$watch$1); + case 14: + // returning from await. + success = $async$result; + if (!success && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 12: + // case + $async$goto = 15; + return A._asyncAwait($async$self._handleAdd$1($event.path), $async$watch$1); + case 15: + // returning from await. + success0 = $async$result; + if (!success0 && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 13: + // case + $async$goto = 16; + return A._asyncAwait($async$self._handleRemove$1($event.path), $async$watch$1); + case 16: + // returning from await. + success1 = $async$result; + if (!success1 && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 10: + // after switch + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$goto = 17; + return A._asyncAwait(t1.cancel$0(), $async$watch$1); + case 17: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$watch$1, $async$completer); + }, + _handleModify$1(path) { + return this._handleModify$body$_Watcher(path); + }, + _handleModify$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t1, t2, t0, url, node; + var $async$_handleModify$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin")) { + t1 = $.$get$context(); + t2 = A._realCasePath(t1.absolute$7(t1.normalize$1(path), null, null, null, null, null, null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, path); + t0 = t2; + t2 = t1; + t1 = t0; + } + url = t2.toUri$1(t1); + t1 = $async$self._graph; + node = t1._nodes.$index(0, url); + if (node == null) { + $async$returnValue = $async$self._handleAdd$1(path); + // goto return + $async$goto = 1; + break; + } + t1.reload$1(url); + $async$goto = 3; + return A._asyncAwait($async$self._recompileDownstream$1(A._setArrayType([node], type$.JSArray_StylesheetNode)), $async$_handleModify$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleModify$1, $async$completer); + }, + _handleAdd$1(path) { + return this._handleAdd$body$_Watcher(path); + }, + _handleAdd$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, destination, success, t1, t2, $async$temp1; + var $async$_handleAdd$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + destination = $async$self._destinationFor$1(path); + $async$temp1 = destination == null; + if ($async$temp1) + $async$result = $async$temp1; + else { + // goto then + $async$goto = 3; + break; + } + // goto join + $async$goto = 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self.compile$2(0, path, destination), $async$_handleAdd$1); + case 5: + // returning from await. + case 4: + // join + success = $async$result; + t1 = $.$get$context(); + t2 = t1.absolute$7(".", null, null, null, null, null, null); + $async$goto = 6; + return A._asyncAwait($async$self._recompileDownstream$1($async$self._graph.addCanonical$3(new A.FilesystemImporter(t2), t1.toUri$1(J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin") ? A._realCasePath(t1.absolute$7(t1.normalize$1(path), null, null, null, null, null, null)) : t1.canonicalize$1(0, path)), t1.toUri$1(path))), $async$_handleAdd$1); + case 6: + // returning from await. + $async$returnValue = $async$result && success; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleAdd$1, $async$completer); + }, + _handleRemove$1(path) { + return this._handleRemove$body$_Watcher(path); + }, + _handleRemove$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t1, t2, t0, url, t3, destination, node, toRecompile; + var $async$_handleRemove$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin")) { + t1 = $.$get$context(); + t2 = A._realCasePath(t1.absolute$7(t1.normalize$1(path), null, null, null, null, null, null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, path); + t0 = t2; + t2 = t1; + t1 = t0; + } + url = t2.toUri$1(t1); + t1 = $async$self._graph; + t3 = t1._nodes; + if (t3.containsKey$1(url)) { + destination = $async$self._destinationFor$1(path); + if (destination != null) + $async$self._delete$1(destination); + } + t2 = t2.absolute$7(".", null, null, null, null, null, null); + node = t3.remove$1(0, url); + t3 = node != null; + if (t3) { + t1._transitiveModificationTimes.clear$0(0); + t1.importCache.clearImport$1(url); + node._stylesheet_graph$_remove$0(); + } + toRecompile = t1._recanonicalizeImports$2(new A.FilesystemImporter(t2), url); + if (t3) + toRecompile.addAll$1(0, node._downstream); + $async$goto = 3; + return A._asyncAwait($async$self._recompileDownstream$1(toRecompile), $async$_handleRemove$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleRemove$1, $async$completer); + }, + _debounceEvents$1(events) { + var t1 = type$.WatchEvent; + t1 = A.RateLimit__debounceAggregate(events, A.Duration$(25), A.instantiate1(A.rate_limit___collect$closure(), t1), false, true, t1, type$.List_WatchEvent); + return new A._ExpandStream(new A._Watcher__debounceEvents_closure(), t1, A._instanceType(t1)._eval$1("_ExpandStream")); + }, + _recompileDownstream$1(nodes) { + return this._recompileDownstream$body$_Watcher(nodes); + }, + _recompileDownstream$body$_Watcher(nodes) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t2, allSucceeded, node, success, t1, seen, toRecompile; + var $async$_recompileDownstream$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.StylesheetNode; + seen = A.LinkedHashSet_LinkedHashSet$_empty(t1); + toRecompile = A.ListQueue_ListQueue$of(nodes, t1); + t1 = type$.UnmodifiableSetView_StylesheetNode, t2 = $async$self._watch$_options._options, allSucceeded = true; + case 3: + // for condition + if (!!toRecompile.get$isEmpty(toRecompile)) { + // goto after for + $async$goto = 4; + break; + } + node = toRecompile.removeFirst$0(); + if (!seen.add$1(0, node)) { + // goto for condition + $async$goto = 3; + break; + } + $async$goto = 5; + return A._asyncAwait($async$self._compileIfEntrypoint$1(node.canonicalUrl), $async$_recompileDownstream$1); + case 5: + // returning from await. + success = $async$result; + allSucceeded = allSucceeded && success; + if (!success && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } + toRecompile.addAll$1(0, new A.UnmodifiableSetView(node._downstream, t1)); + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = allSucceeded; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_recompileDownstream$1, $async$completer); + }, + _compileIfEntrypoint$1(url) { + return this._compileIfEntrypoint$body$_Watcher(url); + }, + _compileIfEntrypoint$body$_Watcher(url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, source, destination; + var $async$_compileIfEntrypoint$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (url.get$scheme() !== "file") { + $async$returnValue = true; + // goto return + $async$goto = 1; + break; + } + source = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + destination = $async$self._destinationFor$1(source); + if (destination == null) { + $async$returnValue = true; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self.compile$2(0, source, destination), $async$_compileIfEntrypoint$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileIfEntrypoint$1, $async$completer); + }, + _destinationFor$1(source) { + var t2, destination, t3, t4, t5, t6, parts, + t1 = this._watch$_options; + t1._ensureSources$0(); + t2 = type$.String; + destination = t1._sourcesToDestinations.cast$2$0(0, t2, t2).$index(0, source); + if (destination != null) + return destination; + t3 = $.$get$context(); + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(source, t3.style).get$basename(), "_")) + return null; + t1._ensureSources$0(); + t1 = t1.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = t1.cast$2$0(0, t2, t2); + t2 = t2.get$entries(t2); + t2 = t2.get$iterator(t2); + t1 = type$.JSArray_nullable_String; + t4 = type$.WhereTypeIterable_String; + for (; t2.moveNext$0();) { + t5 = t2.get$current(t2); + t6 = t5.key; + if (t3._isWithinOrEquals$2(t6, source) !== B._PathRelation_within) + continue; + parts = A._setArrayType([t5.value, t3.withoutExtension$1(t3.relative$2$from(source, t6)) + ".css", null, null, null, null, null, null], t1); + A._validateArgList("join", parts); + destination = t3.joinAll$1(new A.WhereTypeIterable(parts, t4)); + if (t3._isWithinOrEquals$2(destination, source) !== B._PathRelation_equal) + return destination; + } + return null; + } + }; + A._Watcher__debounceEvents_closure.prototype = { + call$1(buffer) { + var t2, t3, t4, oldType, + t1 = A.PathMap__create(null, type$.ChangeType); + for (t2 = J.get$iterator$ax(buffer); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = t3.path; + oldType = t1.$index(0, t4); + if (oldType == null) + t1.$indexSet(0, t4, t3.type); + else if (t3.type === B.ChangeType_remove) + t1.$indexSet(0, t4, B.ChangeType_remove); + else if (oldType !== B.ChangeType_add) + t1.$indexSet(0, t4, B.ChangeType_modify); + } + t2 = A._setArrayType([], type$.JSArray_WatchEvent); + for (t1 = t1.get$entries(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + t4 = t3.value; + t3 = t3.key; + t3.toString; + t2.push(new A.WatchEvent(t4, t3)); + } + return t2; + }, + $signature: 348 + }; + A.EmptyExtensionStore.prototype = { + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty5; + }, + addSelector$3(selector, span, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addSel)); + }, + addExtension$4(extender, target, extend, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addExt_)); + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExts)); + }, + clone$0() { + return B.Tuple2_EmptyExtensionStore_Map_empty; + }, + $isExtensionStore: 1 + }; + A.Extension.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$(string$.You_ma, extension.span)); + }, + toString$0(_) { + return A.serializeSelector(this.selector, true); + } + }; + A.ExtensionStore.prototype = { + get$isEmpty(_) { + return this._extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._selectors, type$.MapKeySet_SimpleSelector); + }, + extensionsWhereTarget$1($async$callback) { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3; + return function $async$extensionsWhereTarget$1($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._extensions, t1 = t1.get$entries(t1), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + if (!callback.call$1(t2.key)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = J.get$values$z(t2.value), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return A._IterationMarker_yieldStar(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return t3; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.Extension); + }, + addSelector$3(selector, selectorSpan, mediaContext) { + var originalSelector, error, stackTrace, t1, t2, t3, _i, exception, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true)) + for (t1 = originalSelector.components, t2 = t1.length, t3 = _this._originals, _i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i]); + t1 = _this._extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extendList$4(originalSelector, selectorSpan, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t3 = error; + t4 = J.getInterceptor$z(t3); + A.throwWithTrace(new A.SassException("From " + A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t4, t3)), stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableCssValue(selector, selectorSpan, type$.ModifiableCssValue_SelectorList); + if (mediaContext != null) + _this._mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._registerSelector$2(selector, modifiableSelector); + return modifiableSelector; + }, + _registerSelector$2(list, selector) { + var t1, t2, t3, _i, t4, t5, _i0, t6, t7, _i1, simple, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._selectors, _i = 0; _i < t2; ++_i) + for (t4 = t1[_i].components, t5 = t4.length, _i0 = 0; _i0 < t5; ++_i0) + for (t6 = t4[_i0].selector.components, t7 = t6.length, _i1 = 0; _i1 < t7; ++_i1) { + simple = t6[_i1]; + J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure()), selector); + if (!(simple instanceof A.PseudoSelector)) + continue; + selectorInPseudo = simple.selector; + if (selectorInPseudo != null) + this._registerSelector$2(selectorInPseudo, selector); + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, _i, complex, t12, extension, existingExtension, t13, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._selectors.$index(0, target), + t1 = _this._extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure()); + for (t2 = extender.value.components, t3 = t2.length, t4 = selectors == null, t5 = _this._sourceSpecificity, t6 = extender.span, t7 = extend.span, t8 = extend.isOptional, t9 = existingExtensions != null, t10 = type$.ComplexSelector, t11 = type$.Extension, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + complex.get$specificity(); + t12 = new A.Extender(complex, false, t6); + extension = t12._extension = new A.Extension(t12, target, mediaContext, t8, t7); + existingExtension = sources.$index(0, complex); + if (existingExtension != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge(existingExtension, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t12 = new A._SyncStarIterator(_this._simpleSelectors$1(complex)._outerHelper()); t12.moveNext$0();) { + t13 = t12.get$current(t12); + J.add$1$ax(t1.putIfAbsent$2(t13, new A.ExtensionStore_addExtension_closure0()), extension); + t5.putIfAbsent$2(t13, new A.ExtensionStore_addExtension_closure1(complex)); + } + if (!t4 || t9) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t10, t11); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension); + if (t9) { + additionalExtensions = _this._extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll2(newExtensionsByTarget, additionalExtensions, t1, t10, t11); + } + if (!t4) + _this._extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _simpleSelectors$1(complex) { + return this._simpleSelectors$body$ExtensionStore(complex); + }, + _simpleSelectors$body$ExtensionStore($async$complex) { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, _i, t3, t4, _i0, simple, selector, t5, t6, _i1; + return function $async$_simpleSelectors$1($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t3 = t1[_i].selector.components, t4 = t3.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t4)) { + // goto after for + $async$goto = 7; + break; + } + simple = t3[_i0]; + $async$goto = 8; + return simple; + case 8: + // after yield + if (!(simple instanceof A.PseudoSelector)) { + // goto for update + $async$goto = 6; + break; + } + selector = simple.selector; + if (selector == null) { + // goto for update + $async$goto = 6; + break; + } + t5 = selector.components, t6 = t5.length, _i1 = 0; + case 9: + // for condition + if (!(_i1 < t6)) { + // goto after for + $async$goto = 11; + break; + } + $async$goto = 12; + return A._IterationMarker_yieldStar($async$self._simpleSelectors$1(t5[_i1])); + case 12: + // after yield + case 10: + // for update + ++_i1; + // goto for condition + $async$goto = 9; + break; + case 11: + // after for + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.SimpleSelector); + }, + _extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, containsExtension, first, _i0, complex, t10, t11, t12, t13, t14, withExtender, existingExtension, _i1, _i2; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extensionsByExtender, t4 = type$.SimpleSelector, t5 = type$.Map_ComplexSelector_Extension, t6 = this._extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extendComplex$4(extension.extender.selector, extension.extender.span, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException) { + error = t8; + stackTrace = A.getTraceFromException(exception); + t8 = error; + t9 = J.getInterceptor$z(t8); + A.throwWithTrace(new A.SassException("From " + extension.extender.span.message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t9, t8)), stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + containsExtension = B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components); + for (t8 = selectors, t9 = t8.length, first = true, _i0 = 0; _i0 < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i0) { + complex = t8[_i0]; + if (containsExtension && first) { + first = false; + continue; + } + t10 = extension; + t11 = t10.extender; + t12 = t10.target; + t13 = t10.span; + t14 = t10.mediaContext; + t10 = t10.isOptional; + complex.get$specificity(); + t11 = new A.Extender(complex, false, t11.span); + withExtender = t11._extension = new A.Extension(t11, t12, t14, t10, t13); + existingExtension = t7.$index(0, complex); + if (existingExtension != null) + t7.$indexSet(0, complex, A.MergedExtension_merge(existingExtension, withExtender)); + else { + t7.$indexSet(0, complex, withExtender); + for (t10 = complex.components, t11 = t10.length, _i1 = 0; _i1 < t11; ++_i1) + for (t12 = t10[_i1].selector.components, t13 = t12.length, _i2 = 0; _i2 < t13; ++_i2) + J.add$1$ax(t3.putIfAbsent$2(t12[_i2], new A.ExtensionStore__extendExistingExtensions_closure()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure0()).$indexSet(0, complex, withExtender); + } + } + } + if (!containsExtension) + t7.remove$1(0, extension.extender); + } + return additionalExtensions; + }, + _extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4; + for (t1 = selectors.get$iterator(selectors), t2 = this._mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extendList$4(selector.value, selector.span, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = error; + t4 = J.getInterceptor$z(t3); + A.throwWithTrace(new A.SassException("From " + selector.span.message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t4, t3)), stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, _box_0 = {}; + _box_0.newExtensions = _box_0.selectorsToExtend = _box_0.extensionsToExtend = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = this._sourceSpecificity; t1.moveNext$0();) { + t3 = t1.get$current(t1); + if (t3.get$isEmpty(t3)) + continue; + t2.addAll$1(0, t3.get$_sourceSpecificity()); + t3.get$_extensions().forEach$1(0, new A.ExtensionStore_addExtensions_closure(_box_0, this)); + } + A.NullableExtension_andThen(_box_0.newExtensions, new A.ExtensionStore_addExtensions_closure0(_box_0, this)); + }, + _extendList$4(list, listSpan, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extendComplex$4(complex, listSpan, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._originals; + return A.SelectorList$(this._trim$2(extended, t1.get$contains(t1))); + }, + _extendList$3(list, listSpan, extensions) { + return this._extendList$4(list, listSpan, extensions, null); + }, + _extendComplex$4(complex, complexSpan, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, t11, extendedNotExpanded, i, component, extended, t12, result, t13, t14, t15, t16, _null = null, + _s56_ = string$.leadin, + _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return _null; + isOriginal = this._originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector, t6 = type$.Combinator, t7 = type$.ComplexSelectorComponent, t8 = complex.lineBreak, t9 = !t8, t10 = type$.JSArray_ComplexSelector, t2 = t2 === 0, t11 = type$.JSArray_ComplexSelectorComponent, extendedNotExpanded = _null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extendCompound$5$inOriginal(component, complexSpan, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) { + t12 = A._setArrayType([component], t11); + result = A.List_List$from(B.List_empty0, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + result = A.List_List$from(t12, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + if (t13.length === 0 && t12.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + extendedNotExpanded.push(A._setArrayType([new A.ComplexSelector(t13, t12, t8)], t10)); + } + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t12 = A._arrayInstanceType(t3); + t13 = new A.SubListIterable(t3, 0, i, t12._eval$1("SubListIterable<1>")); + t13.SubListIterable$3(t3, 0, i, t12._precomputed1); + result = A.List_List$from(t1, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t12.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + extendedNotExpanded = A._setArrayType([A._setArrayType([new A.ComplexSelector(t12, t13, t8)], t10), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t12 = A._setArrayType([], t10); + for (t13 = J.get$iterator$ax(extended); t13.moveNext$0();) { + t14 = t13.get$current(t13); + t15 = t14.leadingCombinators; + if (t15.length === 0 || B.C_ListEquality.equals$2(0, t1, t15)) { + t15 = t14.components; + t14 = !t9 || t14.lineBreak; + result = A.List_List$from(t1, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t16 = result; + result = A.List_List$from(t15, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t15 = result; + if (t16.length === 0 && t15.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + t12.push(new A.ComplexSelector(t16, t15, t14)); + } + } + extendedNotExpanded = A._setArrayType([t12], t5); + } + } + if (extendedNotExpanded == null) + return _null; + _box_0.first = true; + t1 = type$.ComplexSelector; + t1 = J.expand$1$1$ax(A.paths(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure(_box_0, this, complex), t1); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + _extendCompound$5$inOriginal(component, componentSpan, extensions, mediaQueryContext, inOriginal) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, options, i, simple, extended, result, t13, t14, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + _s28_ = "components may not be empty.", + _s56_ = string$.leadin, + t1 = _this._mode, + targetsUsed = t1 === B.ExtendMode_normal_normal || extensions.get$length(extensions) < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector), + simples = component.selector.components; + for (t2 = simples.length, t3 = type$.JSArray_List_Extender, t4 = type$.JSArray_Extender, t5 = type$.Combinator, t6 = type$.JSArray_ComplexSelectorComponent, t7 = type$.ComplexSelectorComponent, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = type$.SimpleSelector, t11 = _this._sourceSpecificity, t12 = type$.JSArray_SimpleSelector, options = _null, i = 0; i < t2; ++i) { + simple = simples[i]; + extended = _this._extendSimple$5(simple, componentSpan, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) { + result = A.List_List$from(A._setArrayType([simple], t12), false, t10); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t13.length === 0) + A.throwExpression(A.ArgumentError$(_s28_, _null)); + result = A.List_List$from(B.List_empty0, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = A._setArrayType([new A.ComplexSelectorComponent(new A.CompoundSelector(t13), result)], t6); + result = A.List_List$from(B.List_empty0, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t14 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t14.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + t11.$index(0, simple); + options.push(A._setArrayType([new A.Extender(new A.ComplexSelector(t14, t13, false), true, componentSpan)], t4)); + } + } else { + if (options == null) { + options = A._setArrayType([], t3); + if (i !== 0) { + t13 = new A.SubListIterable(simples, 0, i, t8); + t13.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t13, false, t10); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + compound = new A.CompoundSelector(t13); + if (t13.length === 0) + A.throwExpression(A.ArgumentError$(_s28_, _null)); + result = A.List_List$from(B.List_empty0, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = A._setArrayType([new A.ComplexSelectorComponent(compound, result)], t6); + result = A.List_List$from(B.List_empty0, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t14 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t14.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + _this._sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender(new A.ComplexSelector(t14, t13, false), true, componentSpan)], t4)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.get$length(extensions)) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(B.JSArray_methods.get$first(options)), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths(options, type$.Extender); + t2 = A._setArrayType([], type$.JSArray_ComplexSelector); + t1 = t1 === B.ExtendMode_replace_replace; + t3 = !t1; + if (t3) + t2.push(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure(), t10)), A.List_List$unmodifiable(component.combinators, t5))], t6), false)); + t4 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t4 = t4.get$iterator(t4); + t5 = component.combinators; + for (; t4.moveNext$0();) { + extended = _this._unifyExtenders$2(t4.get$current(t4), mediaQueryContext); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t5); + if (!withCombinators.accept$1(B.C__IsUselessVisitor)) + t2.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure0(); + return _this._trim$2(t2, inOriginal && t3 ? new A.ExtensionStore__extendCompound_closure1(B.JSArray_methods.get$first(t2)) : isOriginal); + }, + _unifyExtenders$2(extenders, mediaQueryContext) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(originals), A.List_List$unmodifiable(B.List_empty0, type$.Combinator))], type$.JSArray_ComplexSelectorComponent), originalsLineBreak)); + complexes = A.unifyComplex(toUnify); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extendSimple$5(simple, simpleSpan, extensions, mediaQueryContext, targetsUsed) { + var extended, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo(this, extensions, targetsUsed, simpleSpan); + if (simple instanceof A.PseudoSelector && simple.selector != null) { + extended = this._extendPseudo$4(simple, simpleSpan, extensions, mediaQueryContext); + if (extended != null) + return new A.MappedListIterable(extended, new A.ExtensionStore__extendSimple_closure(this, t1, simpleSpan), A._arrayInstanceType(extended)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure0()); + }, + _extenderForSimple$2(simple, span) { + var t1 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([simple], type$.JSArray_SimpleSelector)), A.List_List$unmodifiable(B.List_empty0, type$.Combinator))], type$.JSArray_ComplexSelectorComponent), false); + this._sourceSpecificity.$index(0, simple); + return new A.Extender(t1, true, span); + }, + _extendPseudo$4(pseudo, pseudoSpan, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extendList$4(selector, pseudoSpan, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure0())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure1(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure2(pseudo), type$.ComplexSelector); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure3(pseudo), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector); + result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([A.PseudoSelector$(pseudo.name, pseudo.argument, !pseudo.isClass, A.SelectorList$(complexes))], type$.JSArray_PseudoSelector); + }, + _trim$2(selectors, isOriginal) { + var result, i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity; + if (selectors.length > 100) + return selectors; + result = A.QueueList$(null, type$.ComplexSelector); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (J.$eq$(result.$index(0, j), complex1)) { + A.rotateSlice(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure0(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); + } + return specificity; + }, + clone$0() { + var t3, t4, _this = this, + t1 = type$.SimpleSelector, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList), + t2 = type$.ModifiableCssValue_SelectorList, + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.List_CssMediaQuery), + oldToNewSelectors = A.LinkedHashMap_LinkedHashMap$_empty(type$.CssValue_SelectorList, t2); + _this._selectors.forEach$1(0, new A.ExtensionStore_clone_closure(_this, newSelectors, oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension; + t3 = A.copyMapOfMap(_this._extensions, t1, type$.ComplexSelector, t2); + t2 = A.copyMapOfList(_this._extensionsByExtender, t1, t2); + t1 = new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int); + t1.addAll$1(0, _this._sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector); + t4.addAll$1(0, _this._originals); + return new A.Tuple2(new A.ExtensionStore(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal), oldToNewSelectors, type$.Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList); + }, + get$_extensions() { + return this._extensions; + }, + get$_sourceSpecificity() { + return this._sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 358 + }; + A.ExtensionStore__registerSelector_closure.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableCssValue_SelectorList); + }, + $signature: 364 + }; + A.ExtensionStore_addExtension_closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 122 + }; + A.ExtensionStore_addExtension_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 160 + }; + A.ExtensionStore_addExtension_closure1.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 12 + }; + A.ExtensionStore__extendExistingExtensions_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 160 + }; + A.ExtensionStore__extendExistingExtensions_closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 122 + }; + A.ExtensionStore_addExtensions_closure.prototype = { + call$2(target, newSources) { + var first, t1, extensionsForTarget, t2, t3, t4, selectorsForTarget, t5, existingSources, _this = this; + if (target instanceof A.PlaceholderSelector) { + first = B.JSString_methods._codeUnitAt$1(target.name, 0); + t1 = first === 45 || first === 95; + } else + t1 = false; + if (t1) + return; + t1 = _this.$this; + extensionsForTarget = t1._extensionsByExtender.$index(0, target); + t2 = extensionsForTarget == null; + if (!t2) { + t3 = _this._box_0; + t4 = t3.extensionsToExtend; + B.JSArray_methods.addAll$1(t4 == null ? t3.extensionsToExtend = A._setArrayType([], type$.JSArray_Extension) : t4, extensionsForTarget); + } + selectorsForTarget = t1._selectors.$index(0, target); + t3 = selectorsForTarget != null; + if (t3) { + t4 = _this._box_0; + t5 = t4.selectorsToExtend; + (t5 == null ? t4.selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableCssValue_SelectorList) : t5).addAll$1(0, selectorsForTarget); + } + t1 = t1._extensions; + existingSources = t1.$index(0, target); + if (existingSources == null) { + t4 = type$.ComplexSelector; + t5 = type$.Extension; + t1.$indexSet(0, target, A.LinkedHashMap_LinkedHashMap$of(newSources, t4, t5)); + if (!t2 || t3) { + t1 = _this._box_0; + t2 = t1.newExtensions; + t1 = t2 == null ? t1.newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(type$.SimpleSelector, type$.Map_ComplexSelector_Extension) : t2; + t1.$indexSet(0, target, A.LinkedHashMap_LinkedHashMap$of(newSources, t4, t5)); + } + } else + newSources.forEach$1(0, new A.ExtensionStore_addExtensions__closure1(_this._box_0, existingSources, extensionsForTarget, selectorsForTarget, target)); + }, + $signature: 370 + }; + A.ExtensionStore_addExtensions__closure1.prototype = { + call$2(extender, extension) { + var t2, _this = this, + t1 = _this.existingSources; + if (t1.containsKey$1(extender)) { + t2 = t1.$index(0, extender); + extension = A.MergedExtension_merge(t2, extension); + t1.$indexSet(0, extender, extension); + } else + t1.$indexSet(0, extender, extension); + if (_this.extensionsForTarget != null || _this.selectorsForTarget != null) { + t1 = _this._box_0; + t2 = t1.newExtensions; + t1 = t2 == null ? t1.newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(type$.SimpleSelector, type$.Map_ComplexSelector_Extension) : t2; + J.$indexSet$ax(t1.putIfAbsent$2(_this.target, new A.ExtensionStore_addExtensions___closure()), extender, extension); + } + }, + $signature: 372 + }; + A.ExtensionStore_addExtensions___closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 122 + }; + A.ExtensionStore_addExtensions_closure0.prototype = { + call$1(newExtensions) { + var t1 = this._box_0, + t2 = this.$this; + A.NullableExtension_andThen(t1.extensionsToExtend, new A.ExtensionStore_addExtensions__closure(t2, newExtensions)); + A.NullableExtension_andThen(t1.selectorsToExtend, new A.ExtensionStore_addExtensions__closure0(t2, newExtensions)); + }, + $signature: 375 + }; + A.ExtensionStore_addExtensions__closure.prototype = { + call$1(extensionsToExtend) { + return this.$this._extendExistingExtensions$2(extensionsToExtend, this.newExtensions); + }, + $signature: 385 + }; + A.ExtensionStore_addExtensions__closure0.prototype = { + call$1(selectorsToExtend) { + return this.$this._extendExistingSelectors$2(selectorsToExtend, this.newExtensions); + }, + $signature: 386 + }; + A.ExtensionStore__extendComplex_closure.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave(path, t1.lineBreak), new A.ExtensionStore__extendComplex__closure(this._box_0, this.$this, t1), type$.ComplexSelector); + }, + $signature: 390 + }; + A.ExtensionStore__extendComplex__closure.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._originals.contains$1(0, _this.complex)) + _this.$this._originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 72 + }; + A.ExtensionStore__extendCompound_closure.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 393 + }; + A.ExtensionStore__extendCompound_closure0.prototype = { + call$1(_) { + return false; + }, + $signature: 16 + }; + A.ExtensionStore__extendCompound_closure1.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 16 + }; + A.ExtensionStore__extendSimple_withoutPseudo.prototype = { + call$1(simple) { + var t1, t2, _this = this, + extensionsForSimple = _this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = _this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender); + t2 = _this.$this; + if (t2._mode !== B.ExtendMode_replace_replace) + t1.push(t2._extenderForSimple$2(simple, _this.simpleSpan)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 399 + }; + A.ExtensionStore__extendSimple_closure.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extenderForSimple$2(pseudo, this.simpleSpan)], type$.JSArray_Extender) : t1; + }, + $signature: 402 + }; + A.ExtensionStore__extendSimple_closure0.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender); + }, + $signature: 405 + }; + A.ExtensionStore__extendPseudo_closure.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 16 + }; + A.ExtensionStore__extendPseudo_closure0.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 16 + }; + A.ExtensionStore__extendPseudo_closure1.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 16 + }; + A.ExtensionStore__extendPseudo_closure2.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_YEQji._map.containsKey$1(innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector); + } + }, + $signature: 409 + }; + A.ExtensionStore__extendPseudo_closure3.prototype = { + call$1(complex) { + var t1 = this.pseudo; + return A.PseudoSelector$(t1.name, t1.argument, !t1.isClass, A.SelectorList$(A._setArrayType([complex], type$.JSArray_ComplexSelector))); + }, + $signature: 417 + }; + A.ExtensionStore__trim_closure.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 16 + }; + A.ExtensionStore__trim_closure0.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 16 + }; + A.ExtensionStore_clone_closure.prototype = { + call$2(simple, selectors) { + var t2, t3, t4, t5, t6, newSelector, mediaContext, _this = this, + t1 = type$.ModifiableCssValue_SelectorList, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = _this.$this._mediaContexts, t5 = _this.newMediaContexts; t2.moveNext$0();) { + t6 = t2.get$current(t2); + newSelector = new A.ModifiableCssValue(t6.value, t6.span, t1); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t6, newSelector); + mediaContext = t4.$index(0, t6); + if (mediaContext != null) + t5.$indexSet(0, newSelector, mediaContext); + } + }, + $signature: 429 + }; + A.unifyComplex_closure.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 16 + }; + A._weaveParents_closure.prototype = { + call$2(group1, group2) { + var unified, t1; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector(group1, group2)) + return group2; + if (A._complexIsParentSuperselector(group2, group1)) + return group1; + if (!A._mustUnify(group1, group2)) + return null; + unified = A.unifyComplex(A._setArrayType([A.ComplexSelector$(B.List_empty0, group1, false), A.ComplexSelector$(B.List_empty0, group2, false)], type$.JSArray_ComplexSelector)); + if (unified == null) + return null; + t1 = J.getInterceptor$asx(unified); + if (t1.get$length(unified) > 1) + return null; + return t1.get$first(unified).components; + }, + $signature: 434 + }; + A._weaveParents_closure0.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector(sequence.get$first(sequence), this.group); + }, + $signature: 445 + }; + A._weaveParents_closure1.prototype = { + call$1(sequence) { + return sequence.get$length(sequence) === 0; + }, + $signature: 162 + }; + A._weaveParents_closure2.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 459 + }; + A._mustUnify_closure.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure(this.uniqueSelectors)); + }, + $signature: 45 + }; + A._mustUnify__closure.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 14 + }; + A.paths_closure.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure(paths, t1), t1._eval$1("List<0>")); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure.prototype = { + call$1(path) { + var t1 = A.List_List$of(path, true, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure(complex1)); + }, + $signature: 16 + }; + A.listIsSuperselector__closure.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 16 + }; + A.complexIsSuperselector_closure.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 45 + }; + A.complexIsSuperselector_closure0.prototype = { + call$1(component) { + return A._isSupercombinator(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 45 + }; + A._selectorPseudoIsSuperselector_closure.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 67 + }; + A._selectorPseudoIsSuperselector_closure0.prototype = { + call$1(complex1) { + var t1, t2, t3; + if (complex1.leadingCombinators.length === 0) { + t1 = complex1.components; + t2 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + t3 = this.parents; + if (t3 != null) + B.JSArray_methods.addAll$1(t2, t3); + t2.push(new A.ComplexSelectorComponent(this.compound2, A.List_List$unmodifiable(B.List_empty0, type$.Combinator))); + t1 = A.complexIsSuperselector(t1, t2); + } else + t1 = false; + return t1; + }, + $signature: 16 + }; + A._selectorPseudoIsSuperselector_closure1.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 67 + }; + A._selectorPseudoIsSuperselector_closure2.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 67 + }; + A._selectorPseudoIsSuperselector_closure3.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure(complex, this.pseudo1)); + }, + $signature: 16 + }; + A._selectorPseudoIsSuperselector__closure.prototype = { + call$1(simple2) { + var selector2, _this = this; + if (simple2 instanceof A.TypeSelector) + return B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure(simple2)); + else if (simple2 instanceof A.IDSelector) + return B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure0(simple2)); + else if (simple2 instanceof A.PseudoSelector && simple2.name === _this.pseudo1.name) { + selector2 = simple2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector)); + } else + return false; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector) { + t1 = this.simple2.name.$eq(0, simple1.name); + t1 = !t1; + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure0.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector) { + t1 = simple1.name; + t1 = this.simple2.name !== t1; + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector_closure4.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 67 + }; + A._selectorPseudoIsSuperselector_closure5.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 14 + }; + A._selectorPseudoArgs_closure.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 465 + }; + A._selectorPseudoArgs_closure0.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 467 + }; + A.MergedExtension.prototype = { + unmerge$0() { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; + return function $async$unmerge$0($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._IterationMarker_yieldStar(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return left; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._IterationMarker_yieldStar(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return right; + case 11: + // after yield + case 8: + // join + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.Extension); + } + }; + A.ExtendMode.prototype = { + toString$0(_) { + return this.name; + } + }; + A.globalFunctions_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 4 + }; + A.global_closure.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure0.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure1.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure2.prototype = { + call$1($arguments) { + var parsed = A._parseChannels("rgb", A._setArrayType(["$red", "$green", "$blue"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString ? parsed : A._rgb("rgb", type$.List_Value._as(parsed)); + }, + $signature: 4 + }; + A.global_closure3.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure4.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure5.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure6.prototype = { + call$1($arguments) { + var parsed = A._parseChannels("rgba", A._setArrayType(["$red", "$green", "$blue"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString ? parsed : A._rgb("rgba", type$.List_Value._as(parsed)); + }, + $signature: 4 + }; + A.global_closure7.prototype = { + call$1($arguments) { + var color, t2, + t1 = J.getInterceptor$asx($arguments), + weight = t1.$index($arguments, 1).assertNumber$1("weight"); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + if (weight._number$_value !== 100 || !weight.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + t1 = color.get$red(color); + t2 = color.get$green(color); + return A._mixColors(color.changeRgb$3$blue$green$red(255 - color.get$blue(color), 255 - t2, 255 - t1), color, weight); + }, + $signature: 4 + }; + A.global_closure8.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 4 + }; + A.global_closure9.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 4 + }; + A.global_closure10.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure11.prototype = { + call$1($arguments) { + var parsed = A._parseChannels("hsl", A._setArrayType(["$hue", "$saturation", "$lightness"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString ? parsed : A._hsl("hsl", type$.List_Value._as(parsed)); + }, + $signature: 4 + }; + A.global_closure12.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 4 + }; + A.global_closure13.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 4 + }; + A.global_closure14.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure15.prototype = { + call$1($arguments) { + var parsed = A._parseChannels("hsla", A._setArrayType(["$hue", "$saturation", "$lightness"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString ? parsed : A._hsl("hsla", type$.List_Value._as(parsed)); + }, + $signature: 4 + }; + A.global_closure16.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) + return A._functionString("grayscale", $arguments); + return t1.$index($arguments, 0).assertColor$1("color").changeHsl$1$saturation(0); + }, + $signature: 4 + }; + A.global_closure17.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = t1.$index($arguments, 1).assertNumber$1("degrees"); + A._checkAngle(degrees, "degrees"); + return color.changeHsl$1$hue(color.get$hue(color) + degrees._number$_value); + }, + $signature: 23 + }; + A.global_closure18.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$lightness(B.JSNumber_methods.clamp$2(color.get$lightness(color) + amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 23 + }; + A.global_closure19.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$lightness(B.JSNumber_methods.clamp$2(color.get$lightness(color) - amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 23 + }; + A.global_closure20.prototype = { + call$1($arguments) { + return new A.SassString("saturate(" + A.serializeValue(J.$index$asx($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 18 + }; + A.global_closure21.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$saturation(B.JSNumber_methods.clamp$2(color.get$saturation(color) + amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 23 + }; + A.global_closure22.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$saturation(B.JSNumber_methods.clamp$2(color.get$saturation(color) - amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 23 + }; + A.global_closure23.prototype = { + call$1($arguments) { + var argument = J.$index$asx($arguments, 0); + if (argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart())) + return A._functionString("alpha", $arguments); + return A.SassNumber_SassNumber(argument.assertColor$1("color")._alpha, null); + }, + $signature: 4 + }; + A.global_closure24.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure())) + return A._functionString("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 18 + }; + A.global__closure.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 62 + }; + A.global_closure25.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) + return A._functionString("opacity", $arguments); + return A.SassNumber_SassNumber(t1.$index($arguments, 0).assertColor$1("color")._alpha, null); + }, + $signature: 4 + }; + A.module_closure.prototype = { + call$1($arguments) { + var result, t2, color, + t1 = J.getInterceptor$asx($arguments), + weight = t1.$index($arguments, 1).assertNumber$1("weight"); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + if (weight._number$_value !== 100 || !weight.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + result = A._functionString("invert", t1.take$1($arguments, 1)); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x29x20to_ci + t2, true); + return result; + } + color = t1.$index($arguments, 0).assertColor$1("color"); + t1 = color.get$red(color); + t2 = color.get$green(color); + return A._mixColors(color.changeRgb$3$blue$green$red(255 - color.get$blue(color), 255 - t2, 255 - t1), color, weight); + }, + $signature: 4 + }; + A.module_closure0.prototype = { + call$1($arguments) { + var result, t2, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("grayscale", t1.take$1($arguments, 1)); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x29x20to_cg + t2, true); + return result; + } + return t1.$index($arguments, 0).assertColor$1("color").changeHsl$1$saturation(0); + }, + $signature: 4 + }; + A.module_closure1.prototype = { + call$1($arguments) { + return A._hwb($arguments); + }, + $signature: 4 + }; + A.module_closure2.prototype = { + call$1($arguments) { + var parsed = A._parseChannels("hwb", A._setArrayType(["$hue", "$whiteness", "$blackness"], type$.JSArray_String), J.get$first$ax($arguments)); + if (parsed instanceof A.SassString) + throw A.wrapException(A.SassScriptException$('Expected numeric channels, got "' + parsed.toString$0(0) + '".', null)); + else + return A._hwb(type$.List_Value._as(parsed)); + }, + $signature: 4 + }; + A.module_closure3.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$whiteness(t1), "%"); + }, + $signature: 10 + }; + A.module_closure4.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$blackness(t1), "%"); + }, + $signature: 10 + }; + A.module_closure5.prototype = { + call$1($arguments) { + var result, t1, + argument = J.$index$asx($arguments, 0); + if (argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart())) { + result = A._functionString("alpha", $arguments); + t1 = result.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, string$.Using_c + t1, true); + return result; + } + return A.SassNumber_SassNumber(argument.assertColor$1("color")._alpha, null); + }, + $signature: 4 + }; + A.module_closure6.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure())) { + result = A._functionString("alpha", $arguments); + t1 = result.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, string$.Using_c + t1, true); + return result; + } + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 18 + }; + A.module__closure.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 62 + }; + A.module_closure7.prototype = { + call$1($arguments) { + var result, t2, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("opacity", $arguments); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x20to_co + t2, true); + return result; + } + return A.SassNumber_SassNumber(t1.$index($arguments, 0).assertColor$1("color")._alpha, null); + }, + $signature: 4 + }; + A._red_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$red(t1), null); + }, + $signature: 10 + }; + A._green_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$green(t1), null); + }, + $signature: 10 + }; + A._blue_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$blue(t1), null); + }, + $signature: 10 + }; + A._mix_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._mixColors(t1.$index($arguments, 0).assertColor$1("color1"), t1.$index($arguments, 1).assertColor$1("color2"), t1.$index($arguments, 2).assertNumber$1("weight")); + }, + $signature: 23 + }; + A._hue_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$hue(t1), "deg"); + }, + $signature: 10 + }; + A._saturation_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$saturation(t1), "%"); + }, + $signature: 10 + }; + A._lightness_closure.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber(t1.get$lightness(t1), "%"); + }, + $signature: 10 + }; + A._complement_closure.prototype = { + call$1($arguments) { + var color = J.$index$asx($arguments, 0).assertColor$1("color"); + return color.changeHsl$1$hue(color.get$hue(color) + 180); + }, + $signature: 23 + }; + A._adjust_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, true, false, false); + }, + $signature: 23 + }; + A._scale_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, false, true); + }, + $signature: 23 + }; + A._change_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, true, false); + }, + $signature: 23 + }; + A._ieHexStr_closure.prototype = { + call$1($arguments) { + var color = J.$index$asx($arguments, 0).assertColor$1("color"), + t1 = new A._ieHexStr_closure_hexString(); + return new A.SassString("#" + A.S(t1.call$1(A.fuzzyRound(color._alpha * 255))) + A.S(t1.call$1(color.get$red(color))) + A.S(t1.call$1(color.get$green(color))) + A.S(t1.call$1(color.get$blue(color))), false); + }, + $signature: 18 + }; + A._ieHexStr_closure_hexString.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(component, 16), 2, "0").toUpperCase(); + }, + $signature: 174 + }; + A._updateComponents_getParam.prototype = { + call$4$assertPercent$checkPercent($name, max, assertPercent, checkPercent) { + var t2, _this = this, + t1 = _this.keywords.remove$1(0, $name), + number = t1 == null ? null : t1.assertNumber$1($name); + if (number == null) + return null; + t1 = _this.scale; + t2 = !t1; + if (t2 && checkPercent) + A._checkPercent(number, $name); + if (!t2 || assertPercent) + number.assertUnit$2("%", $name); + if (t1) + max = 100; + if (!t2 || assertPercent) + t1 = number.valueInRange$3(_this.change ? 0 : -max, max, $name); + else { + t1 = _this.change ? 0 : -max; + t1 = number.valueInRangeWithUnit$4(t1, max, $name, checkPercent ? "%" : ""); + } + return t1; + }, + call$2($name, max) { + return this.call$4$assertPercent$checkPercent($name, max, false, false); + }, + call$3$checkPercent($name, max, checkPercent) { + return this.call$4$assertPercent$checkPercent($name, max, false, checkPercent); + }, + call$3$assertPercent($name, max, assertPercent) { + return this.call$4$assertPercent$checkPercent($name, max, assertPercent, false); + }, + $signature: 176 + }; + A._updateComponents_closure.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._updateComponents_updateValue.prototype = { + call$3(current, param, max) { + var t1; + if (param == null) + return current; + if (this.change) + return param; + if (this.adjust) + return B.JSNumber_methods.clamp$2(current + param, 0, max); + t1 = param > 0 ? max - current : current; + return current + t1 * (param / 100); + }, + $signature: 181 + }; + A._updateComponents_updateRgb.prototype = { + call$2(current, param) { + return A.fuzzyRound(this.updateValue.call$3(current, param, 255)); + }, + $signature: 185 + }; + A._functionString_closure.prototype = { + call$1(argument) { + return A.serializeValue(argument, false, true); + }, + $signature: 506 + }; + A._removedColorFunction_closure.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = A.S(t2.$index($arguments, 0)), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Morx3a + t1, null)); + }, + $signature: 508 + }; + A._rgb_closure.prototype = { + call$1(alpha) { + return A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 121 + }; + A._hsl_closure.prototype = { + call$1(alpha) { + return A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 121 + }; + A._removeUnits_closure.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 5 + }; + A._removeUnits_closure0.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 5 + }; + A._hwb_closure.prototype = { + call$1(alpha) { + return A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 121 + }; + A._parseChannels_closure.prototype = { + call$1(value) { + return value.get$isVar(); + }, + $signature: 62 + }; + A._length_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 10 + }; + A._nth_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 4 + }; + A._setNth_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2), + t2 = list.get$asList(), + newList = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return t1.$index($arguments, 0).withListContents$1(newList); + }, + $signature: 21 + }; + A._join_closure.prototype = { + call$1($arguments) { + var separator, bracketed, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3); + t1 = separatorParam._string$_text; + if (t1 === "auto") + if (list1.get$separator(list1) !== B.ListSeparator_undecided_null_undecided) + separator = list1.get$separator(list1); + else + separator = list2.get$separator(list2) !== B.ListSeparator_undecided_null_undecided ? list2.get$separator(list2) : B.ListSeparator_EVt; + else if (t1 === "space") + separator = B.ListSeparator_EVt; + else if (t1 === "comma") + separator = B.ListSeparator_rXA; + else { + if (t1 !== "slash") + throw A.wrapException(A.SassScriptException$(string$.x24separ, null)); + separator = B.ListSeparator_zg9; + } + bracketed = bracketedParam instanceof A.SassString && bracketedParam._string$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t1 = A.List_List$of(list1.get$asList(), true, type$.Value); + B.JSArray_methods.addAll$1(t1, list2.get$asList()); + return A.SassList$(t1, separator, bracketed); + }, + $signature: 21 + }; + A._append_closure0.prototype = { + call$1($arguments) { + var separator, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1); + t1 = t1.$index($arguments, 2).assertString$1("separator")._string$_text; + if (t1 === "auto") + separator = list.get$separator(list) === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_EVt : list.get$separator(list); + else if (t1 === "space") + separator = B.ListSeparator_EVt; + else if (t1 === "comma") + separator = B.ListSeparator_rXA; + else { + if (t1 !== "slash") + throw A.wrapException(A.SassScriptException$(string$.x24separ, null)); + separator = B.ListSeparator_zg9; + } + t1 = A.List_List$of(list.get$asList(), true, type$.Value); + t1.push(value); + return list.withListContents$2$separator(t1, separator); + }, + $signature: 21 + }; + A._zip_closure.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure(), t2), true, t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_Sof; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value>"), t2 = type$.Value; B.JSArray_methods.every$1(lists, new A._zip__closure0(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure1(_box_0), t1), false, t2); + result.fixed$length = Array; + result.immutable$list = Array; + results.push(new A.SassList(result, B.ListSeparator_EVt, false)); + ++_box_0.i; + } + return A.SassList$(results, B.ListSeparator_rXA, false); + }, + $signature: 21 + }; + A._zip__closure.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 528 + }; + A._zip__closure0.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 554 + }; + A._zip__closure1.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 4 + }; + A._index_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull : A.SassNumber_SassNumber(index + 1, null); + }, + $signature: 4 + }; + A._separator_closure.prototype = { + call$1($arguments) { + switch (J.get$separator$x(J.$index$asx($arguments, 0))) { + case B.ListSeparator_rXA: + return new A.SassString("comma", false); + case B.ListSeparator_zg9: + return new A.SassString("slash", false); + default: + return new A.SassString("space", false); + } + }, + $signature: 18 + }; + A._isBracketed_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._slash_closure.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$("At least two elements are required.", null)); + return A.SassList$(list, B.ListSeparator_zg9, false); + }, + $signature: 21 + }; + A._get_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.C__SassNull; + } + t1 = map._map$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull : t1; + }, + $signature: 4 + }; + A._set_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value), new A._set__closure0($arguments), true); + }, + $signature: 4 + }; + A._set__closure0.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 36 + }; + A._set_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + args = t1.$index($arguments, 1).get$asList(); + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", null)); + else if (t1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a value.", null)); + return A._modify(map, B.JSArray_methods.sublist$2(args, 0, t1 - 1), new A._set__closure(args), true); + }, + $signature: 4 + }; + A._set__closure.prototype = { + call$1(_) { + return B.JSArray_methods.get$last(this.args); + }, + $signature: 36 + }; + A._merge_closure.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map$_contents, t1, t1); + t2.addAll$1(0, map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 37 + }; + A._merge_closure0.prototype = { + call$1($arguments) { + var map2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + args = t1.$index($arguments, 1).get$asList(); + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", null)); + else if (t1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a map.", null)); + map2 = B.JSArray_methods.get$last(args).assertMap$1("map2"); + return A._modify(map1, A.IterableExtension_get_exceptLast(args), new A._merge__closure(map2), true); + }, + $signature: 4 + }; + A._merge__closure.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.addAll$1(0, this.map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 270 + }; + A._deepMerge_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 37 + }; + A._deepRemove_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify(map, A.IterableExtension_get_exceptLast(t2), new A._deepRemove__closure(t2), false); + }, + $signature: 4 + }; + A._deepRemove__closure.prototype = { + call$1(value) { + var t1, t2, + nestedMap = value.tryMap$0(); + if (nestedMap != null && nestedMap._map$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys))) { + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 36 + }; + A._remove_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 37 + }; + A._remove_closure0.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 37 + }; + A._keys_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$keys(t1), B.ListSeparator_rXA, false); + }, + $signature: 21 + }; + A._values_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$values(t1), B.ListSeparator_rXA, false); + }, + $signature: 21 + }; + A._hasKey_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.SassBoolean_false; + } + return map._map$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._modify_modifyNestedMap.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty : nestedMap)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 276 + }; + A._deepMergeImpl_closure.prototype = { + call$2(key, value) { + var valueMap, merged, + t1 = this.result, + t2 = t1.$index(0, key), + resultMap = t2 == null ? null : t2.tryMap$0(); + if (resultMap == null) + t1.$indexSet(0, key, value); + else { + valueMap = value.tryMap$0(); + if (valueMap != null) { + merged = A._deepMergeImpl(resultMap, valueMap); + if (merged === resultMap) + return; + t1.$indexSet(0, key, merged); + } else + t1.$indexSet(0, key, value); + } + }, + $signature: 60 + }; + A._ceil_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 29 + }; + A._clamp_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 10 + }; + A._floor_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 29 + }; + A._max_closure.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 10 + }; + A._min_closure.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 10 + }; + A._round_closure.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 29 + }; + A._abs_closure.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 29 + }; + A._hypot_closure.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, t4, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber>"), + numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure(), t2), true, t2._eval$1("ListIterable.E")); + t1 = numbers.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < t1; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t3 = J.getInterceptor$x(t2); + t4 = t3.get$numeratorUnits(t2); + return A.SassNumber_SassNumber$withUnits(t1, t3.get$denominatorUnits(t2), t4); + }, + $signature: 10 + }; + A._hypot__closure.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 282 + }; + A._log_closure.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull)) + return A.SassNumber_SassNumber(Math.log(number._number$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), _null); + }, + $signature: 10 + }; + A._pow_closure.prototype = { + call$1($arguments) { + var _s18_ = " to have no units.", + t1 = J.getInterceptor$asx($arguments), + base = t1.$index($arguments, 0).assertNumber$1("base"), + exponent = t1.$index($arguments, 1).assertNumber$1("exponent"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$base: Expected " + base.toString$0(0) + _s18_, null)); + else if (exponent.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$exponent: Expected " + exponent.toString$0(0) + _s18_, null)); + else + return A.SassNumber_SassNumber(Math.pow(base._number$_value, exponent._number$_value), null); + }, + $signature: 10 + }; + A._sqrt_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber(Math.sqrt(number._number$_value), null); + }, + $signature: 10 + }; + A._acos_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits(Math.acos(number._number$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 10 + }; + A._asin_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits(Math.asin(number._number$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 10 + }; + A._atan_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits(Math.atan(number._number$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 10 + }; + A._atan2_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 10 + }; + A._cos_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(Math.cos(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 10 + }; + A._sin_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(Math.sin(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 10 + }; + A._tan_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(Math.tan(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 10 + }; + A._compatible_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._isUnitless_closure.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._unit_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 18 + }; + A._percentage_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber(number._number$_value * 100, "%"); + }, + $signature: 10 + }; + A._randomFunction_closure.prototype = { + call$1($arguments) { + var limit, t2, t3, t4, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull)) + return A.SassNumber_SassNumber($.$get$_random0().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) { + t1 = limit.toString$0(0); + t2 = limit.get$unitString(); + t3 = limit.get$unitString(); + t4 = limit.get$unitString(); + A.EvaluationContext_current().warn$2$deprecation(0, string$.math_r + t1 + string$.x29x20in_a + t2 + ")) * 1" + t3 + string$.x0a_To_p + t4 + string$.x29x29__Mo, false); + } + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber($.$get$_random0().nextInt$1(limitScalar) + 1, null); + }, + $signature: 10 + }; + A._div_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber) || !(number2 instanceof A.SassNumber)) + A.EvaluationContext_current().warn$2$deprecation(0, string$.math_d, false); + return number1.dividedBy$1(number2); + }, + $signature: 4 + }; + A._numberFunction_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 10 + }; + A.global_closure26.prototype = { + call$1($arguments) { + return $._features.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A.global_closure27.prototype = { + call$1($arguments) { + return new A.SassString(A.serializeValue(J.get$first$ax($arguments), true, true), false); + }, + $signature: 18 + }; + A.global_closure28.prototype = { + call$1($arguments) { + var value = J.$index$asx($arguments, 0); + if (value instanceof A.SassArgumentList) + return new A.SassString("arglist", false); + if (value instanceof A.SassBoolean) + return new A.SassString("bool", false); + if (value instanceof A.SassColor) + return new A.SassString("color", false); + if (value instanceof A.SassList) + return new A.SassString("list", false); + if (value instanceof A.SassMap) + return new A.SassString("map", false); + if (value.$eq(0, B.C__SassNull)) + return new A.SassString("null", false); + if (value instanceof A.SassNumber) + return new A.SassString("number", false); + if (value instanceof A.SassFunction) + return new A.SassString("function", false); + if (value instanceof A.SassCalculation) + return new A.SassString("calculation", false); + return new A.SassString("string", false); + }, + $signature: 18 + }; + A.global_closure29.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, + argumentList = J.$index$asx($arguments, 0); + if (argumentList instanceof A.SassArgumentList) { + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (argumentList._wereKeywordsAccessed = true, t3 = argumentList._keywords, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4.key, false), t4.value); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + argumentList.toString$0(0) + " is not an argument list."); + }, + $signature: 37 + }; + A.local_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 18 + }; + A.local_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$(new A.MappedListIterable(t1, new A.local__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_rXA, false); + }, + $signature: 21 + }; + A.local__closure.prototype = { + call$1(argument) { + if (argument instanceof A.Value) + return argument; + return new A.SassString(J.toString$0$(argument), false); + }, + $signature: 284 + }; + A._nest_closure.prototype = { + call$1($arguments) { + var t1 = {}, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); + t1.first = true; + return new A.MappedListIterable(selectors, new A._nest__closure(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._nest__closure0()).get$asSassList(); + }, + $signature: 21 + }; + A._nest__closure.prototype = { + call$1(selector) { + var t1 = this._box_0, + result = A.SassApiValue_assertSelector(selector, !t1.first, null); + t1.first = false; + return result; + }, + $signature: 205 + }; + A._nest__closure0.prototype = { + call$2($parent, child) { + return child.resolveParentSelectors$1($parent); + }, + $signature: 209 + }; + A._append_closure.prototype = { + call$1($arguments) { + var selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); + return new A.MappedListIterable(selectors, new A._append__closure(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._append__closure0()).get$asSassList(); + }, + $signature: 21 + }; + A._append__closure.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector(selector, false, null); + }, + $signature: 205 + }; + A._append__closure0.prototype = { + call$2($parent, child) { + var t1 = child.components; + return A.SelectorList$(new A.MappedListIterable(t1, new A._append___closure($parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>"))).resolveParentSelectors$1($parent); + }, + $signature: 209 + }; + A._append___closure.prototype = { + call$1(complex) { + var t1, component, newCompound, t2; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", null)); + t1 = complex.components; + component = B.JSArray_methods.get$first(t1); + newCompound = A._prependParent(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", null)); + t2 = A._setArrayType([new A.ComplexSelectorComponent(newCompound, A.List_List$unmodifiable(component.combinators, type$.Combinator))], type$.JSArray_ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t2, A.SubListIterable$(t1, 1, null, A._arrayInstanceType(t1)._precomputed1)); + return A.ComplexSelector$(B.List_empty0, t2, false); + }, + $signature: 72 + }; + A._extend_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_allTargets_allTargets, A.EvaluationContext_current().get$currentCallableSpan()).get$asSassList(); + }, + $signature: 21 + }; + A._replace_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_replace_replace, A.EvaluationContext_current().get$currentCallableSpan()).get$asSassList(); + }, + $signature: 21 + }; + A._unify_closure.prototype = { + call$1($arguments) { + var selector2, result, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + result = selector1.unify$1(selector2); + return result == null ? B.C__SassNull : result.get$asSassList(); + }, + $signature: 4 + }; + A._isSuperselector_closure.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector(selector1.components, selector2.components) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._simpleSelectors_closure.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$(new A.MappedListIterable(t1, new A._simpleSelectors__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_rXA, false); + }, + $signature: 21 + }; + A._simpleSelectors__closure.prototype = { + call$1(simple) { + return new A.SassString(A.serializeSelector(simple, true), false); + }, + $signature: 288 + }; + A._parse_closure.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 21 + }; + A._unquote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._hasQuotes) + return string; + return new A.SassString(string._string$_text, false); + }, + $signature: 18 + }; + A._quote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._hasQuotes) + return string; + return new A.SassString(string._string$_text, true); + }, + $signature: 18 + }; + A._length_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).assertString$1("string").get$_sassLength(), null); + }, + $signature: 10 + }; + A._insert_closure.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_sassLength() + indexInt + 2, 0); + t1 = string._string$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex(t1, A._codepointForIndex(indexInt, string.get$_sassLength(), false)); + return new A.SassString(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string$_text), string._hasQuotes); + }, + $signature: 18 + }; + A._index_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string$_text); + if (codeUnitIndex === -1) + return B.C__SassNull; + return A.SassNumber_SassNumber(A.codeUnitIndexToCodepointIndex(t2, codeUnitIndex) + 1, null); + }, + $signature: 4 + }; + A._slice_closure.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + startCodepoint = A._codepointForIndex(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + t1 = string._string$_text; + return new A.SassString(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex(t1, startCodepoint), A.codepointIndexToCodeUnitIndex(t1, endCodepoint + 1)), string._hasQuotes); + }, + $signature: 18 + }; + A._toUpperCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = B.JSString_methods._codeUnitAt$1(t1, i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 18 + }; + A._toLowerCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = B.JSString_methods._codeUnitAt$1(t1, i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 18 + }; + A._uniqueId_closure.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId() + ($.$get$_random().nextInt$1(36) + 1); + $._previousUniqueId = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId = B.JSInt_methods.$mod($.$get$_previousUniqueId(), A._asInt(Math.pow(36, 6))); + return new A.SassString("u" + B.JSString_methods.padLeft$2(J.toRadixString$1$n($.$get$_previousUniqueId(), 36), 6, "0"), false); + }, + $signature: 18 + }; + A.ImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var relativeResult, _this = this; + if (baseImporter != null) { + relativeResult = _this._relativeCanonicalizeCache.putIfAbsent$2(new A.Tuple4(url, forImport, baseImporter, baseUrl, type$.Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri), new A.ImportCache_canonicalize_closure(_this, baseUrl, url, baseImporter, forImport)); + if (relativeResult != null) + return relativeResult; + } + return _this._canonicalizeCache.putIfAbsent$2(new A.Tuple2(url, forImport, type$.Tuple2_Uri_bool), new A.ImportCache_canonicalize_closure0(_this, url, forImport)); + }, + canonicalize$3$baseImporter$baseUrl($receiver, url, baseImporter, baseUrl) { + return this.canonicalize$4$baseImporter$baseUrl$forImport($receiver, url, baseImporter, baseUrl, false); + }, + _canonicalize$3(importer, url, forImport) { + var t1, result; + if (forImport) { + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__inImportRule, true], t1, t1), type$.nullable_Uri); + } else + result = importer.canonicalize$1(0, url); + if ((result == null ? null : result.get$scheme()) === "") + this._logger.warn$2$deprecation(0, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + A.S(result) + string$.x2e_Rela, true); + return result; + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this._importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure(this, importer, canonicalUrl, originalUrl, quiet)); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$2(importer, canonicalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, null, false); + }, + humanize$1(canonicalUrl) { + var t2, url, + t1 = this._canonicalizeCache; + t1 = A.IterableNullableExtension_whereNotNull(t1.get$values(t1), type$.Tuple3_Importer_Uri_Uri); + t2 = t1.$ti; + url = A.minBy(new A.MappedIterable(new A.WhereIterable(t1, new A.ImportCache_humanize_closure(canonicalUrl), t2._eval$1("WhereIterable")), new A.ImportCache_humanize_closure0(), t2._eval$1("MappedIterable")), new A.ImportCache_humanize_closure1()); + if (url == null) + return canonicalUrl; + t1 = $.$get$url(); + return url.resolve$1(A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t1.style).get$basename()); + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(t1); + return t1 == null ? canonicalUrl : t1; + }, + clearCanonicalize$1(url) { + var t3, t4, _i, + t1 = this._canonicalizeCache, + t2 = type$.Tuple2_Uri_bool; + t1.remove$1(0, new A.Tuple2(url, false, t2)); + t1.remove$1(0, new A.Tuple2(url, true, t2)); + t2 = A._setArrayType([], type$.JSArray_Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri); + for (t1 = this._relativeCanonicalizeCache, t3 = A.LinkedHashMapKeyIterator$(t1, t1._modifications); t3.moveNext$0();) { + t4 = t3.__js_helper$_current; + if (t4.item1.$eq(0, url)) + t2.push(t4); + } + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + t1.remove$1(0, t2[_i]); + }, + clearImport$1(canonicalUrl) { + this._resultsCache.remove$1(0, canonicalUrl); + this._importCache.remove$1(0, canonicalUrl); + } + }; + A.ImportCache_canonicalize_closure.prototype = { + call$0() { + var canonicalUrl, _this = this, + t1 = _this.baseUrl, + resolvedUrl = t1 == null ? null : t1.resolveUri$1(_this.url); + if (resolvedUrl == null) + resolvedUrl = _this.url; + t1 = _this.baseImporter; + canonicalUrl = _this.$this._canonicalize$3(t1, resolvedUrl, _this.forImport); + if (canonicalUrl == null) + return null; + return new A.Tuple3(t1, canonicalUrl, resolvedUrl, type$.Tuple3_Importer_Uri_Uri); + }, + $signature: 100 + }; + A.ImportCache_canonicalize_closure0.prototype = { + call$0() { + var t1, t2, t3, t4, t5, _i, importer, canonicalUrl; + for (t1 = this.$this, t2 = t1._importers, t3 = t2.length, t4 = this.url, t5 = this.forImport, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + importer = t2[_i]; + canonicalUrl = t1._canonicalize$3(importer, t4, t5); + if (canonicalUrl != null) + return new A.Tuple3(importer, canonicalUrl, t4, type$.Tuple3_Importer_Uri_Uri); + } + return null; + }, + $signature: 100 + }; + A.ImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 216 + }; + A.ImportCache_importCanonical_closure.prototype = { + call$0() { + var t3, _this = this, + t1 = _this.canonicalUrl, + result = _this.importer.load$1(0, t1), + t2 = _this.$this; + t2._resultsCache.$indexSet(0, t1, result); + t3 = _this.originalUrl; + t1 = t3 == null ? t1 : t3.resolveUri$1(t1); + t2 = _this.quiet ? $.$get$Logger_quiet() : t2._logger; + return A.Stylesheet_Stylesheet$parse(result.contents, result.syntax, t2, t1); + }, + $signature: 90 + }; + A.ImportCache_humanize_closure.prototype = { + call$1(tuple) { + return tuple.item2.$eq(0, this.canonicalUrl); + }, + $signature: 295 + }; + A.ImportCache_humanize_closure0.prototype = { + call$1(tuple) { + return tuple.item3; + }, + $signature: 296 + }; + A.ImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 91 + }; + A.Importer.prototype = { + modificationTime$1(url) { + return new A.DateTime(Date.now(), false); + }, + couldCanonicalize$2(url, canonicalUrl) { + return true; + } + }; + A.AsyncImporter.prototype = {}; + A.FilesystemImporter.prototype = { + canonicalize$1(_, url) { + if (url.get$scheme() !== "file" && url.get$scheme() !== "") + return null; + return A.NullableExtension_andThen(A.resolveImportPath(A.join(this._loadPath, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)), new A.FilesystemImporter_canonicalize_closure()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)), + t1 = A.readFile(path), + t2 = A.Syntax_forPath(path), + t3 = url.get$scheme(); + if (t3 === "") + A.throwExpression(A.ArgumentError$value(url, "sourceMapUrl", "must be absolute")); + return new A.ImporterResult(t1, url, t2); + }, + modificationTime$1(url) { + return A.modificationTime($.$get$context().style.pathFromUri$1(A._parseUri(url))); + }, + couldCanonicalize$2(url, canonicalUrl) { + var t1, t2, t3, basename, canonicalBasename; + if (url.get$scheme() !== "file" && url.get$scheme() !== "") + return false; + if (canonicalUrl.get$scheme() !== "file") + return false; + t1 = $.$get$url(); + t2 = url.get$path(url); + t3 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(t2, t3).get$basename(); + canonicalBasename = A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t3).get$basename(); + if (!B.JSString_methods.startsWith$1(basename, "_") && B.JSString_methods.startsWith$1(canonicalBasename, "_")) + canonicalBasename = B.JSString_methods.substring$1(canonicalBasename, 1); + return basename === canonicalBasename || basename === t1.withoutExtension$1(canonicalBasename); + }, + toString$0(_) { + return this._loadPath; + } + }; + A.FilesystemImporter_canonicalize_closure.prototype = { + call$1(resolved) { + var t1, t2, t0, _null = null; + if (J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin")) { + t1 = $.$get$context(); + t2 = A._realCasePath(t1.absolute$7(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 219 + }; + A.ImporterResult.prototype = { + get$sourceMapUrl(_) { + return this._sourceMapUrl; + } + }; + A.resolveImportPath_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPath($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 42 + }; + A.resolveImportPath_closure0.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(this.path + ".import")); + }, + $signature: 42 + }; + A._tryPathAsDirectory_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(A.join(this.path, "index.import", null))); + }, + $signature: 42 + }; + A._exactlyOne_closure.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 5 + }; + A.InterpolationBuffer.prototype = { + writeCharCode$1(character) { + this._interpolation_buffer$_text._contents += A.Primitives_stringFromCharCode(character); + return null; + }, + add$1(_, expression) { + this._flushText$0(); + this._interpolation_buffer$_contents.push(expression); + }, + addInterpolation$1(interpolation) { + var first, t1, _this = this, + toAdd = interpolation.contents; + if (toAdd.length === 0) + return; + first = B.JSArray_methods.get$first(toAdd); + if (typeof first == "string") { + _this._interpolation_buffer$_text._contents += first; + toAdd = A.SubListIterable$(toAdd, 1, null, A._arrayInstanceType(toAdd)._precomputed1); + } + _this._flushText$0(); + t1 = _this._interpolation_buffer$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") + _this._interpolation_buffer$_text._contents += A.S(t1.pop()); + }, + _flushText$0() { + var t1 = this._interpolation_buffer$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$of(this._interpolation_buffer$_contents, true, type$.Object), + t2 = this._interpolation_buffer$_text._contents; + if (t2.length !== 0) + t1.push(t2.charCodeAt(0) == 0 ? t2 : t2); + return A.Interpolation$(t1, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._realCasePath_helper.prototype = { + call$1(path) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache.putIfAbsent$2(path, new A._realCasePath_helper_closure(this, dirname, path)); + }, + $signature: 5 + }; + A._realCasePath_helper_closure.prototype = { + call$0() { + var matches, t2, exception, + realDirname = this.helper.call$1(this.dirname), + t1 = this.path, + basename = A.ParsedPath_ParsedPath$parse(t1, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir(realDirname, false), new A._realCasePath_helper__closure(basename)).toList$0(0); + t2 = J.get$length$asx(matches) !== 1 ? A.join(realDirname, basename, null) : J.$index$asx(matches, 0); + return t2; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException) + return t1; + else + throw exception; + } + }, + $signature: 30 + }; + A._realCasePath_helper__closure.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 8 + }; + A.FileSystemException.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.Stderr.prototype = { + writeln$1(object) { + J.write$1$x(this._stderr, A.S(object == null ? "" : object) + "\n"); + }, + writeln$0() { + return this.writeln$1(null); + } + }; + A._readFile_closure.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 92 + }; + A.writeFile_closure.prototype = { + call$0() { + return J.writeFileSync$2$x(A.fs(), this.path, this.contents); + }, + $signature: 0 + }; + A.deleteFile_closure.prototype = { + call$0() { + return J.unlinkSync$1$x(A.fs(), this.path); + }, + $signature: 0 + }; + A.readStdin_closure.prototype = { + call$1(result) { + this._box_0.contents = result; + this.completer.complete$1(result); + }, + $signature: 119 + }; + A.readStdin_closure0.prototype = { + call$1(chunk) { + this.sink.add$1(0, type$.List_int._as(chunk)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 97 + }; + A.readStdin_closure1.prototype = { + call$1(_) { + this.sink.close$0(0); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 97 + }; + A.readStdin_closure2.prototype = { + call$1(e) { + var t1 = $.$get$stderr(); + t1.writeln$1("Failed to read from stdin"); + t1.writeln$1(e); + e.toString; + this.completer.completeError$1(e); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 97 + }; + A.fileExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 28 + }; + A.dirExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 28 + }; + A.ensureDir_closure.prototype = { + call$0() { + var error, systemError, exception, t1; + try { + J.mkdirSync$1$x(A.fs(), this.path); + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "EEXIST")) + return; + if (!J.$eq$(J.get$code$x(systemError), "ENOENT")) + throw exception; + t1 = this.path; + A.ensureDir($.$get$context().dirname$1(t1)); + J.mkdirSync$1$x(A.fs(), t1); + } + }, + $signature: 0 + }; + A.listDir_closure.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure(t1), type$.String).where$1(0, new A.listDir__closure0()); + else + return new A.listDir_closure_list().call$1(t1); + }, + $signature: 141 + }; + A.listDir__closure.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 86 + }; + A.listDir__closure0.prototype = { + call$1(child) { + return !A.dirExists(child); + }, + $signature: 8 + }; + A.listDir_closure_list.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure($parent, this), type$.String); + }, + $signature: 143 + }; + A.listDir__list_closure.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 147 + }; + A.modificationTime_closure.prototype = { + call$0() { + var t2, + t1 = J.getTime$0$x(J.get$mtime$x(J.statSync$1$x(A.fs(), this.path))); + if (Math.abs(t1) <= 864e13) + t2 = false; + else + t2 = true; + if (t2) + A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + A.S(t1), null)); + A.checkNotNullable(false, "isUtc", type$.bool); + return new A.DateTime(t1, false); + }, + $signature: 149 + }; + A.watchDir_closure.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_add, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 151 + }; + A.watchDir_closure0.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_modify, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 151 + }; + A.watchDir_closure1.prototype = { + call$1(path) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_remove, path)); + }, + $signature: 119 + }; + A.watchDir_closure2.prototype = { + call$1(error) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.addError$1(error); + }, + $signature: 118 + }; + A.watchDir_closure3.prototype = { + call$0() { + var controller = A.StreamController_StreamController(new A.watchDir__closure(this.watcher), null, null, null, false, type$.WatchEvent); + this._box_0.controller = controller; + this.completer.complete$1(new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>"))); + }, + $signature: 1 + }; + A.watchDir__closure.prototype = { + call$0() { + J.close$0$x(this.watcher); + }, + $signature: 1 + }; + A._QuietLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + }, + warn$1($receiver, message) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, null); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + } + }; + A.StderrLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var t2, t3, t4, + t1 = this.color; + if (t1) { + t2 = $.$get$stderr(); + t3 = t2._stderr; + t4 = J.getInterceptor$x(t3); + t4.write$1(t3, "\x1b[33m\x1b[1m"); + if (deprecation) + t4.write$1(t3, "Deprecation "); + t4.write$1(t3, "Warning\x1b[0m"); + } else { + if (deprecation) + J.write$1$x($.$get$stderr()._stderr, "DEPRECATION "); + t2 = $.$get$stderr(); + J.write$1$x(t2._stderr, "WARNING"); + } + if (span == null) + t2.writeln$1(": " + message); + else if (trace != null) + t2.writeln$1(": " + message + "\n\n" + span.highlight$1$color(t1)); + else + t2.writeln$1(" on " + span.message$2$color(0, "\n" + message, t1)); + if (trace != null) + t2.writeln$1(A.indent(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4)); + t2.writeln$0(); + }, + warn$1($receiver, message) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, null); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + var url, t3, t4, + t1 = span.file, + t2 = span._file$_start; + if (A.FileLocation$_(t1, t2).file.url == null) + url = "-"; + else { + t3 = A.FileLocation$_(t1, t2); + url = $.$get$context().prettyUri$1(t3.file.url); + } + t3 = $.$get$stderr(); + t2 = A.FileLocation$_(t1, t2); + t2 = t2.file.getLine$1(t2.offset); + t1 = t3._stderr; + t4 = J.getInterceptor$x(t1); + t4.write$1(t1, url + ":" + (t2 + 1) + " "); + t4.write$1(t1, this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"); + t3.writeln$1(": " + message); + } + }; + A.TerseLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var firstParagraph, t1, t2, count; + if (deprecation) { + firstParagraph = B.JSArray_methods.get$first(message.split("\n\n")); + t1 = this._warningCounts; + t2 = t1.$index(0, firstParagraph); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, firstParagraph, count); + if (count > 5) + return; + } + this._inner.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + return this._inner.debug$2(0, message, span); + }, + summarize$1$node(node) { + var t2, total, + t1 = this._warningCounts; + t1 = t1.get$values(t1); + t2 = A._instanceType(t1); + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.TerseLogger_summarize_closure(), t2._eval$1("WhereIterable")), new A.TerseLogger_summarize_closure0(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = node ? "" : string$.x0aRun_i; + this._inner.warn$1(0, "" + total + string$.x20repet + t1); + } + } + }; + A.TerseLogger_summarize_closure.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 54 + }; + A.TerseLogger_summarize_closure0.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 154 + }; + A.TrackingLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this._emittedWarning = true; + this._tracking$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + this._emittedDebug = true; + this._tracking$_logger.debug$2(0, message, span); + } + }; + A.BuiltInModule.prototype = { + get$upstream() { + return B.List_empty6; + }, + get$variableNodes() { + return B.Map_empty0; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore; + }, + get$css(_) { + return new A.CssStylesheet(B.List_empty3, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + cloneCss$0() { + return this; + }, + $isModule: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.ForwardedModuleView.prototype = { + get$url(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$css(t1); + }, + get$transitivelyContainsCss() { + return this._forwarded_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var prefix, + _s19_ = "Undefined variable.", + t1 = this._rule, + shownVariables = t1.shownVariables, + hiddenVariables = t1.hiddenVariables; + if (shownVariables != null && !shownVariables._base.contains$1(0, $name)) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + else if (hiddenVariables != null && hiddenVariables._base.contains$1(0, $name)) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + prefix = t1.prefix; + if (prefix != null) { + if (!B.JSString_methods.startsWith$1($name, prefix)) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + $name = B.JSString_methods.substring$1($name, prefix.length); + } + return this._forwarded_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var prefix = this._rule.prefix; + if (prefix != null) + $name = B.JSString_methods.substring$1($name, prefix.length); + return this._forwarded_view$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView && this._forwarded_view$_inner.$eq(0, other._forwarded_view$_inner) && this._rule === other._rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$(this._forwarded_view$_inner.cloneCss$0(), this._rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view$_inner.toString$0(0); + }, + $isModule: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.ShadowedModuleView.prototype = { + get$url(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$css(t1); + }, + get$transitivelyContainsCss() { + return this._shadowed_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + else + return this._shadowed_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (other instanceof A.ShadowedModuleView) + if (_this._shadowed_view$_inner.$eq(0, other._shadowed_view$_inner)) { + t1 = _this.variables; + t1 = t1.get$keys(t1); + t2 = other.variables; + if (B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2))) { + t1 = _this.functions; + t1 = t1.get$keys(t1); + t2 = other.functions; + if (B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + else + t1 = false; + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView(_this._shadowed_view$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view$_inner.toString$0(0); + }, + $isModule: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.JSArray0.prototype = {}; + A.Chokidar.prototype = {}; + A.ChokidarOptions.prototype = {}; + A.ChokidarWatcher.prototype = {}; + A.JSFunction.prototype = {}; + A.NodeImporterResult.prototype = {}; + A.RenderContext.prototype = {}; + A.RenderContextOptions.prototype = {}; + A.RenderContextResult.prototype = {}; + A.RenderContextResultStats.prototype = {}; + A.JSClass.prototype = {}; + A.JSUrl.prototype = {}; + A._PropertyDescriptor.prototype = {}; + A.AtRootQueryParser.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure(this)); + } + }; + A.AtRootQueryParser_parse_closure.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$0(); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$0(); + t2.expectChar$1(58); + t1.whitespace$0(); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$0(); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 117 + }; + A._disallowedFunctionNames_closure.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 320 + }; + A.CssParser.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + this.super$Parser$silentComment(); + this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, urlStart, next, url, urlSpan, modifiers, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + switch ($name.get$asPlain()) { + case "at-root": + case "content": + case "debug": + case "each": + case "error": + case "extend": + case "for": + case "function": + case "if": + case "include": + case "mixin": + case "return": + case "warn": + case "while": + _this.almostAnyValue$0(); + _this.error$2(0, "This at-rule isn't allowed in plain CSS.", t1.spanFrom$1(start)); + break; + case "import": + urlStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + url = next === 117 || next === 85 ? _this.dynamicUrl$0() : new A.StringExpression(_this.interpolatedString$0().asInterpolation$1$static(true), false); + urlSpan = t1.spanFrom$1(urlStart); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport(A.Interpolation$(A._setArrayType([url], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(urlStart))], type$.JSArray_Import); + t1 = t1.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(t2, type$.Import), t1); + case "media": + return _this.mediaRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "supports": + return _this.supportsRule$1(start); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + specialFunction = _this.trySpecialFunction$2(lower, start); + if (specialFunction != null) + return specialFunction; + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return new A.StringExpression(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$0(); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression(A.Interpolation$(A._setArrayType([""], type$.JSArray_Object), t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames().contains$1(0, plain)) + _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); + t3 = A.Interpolation$(A._setArrayType([new A.StringExpression(identifier, false)], type$.JSArray_Object), identifier.span); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + t4 = type$.Expression; + return new A.InterpolatedFunctionExpression(t3, new A.ArgumentInvocation(A.List_List$unmodifiable($arguments, t4), A.ConstantMap_ConstantMap$from(B.Map_empty2, type$.String, t4), null, null, t2), t1.spanFrom$1(start)); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.KeyframeSelectorParser.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure(this)); + }, + _percentage$0() { + var t3, next, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!A.isDigit(second) && second !== 46) + t1.error$1(0, "Expected number."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + next = t1.peekChar$0(); + if (next === 43 || next === 45) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + if (!A.isDigit(t1.peekChar$0())) + t1.error$1(0, "Expected digit."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._percentage$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 48 + }; + A.MediaQueryParser.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure(this)); + }, + _mediaQuery$0() { + var conditions, conjunction, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._mediaInParens$0()], type$.JSArray_String); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1(_s3_)); + conjunction = true; + } else if (_this.scanIdentifier$1("or")) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1("or")); + conjunction = false; + } else + conjunction = true; + return A.CssMediaQuery$condition(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition(A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type(type, A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type(type, _this._mediaLogicSequence$1(_s3_), modifier); + }, + _mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner; true;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + queries.push(t1._mediaQuery$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 116 + }; + A.Parser.prototype = { + _parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure(this)); + }, + _isVariableDeclarationLike$0() { + var _this = this, + t1 = _this.scanner; + if (!t1.scanChar$1(36)) + return false; + if (!_this.lookingAtIdentifier$0()) + return false; + _this.identifier$0(); + _this.whitespace$0(); + return t1.scanChar$1(58); + }, + whitespace$0() { + do + this.whitespaceWithoutComments$0(); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var next, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + next = t1.peekChar$1(1); + if (next === 47) { + this.silentComment$0(); + return true; + } else if (next === 42) { + this.loudComment$0(); + return true; + } else + return false; + }, + expectWhitespace$0() { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$0(); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, first, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + A.Primitives_stringFromCharCode(45); + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s20_); + else if (normalize && first === 95) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + } else if (first === 95 || A.isAlphabetic0(first) || first >= 128) + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (first === 92) + text._contents = t2 + A.S(_this.escape$1$identifierStart(true)); + else + t1.error$1(0, _s20_); + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, next, second, t2; + for (t1 = this.scanner; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (unit && next === 45) { + second = t1.peekChar$1(1); + if (second != null) + if (second !== 46) + t2 = second >= 48 && second <= 57; + else + t2 = true; + else + t2 = false; + if (t2) + break; + text._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else if (normalize && next === 95) { + t1.readChar$0(); + text._contents += A.Primitives_stringFromCharCode(45); + } else { + if (next !== 95) { + if (!(next >= 97 && next <= 122)) + t2 = next >= 65 && next <= 90; + else + t2 = true; + t2 = t2 || next >= 128; + } else + t2 = true; + if (!t2) + t2 = next >= 48 && next <= 57 || next === 45; + else + t2 = true; + if (t2) + text._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 92) + text._contents += A.S(this.escape$0()); + else + break; + } + } + }, + _identifierBody$1(text) { + return this._identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, next, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (; true;) { + next = t1.peekChar$0(); + if (next === quote) { + t1.readChar$0(); + break; + } else if (next == null || next === 10 || next === 13 || next === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + else if (next === 92) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else + buffer._contents += A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + } else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, wroteNewline, next, start, end, t3, url, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + $label0$1: + for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + buffer._contents += A.S(_this.escape$1$identifierStart(true)); + wroteNewline = false; + break; + case 34: + case 39: + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = false; + break; + case 47: + if (t1.peekChar$1(1) === 42) { + t3 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 32: + case 9: + if (!wroteNewline) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) + buffer._contents += A.Primitives_stringFromCharCode(32); + t1.readChar$0(); + break; + case 10: + case 13: + case 12: + t3 = t1.peekChar$1(-1); + if (!(t3 === 10 || t3 === 13 || t3 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break; + case 40: + case 123: + case 91: + next.toString; + buffer._contents += A.Primitives_stringFromCharCode(next); + brackets.push(A.opposite(t1.readChar$0())); + wroteNewline = false; + break; + case 41: + case 125: + case 93: + if (brackets.length === 0) + break $label0$1; + next.toString; + buffer._contents += A.Primitives_stringFromCharCode(next); + t1.expectChar$1(brackets.pop()); + wroteNewline = false; + break; + case 59: + if (brackets.length === 0) + break $label0$1; + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 117: + case 85: + url = _this.tryUrl$0(); + if (url != null) + buffer._contents += url; + else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + buffer._contents += _this.identifier$0(); + else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, next, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$0(); + buffer = new A.StringBuffer(""); + buffer._contents = "" + "url("; + for (; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (next === 92) + buffer._contents += A.S(_this.escape$0()); + else { + if (next !== 37) + if (next !== 38) + if (next !== 35) + t2 = next >= 42 && next <= 126 || next >= 128; + else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12) { + _this.whitespace$0(); + if (t1.peekChar$0() !== 41) + break; + } else if (next === 41) { + t2 = buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + break; + } + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, first, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s25_); + else if (first === 10 || first === 13 || first === 12) + t1.error$1(0, _s25_); + else if (A.isHex(first)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next == null || !A.isHex(next)) + break; + value *= 16; + value += A.asHex(t1.readChar$0()); + } + this.scanCharIf$1(A.character__isWhitespace$closure()); + } else + value = t1.readChar$0(); + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.isAlphabetic0(t2) || t2 >= 128; + } else { + t2 = value; + t2 = t2 === 95 || A.isAlphabetic0(t2) || t2 >= 128 || A.isDigit(t2) || t2 === 45; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + t1 = identifierStart && A.isDigit(value); + else + t1 = true; + else + t1 = true; + if (t1) { + t1 = "" + A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches(caseSensitive, char), + t2 = this.scanner, + next = t2.peekChar$0(); + if (next != null && t1.call$1(next)) { + t2.readChar$0(); + return true; + } else if (next === 92) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, first, second; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + first = t1.peekChar$1($forward); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic0(first) || first >= 128 || first === 92) + return true; + if (first !== 45) + return false; + second = t1.peekChar$1($forward + 1); + if (second == null) + return false; + return second === 95 || A.isAlphabetic0(second) || second >= 128 || second === 92 || second === 45; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) + t1 = next === 95 || A.isAlphabetic0(next) || next >= 128 || A.isDigit(next) || next === 45 || next === 92; + else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + matchesIdentifier$1(text) { + var t1, t2, result, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + result = _this._consumeIdentifier$2(text, false) && !_this.lookingAtIdentifierBody$0(); + t1.set$state(new A._SpanScannerState(t1, t2)); + return result; + }, + _consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = "Expected " + $name, t4 = t3 + ".", t5 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t5._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t4, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t3, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace(exception, trace); + }, + error$2($receiver, message, span) { + return this.error$3($receiver, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$z(error); + A.throwWithTrace(new A.SourceSpanFormatException(error.get$source(), message, t1), stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, span, startPosition, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + span = J.get$span$z(error); + if (A.startsWithIgnoreCase(error._span_exception$_message, "expected") && J.get$length$asx(span) === 0) { + startPosition = this._firstNewlineBefore$1(J.get$start$z(span).offset); + if (!J.$eq$(startPosition, J.get$start$z(span).offset)) + span = J.get$file$x(span).span$2(0, startPosition, startPosition); + } + A.throwWithTrace(new A.SassFormatException(error._span_exception$_message, span), stackTrace); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _firstNewlineBefore$1(position) { + var t1, lastNewline, codeUnit, + index = position - 1; + for (t1 = this.scanner.string, lastNewline = null; index >= 0;) { + codeUnit = B.JSString_methods.codeUnitAt$1(t1, index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + return lastNewline == null ? position : lastNewline; + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return position; + } + }; + A.Parser__parseIdentifier_closure.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 30 + }; + A.Parser_scanIdentChar_matches.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase(t1, actual); + }, + $signature: 54 + }; + A.SassParser.prototype = { + get$currentIndentation() { + return this._currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + do { + buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); + t4 = t3._contents += A.Primitives_stringFromCharCode(10); + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(A.character__isNewline$closure())); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this; + if (!_this.atEndOfStatement$0()) + _this._expectNewline$0(); + if (_this._peekIndentation$0() <= _this._currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 10 || next === 13 || next === 12; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._peekIndentation$0() > this._currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, start, next, t2, exception, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 117: + case 85: + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument(); + } else + t1.set$state(start); + break; + case 39: + case 34: + return _this.super$StylesheetParser$importArgument(); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + while (true) { + if (next != null) + if (next !== 44) + if (next !== 59) + t2 = !(next === 10 || next === 13 || next === 12); + else + t2 = false; + else + t2 = false; + else + t2 = false; + if (!t2) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, start.position); + span = t1.spanFrom$1(start); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport(A.Interpolation$(A._setArrayType([A.serializeValue(new A.SassString(url, true), true, true)], type$.JSArray_Object), span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._currentIndentation; + startNextIndentation = _this._nextIndentation; + startNextIndentationEnd = _this._nextIndentationEnd; + _this._readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._currentIndentation = startIndentation; + _this._nextIndentation = startNextIndentation; + _this._nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement); + this._whileIndentedLower$1(new A.SassParser_children_closure(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, child, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first === 9 || first === 32) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + child = this._child$1(statement); + if (child != null) + statements.push(child); + this._readIndentation$0(); + } + return statements; + }, + _child$1(child) { + var _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 13: + case 10: + case 12: + return null; + case 36: + return _this.variableDeclarationWithoutNamespace$0(); + case 47: + switch (t1.peekChar$1(1)) { + case 47: + return _this._silentComment$0(); + case 42: + return _this._loudComment$0(); + default: + return child.call$0(); + } + default: + return child.call$0(); + } + }, + _silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length; true;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + while (true) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._readIndentation$0(); + break; + } + _this._readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _loudComment$0() { + var t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + "/*"; + parentIndentation = _this._currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._readIndentation$0(); + t7 = t3._contents += A.Primitives_stringFromCharCode(32); + } else { + end = t1._string_scanner$_position; + t7 = t3._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else { + t7 = t3._contents += "\n"; + t7 += " * "; + t3._contents = t7; + } + for (i = 3; i < _this._currentIndentation - parentIndentation; ++i) { + t7 += A.Primitives_stringFromCharCode(32); + t3._contents = t7; + } + $label0$1: + for (; t1._string_scanner$_position !== t6;) + switch (t1.peekChar$0()) { + case 10: + case 13: + case 12: + break $label0$1; + case 35: + if (t1.peekChar$1(1) === 123) { + t7 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t7); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + default: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + if (_this._peekIndentation$0() <= parentIndentation) + break; + for (; _this._lookingAtDoubleNewline$0();) { + _this._expectNewline$0(); + t7 = t3._contents += "\n"; + t3._contents = t7 + " *"; + } + _this._readIndentation$0(); + } + t4 = t3._contents; + if (!B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), "*/")) + t3._contents += " */"; + return new A.LoudComment(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); + }, + whitespaceWithoutComments$0() { + var t1, t2, next; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (next !== 9 && next !== 32) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + next = t1.readChar$0(); + if (next === 10 || next === 13 || next === 12) + t1.error$1(0, "expected */."); + if (next !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + _expectNewline$0() { + var t1 = this.scanner; + switch (t1.peekChar$0()) { + case 59: + t1.error$1(0, string$.semico); + break; + case 13: + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + case 10: + case 12: + t1.readChar$0(); + return; + default: + t1.error$1(0, "expected newline."); + } + }, + _lookingAtDoubleNewline$0() { + var nextChar, + t1 = this.scanner; + switch (t1.peekChar$0()) { + case 13: + nextChar = t1.peekChar$1(1); + if (nextChar === 10) { + t1 = t1.peekChar$1(2); + return t1 === 10 || t1 === 13 || t1 === 12; + } + return nextChar === 13 || nextChar === 12; + case 10: + case 12: + t1 = t1.peekChar$1(1); + return t1 === 10 || t1 === 13 || t1 === 12; + default: + return false; + } + }, + _whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._peekIndentation$0() > parentIndentation;) { + indentation = _this._readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._nextIndentation = _this._peekIndentation$0(); + _this._currentIndentation = currentIndentation; + t1 = _this._nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._nextIndentationEnd = _this._nextIndentation = null; + return currentIndentation; + }, + _peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, next, t4, _this = this, + cached = _this._nextIndentation; + if (cached != null) + return cached; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(A.character__isNewline$closure())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + t2 = nextIndentation.__late_helper$_name; + do { + containsSpace._value = containsTab._value = false; + nextIndentation._value = 0; + for (; true;) { + next = t1.peekChar$0(); + if (next === 32) + containsSpace._value = true; + else if (next === 9) + containsTab._value = true; + else + break; + t4 = nextIndentation._value; + if (t4 === nextIndentation) + A.throwExpression(A.LateError$localNI(t2)); + nextIndentation._value = t4 + 1; + t1.readChar$0(); + } + t4 = t1._string_scanner$_position; + if (t4 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t4); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(A.character__isNewline$closure())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._spaces == null) + _this._spaces = containsSpace._readLocal$0(); + _this._nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + } + }; + A.SassParser_children_closure.prototype = { + call$0() { + var parsedChild = this.$this._child$1(this.child); + if (parsedChild != null) + this.children.push(parsedChild); + }, + $signature: 0 + }; + A.ScssParser.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, next; + this.whitespaceWithoutComments$0(); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + next = t1.peekChar$0(); + if (next === 59 || next === 125) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + _this.logger.warn$3$deprecation$span(0, string$.x40elsei, true, t1.spanFrom$1(new A._SpanScannerState(t1, t3))); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$0(); + children = A._setArrayType([], type$.JSArray_Statement); + for (; true;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + children.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + children.push(child.call$0()); + break; + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + break; + } + }, + statements$1(statement) { + var t1, t2, child, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement); + _this.whitespaceWithoutComments$0(); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + statements.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + child = statement.call$0(); + if (child != null) + statements.push(child); + break; + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + default: + child = statement.call$0(); + if (child != null) + statements.push(child); + break; + } + return statements; + }, + _scss$_silentComment$0() { + var t2, t3, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("//"); + t2 = t1.string.length; + do { + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.readChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + } + if (t1._string_scanner$_position === t2) + break; + _this.whitespaceWithoutComments$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment(t1.substring$1(0, start.position), t1.spanFrom$1(start)); + }, + _scss$_loudComment$0() { + var t3, t4, buffer, t5, endPosition, t6, result, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + "/*"; + for (; true;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 42: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + if (t1.peekChar$0() !== 47) + break; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._SpanScannerState(t1, t2).position; + t1 = new A._FileSpan(t5, t6, endPosition); + t1._FileSpan$3(t5, t6, endPosition); + t6 = type$.Object; + t5 = A.List_List$of(t4, true, t6); + t2 = t3._contents; + if (t2.length !== 0) + t5.push(t2.charCodeAt(0) == 0 ? t2 : t2); + result = A.List_List$from(t5, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation(result, t1); + t2.Interpolation$2(t5, t1); + return new A.LoudComment(t2); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) + t3._contents += A.Primitives_stringFromCharCode(10); + break; + case 12: + t1.readChar$0(); + t3._contents += A.Primitives_stringFromCharCode(10); + break; + default: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + } + }; + A.SelectorParser.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure(this)); + }, + _selectorList$0() { + var t3, t4, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._sourceFile, + previousLine = t2.getLine$1(t1._string_scanner$_position), + components = A._setArrayType([_this._complexSelector$0()], type$.JSArray_ComplexSelector); + _this.whitespace$0(); + for (t3 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (t1.peekChar$0() === 44) + continue; + t4 = t1._string_scanner$_position; + if (t4 === t3) + break; + lineBreak = t2.getLine$1(t4) !== previousLine; + if (lineBreak) + previousLine = t2.getLine$1(t1._string_scanner$_position); + components.push(_this._complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$(components); + }, + _complexSelector$1$lineBreak(lineBreak) { + var t2, t3, t4, lastCompound, initialCombinators, next, t5, result, _this = this, + t1 = type$.JSArray_Combinator, + combinators = A._setArrayType([], t1), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + $label0$1: + for (t2 = _this.scanner, t3 = B.Set_2Vk2._map, t4 = type$.Combinator, lastCompound = null, initialCombinators = null; true;) { + _this.whitespace$0(); + next = t2.peekChar$0(); + switch (next) { + case 43: + t2.readChar$0(); + combinators.push(B.Combinator_4QF); + break; + case 62: + t2.readChar$0(); + combinators.push(B.Combinator_Cht); + break; + case 126: + t2.readChar$0(); + combinators.push(B.Combinator_Htt); + break; + default: + if (next != null) + t5 = !t3.containsKey$1(next) && !_this.lookingAtIdentifier$0(); + else + t5 = true; + if (t5) + break $label0$1; + if (lastCompound != null) { + result = A.List_List$from(combinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + components.push(new A.ComplexSelectorComponent(lastCompound, result)); + } else if (combinators.length !== 0) + initialCombinators = combinators; + lastCompound = _this._compoundSelector$0(); + combinators = A._setArrayType([], t1); + if (t2.peekChar$0() === 38) + t2.error$1(0, string$.x22x26__ma); + break; + } + } + if (lastCompound != null) + components.push(new A.ComplexSelectorComponent(lastCompound, A.List_List$unmodifiable(combinators, t4))); + else if (combinators.length !== 0) + initialCombinators = combinators; + else + t2.error$1(0, "expected selector."); + return A.ComplexSelector$(initialCombinators == null ? B.List_empty0 : initialCombinators, components, lineBreak); + }, + _complexSelector$0() { + return this._complexSelector$1$lineBreak(false); + }, + _compoundSelector$0() { + var t2, + components = A._setArrayType([this._simpleSelector$0()], type$.JSArray_SimpleSelector), + t1 = this.scanner; + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 === 42 || t2 === 91 || t2 === 46 || t2 === 35 || t2 === 37 || t2 === 58)) + break; + components.push(this._simpleSelector$1$allowParent(false)); + } + return A.CompoundSelector$(components); + }, + _simpleSelector$1$allowParent(allowParent) { + var $name, text, t2, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._attributeSelector$0(); + case 46: + t1.expectChar$1(46); + return new A.ClassSelector(_this.identifier$0()); + case 35: + t1.expectChar$1(35); + return new A.IDSelector(_this.identifier$0()); + case 37: + t1.expectChar$1(37); + $name = _this.identifier$0(); + if (!_this._allowPlaceholder) + _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); + return new A.PlaceholderSelector($name); + case 58: + return _this._pseudoSelector$0(); + case 38: + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t2 = text._contents; + suffix = t2.charCodeAt(0) == 0 ? t2 : t2; + } else + suffix = null; + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); + return new A.ParentSelector(suffix); + default: + return _this._typeOrUniversalSelector$0(); + } + }, + _simpleSelector$0() { + return this._simpleSelector$1$allowParent(null); + }, + _attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner; + t1.expectChar$1(91); + _this.whitespace$0(); + $name = _this._attributeName$0(); + _this.whitespace$0(); + if (t1.scanChar$1(93)) + return new A.AttributeSelector($name, _null, _null, _null); + operator = _this._attributeOperator$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + modifier = next != null && A.isAlphabetic0(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector($name, operator, value, modifier); + }, + _attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName(_this.identifier$0(), nameOrNamespace); + }, + _attributeOperator$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_ES6; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_r60; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_ivT; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_eot; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_BGd; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_8aB; + default: + t1.error$2$position(0, 'Expected "]".', t2); + } + }, + _pseudoSelector$0() { + var element, $name, unvendored, selector, argument, t2, _this = this, _null = null, + t1 = _this.scanner; + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$($name, _null, element, _null); + _this.whitespace$0(); + unvendored = A.unvendor($name); + if (element) + if ($._selectorPseudoElements.contains$1(0, unvendored)) { + selector = _this._selectorList$0(); + argument = _null; + } else { + argument = _this.declarationValue$1$allowEmpty(true); + selector = _null; + } + else if ($._selectorPseudoClasses.contains$1(0, unvendored)) { + selector = _this._selectorList$0(); + argument = _null; + } else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._aNPlusB$0(); + _this.whitespace$0(); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$0(); + selector = _this._selectorList$0(); + } else + selector = _null; + } else { + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + selector = _null; + } + t1.expectChar$1(41); + return A.PseudoSelector$($name, argument, element, selector); + }, + _aNPlusB$0() { + var t2, first, t3, next, last, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 101: + case 69: + _this.expectIdentifier$1("even"); + return "even"; + case 111: + case 79: + _this.expectIdentifier$1("odd"); + return "odd"; + case 43: + case 45: + t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + default: + t2 = ""; + } + first = t1.peekChar$0(); + if (first != null && A.isDigit(first)) { + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + _this.whitespace$0(); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$0(); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$0(); + last = t1.peekChar$0(); + if (last == null || !A.isDigit(last)) + t1.error$1(0, "Expected a number."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + first = t1.peekChar$0(); + if (first === 42) { + t1.readChar$0(); + if (!t1.scanChar$1(124)) + return new A.UniversalSelector(null); + if (t1.scanChar$1(42)) + return new A.UniversalSelector("*"); + else + return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), "*")); + } else if (first === 124) { + t1.readChar$0(); + if (t1.scanChar$1(42)) + return new A.UniversalSelector(""); + else + return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), "")); + } + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector(new A.QualifiedName(nameOrNamespace, null)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector(nameOrNamespace); + else + return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), nameOrNamespace)); + } + }; + A.SelectorParser_parse_closure.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 47 + }; + A.SelectorParser_parseCompoundSelector_closure.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 325 + }; + A.StylesheetParser.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure(this)); + }, + parseArgumentDeclaration$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure(this), type$.ArgumentDeclaration); + }, + parseVariableDeclaration$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseVariableDeclaration_closure(this), type$.VariableDeclaration); + }, + parseUseRule$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseUseRule_closure(this), type$.UseRule); + }, + _parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure(this, production, $T)); + }, + _statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 64: + return _this.atRule$2$root(new A.StylesheetParser__statement_closure(_this), root); + case 43: + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._includeRule$1(new A._SpanScannerState(t1, t2)); + case 61: + if (!_this.get$indented()) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$0(); + return _this._mixinRule$1(new A._SpanScannerState(t1, t2)); + case 125: + t1.error$2$length(0, 'unmatched "}".', 1); + break; + default: + return _this._inStyleRule || _this._stylesheet$_inUnknownAtRule || _this._stylesheet$_inMixin || _this._inContentBlock ? _this._declarationOrStyleRule$0() : _this._variableDeclarationOrStyleRule$0(); + } + }, + _statement$0() { + return this._statement$1$root(false); + }, + _variableDeclarationWithNamespace$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position, + namespace = this.identifier$0(); + t1.expectChar$1(46); + return this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, flag, endPosition, t4, t5, t6, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$0(); + value = _this._expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = t2.string, guarded = false, global = false; t2.scanChar$1(33);) { + flag = _this.identifier$0(); + if (flag === "default") + guarded = true; + else if (flag === "global") { + if (t1) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.throwExpression(new A.StringScannerException(t3, string$.x21globa, t6)); + } + global = true; + } else { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.throwExpression(new A.StringScannerException(t3, "Invalid flag name.", t6)); + } + _this.whitespace$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure0(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t3.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + return _this._styleRule$2(t3, new A._SpanScannerState(t1, t2)); + } + }, + _declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$plainCss() && _this._inStyleRule && !_this._stylesheet$_inUnknownAtRule) + return _this._propertyOrVariableDeclaration$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._declarationOrBuffer$0(); + return type$.Statement._is(declarationOrBuffer) ? declarationOrBuffer : _this._styleRule$2(type$.InterpolationBuffer._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, additional, t3, startsWithPunctuation, variableOrInterpolation, t4, $name, postColonWhitespace, exception, _this = this, t1 = {}, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)), + first = t2.peekChar$0(); + if (first !== 58) + if (first !== 42) + if (first !== 46) + t3 = first === 35 && t2.peekChar$1(1) !== 123; + else + t3 = true; + else + t3 = true; + else + t3 = true; + if (t3) { + t3 = t2.readChar$0(); + nameBuffer._interpolation_buffer$_text._contents += A.Primitives_stringFromCharCode(t3); + t3 = _this.rawText$1(_this.get$whitespace()); + nameBuffer._interpolation_buffer$_text._contents += t3; + startsWithPunctuation = true; + } else + startsWithPunctuation = false; + if (!_this._lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + _this._isUseAllowed = false; + if (t2.matches$1("/*")) { + t3 = _this.rawText$1(_this.get$loudComment()); + nameBuffer._interpolation_buffer$_text._contents += t3; + } + midBuffer = new A.StringBuffer(""); + t3 = _this.get$whitespace(); + midBuffer._contents += _this.rawText$1(t3); + t4 = t2._string_scanner$_position; + if (!t2.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) + nameBuffer._interpolation_buffer$_text._contents += A.Primitives_stringFromCharCode(32); + return nameBuffer; + } + midBuffer._contents += A.Primitives_stringFromCharCode(58); + $name = nameBuffer.interpolation$1(t2.spanFrom$2(start, new A._SpanScannerState(t2, t4))); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { + t1 = _this._interpolatedDeclarationValue$0(); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$($name, new A.StringExpression(t1, false), t2.spanFrom$1(start)); + } + if (t2.scanChar$1(58)) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer$_text; + t3 = t2._contents += A.S(midBuffer); + t2._contents = t3 + A.Primitives_stringFromCharCode(58); + return t1; + } else if (_this.get$indented() && _this._lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t1._interpolation_buffer$_text._contents += A.S(midBuffer); + return t1; + } + postColonWhitespace = _this.rawText$1(t3); + if (_this.lookingAtChildren$0()) + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__declarationOrBuffer_closure($name)); + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t2, t2._string_scanner$_position); + t3 = t1.value = null; + try { + t3 = t1.value = _this._expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t2.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t2.peekChar$0() === 59) + throw exception; + nameBuffer._interpolation_buffer$_text._contents += A.S(midBuffer); + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + if (_this.lookingAtChildren$0()) + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__declarationOrBuffer_closure0(t1, $name)); + else { + _this.expectStatementSeparator$0(); + return A.Declaration$($name, t3, t2.spanFrom$1(start)); + } + }, + _variableDeclarationOrInterpolation$0() { + var t1, start, identifier, t2, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + identifier; + if (_this._lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + }, + _styleRule$2(buffer, start_) { + var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; + _this._isUseAllowed = false; + if (start_ == null) { + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + } else + start = start_; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + wasInStyleRule = _this._inStyleRule; + _this._inStyleRule = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__styleRule_closure(t1, _this, wasInStyleRule, start)); + }, + _styleRule$0() { + return this._styleRule$2(null, null); + }, + _propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { + var first, t3, nameBuffer, variableOrInterpolation, $name, value, _this = this, + _s48_ = string$.Nested, + t1 = {}, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + t1.name = null; + first = t2.peekChar$0(); + if (first !== 58) + if (first !== 42) + if (first !== 46) + t3 = first === 35 && t2.peekChar$1(1) !== 123; + else + t3 = true; + else + t3 = true; + else + t3 = true; + if (t3) { + t3 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + t3._contents += A.Primitives_stringFromCharCode(t2.readChar$0()); + t3._contents += _this.rawText$1(_this.get$whitespace()); + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + t3 = t1.name = nameBuffer.interpolation$1(t2.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else { + type$.Interpolation._as(variableOrInterpolation); + t1.name = variableOrInterpolation; + } + t3 = variableOrInterpolation; + } else { + $name = _this.interpolatedIdentifier$0(); + t1.name = $name; + t3 = $name; + } + _this.whitespace$0(); + t2.expectChar$1(58); + if (parseCustomProperties && B.JSString_methods.startsWith$1(t3.get$initialPlain(), "--")) { + t1 = _this._interpolatedDeclarationValue$0(); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$(t3, new A.StringExpression(t1, false), t2.spanFrom$1(start)); + } + _this.whitespace$0(); + if (_this.lookingAtChildren$0()) { + if (_this.get$plainCss()) + t2.error$1(0, _s48_); + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__propertyOrVariableDeclaration_closure(t1)); + } + value = _this._expression$0(); + if (_this.lookingAtChildren$0()) { + if (_this.get$plainCss()) + t2.error$1(0, _s48_); + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__propertyOrVariableDeclaration_closure0(t1, value)); + } else { + _this.expectStatementSeparator$0(); + return A.Declaration$(t3, value, t2.spanFrom$1(start)); + } + }, + _propertyOrVariableDeclaration$0() { + return this._propertyOrVariableDeclaration$1$parseCustomProperties(true); + }, + _declarationChild$0() { + if (this.scanner.peekChar$0() === 64) + return this._declarationAtRule$0(); + return this._propertyOrVariableDeclaration$1$parseCustomProperties(false); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + wasUseAllowed = _this._isUseAllowed; + _this._isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._atRootRule$1(start); + case "content": + return _this._contentRule$1(start); + case "debug": + return _this._debugRule$1(start); + case "each": + return _this._eachRule$2(start, child); + case "else": + return _this._disallowedAtRule$1(start); + case "error": + return _this._errorRule$1(start); + case "extend": + if (!_this._inStyleRule && !_this._stylesheet$_inMixin && !_this._inContentBlock) + _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) + _this.expectIdentifier$1("optional"); + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule(value, optional, t1.spanFrom$1(start)); + case "for": + return _this._forRule$2(start, child); + case "forward": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._forwardRule$1(start); + case "function": + return _this._functionRule$1(start); + case "if": + return _this._ifRule$2(start, child); + case "import": + return _this._importRule$1(start); + case "include": + return _this._includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._useRule$1(start); + case "warn": + return _this._warnRule$1(start); + case "while": + return _this._whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + switch (_this._plainAtRuleName$0()) { + case "content": + return _this._contentRule$1(start); + case "debug": + return _this._debugRule$1(start); + case "each": + return _this._eachRule$2(start, _this.get$_declarationChild()); + case "else": + return _this._disallowedAtRule$1(start); + case "error": + return _this._errorRule$1(start); + case "for": + return _this._forRule$2(start, _this.get$_declarationChild()); + case "if": + return _this._ifRule$2(start, _this.get$_declarationChild()); + case "include": + return _this._includeRule$1(start); + case "warn": + return _this._warnRule$1(start); + case "while": + return _this._whileRule$2(start, _this.get$_declarationChild()); + default: + return _this._disallowedAtRule$1(start); + } + }, + _functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, exception, t3, start, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + state = new A._SpanScannerState(t1, t1._string_scanner$_position); + try { + t2 = _this._variableDeclarationWithNamespace$0(); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + switch (_this._plainAtRuleName$0()) { + case "debug": + return _this._debugRule$1(start); + case "each": + return _this._eachRule$2(start, _this.get$_functionChild()); + case "else": + return _this._disallowedAtRule$1(start); + case "error": + return _this._errorRule$1(start); + case "for": + return _this._forRule$2(start, _this.get$_functionChild()); + case "if": + return _this._ifRule$2(start, _this.get$_functionChild()); + case "return": + value = _this._expression$0(); + _this.expectStatementSeparator$1("@return rule"); + return new A.ReturnRule(value, t1.spanFrom$1(start)); + case "warn": + return _this._warnRule$1(start); + case "while": + return _this._whileRule$2(start, _this.get$_functionChild()); + default: + return _this._disallowedAtRule$1(start); + } + }, + _plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + var $name = this.identifier$0(); + this.whitespace$0(); + return $name; + }, + _atRootRule$1(start) { + var query, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + query = _this._atRootQuery$0(); + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure(query)); + } else if (_this.lookingAtChildren$0()) + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure0()); + else + return A.AtRootRule$(A._setArrayType([_this._styleRule$0()], type$.JSArray_Statement), t1.spanFrom$1(start), null); + }, + _atRootQuery$0() { + var interpolation, t2, t3, t4, buffer, t5, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 35) { + interpolation = _this.singleInterpolation$0(); + return A.Interpolation$(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation)); + } + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t1.expectChar$1(40); + t3._contents += A.Primitives_stringFromCharCode(40); + _this.whitespace$0(); + t5 = _this._expression$0(); + buffer._flushText$0(); + t4.push(t5); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t5 = t3._contents += A.Primitives_stringFromCharCode(58); + t3._contents = t5 + A.Primitives_stringFromCharCode(32); + t5 = _this._expression$0(); + buffer._flushText$0(); + t4.push(t5); + } + t1.expectChar$1(41); + _this.whitespace$0(); + t3._contents += A.Primitives_stringFromCharCode(41); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _contentRule$1(start) { + var t1, $arguments, t2, t3, _this = this; + if (!_this._stylesheet$_inMixin) + _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + $arguments = _this._argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty(A._FileSpan$(t2.file, t3, t3)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule($arguments, t1.spanFrom$1(start)); + }, + _debugRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule(value, this.scanner.spanFrom$1(start)); + }, + _eachRule$2(start, child) { + var variables, t1, _this = this, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$0(); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$0(); + } + _this.expectIdentifier$1("in"); + _this.whitespace$0(); + return _this._withChildren$3(child, start, new A.StylesheetParser__eachRule_closure(_this, wasInControlDirective, variables, _this._expression$0())); + }, + _errorRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule(value, this.scanner.spanFrom$1(start)); + }, + _functionRule$1(start) { + var $name, $arguments, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + $arguments = _this._argumentDeclaration$0(); + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscf, _this.scanner.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Functi, _this.scanner.spanFrom$1(start)); + switch (A.unvendor($name)) { + case "calc": + case "element": + case "expression": + case "url": + case "and": + case "or": + case "not": + case "clamp": + _this.error$2(0, "Invalid function name.", _this.scanner.spanFrom$1(start)); + break; + } + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_functionChild(), start, new A.StylesheetParser__functionRule_closure($name, $arguments, precedingComment)); + }, + _forRule$2(start, child) { + var variable, from, _this = this, t1 = {}, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$0(); + _this.expectIdentifier$1("from"); + _this.whitespace$0(); + t1.exclusive = null; + from = _this._expression$1$until(new A.StylesheetParser__forRule_closure(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$0(); + return _this._withChildren$3(child, start, new A.StylesheetParser__forRule_closure0(t1, _this, wasInControlDirective, variable, from, _this._expression$0())); + }, + _forwardRule$1(start) { + var prefix, members, shownMixinsAndFunctions, shownVariables, hiddenVariables, hiddenMixinsAndFunctions, configuration, span, t1, t2, t3, t4, _this = this, _null = null, + url = _this._urlString$0(); + _this.whitespace$0(); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$0(); + } else + prefix = _null; + if (_this.scanIdentifier$1("show")) { + members = _this._memberList$0(); + shownMixinsAndFunctions = members.item1; + shownVariables = members.item2; + hiddenVariables = _null; + hiddenMixinsAndFunctions = hiddenVariables; + } else { + if (_this.scanIdentifier$1("hide")) { + members = _this._memberList$0(); + hiddenMixinsAndFunctions = members.item1; + hiddenVariables = members.item2; + } else { + hiddenVariables = _null; + hiddenMixinsAndFunctions = hiddenVariables; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet$_configuration$1$allowGuarded(true); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.scanner.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty8 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, new A.UnmodifiableSetView(t2, t3), new A.UnmodifiableSetView(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty8 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, _null, _null, new A.UnmodifiableSetView(t2, t3), new A.UnmodifiableSetView(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty8 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + }, + _memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$0(); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure(_this, variables, identifiers)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + return new A.Tuple2(identifiers, variables, type$.Tuple2_of_Set_String_and_Set_String); + }, + _ifRule$2(start, child) { + var condition, children, clauses, lastClause, span, _this = this, + ifIndentation = _this.get$currentIndentation(), + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + condition = _this._expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$0(); + clauses = A._setArrayType([A.IfClause$(condition, children)], type$.JSArray_IfClause); + while (true) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$0(); + clauses.push(A.IfClause$(_this._expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$(_this.children$1(0, child)); + break; + } + } + _this._inControlDirective = wasInControlDirective; + span = _this.scanner.spanFrom$1(start); + _this.whitespaceWithoutComments$0(); + return new A.IfRule(A.List_List$unmodifiable(clauses, type$.IfClause), lastClause, span); + }, + _importRule$1(start) { + var argument, _this = this, + imports = A._setArrayType([], type$.JSArray_Import), + t1 = _this.scanner; + do { + _this.whitespace$0(); + argument = _this.importArgument$0(); + if ((_this._inControlDirective || _this._stylesheet$_inMixin) && argument instanceof A.DynamicImport) + _this._disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = t1.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(imports, type$.Import), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + next = t1.peekChar$0(); + if (next === 117 || next === 85) { + url = _this.dynamicUrl$0(); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + return new A.StaticImport(A.Interpolation$(A._setArrayType([url], type$.JSArray_Object), t1.spanFrom$1(start)), modifiers, t1.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = t1.spanFrom$1(start); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) { + t2 = urlSpan; + return new A.StaticImport(A.Interpolation$(A._setArrayType([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(start)); + } else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var first; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + first = B.JSString_methods._codeUnitAt$1(url, 0); + if (first === 47) + return B.JSString_methods._codeUnitAt$1(url, 1) === 47; + if (first !== 104) + return false; + return B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + }, + tryImportModifiers$0() { + var t1, start, t2, t3, buffer, identifier, t4, $name, query, endPosition, t5, result, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t2, t3); + for (; true;) + if (_this._lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) + t2._contents += A.Primitives_stringFromCharCode(32); + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t4 = identifier.get$asPlain(); + $name = t4 == null ? null : t4.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._importSupportsQuery$0(); + t4 = !(query instanceof A.SupportsDeclaration); + if (t4) + t2._contents += A.Primitives_stringFromCharCode(40); + buffer._flushText$0(); + t3.push(new A.SupportsExpression(query)); + if (t4) + t2._contents += A.Primitives_stringFromCharCode(41); + } else { + t2._contents += A.Primitives_stringFromCharCode(40); + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); + t2._contents += A.Primitives_stringFromCharCode(41); + } + t1.expectChar$1(41); + _this.whitespace$0(); + } else { + _this.whitespace$0(); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t4, t5, endPosition); + t1._FileSpan$3(t4, t5, endPosition); + t5 = type$.Object; + t4 = A.List_List$of(t3, true, t5); + t3 = t2._contents; + if (t3.length !== 0) + t4.push(t3.charCodeAt(0) == 0 ? t3 : t3); + result = A.List_List$from(t4, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation(result, t1); + t2.Interpolation$2(t4, t1); + return t2; + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) + t2._contents += A.Primitives_stringFromCharCode(32); + buffer.addInterpolation$1(_this._mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation(result, t5); + t1.Interpolation$2(t3, t5); + return t1; + } else { + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation(result, t5); + t1.Interpolation$2(t3, t5); + return t1; + } + }, + _importSupportsQuery$0() { + var t1, t2, $function, $name, _this = this; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._supportsCondition$0(); + else { + $function = _this._tryImportSupportsFunction$0(); + if ($function != null) + return $function; + t2 = t1._string_scanner$_position; + $name = _this._expression$0(); + t1.expectChar$1(58); + return _this._supportsDeclarationValue$2($name, new A._SpanScannerState(t1, t2)); + } + } + }, + _tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction($name, value, t1.spanFrom$1(start)); + }, + _includeRule$1(start) { + var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, _this = this, _null = null, + $name = _this.identifier$0(), + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._publicIdentifier$0(); + namespace = $name; + $name = name0; + } else { + $name = A.stringReplaceAllUnchecked($name, "_", "-"); + namespace = _null; + } + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$0(); + contentArguments = _this._argumentDeclaration$0(); + _this.whitespace$0(); + } else + contentArguments = _null; + t2 = contentArguments == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + contentArguments_ = new A.ArgumentDeclaration(B.List_empty10, _null, A._FileSpan$(t2.file, t3, t3)); + } else + contentArguments_ = contentArguments; + wasInContentBlock = _this._inContentBlock; + _this._inContentBlock = true; + $content = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__includeRule_closure(contentArguments_)); + _this._inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = t1.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + return new A.IncludeRule(namespace, $name, $arguments, $content, t1.expand$1(0, t2.get$span(t2))); + }, + mediaRule$1(start) { + return this._withChildren$3(this.get$_statement(), start, new A.StylesheetParser_mediaRule_closure(this._mediaQueryList$0())); + }, + _mixinRule$1(start) { + var $name, t1, $arguments, t2, t3, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + $arguments = _this._argumentDeclaration$0(); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration(B.List_empty10, null, A._FileSpan$(t2.file, t3, t3)); + } + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); + _this.whitespace$0(); + _this._stylesheet$_inMixin = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__mixinRule_closure(_this, $name, $arguments, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t5, t6, t7, identifier, contents, argument, trailing, endPosition, t8, t9, start0, end, _this = this, _box_0 = {}, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer(t3, t4); + _box_0.needsDeprecationWarning = false; + for (t5 = _this.get$whitespace(), t6 = t1.string; true;) { + if (t1.peekChar$0() === 35) { + t7 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t7); + _box_0.needsDeprecationWarning = true; + } else { + t7 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + switch (identifier) { + case "url": + case "url-prefix": + case "domain": + contents = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); + if (contents != null) + buffer.addInterpolation$1(contents); + else { + t1.expectChar$1(40); + _this.whitespace$0(); + argument = _this.interpolatedString$0(); + t1.expectChar$1(41); + t7 = t3._contents += identifier; + t3._contents = t7 + A.Primitives_stringFromCharCode(40); + buffer.addInterpolation$1(argument.asInterpolation$0()); + t3._contents += A.Primitives_stringFromCharCode(41); + } + t7 = t3._contents; + trailing = t7.charCodeAt(0) == 0 ? t7 : t7; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break; + case "regexp": + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + t1.expectChar$1(41); + t3._contents += A.Primitives_stringFromCharCode(41); + _box_0.needsDeprecationWarning = true; + break; + default: + endPosition = t1._string_scanner$_position; + t8 = t1._sourceFile; + t9 = new A._FileSpan(t8, t7, endPosition); + t9._FileSpan$3(t8, t7, endPosition); + A.throwExpression(new A.StringScannerException(t6, "Invalid function name.", t9)); + } + } + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t3._contents += A.Primitives_stringFromCharCode(44); + start0 = t1._string_scanner$_position; + t5.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t6, start0, end); + } + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var _this = this, + condition = _this._supportsCondition$0(); + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_supportsRule_closure(condition)); + }, + _useRule$1(start) { + var namespace, configuration, span, t1, _this = this, + _s9_ = "@use rule", + url = _this._urlString$0(); + _this.whitespace$0(); + namespace = _this._useNamespace$2(url, start); + _this.whitespace$0(); + configuration = _this._stylesheet$_configuration$0(); + _this.expectStatementSeparator$1(_s9_); + span = _this.scanner.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1(_s9_); + t1 = new A.UseRule(url, namespace, configuration == null ? B.List_empty8 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + t1.UseRule$4$configuration(url, namespace, span, configuration); + return t1; + }, + _useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = A.SpanScanner$(namespace, null); + t1 = new A.Parser(t1, _this.logger)._parseIdentifier$0(); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassFormatException) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, t3, $name, expression, t4, guarded, endPosition, t5, t6, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable); + _this.whitespace$0(); + t1 = _this.scanner; + t1.expectChar$1(40); + for (t2 = t1.string; true;) { + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + expression = _this.expressionUntilComma$0(); + t4 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) + if (_this.identifier$0() === "default") { + _this.whitespace$0(); + guarded = true; + } else { + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t4, endPosition); + t6._FileSpan$3(t5, t4, endPosition); + A.throwExpression(new A.StringScannerException(t2, "Invalid flag name.", t6)); + guarded = false; + } + else + guarded = false; + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + span = new A._FileSpan(t4, t3, endPosition); + span._FileSpan$3(t4, t3, endPosition); + if (variableNames.contains$1(0, $name)) + A.throwExpression(new A.StringScannerException(t2, string$.The_sa, span)); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet$_configuration$0() { + return this._stylesheet$_configuration$1$allowGuarded(false); + }, + _warnRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule(value, this.scanner.spanFrom$1(start)); + }, + _whileRule$2(start, child) { + var _this = this, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + return _this._withChildren$3(child, start, new A.StylesheetParser__whileRule_closure(_this, wasInControlDirective, _this._expression$0())); + }, + unknownAtRule$2(start, $name) { + var t2, t3, rule, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet$_inUnknownAtRule; + _this._stylesheet$_inUnknownAtRule = true; + t1.value = null; + t2 = _this.scanner; + t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this.almostAnyValue$0() : null; + if (_this.lookingAtChildren$0()) + rule = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_unknownAtRule_closure(t1, $name)); + else { + _this.expectStatementSeparator$0(); + rule = A.AtRule$($name, t2.spanFrom$1(start), null, t3); + } + _this._stylesheet$_inUnknownAtRule = wasInUnknownAtRule; + return rule; + }, + _disallowedAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); + }, + _argumentDeclaration$0() { + var $arguments, named, restArgument, t3, t4, $name, defaultValue, endPosition, t5, t6, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + $arguments = A._setArrayType([], type$.JSArray_Argument); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + t3 = t1.string; + while (true) { + if (!(t1.peekChar$0() === 36)) { + restArgument = null; + break; + } + t4 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$0(); + restArgument = $name; + break; + } + defaultValue = null; + } + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t4, endPosition); + t6._FileSpan$3(t5, t4, endPosition); + $arguments.push(new A.Argument($name, defaultValue, t6)); + if (!named.add$1(0, $name)) + A.throwExpression(new A.StringScannerException(t3, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span)); + if (!t1.scanChar$1(44)) { + restArgument = null; + break; + } + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentDeclaration(A.List_List$unmodifiable($arguments, type$.Argument), restArgument, t1); + }, + _argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, t4, named, keywordRest, t5, t6, rest, expression, t7, result, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + positional = A._setArrayType([], type$.JSArray_Expression); + t3 = type$.String; + t4 = type$.Expression; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + t5 = !mixin; + t6 = t1.string; + rest = _null; + while (true) { + if (!_this._lookingAtExpression$0()) { + keywordRest = _null; + break; + } + expression = _this.expressionUntilComma$1$singleEquals(t5); + _this.whitespace$0(); + if (expression instanceof A.VariableExpression && t1.scanChar$1(58)) { + _this.whitespace$0(); + t7 = expression.name; + if (named.containsKey$1(t7)) + A.throwExpression(new A.StringScannerException(t6, "Duplicate argument.", expression.span)); + named.$indexSet(0, t7, _this.expressionUntilComma$1$singleEquals(t5)); + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$0(); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + A.throwExpression(new A.StringScannerException(t6, string$.Positi, expression.get$span(expression))); + else + positional.push(expression); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) { + keywordRest = _null; + break; + } + _this.whitespace$0(); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t5 = t1._sourceFile; + t6 = t1._string_scanner$_position; + new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); + t7 = new A._FileSpan(t5, t6, t6); + t7._FileSpan$3(t5, t6, t6); + t6 = A._setArrayType([""], type$.JSArray_Object); + result = A.List_List$from(t6, false, type$.Object); + result.fixed$length = Array; + result.immutable$list = Array; + t5 = new A.Interpolation(result, t7); + t5.Interpolation$2(t6, t7); + positional.push(new A.StringExpression(t5, false)); + keywordRest = _null; + break; + } + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentInvocation(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); + }, + _argumentInvocation$0() { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _argumentInvocation$1$mixin(mixin) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { + var t2, beforeBracket, start, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, first, next, t4, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$0(); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression); + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(t1, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInParentheses = _this._inParentheses; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator(_box_0, _this, resolveOneOperation); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions(_box_0, _this, resolveOperations); + $label0$0: + for (t3 = type$.JSArray_Expression; true;) { + _this.whitespace$0(); + if (t1 && until.call$0()) + break $label0$0; + first = t2.peekChar$0(); + switch (first) { + case 40: + addSingleExpression.call$1(_this._parentheses$0()); + break; + case 91: + addSingleExpression.call$1(_this._expression$1$bracketList(true)); + break; + case 36: + addSingleExpression.call$1(_this._variable$0()); + break; + case 38: + addSingleExpression.call$1(_this._selector$0()); + break; + case 39: + case 34: + addSingleExpression.call$1(_this.interpolatedString$0()); + break; + case 35: + addSingleExpression.call$1(_this._hashExpression$0()); + break; + case 61: + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_axY); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_nZh); + } + break; + case 33: + next = t2.peekChar$1(1); + if (next === 61) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_Vr9); + } else { + if (next != null) + if ((next | 32) >>> 0 !== 105) + t4 = next === 32 || next === 9 || next === 10 || next === 13 || next === 12; + else + t4 = true; + else + t4 = true; + if (t4) + addSingleExpression.call$1(_this._importantExpression$0()); + else + break $label0$0; + } + break; + case 60: + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oqF : B.BinaryOperator_apg); + break; + case 62: + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_Wma : B.BinaryOperator_cw1); + break; + case 42: + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_6pl); + break; + case 43: + if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_qbf); + } + break; + case 45: + next = t2.peekChar$1(1); + if (next != null && next >= 48 && next <= 57 || next === 46) + if (_box_0.singleExpression_ != null) { + t4 = t2.peekChar$1(-1); + t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; + } else + t4 = true; + else + t4 = false; + if (t4) + addSingleExpression.call$1(_this._number$0()); + else if (_this._lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_KlB); + } + break; + case 47: + if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_qpm); + } + break; + case 37: + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_PHH); + break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + addSingleExpression.call$1(_this._number$0()); + break; + case 46: + if (t2.peekChar$1(1) === 46) + break $label0$0; + addSingleExpression.call$1(_this._number$0()); + break; + case 97: + if (!_this.get$plainCss() && _this.scanIdentifier$1("and")) + addOperator.call$1(B.BinaryOperator_and_and_2_and); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 111: + if (!_this.get$plainCss() && _this.scanIdentifier$1("or")) + addOperator.call$1(B.BinaryOperator_or_or_1_or); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 117: + case 85: + if (t2.peekChar$1(1) === 43) + addSingleExpression.call$1(_this._unicodeRange$0()); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 112: + case 113: + case 114: + case 115: + case 116: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 92: + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 44: + if (_this._inParentheses) { + _this._inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + break; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t4 = _box_0.singleExpression_; + t4.toString; + commaExpressions.push(t4); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + break; + default: + if (first != null && first >= 128) { + addSingleExpression.call$1(_this.identifierLike$0()); + break; + } else + break $label0$0; + } + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(commaExpressions, type$.Expression), B.ListSeparator_rXA, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_EVt, true, t2); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t3 = A._setArrayType([t1], t3); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(t3, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); + } + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _expression$0() { + return this._expression$3$bracketList$singleEquals$until(false, false, null); + }, + _expression$2$singleEquals$until(singleEquals, until) { + return this._expression$3$bracketList$singleEquals$until(false, singleEquals, until); + }, + _expression$1$bracketList(bracketList) { + return this._expression$3$bracketList$singleEquals$until(bracketList, false, null); + }, + _expression$1$until(until) { + return this._expression$3$bracketList$singleEquals$until(false, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _isSlashOperand$1(expression) { + var t1; + if (!(expression instanceof A.NumberExpression)) + if (!(expression instanceof A.CalculationExpression)) + t1 = expression instanceof A.BinaryOperationExpression && expression.allowsSlash; + else + t1 = true; + else + t1 = true; + return t1; + }, + _singleExpression$0() { + var next, _this = this, + t1 = _this.scanner, + first = t1.peekChar$0(); + switch (first) { + case 40: + return _this._parentheses$0(); + case 47: + return _this._unaryOperation$0(); + case 46: + return _this._number$0(); + case 91: + return _this._expression$1$bracketList(true); + case 36: + return _this._variable$0(); + case 38: + return _this._selector$0(); + case 39: + case 34: + return _this.interpolatedString$0(); + case 35: + return _this._hashExpression$0(); + case 43: + next = t1.peekChar$1(1); + return A.isDigit(next) || next === 46 ? _this._number$0() : _this._unaryOperation$0(); + case 45: + return _this._minusExpression$0(); + case 33: + return _this._importantExpression$0(); + case 117: + case 85: + if (t1.peekChar$1(1) === 43) + return _this._unicodeRange$0(); + else + return _this.identifierLike$0(); + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return _this._number$0(); + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 92: + return _this.identifierLike$0(); + default: + if (first != null && first >= 128) + return _this.identifierLike$0(); + t1.error$1(0, "Expected expression."); + } + }, + _parentheses$0() { + var wasInParentheses, start, first, expressions, t1, t2, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, "Parentheses aren't allowed in plain CSS.", 1); + wasInParentheses = _this._inParentheses; + _this._inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) { + t1.expectChar$1(41); + t2 = A._setArrayType([], type$.JSArray_Expression); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(t2, type$.Expression); + return new A.ListExpression(t2, B.ListSeparator_undecided_null_undecided, false, t1); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t1 = _this._stylesheet$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.ParenthesizedExpression(first, t1); + } + _this.whitespace$0(); + expressions = A._setArrayType([first], type$.JSArray_Expression); + for (; true;) { + if (!_this._lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(expressions, type$.Expression); + return new A.ListExpression(t2, B.ListSeparator_rXA, false, t1); + } finally { + _this._inParentheses = wasInParentheses; + } + }, + _stylesheet$_map$2(first, start) { + var t2, key, _this = this, + t1 = type$.Tuple2_Expression_Expression, + pairs = A._setArrayType([new A.Tuple2(first, _this.expressionUntilComma$0(), t1)], type$.JSArray_Tuple2_Expression_Expression); + for (t2 = _this.scanner; t2.scanChar$1(44);) { + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t2.expectChar$1(58); + _this.whitespace$0(); + pairs.push(new A.Tuple2(key, _this.expressionUntilComma$0(), t1)); + } + t2.expectChar$1(41); + t2 = t2.spanFrom$1(start); + return new A.MapExpression(A.List_List$unmodifiable(pairs, t1), t2); + }, + _hashExpression$0() { + var start, first, t2, identifier, buffer, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + first = t1.peekChar$0(); + if (first != null && A.isDigit(first)) + return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + A.Primitives_stringFromCharCode(35); + buffer.addInterpolation$1(identifier); + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, _this = this, + digit1 = _this._hexDigit$0(), + digit2 = _this._hexDigit$0(), + digit3 = _this._hexDigit$0(), + t1 = _this.scanner; + if (!A.isHex(t1.peekChar$0())) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._hexDigit$0(); + t2 = digit1 << 4 >>> 0; + t3 = digit3 << 4 >>> 0; + if (!A.isHex(t1.peekChar$0())) { + red = t2 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t3 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t2 + digit2; + green = t3 + digit4; + blue = (_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0(); + alpha = A.isHex(t1.peekChar$0()) ? ((_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0()) / 255 : null; + } + } + return A.SassColor$rgbInternal(red, green, blue, alpha, alpha == null ? new A.SpanColorFormat(t1.spanFrom$1(start)) : null); + }, + _isHexColor$1(interpolation) { + var t1, + plain = interpolation.get$asPlain(); + if (plain == null) + return false; + t1 = plain.length; + if (t1 !== 3 && t1 !== 4 && t1 !== 6 && t1 !== 8) + return false; + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, A.character__isHex$closure()); + }, + _hexDigit$0() { + var t1 = this.scanner, + char = t1.peekChar$0(); + if (char == null || !A.isHex(char)) + t1.error$1(0, "Expected hex digit."); + return A.asHex(t1.readChar$0()); + }, + _minusExpression$0() { + var _this = this, + next = _this.scanner.peekChar$1(1); + if (A.isDigit(next) || next === 46) + return _this._number$0(); + if (_this._lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._unaryOperation$0(); + }, + _importantExpression$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + this.whitespace$0(); + this.expectIdentifier$1("important"); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression(A.Interpolation$(A._setArrayType(["!important"], type$.JSArray_Object), t2), false); + }, + _unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_Ix1) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$0(); + return new A.UnaryOperationExpression(operator, _this._singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _unaryOperatorFor$1(character) { + switch (character) { + case 43: + return B.UnaryOperator_gg4; + case 45: + return B.UnaryOperator_TLI; + case 47: + return B.UnaryOperator_Ix1; + default: + return null; + } + }, + _number$0() { + var number, unit, t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(); + if (first === 43 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._consumeNaturalNumber$0(); + _this._tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2); + _this._tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _consumeNaturalNumber$0() { + var t2, + t1 = this.scanner; + if (!A.isDigit(t1.readChar$0())) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var t2, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + if (!A.isDigit(t1.peekChar$1(1))) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _tryExponent$0() { + var next, t2, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!A.isDigit(next) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (next === 43 || next === 45) + t1.readChar$0(); + if (!A.isDigit(t1.peekChar$0())) + t1.error$1(0, "Expected digit."); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(start)); + else if (hasQuestionMark) { + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression(A.Interpolation$(A._setArrayType([t2], type$.JSArray_Object), t1), false); + } + if (t1.scanChar$1(45)) { + t2 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure0());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + if (_this._lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression(A.Interpolation$(A._setArrayType([t2], type$.JSArray_Object), t1), false); + }, + _variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, t1.spanFrom$1(start)); + return new A.VariableExpression(null, $name, t1.spanFrom$1(start)); + }, + _selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.logger.warn$2$span(0, string$.In_Sas, t1.spanFrom$1(start)); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression(t1.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, buffer, next, second, t5, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + for (; true;) { + next = t1.peekChar$0(); + if (next === quote) { + t1.readChar$0(); + break; + } else if (next == null || next === 10 || next === 13 || next === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + else if (next === 92) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else + t3._contents += A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + } else if (next === 35) + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + identifierLike$0() { + var invocation, expression, color, specialFunction, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t2 = plain == null, + t3 = !t2; + if (t3) { + if (plain === "if" && t1.peekChar$0() === 40) { + invocation = _this._argumentInvocation$0(); + return new A.IfExpression(invocation, identifier.span.expand$1(0, invocation.span)); + } else if (plain === "not") { + _this.whitespace$0(); + expression = _this._singleExpression$0(); + return new A.UnaryOperationExpression(B.UnaryOperator_not_not_not, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower._value = plain.toLowerCase(); + if (t1.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression(false, identifier.span); + case "null": + return new A.NullExpression(identifier.span); + case "true": + return new A.BooleanExpression(true, identifier.span); + } + color = $.$get$colorsByName().$index(0, lower._readLocal$0()); + if (color != null) { + t1 = identifier.span; + return new A.ColorExpression(A.SassColor$rgbInternal(color.get$red(color), color.get$green(color), color.get$blue(color), color._alpha, new A.SpanColorFormat(t1)), t1); + } + } + specialFunction = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (specialFunction != null) + return specialFunction; + } + switch (t1.peekChar$0()) { + case 46: + if (t1.peekChar$1(1) === 46) + return new A.StringExpression(identifier, false); + t1.readChar$0(); + if (t3) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + break; + case 40: + if (t2) + return new A.InterpolatedFunctionExpression(identifier, _this._argumentInvocation$0(), t1.spanFrom$1(start)); + else + return new A.FunctionExpression(null, plain, _this._argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")), t1.spanFrom$1(start)); + default: + return new A.StringExpression(identifier, false); + } + }, + namespacedExpression$2(namespace, start) { + var $name, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure(_this, start)); + return new A.VariableExpression(namespace, $name, t1.spanFrom$1(start)); + } + return new A.FunctionExpression(namespace, _this._publicIdentifier$0(), _this._argumentInvocation$0(), t1.spanFrom$1(start)); + }, + trySpecialFunction$2($name, start) { + var t2, buffer, t3, next, _this = this, _null = null, + t1 = _this.scanner, + calculation = t1.peekChar$0() === 40 ? _this._tryCalculation$2($name, start) : _null; + if (calculation != null) + return calculation; + switch (A.unvendor($name)) { + case "calc": + case "element": + case "expression": + if (!t1.scanChar$1(40)) + return _null; + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = "" + $name; + t2._contents = t3; + t2._contents = t3 + A.Primitives_stringFromCharCode(40); + break; + case "progid": + if (!t1.scanChar$1(58)) + return _null; + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = "" + $name; + t2._contents = t3; + t2._contents = t3 + A.Primitives_stringFromCharCode(58); + next = t1.peekChar$0(); + while (true) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + next = t1.peekChar$0(); + } + t1.expectChar$1(40); + t2._contents += A.Primitives_stringFromCharCode(40); + break; + case "url": + return A.NullableExtension_andThen(_this._tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure()); + default: + return _null; + } + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + buffer._interpolation_buffer$_text._contents += A.Primitives_stringFromCharCode(41); + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _tryCalculation$2($name, start) { + var beforeArguments, $arguments, t1, exception, t2, _this = this; + switch ($name) { + case "calc": + $arguments = _this._calculationArguments$1(1); + t1 = _this.scanner.spanFrom$1(start); + return new A.CalculationExpression($name, A.CalculationExpression__verifyArguments($arguments), t1); + case "min": + case "max": + t1 = _this.scanner; + beforeArguments = new A._SpanScannerState(t1, t1._string_scanner$_position); + $arguments = null; + try { + $arguments = _this._calculationArguments$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(beforeArguments); + return null; + } else + throw exception; + } + t2 = $arguments; + t1 = t1.spanFrom$1(start); + return new A.CalculationExpression($name, A.CalculationExpression__verifyArguments(t2), t1); + case "clamp": + $arguments = _this._calculationArguments$1(3); + t1 = _this.scanner.spanFrom$1(start); + return new A.CalculationExpression($name, A.CalculationExpression__verifyArguments($arguments), t1); + default: + return null; + } + }, + _calculationArguments$1(maxArgs) { + var interpolation, $arguments, t2, _this = this, + t1 = _this.scanner; + t1.expectChar$1(40); + interpolation = _this._containsCalculationInterpolation$0() ? new A.StringExpression(_this._interpolatedDeclarationValue$0(), false) : null; + if (interpolation != null) { + t1.expectChar$1(41); + return A._setArrayType([interpolation], type$.JSArray_Expression); + } + _this.whitespace$0(); + $arguments = A._setArrayType([_this._calculationSum$0()], type$.JSArray_Expression); + t2 = maxArgs != null; + while (true) { + if (!((!t2 || $arguments.length < maxArgs) && t1.scanChar$1(44))) + break; + _this.whitespace$0(); + $arguments.push(_this._calculationSum$0()); + } + t1.expectChar$2$name(41, $arguments.length === maxArgs ? '"+", "-", "*", "/", or ")"' : '"+", "-", "*", "/", ",", or ")"'); + return $arguments; + }, + _calculationArguments$0() { + return this._calculationArguments$1(null); + }, + _calculationSum$0() { + var t1, next, t2, t3, _this = this, + sum = _this._calculationProduct$0(); + for (t1 = _this.scanner; true;) { + next = t1.peekChar$0(); + t2 = next === 43; + if (t2 || next === 45) { + t3 = t1.peekChar$1(-1); + if (t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) + t1.error$1(0, string$.x22x2b__an); + t1.readChar$0(); + _this.whitespace$0(); + t2 = t2 ? B.BinaryOperator_qbf : B.BinaryOperator_KlB; + sum = new A.BinaryOperationExpression(t2, sum, _this._calculationProduct$0(), false); + } else + return sum; + } + }, + _calculationProduct$0() { + var t1, next, t2, _this = this, + product = _this._calculationValue$0(); + for (t1 = _this.scanner; true;) { + _this.whitespace$0(); + next = t1.peekChar$0(); + t2 = next === 42; + if (t2 || next === 47) { + t1.readChar$0(); + _this.whitespace$0(); + t2 = t2 ? B.BinaryOperator_6pl : B.BinaryOperator_qpm; + product = new A.BinaryOperationExpression(t2, product, _this._calculationValue$0(), false); + } else + return product; + } + }, + _calculationValue$0() { + var t2, value, start, ident, lowerCase, calculation, _this = this, + t1 = _this.scanner, + next = t1.peekChar$0(); + if (next === 43 || next === 45 || next === 46 || A.isDigit(next)) + return _this._number$0(); + else if (next === 36) + return _this._variable$0(); + else if (next === 40) { + t2 = t1._string_scanner$_position; + t1.readChar$0(); + value = _this._containsCalculationInterpolation$0() ? new A.StringExpression(_this._interpolatedDeclarationValue$0(), false) : null; + if (value == null) { + _this.whitespace$0(); + value = _this._calculationSum$0(); + } + _this.whitespace$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression(value, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else if (!_this.lookingAtIdentifier$0()) + t1.error$1(0, string$.Expectn); + else { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + ident = _this.identifier$0(); + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(ident, start); + if (t1.peekChar$0() !== 40) + t1.error$1(0, 'Expected "(" or ".".'); + lowerCase = ident.toLowerCase(); + calculation = _this._tryCalculation$2(lowerCase, start); + if (calculation != null) + return calculation; + else if (lowerCase === "if") + return new A.IfExpression(_this._argumentInvocation$0(), t1.spanFrom$1(start)); + else + return new A.FunctionExpression(null, ident, _this._argumentInvocation$0(), t1.spanFrom$1(start)); + } + }, + _containsCalculationInterpolation$0() { + var t2, parens, next, target, t3, _null = null, + _s64_ = string$.The_gi, + _s17_ = "Invalid position ", + brackets = A._setArrayType([], type$.JSArray_int), + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + for (t2 = t1.string.length, parens = 0; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + target = 1; + break; + case 47: + target = 2; + break; + case 39: + case 34: + target = 3; + break; + case 35: + target = 4; + break; + case 40: + target = 5; + break; + case 123: + case 91: + target = 6; + break; + case 41: + target = 7; + break; + case 125: + case 93: + target = 8; + break; + default: + target = 9; + break; + } + c$0: + for (; true;) + switch (target) { + case 1: + t1.readChar$0(); + t1.readChar$0(); + break c$0; + case 2: + if (!this.scanComment$0()) + t1.readChar$0(); + break c$0; + case 3: + this.interpolatedString$0(); + break c$0; + case 4: + if (parens === 0 && t1.peekChar$1(1) === 123) { + if (start._scanner !== t1) + A.throwExpression(A.ArgumentError$(_s64_, _null)); + t3 = start.position; + if ((t3 === 0 ? 1 / t3 < 0 : t3 < 0) || t3 > t2) + A.throwExpression(A.ArgumentError$(_s17_ + t3, _null)); + t1._string_scanner$_position = t3; + t1._lastMatch = null; + return true; + } + t1.readChar$0(); + break c$0; + case 5: + ++parens; + target = 6; + continue c$0; + case 6: + next.toString; + brackets.push(A.opposite(next)); + t1.readChar$0(); + break c$0; + case 7: + --parens; + target = 8; + continue c$0; + case 8: + if (brackets.length === 0 || brackets.pop() !== next) { + if (start._scanner !== t1) + A.throwExpression(A.ArgumentError$(_s64_, _null)); + t3 = start.position; + if ((t3 === 0 ? 1 / t3 < 0 : t3 < 0) || t3 > t2) + A.throwExpression(A.ArgumentError$(_s17_ + t3, _null)); + t1._string_scanner$_position = t3; + t1._lastMatch = null; + return false; + } + t1.readChar$0(); + break c$0; + case 9: + t1.readChar$0(); + break c$0; + } + } + t1.set$state(start); + return false; + }, + _tryUrlContents$2$name(start, $name) { + var t3, t4, buffer, t5, next, endPosition, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + _this.whitespaceWithoutComments$0(); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t5 = "" + ($name == null ? "url" : $name); + t3._contents = t5; + t3._contents = t5 + A.Primitives_stringFromCharCode(40); + for (; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (next === 92) + t3._contents += A.S(_this.escape$0()); + else { + if (next !== 33) + if (next !== 37) + if (next !== 38) + t5 = next >= 42 && next <= 126 || next >= 128; + else + t5 = true; + else + t5 = true; + else + t5 = true; + if (t5) + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 35) + if (t1.peekChar$1(1) === 123) { + t5 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12) { + _this.whitespaceWithoutComments$0(); + if (t1.peekChar$0() !== 41) + break; + } else if (next === 41) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + endPosition = t1._string_scanner$_position; + t2 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t2, t5, endPosition); + t1._FileSpan$3(t2, t5, endPosition); + t5 = type$.Object; + t2 = A.List_List$of(t4, true, t5); + t4 = t3._contents; + if (t4.length !== 0) + t2.push(t4.charCodeAt(0) == 0 ? t4 : t4); + result = A.List_List$from(t2, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t3 = new A.Interpolation(result, t1); + t3.Interpolation$2(t2, t1); + return t3; + } else + break; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _tryUrlContents$1(start) { + return this._tryUrlContents$2$name(start, null); + }, + dynamicUrl$0() { + var contents, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + contents = _this._tryUrlContents$1(start); + if (contents != null) + return new A.StringExpression(contents, false); + return new A.InterpolatedFunctionExpression(A.Interpolation$(A._setArrayType(["url"], type$.JSArray_Object), t1.spanFrom$1(start)), _this._argumentInvocation$0(), t1.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, next, commentStart, end, t7, contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + $label0$1: + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 34: + case 39: + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + break; + case 47: + commentStart = t1._string_scanner$_position; + if (_this.scanComment$0()) { + if (t6) { + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, commentStart, end); + } + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 35: + if (t1.peekChar$1(1) === 123) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 13: + case 10: + case 12: + if (_this.get$indented()) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 33: + case 59: + case 123: + case 125: + break $label0$1; + case 117: + case 85: + t7 = t1._string_scanner$_position; + if (!_this.scanIdentifier$1("url")) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + contents = _this._tryUrlContents$1(new A._SpanScannerState(t1, t7)); + if (contents == null) { + if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); + t1._string_scanner$_position = t7; + t1._lastMatch = null; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else + buffer.addInterpolation$1(contents); + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + t3._contents += _this.identifier$0(); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { + var t4, t5, t6, t7, wroteNewline, next, t8, start, end, contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)), + brackets = A._setArrayType([], type$.JSArray_int); + $label0$1: + for (t4 = t1.string, t5 = t4.length, t6 = !allowColon, t7 = !allowSemicolon, wroteNewline = false; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + t3._contents += A.S(_this.escape$1$identifierStart(true)); + wroteNewline = false; + break; + case 34: + case 39: + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + wroteNewline = false; + break; + case 47: + if (t1.peekChar$1(1) === 42) { + t8 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t8.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 35: + if (t1.peekChar$1(1) === 123) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 32: + case 9: + if (!wroteNewline) { + t8 = t1.peekChar$1(1); + t8 = !(t8 === 32 || t8 === 9 || t8 === 10 || t8 === 13 || t8 === 12); + } else + t8 = true; + if (t8) + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else + t1.readChar$0(); + break; + case 10: + case 13: + case 12: + if (_this.get$indented()) + break $label0$1; + t8 = t1.peekChar$1(-1); + if (!(t8 === 10 || t8 === 13 || t8 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break; + case 40: + case 123: + case 91: + next.toString; + t3._contents += A.Primitives_stringFromCharCode(next); + brackets.push(A.opposite(t1.readChar$0())); + wroteNewline = false; + break; + case 41: + case 125: + case 93: + if (brackets.length === 0) + break $label0$1; + next.toString; + t3._contents += A.Primitives_stringFromCharCode(next); + t1.expectChar$1(brackets.pop()); + wroteNewline = false; + break; + case 59: + if (t7 && brackets.length === 0) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 58: + if (t6 && brackets.length === 0) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 117: + case 85: + t8 = t1._string_scanner$_position; + if (!_this.scanIdentifier$1("url")) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + contents = _this._tryUrlContents$1(new A._SpanScannerState(t1, t8)); + if (contents == null) { + if ((t8 === 0 ? 1 / t8 < 0 : t8 < 0) || t8 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t8, null)); + t1._string_scanner$_position = t8; + t1._lastMatch = null; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else + buffer.addInterpolation$1(contents); + wroteNewline = false; + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + t3._contents += _this.identifier$0(); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._interpolation_buffer$_contents.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, allowEmpty, false); + }, + _interpolatedDeclarationValue$0() { + return this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, false, false); + }, + _interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { + return this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, allowEmpty, allowSemicolon); + }, + interpolatedIdentifier$0() { + var first, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + t3 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer(t2, t3); + if (t1.scanChar$1(45)) { + t2._contents += A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + t2._contents += A.Primitives_stringFromCharCode(45); + _this._interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + } + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s20_); + else if (first === 95 || A.isAlphabetic0(first) || first >= 128) + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (first === 92) + t2._contents += A.S(_this.escape$1$identifierStart(true)); + else if (first === 35 && t1.peekChar$1(1) === 123) { + t2 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t3.push(t2); + } else + t1.error$1(0, _s20_); + _this._interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + }, + _interpolatedIdentifierBody$1(buffer) { + var t1, t2, t3, next, t4; + for (t1 = buffer._interpolation_buffer$_contents, t2 = this.scanner, t3 = buffer._interpolation_buffer$_text; true;) { + next = t2.peekChar$0(); + if (next == null) + break; + else { + if (next !== 95) + if (next !== 45) { + if (!(next >= 97 && next <= 122)) + t4 = next >= 65 && next <= 90; + else + t4 = true; + if (!t4) + t4 = next >= 48 && next <= 57; + else + t4 = true; + t4 = t4 || next >= 128; + } else + t4 = true; + else + t4 = true; + if (t4) + t3._contents += A.Primitives_stringFromCharCode(t2.readChar$0()); + else if (next === 92) + t3._contents += A.S(this.escape$0()); + else if (next === 35 && t2.peekChar$1(1) === 123) { + t4 = this.singleInterpolation$0(); + buffer._flushText$0(); + t1.push(t4); + } else + break; + } + } + }, + singleInterpolation$0() { + var contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$0(); + contents = _this._expression$0(); + t1.expectChar$1(125); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + return contents; + }, + _mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + for (; true;) { + _this.whitespace$0(); + _this._stylesheet$_mediaQuery$1(buffer); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t4 = t3._contents += A.Primitives_stringFromCharCode(44); + t3._contents = t4 + A.Primitives_stringFromCharCode(32); + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet$_mediaQuery$1(buffer) { + var identifier1, t1, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer$_text._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$0(); + buffer.addInterpolation$1(identifier1); + if (!_this._lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer$_text; + t1._contents += A.Primitives_stringFromCharCode(32); + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$0(); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, _this = this; + for (t1 = buffer._interpolation_buffer$_text; true;) { + _this._mediaOrInterp$1(buffer); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$0(); + t2 = t1._contents += A.Primitives_stringFromCharCode(32); + t2 += operator; + t1._contents = t2; + t1._contents = t2 + A.Primitives_stringFromCharCode(32); + } + }, + _mediaOrInterp$1(buffer) { + var interpolation; + if (this.scanner.peekChar$0() === 35) { + interpolation = this.singleInterpolation$0(); + buffer.addInterpolation$1(A.Interpolation$(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation))); + } else + this._stylesheet$_mediaInParens$1(buffer); + }, + _stylesheet$_mediaInParens$1(buffer) { + var t2, needsParenDeprecation, needsNotDeprecation, expression, t3, t4, next, t5, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer$_text; + t2._contents += A.Primitives_stringFromCharCode(40); + _this.whitespace$0(); + needsParenDeprecation = t1.peekChar$0() === 40; + needsNotDeprecation = _this.matchesIdentifier$1("not"); + expression = _this._expressionUntilComparison$0(); + if (needsParenDeprecation || needsNotDeprecation) { + t3 = needsParenDeprecation ? "(" : "not"; + _this.logger.warn$3$deprecation$span(0, 'Starting a @media query with "' + t3 + string$.x22x20is_d + expression.toString$0(0) + '}\nTo migrate to new behavior: #{"' + expression.toString$0(0) + string$.x22x7d__Fo, true, expression.get$span(expression)); + } + buffer._flushText$0(); + t3 = buffer._interpolation_buffer$_contents; + t3.push(expression); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t4 = t2._contents += A.Primitives_stringFromCharCode(58); + t2._contents = t4 + A.Primitives_stringFromCharCode(32); + t4 = _this._expression$0(); + buffer._flushText$0(); + t3.push(t4); + } else { + next = t1.peekChar$0(); + t4 = next !== 60; + if (!t4 || next === 62 || next === 61) { + t2._contents += A.Primitives_stringFromCharCode(32); + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + if ((!t4 || next === 62) && t1.scanChar$1(61)) + t2._contents += A.Primitives_stringFromCharCode(61); + t2._contents += A.Primitives_stringFromCharCode(32); + _this.whitespace$0(); + t5 = _this._expressionUntilComparison$0(); + buffer._flushText$0(); + t3.push(t5); + if (!t4 || next === 62) { + next.toString; + t4 = t1.scanChar$1(next); + } else + t4 = false; + if (t4) { + t4 = t2._contents += A.Primitives_stringFromCharCode(32); + t2._contents = t4 + A.Primitives_stringFromCharCode(next); + if (t1.scanChar$1(61)) + t2._contents += A.Primitives_stringFromCharCode(61); + t2._contents += A.Primitives_stringFromCharCode(32); + _this.whitespace$0(); + t4 = _this._expressionUntilComparison$0(); + buffer._flushText$0(); + t3.push(t4); + } + } + } + t1.expectChar$1(41); + _this.whitespace$0(); + t2._contents += A.Primitives_stringFromCharCode(41); + }, + _expressionUntilComparison$0() { + return this._expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure(this)); + }, + _supportsCondition$0() { + var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + condition = _this._supportsConditionInParens$0(); + _this.whitespace$0(); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("or")) + operator = "or"; + else { + _this.expectIdentifier$1("and"); + operator = "and"; + } + _this.whitespace$0(); + right = _this._supportsConditionInParens$0(); + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = new A._FileSpan(t3, t2, endPosition); + t4._FileSpan$3(t3, t2, endPosition); + condition = new A.SupportsOperation(condition, right, operator, t4); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return condition; + }, + _supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, operation, contents, identifier0, t2, $arguments, condition, exception, declaration, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction(identifier0, $arguments, t1.spanFrom$1(start)); + } else { + t2 = identifier0.contents; + if (t2.length !== 1 || !type$.Expression._is(B.JSArray_methods.get$first(t2))) + _this.error$2(0, "Expected @supports condition.", identifier0.span); + else + return new A.SupportsInterpolation(type$.Expression._as(B.JSArray_methods.get$first(t2)), t1.spanFrom$1(start)); + } + } + t1.expectChar$1(40); + _this.whitespace$0(); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + condition = _this._supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation(condition, t1.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._supportsCondition$0(); + t1.expectChar$1(41); + return condition; + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._inParentheses; + try { + $name = _this._expression$0(); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + operation = _this._trySupportsOperation$2(identifier, nameStart); + if (operation != null) { + t1.expectChar$1(41); + return operation; + } + t2 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); + contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything(contents, t1.spanFrom$1(start)); + } else + throw exception; + } + declaration = _this._supportsDeclarationValue$2($name, start); + t1.expectChar$1(41); + return declaration; + }, + _supportsDeclarationValue$2($name, start) { + var value, _this = this; + if ($name instanceof A.StringExpression && !$name.hasQuotes && B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--")) + value = new A.StringExpression(_this._interpolatedDeclarationValue$0(), false); + else { + _this.whitespace$0(); + value = _this._expression$0(); + } + return new A.SupportsDeclaration($name, value, _this.scanner.spanFrom$1(start)); + }, + _trySupportsOperation$2(interpolation, start) { + var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!type$.Expression._is(expression)) + return _null; + t1 = _this.scanner; + beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.whitespace$0(); + for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("and")) + operator = "and"; + else { + if (!_this.scanIdentifier$1("or")) { + if (beforeWhitespace._scanner !== t1) + A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); + t2 = beforeWhitespace.position; + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = "or"; + } + _this.whitespace$0(); + right = _this._supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation(expression, t3) : operation; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t2, endPosition); + t6._FileSpan$3(t5, t2, endPosition); + operation = new A.SupportsOperation(t4, right, operator, t6); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return operation; + }, + _lookingAtInterpolatedIdentifier$0() { + var second, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic0(first) || first >= 128 || first === 92) + return true; + if (first === 35) + return t1.peekChar$1(1) === 123; + if (first !== 45) + return false; + second = t1.peekChar$1(1); + if (second == null) + return false; + if (second === 35) + return t1.peekChar$1(2) === 123; + return second === 95 || A.isAlphabetic0(second) || second >= 128 || second === 92 || second === 45; + }, + _lookingAtInterpolatedIdentifierBody$0() { + var t1 = this.scanner, + first = t1.peekChar$0(); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic0(first) || first >= 128 || A.isDigit(first) || first === 45 || first === 92) + return true; + return first === 35 && t1.peekChar$1(1) === 123; + }, + _lookingAtExpression$0() { + var next, + t1 = this.scanner, + character = t1.peekChar$0(); + if (character == null) + return false; + if (character === 46) + return t1.peekChar$1(1) !== 46; + if (character === 33) { + next = t1.peekChar$1(1); + if (next != null) + if ((next | 32) >>> 0 !== 105) + t1 = next === 32 || next === 9 || next === 10 || next === 13 || next === 12; + else + t1 = true; + else + t1 = true; + return t1; + } + if (character !== 40) + if (character !== 47) + if (character !== 91) + if (character !== 39) + if (character !== 34) + if (character !== 35) + if (character !== 43) + if (character !== 45) + if (character !== 92) + if (character !== 36) + if (character !== 38) + t1 = character === 95 || A.isAlphabetic0(character) || character >= 128 || A.isDigit(character); + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + _withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); + this.whitespaceWithoutComments$0(); + return result; + }, + _withChildren$3(child, start, create) { + return this._withChildren$1$3(child, start, create, type$.dynamic); + }, + _urlString$0() { + var innerError, stackTrace, t2, exception, + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = this.string$0(); + try { + t2 = A.Uri_parse(url); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.FormatException._is(t2)) { + innerError = t2; + stackTrace = A.getTraceFromException(exception); + this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$1$normalize(true); + _this._assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _assertPublic$2(identifier, span) { + var first = B.JSString_methods._codeUnitAt$1(identifier, 0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure.prototype = { + call$0() { + var statements, t4, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure(t1)); + t2.expectDone$0(); + t4 = t1._globalVariables; + t4 = t4.get$values(t4); + B.JSArray_methods.addAll$1(statements, A.MappedIterable_MappedIterable(t4, new A.StylesheetParser_parse__closure0(), A._instanceType(t4)._eval$1("Iterable.E"), type$.Statement)); + return A.Stylesheet$internal(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.get$plainCss()); + }, + $signature: 330 + }; + A.StylesheetParser_parse__closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$0(); + t1.string$0(); + return null; + } + return t1._statement$1$root(true); + }, + $signature: 331 + }; + A.StylesheetParser_parse__closure0.prototype = { + call$1(declaration) { + var t1 = declaration.name, + t2 = declaration.expression; + return A.VariableDeclaration$(t1, new A.NullExpression(t2.get$span(t2)), declaration.span, null, false, true, null); + }, + $signature: 332 + }; + A.StylesheetParser_parseArgumentDeclaration_closure.prototype = { + call$0() { + var $arguments, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$0(); + t1.identifier$0(); + $arguments = t1._argumentDeclaration$0(); + t1.whitespace$0(); + t2.expectChar$1(123); + return $arguments; + }, + $signature: 334 + }; + A.StylesheetParser_parseVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this; + return t1.lookingAtIdentifier$0() ? t1._variableDeclarationWithNamespace$0() : t1.variableDeclarationWithoutNamespace$0(); + }, + $signature: 163 + }; + A.StylesheetParser_parseUseRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.expectChar$2$name(64, "@-rule"); + t1.expectIdentifier$1("use"); + t1.whitespace$0(); + return t1._useRule$1(new A._SpanScannerState(t2, t3)); + }, + $signature: 336 + }; + A.StylesheetParser__parseSingleProduction_closure.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser__statement_closure.prototype = { + call$0() { + return this.$this._statement$0(); + }, + $signature: 115 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure0.prototype = { + call$0() { + return this.declaration; + }, + $signature: 163 + }; + A.StylesheetParser__declarationOrBuffer_closure.prototype = { + call$2(children, span) { + return A.Declaration$nested(this.name, children, span, null); + }, + $signature: 89 + }; + A.StylesheetParser__declarationOrBuffer_closure0.prototype = { + call$2(children, span) { + return A.Declaration$nested(this.name, children, span, this._box_0.value); + }, + $signature: 89 + }; + A.StylesheetParser__styleRule_closure.prototype = { + call$2(children, span) { + var _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) + t1.logger.warn$2$span(0, string$.This_s, _this._box_0.interpolation.span); + t1._inStyleRule = _this.wasInStyleRule; + return A.StyleRule$(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); + }, + $signature: 339 + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure.prototype = { + call$2(children, span) { + return A.Declaration$nested(this._box_0.name, children, span, null); + }, + $signature: 89 + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure0.prototype = { + call$2(children, span) { + return A.Declaration$nested(this._box_0.name, children, span, this.value); + }, + $signature: 89 + }; + A.StylesheetParser__atRootRule_closure.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, this.query); + }, + $signature: 168 + }; + A.StylesheetParser__atRootRule_closure0.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, null); + }, + $signature: 168 + }; + A.StylesheetParser__eachRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + return A.EachRule$(_this.variables, _this.list, children, span); + }, + $signature: 342 + }; + A.StylesheetParser__functionRule_closure.prototype = { + call$2(children, span) { + return A.FunctionRule$(this.name, this.$arguments, children, span, this.precedingComment); + }, + $signature: 343 + }; + A.StylesheetParser__forRule_closure.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 28 + }; + A.StylesheetParser__forRule_closure0.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 344 + }; + A.StylesheetParser__memberList_closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure.prototype = { + call$2(children, span) { + return A.ContentBlock$(this.contentArguments_, children, span); + }, + $signature: 345 + }; + A.StylesheetParser_mediaRule_closure.prototype = { + call$2(children, span) { + return A.MediaRule$(this.query, children, span); + }, + $signature: 346 + }; + A.StylesheetParser__mixinRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet$_inMixin = false; + return A.MixinRule$(_this.name, _this.$arguments, children, span, _this.precedingComment); + }, + $signature: 347 + }; + A.StylesheetParser_mozDocumentRule_closure.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + _this.$this.logger.warn$3$deprecation$span(0, string$.x40_moz_, true, span); + return A.AtRule$(_this.name, span, children, _this.value); + }, + $signature: 170 + }; + A.StylesheetParser_supportsRule_closure.prototype = { + call$2(children, span) { + return A.SupportsRule$(this.condition, children, span); + }, + $signature: 352 + }; + A.StylesheetParser__whileRule_closure.prototype = { + call$2(children, span) { + this.$this._inControlDirective = this.wasInControlDirective; + return A.WhileRule$(this.condition, children, span); + }, + $signature: 256 + }; + A.StylesheetParser_unknownAtRule_closure.prototype = { + call$2(children, span) { + return A.AtRule$(this.name, span, children, this._box_0.value); + }, + $signature: 170 + }; + A.StylesheetParser__expression_resetState.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._inParentheses && operator === B.BinaryOperator_qpm && t2._isSlashOperand$1(left) && t2._isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression(B.BinaryOperator_qpm, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression(operator, left, right, false); + t2 = t1.allowSlash = false; + if (operator === B.BinaryOperator_qbf || operator === B.BinaryOperator_KlB) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = B.JSString_methods.codeUnitAt$1(t4, t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + t3.logger.warn$3$deprecation$span(0, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, true, t1.get$span(t1)); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._inParentheses) { + t2._inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 356 + }; + A.StylesheetParser__expression_addOperator.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, + t1 = this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_qpm && operator !== B.BinaryOperator_axY) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_qpm; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression); + t3 = this.resolveOneOperation; + t4 = operator.precedence; + while (true) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + operators.push(operator); + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operands.push(singleExpression); + t1.whitespace$0(); + t2.singleExpression_ = t1._singleExpression$0(); + }, + $signature: 357 + }; + A.StylesheetParser__expression_resolveSpaceExpressions.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions != null) { + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_EVt, false, t2); + t1.spaceExpressions_ = null; + } + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 28 + }; + A.StylesheetParser__unicodeRange_closure.prototype = { + call$1(char) { + return char != null && A.isHex(char); + }, + $signature: 32 + }; + A.StylesheetParser__unicodeRange_closure0.prototype = { + call$1(char) { + return char != null && A.isHex(char); + }, + $signature: 32 + }; + A.StylesheetParser_namespacedExpression_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.StylesheetParser_trySpecialFunction_closure.prototype = { + call$1(contents) { + return new A.StringExpression(contents, false); + }, + $signature: 359 + }; + A.StylesheetParser__expressionUntilComparison_closure.prototype = { + call$0() { + var t1 = this.$this.scanner, + next = t1.peekChar$0(); + if (next === 61) + return t1.peekChar$1(1) !== 61; + return next === 60 || next === 62; + }, + $signature: 28 + }; + A.StylesheetParser__publicIdentifier_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.StylesheetGraph.prototype = { + modifiedSince$3(url, since, baseImporter) { + var node = this._stylesheet_graph$_add$3(url, baseImporter, null); + if (node == null) + return true; + return new A.StylesheetGraph_modifiedSince_transitiveModificationTime(this).call$1(node)._core$_value > since._core$_value; + }, + _stylesheet_graph$_add$3(url, baseImporter, baseUrl) { + var t1, t2, _this = this, + tuple = _this._ignoreErrors$1(new A.StylesheetGraph__add_closure(_this, url, baseImporter, baseUrl)); + if (tuple == null) + return null; + t1 = tuple.item1; + t2 = tuple.item2; + _this.addCanonical$3(t1, t2, tuple.item3); + return _this._nodes.$index(0, t2); + }, + addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, recanonicalize) { + var stylesheet, _this = this, + t1 = _this._nodes; + if (t1.$index(0, canonicalUrl) != null) + return B.Set_empty2; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_addCanonical_closure(_this, importer, canonicalUrl, originalUrl)); + if (stylesheet == null) + return B.Set_empty2; + t1.$indexSet(0, canonicalUrl, A.StylesheetNode$_(stylesheet, importer, canonicalUrl, _this._upstreamNodes$3(stylesheet, importer, canonicalUrl))); + return recanonicalize ? _this._recanonicalizeImports$2(importer, canonicalUrl) : B.Set_empty2; + }, + addCanonical$3(importer, canonicalUrl, originalUrl) { + return this.addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, true); + }, + _upstreamNodes$3(stylesheet, baseImporter, baseUrl) { + var t4, t5, t6, t7, + t1 = type$.Uri, + active = A.LinkedHashSet_LinkedHashSet$_literal([baseUrl], t1), + t2 = type$.JSArray_Uri, + t3 = A._setArrayType([], t2); + t2 = A._setArrayType([], t2); + new A._FindDependenciesVisitor(t3, t2).visitChildren$1(stylesheet.children); + t4 = type$.nullable_StylesheetNode; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t4); + for (t6 = B.JSArray_methods.get$iterator(t3); t6.moveNext$0();) { + t7 = t6.get$current(t6); + t5.$indexSet(0, t7, this._nodeFor$4(t7, baseImporter, baseUrl, active)); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t4); + for (t2 = J.get$iterator$ax(new A.Tuple2(t3, t2, type$.Tuple2_of_List_Uri_and_List_Uri).item2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.$indexSet(0, t3, this._nodeFor$5$forImport(t3, baseImporter, baseUrl, active, true)); + } + return new A.Tuple2(t5, t1, type$.Tuple2_of_Map_of_Uri_and_nullable_StylesheetNode_and_Map_of_Uri_and_nullable_StylesheetNode); + }, + reload$1(canonicalUrl) { + var stylesheet, upstream, _this = this, + node = _this._nodes.$index(0, canonicalUrl); + if (node == null) + throw A.wrapException(A.StateError$(canonicalUrl.toString$0(0) + " is not in the dependency graph.")); + _this._transitiveModificationTimes.clear$0(0); + _this.importCache.clearImport$1(canonicalUrl); + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_reload_closure(_this, node, canonicalUrl)); + if (stylesheet == null) + return false; + node._stylesheet = stylesheet; + upstream = _this._upstreamNodes$3(stylesheet, node.importer, canonicalUrl); + node._replaceUpstream$2(upstream.item1, upstream.item2); + return true; + }, + _recanonicalizeImports$2(importer, canonicalUrl) { + var t1, t2, t3, t4, t5, newUpstream, newUpstreamImports, _this = this, + changed = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); + for (t1 = _this._nodes, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1), t2 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, t3 = type$.Uri, t4 = type$.nullable_StylesheetNode; t1.moveNext$0();) { + t5 = t1.get$current(t1); + newUpstream = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, false); + newUpstreamImports = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, true); + if (newUpstream.__js_helper$_length !== 0 || newUpstreamImports.__js_helper$_length !== 0) { + changed.add$1(0, t5); + t5._replaceUpstream$2(A.mergeMaps(new A.UnmodifiableMapView(t5._upstream, t2), newUpstream, t3, t4), A.mergeMaps(new A.UnmodifiableMapView(t5._upstreamImports, t2), newUpstreamImports, t3, t4)); + } + } + if (changed._collection$_length !== 0) + _this._transitiveModificationTimes.clear$0(0); + return changed; + }, + _recanonicalizeImportsForNode$4$forImport(node, importer, canonicalUrl, forImport) { + var t1 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, + map = forImport ? new A.UnmodifiableMapView(node._upstreamImports, t1) : new A.UnmodifiableMapView(node._upstream, t1), + newMap = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.nullable_StylesheetNode); + map._map.forEach$1(0, new A.StylesheetGraph__recanonicalizeImportsForNode_closure(this, importer, canonicalUrl, node, forImport, newMap)); + return newMap; + }, + _nodeFor$5$forImport(url, baseImporter, baseUrl, active, forImport) { + var importer, canonicalUrl, resolvedUrl, t1, stylesheet, node, _this = this, + tuple = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure(_this, url, baseImporter, baseUrl, forImport)); + if (tuple == null) + return null; + importer = tuple.item1; + canonicalUrl = tuple.item2; + resolvedUrl = tuple.item3; + t1 = _this._nodes; + if (t1.containsKey$1(canonicalUrl)) + return t1.$index(0, canonicalUrl); + if (active.contains$1(0, canonicalUrl)) + return null; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure0(_this, importer, canonicalUrl, resolvedUrl)); + if (stylesheet == null) + return null; + active.add$1(0, canonicalUrl); + node = A.StylesheetNode$_(stylesheet, importer, canonicalUrl, _this._upstreamNodes$3(stylesheet, importer, canonicalUrl)); + active.remove$1(0, canonicalUrl); + t1.$indexSet(0, canonicalUrl, node); + return node; + }, + _nodeFor$4(url, baseImporter, baseUrl, active) { + return this._nodeFor$5$forImport(url, baseImporter, baseUrl, active, false); + }, + _ignoreErrors$1$1(callback) { + var t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + return null; + } + }, + _ignoreErrors$1(callback) { + return this._ignoreErrors$1$1(callback, type$.dynamic); + } + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime.prototype = { + call$1(node) { + return this.$this._transitiveModificationTimes.putIfAbsent$2(node.canonicalUrl, new A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure(node, this)); + }, + $signature: 360 + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure.prototype = { + call$0() { + var t2, t3, upstreamTime, + t1 = this.node, + latest = t1.importer.modificationTime$1(t1.canonicalUrl); + for (t2 = t1._upstream, t2 = t2.get$values(t2), t1 = t1._upstreamImports, t1 = t2.followedBy$1(0, t1.get$values(t1)), t1 = new A.FollowedByIterator(J.get$iterator$ax(t1.__internal$_first), t1._second), t2 = this.transitiveModificationTime; t1.moveNext$0();) { + t3 = t1._currentIterator; + t3 = t3.get$current(t3); + upstreamTime = t3 == null ? new A.DateTime(Date.now(), false) : t2.call$1(t3); + if (upstreamTime._core$_value > latest._core$_value) + latest = upstreamTime; + } + return latest; + }, + $signature: 149 + }; + A.StylesheetGraph__add_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$3$baseImporter$baseUrl(0, _this.url, _this.baseImporter, _this.baseUrl); + }, + $signature: 100 + }; + A.StylesheetGraph_addCanonical_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.importCanonical$3$originalUrl(_this.importer, _this.canonicalUrl, _this.originalUrl); + }, + $signature: 90 + }; + A.StylesheetGraph_reload_closure.prototype = { + call$0() { + return this.$this.importCache.importCanonical$2(this.node.importer, this.canonicalUrl); + }, + $signature: 90 + }; + A.StylesheetGraph__recanonicalizeImportsForNode_closure.prototype = { + call$2(url, upstream) { + var result, t1, t2, t3, exception, newCanonicalUrl, _this = this; + if (!_this.importer.couldCanonicalize$2(url, _this.canonicalUrl)) + return; + t1 = _this.$this; + t2 = t1.importCache; + t2.clearCanonicalize$1(url); + result = null; + try { + t3 = _this.node; + result = t2.canonicalize$4$baseImporter$baseUrl$forImport(0, url, t3.importer, t3.canonicalUrl, _this.forImport); + } catch (exception) { + } + t2 = result; + newCanonicalUrl = t2 == null ? null : t2.item2; + if (J.$eq$(newCanonicalUrl, upstream == null ? null : upstream.canonicalUrl)) + return; + t1 = result == null ? null : t1._nodes.$index(0, result.item2); + _this.newMap.$indexSet(0, url, t1); + }, + $signature: 362 + }; + A.StylesheetGraph__nodeFor_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$4$baseImporter$baseUrl$forImport(0, _this.url, _this.baseImporter, _this.baseUrl, _this.forImport); + }, + $signature: 100 + }; + A.StylesheetGraph__nodeFor_closure0.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.importCanonical$3$originalUrl(_this.importer, _this.canonicalUrl, _this.resolvedUrl); + }, + $signature: 90 + }; + A.StylesheetNode.prototype = { + StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1, t2; + for (t1 = this._upstream, t1 = t1.get$values(t1), t2 = this._upstreamImports, t2 = t1.followedBy$1(0, t2.get$values(t2)), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + t1 = t1.get$current(t1); + if (t1 != null) + t1._downstream.add$1(0, this); + } + }, + _replaceUpstream$2(newUpstream, newUpstreamImports) { + var t3, oldUpstream, newUpstreamSet, _this = this, + t1 = _this._upstream, + t2 = type$.nullable_StylesheetNode; + t1 = A.LinkedHashSet_LinkedHashSet$of(t1.get$values(t1), t2); + t3 = _this._upstreamImports; + t1.addAll$1(0, t3.get$values(t3)); + t3 = type$.StylesheetNode; + oldUpstream = A.SetExtension_removeNull(t1, t3); + t2 = A.LinkedHashSet_LinkedHashSet$of(newUpstream.get$values(newUpstream), t2); + t2.addAll$1(0, newUpstreamImports.get$values(newUpstreamImports)); + newUpstreamSet = A.SetExtension_removeNull(t2, t3); + for (t1 = oldUpstream.difference$1(newUpstreamSet), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.remove$1(0, _this); + for (t1 = newUpstreamSet.difference$1(oldUpstream), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.add$1(0, _this); + _this._upstream = newUpstream; + _this._upstreamImports = newUpstreamImports; + }, + _stylesheet_graph$_remove$0() { + var t1, t2, t3, t4, _i, url, _this = this; + for (t1 = _this._upstream, t1 = A.LinkedHashSet_LinkedHashSet$of(t1.get$values(t1), type$.nullable_StylesheetNode), t2 = _this._upstreamImports, t1.addAll$1(0, t2.get$values(t2)), t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 == null) + continue; + t3._downstream.remove$1(0, _this); + } + for (t1 = _this._downstream, t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + for (t3 = t2._upstream, t3 = J.toList$0$ax(t3.get$keys(t3)), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + url = t3[_i]; + if (J.$eq$(t2._upstream.$index(0, url), _this)) { + t2._upstream.$indexSet(0, url, null); + break; + } + } + for (t3 = t2._upstreamImports, t3 = J.toList$0$ax(t3.get$keys(t3)), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + url = t3[_i]; + if (J.$eq$(t2._upstreamImports.$index(0, url), _this)) { + t2._upstreamImports.$indexSet(0, url, null); + break; + } + } + } + }, + toString$0(_) { + var t1 = this._stylesheet.span; + t1 = A.NullableExtension_andThen(t1.get$sourceUrl(t1), A.path__prettyUri$closure()); + return t1 == null ? "" : t1; + } + }; + A.Syntax.prototype = { + toString$0(_) { + return this._syntax$_name; + } + }; + A.LimitedMapView.prototype = { + get$keys(_) { + return this._limited_map_view$_keys; + }, + get$length(_) { + return this._limited_map_view$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.remove$1(0, key) : null; + } + }; + A.MergedMapView.prototype = { + get$keys(_) { + var t1 = this._mapsByKey; + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$length(_) { + return this._mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$1(maps, $K, $V) { + var t1, t2, t3, _i, map, t4, t5, t6; + for (t1 = maps.length, t2 = this._mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (t3._is(map)) + for (t4 = map._mapsByKey, t4 = t4.get$values(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f), t5 = A._instanceType(t4)._rest[1]; t4.moveNext$0();) { + t6 = t4.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + A.setAll(t2, t6.get$keys(t6), t6); + } + else + A.setAll(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var child = this._mapsByKey.$index(0, key); + if (child == null) + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + child.$indexSet(0, key, value); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._mapsByKey.containsKey$1(key); + } + }; + A.MultiDirWatcher.prototype = { + watch$1(_, directory) { + var t1, t2, t3, t4, isParentOfExistingDir, _i, entry, t5, existingWatcher, t6, future, completer; + for (t1 = this._watchers._map, t2 = t1.get$entries(t1).toList$0(0), t3 = t2.length, t4 = this._group, isParentOfExistingDir = false, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + entry = t2[_i]; + t5 = entry.key; + t5.toString; + existingWatcher = entry.value; + if (!isParentOfExistingDir) { + t6 = $.$get$context(); + t6 = t6._isWithinOrEquals$2(t5, directory) === B._PathRelation_equal || t6._isWithinOrEquals$2(t5, directory) === B._PathRelation_within; + } else + t6 = false; + if (t6) { + t1 = new A._Future($.Zone__current, type$._Future_void); + t1._asyncComplete$1(null); + return t1; + } + if ($.$get$context()._isWithinOrEquals$2(directory, t5) === B._PathRelation_within) { + t1.remove$1(0, t5); + t4.remove$1(0, existingWatcher); + isParentOfExistingDir = true; + } + } + future = A.watchDir(directory, this._poll); + t2 = new A._CompleterStream(type$._CompleterStream_WatchEvent); + completer = new A.StreamCompleter(t2, type$.StreamCompleter_WatchEvent); + future.then$1$2$onError(0, completer.get$setSourceStream(), completer.get$setError(), type$.void); + t1.$indexSet(0, directory, t2); + t4.add$1(0, t2); + return future; + } + }; + A.MultiSpan.prototype = { + get$start(_) { + var t1 = this._multi_span$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan(this._multi_span$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + var t1 = color === true || false; + return A.Highlighter$multiple(this._multi_span$_primary, this.primaryLabel, this.secondarySpans, t1, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2); + }, + message$1($receiver, message) { + return this.message$2$color($receiver, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.NoSourceMapBuffer.prototype = { + get$length(_) { + return this._no_source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + this._no_source_map_buffer$_buffer._contents += A.S(object); + return null; + }, + writeCharCode$1(charCode) { + this._no_source_map_buffer$_buffer._contents += A.Primitives_stringFromCharCode(charCode); + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A.PrefixedMapView.prototype = { + get$keys(_) { + return new A._PrefixedKeys(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) ? this._prefixed_map_view$_map.$index(0, J.substring$1$s(key, this._prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) && this._prefixed_map_view$_map.containsKey$1(J.substring$1$s(key, this._prefix.length)); + } + }; + A._PrefixedKeys.prototype = { + get$length(_) { + var t1 = this._view._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._view._prefixed_map_view$_map; + t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure.prototype = { + call$1(key) { + return this.$this._view._prefix + key; + }, + $signature: 5 + }; + A.PublicMemberMapView.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view$_inner; + return J.where$1$ax(t1.get$keys(t1), A.utils__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic(key) && this._public_member_map_view$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic(key)) + return this._public_member_map_view$_inner.$index(0, key); + return null; + } + }; + A.SourceMapBuffer.prototype = { + get$_targetLocation() { + var t1 = this._source_map_buffer$_buffer._contents, + t2 = this._line; + return A.SourceLocation$(t1.length, this._column, t2, null); + }, + get$length(_) { + return this._source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._inSpan; + _this._inSpan = true; + _this._addEntry$2(span.get$start(span), _this.get$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _addEntry$2(source, target) { + var entry, t2, + t1 = this._entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1(string, i) === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + writeCharCode$1(charCode) { + this._source_map_buffer$_buffer._contents += A.Primitives_stringFromCharCode(charCode); + if (charCode === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + _source_map_buffer$_writeLine$0() { + var _this = this, + t1 = _this._entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._line && B.JSArray_methods.get$last(t1).target.column === _this._column) + t1.pop(); + ++_this._line; + _this._column = 0; + if (_this._inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1(prefix, i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure.prototype = { + call$1(entry) { + var t1 = entry.source, + t2 = entry.target, + t3 = t2.line, + t4 = this._box_0, + t5 = t4.prefixLines; + t4 = t3 === 0 ? t4.prefixColumn : 0; + return new A.Entry(t1, A.SourceLocation$(t2.offset + this.prefixLength, t2.column + t4, t3 + t5, null), entry.identifierName); + }, + $signature: 175 + }; + A.UnprefixedMapView.prototype = { + get$keys(_) { + return new A._UnprefixedKeys(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.$index(0, this._unprefixed_map_view$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view$_map.containsKey$1(this._unprefixed_map_view$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.remove$1(0, this._unprefixed_map_view$_prefix + key) : null; + } + }; + A._UnprefixedKeys.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view$_view._unprefixed_map_view$_map; + t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix); + }, + $signature: 8 + }; + A._UnprefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix.length); + }, + $signature: 5 + }; + A.indent_closure.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 5 + }; + A.flattenVertically_closure.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure0.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(queue) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure.prototype = { + call$2(key, inner) { + var t1 = this.destination, + innerDestination = t1.$index(0, key); + if (innerDestination != null) + innerDestination.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.Value.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_undecided; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isVar() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var index = sassIndex.assertNumber$1($name).assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a string.", $name)); + }, + _selectorString$1($name) { + var string = this._selectorStringOrNull$0(); + if (string != null) + return string; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + string$.x20is_noa, $name)); + }, + _selectorStringOrNull$0() { + var t1, t2, result, t3, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString) + return _this._string$_text; + if (!(_this instanceof A.SassList)) + return _null; + t1 = _this._list$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + t3 = _this._separator; + switch (t3) { + case B.ListSeparator_rXA: + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString) + result.push(complex._string$_text); + else if (complex instanceof A.SassList && complex._separator === B.ListSeparator_EVt) { + string = complex._selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + } else + return _null; + } + break; + case B.ListSeparator_zg9: + return _null; + default: + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (compound instanceof A.SassString) + result.push(compound._string$_text); + else + return _null; + } + break; + } + return B.JSArray_methods.join$1(result, t3 === B.ListSeparator_rXA ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + if (other instanceof A.SassString) + return new A.SassString(A.serializeValue(this, false, true) + other._string$_text, other._hasQuotes); + else if (other instanceof A.SassCalculation) + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + else + return new A.SassString(A.serializeValue(this, false, true) + A.serializeValue(other, false, true), false); + }, + minus$1(other) { + if (other instanceof A.SassCalculation) + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + else + return new A.SassString(A.serializeValue(this, false, true) + "-" + A.serializeValue(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString(A.serializeValue(this, false, true) + "/" + A.serializeValue(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString("+" + A.serializeValue(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString("-" + A.serializeValue(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false; + }, + withoutSlash$0() { + return this; + }, + toString$0(_) { + return A.serializeValue(this, true, true); + } + }; + A.SassArgumentList.prototype = {}; + A.SassBoolean.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false : B.SassBoolean_true; + } + }; + A.SassCalculation.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + var t2, + t1 = visitor._serialize$_buffer; + t1.write$1(0, this.name); + t1.writeCharCode$1(40); + t2 = visitor._style === B.OutputStyle_1 ? "," : ", "; + visitor._writeBetween$3(this.$arguments, t2, visitor.get$_writeCalculationValue()); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure.prototype = { + call$1(arg) { + return arg instanceof A.SassString || arg instanceof A.CalculationInterpolation; + }, + $signature: 112 + }; + A.CalculationOperation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation && this.operator === other.operator && J.$eq$(this.left, other.left) && J.$eq$(this.right, other.right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this.operator) ^ J.get$hashCode$(this.left) ^ J.get$hashCode$(this.right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue(new A.SassCalculation("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator.prototype = { + toString$0(_) { + return this.name; + } + }; + A.CalculationInterpolation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationInterpolation && this.value === other.value; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.value); + }, + toString$0(_) { + return this.value; + } + }; + A.SassColor.prototype = { + get$red(_) { + var t1; + if (this._red == null) + this._hslToRgb$0(); + t1 = this._red; + t1.toString; + return t1; + }, + get$green(_) { + var t1; + if (this._green == null) + this._hslToRgb$0(); + t1 = this._green; + t1.toString; + return t1; + }, + get$blue(_) { + var t1; + if (this._blue == null) + this._hslToRgb$0(); + t1 = this._blue; + t1.toString; + return t1; + }, + get$hue(_) { + var t1; + if (this._hue == null) + this._rgbToHsl$0(); + t1 = this._hue; + t1.toString; + return t1; + }, + get$saturation(_) { + var t1; + if (this._saturation == null) + this._rgbToHsl$0(); + t1 = this._saturation; + t1.toString; + return t1; + }, + get$lightness(_) { + var t1; + if (this._lightness == null) + this._rgbToHsl$0(); + t1 = this._lightness; + t1.toString; + return t1; + }, + get$whiteness(_) { + var _this = this; + return Math.min(Math.min(_this.get$red(_this), _this.get$green(_this)), _this.get$blue(_this)) / 255 * 100; + }, + get$blackness(_) { + var _this = this; + return 100 - Math.max(Math.max(_this.get$red(_this), _this.get$green(_this)), _this.get$blue(_this)) / 255 * 100; + }, + accept$1$1(visitor) { + var $name, hexLength, t1, format, t2, opaque, _this = this; + if (visitor._style === B.OutputStyle_1) + if (!A.fuzzyEquals(_this._alpha, 1)) + visitor._writeRgb$1(_this); + else { + $name = $.$get$namesByColor().$index(0, _this); + hexLength = visitor._canUseShortHex$1(_this) ? 4 : 7; + if ($name != null && $name.length <= hexLength) + visitor._serialize$_buffer.write$1(0, $name); + else { + t1 = visitor._serialize$_buffer; + if (visitor._canUseShortHex$1(_this)) { + t1.writeCharCode$1(35); + t1.writeCharCode$1(A.hexCharFor(_this.get$red(_this) & 15)); + t1.writeCharCode$1(A.hexCharFor(_this.get$green(_this) & 15)); + t1.writeCharCode$1(A.hexCharFor(_this.get$blue(_this) & 15)); + } else { + t1.writeCharCode$1(35); + visitor._writeHexComponent$1(_this.get$red(_this)); + visitor._writeHexComponent$1(_this.get$green(_this)); + visitor._writeHexComponent$1(_this.get$blue(_this)); + } + } + } + else { + format = _this.format; + if (format != null) + if (format === B._ColorFormatEnum_rgbFunction) + visitor._writeRgb$1(_this); + else { + t1 = visitor._serialize$_buffer; + if (format === B._ColorFormatEnum_hslFunction) { + t2 = _this._alpha; + opaque = A.fuzzyEquals(t2, 1); + t1.write$1(0, opaque ? "hsl(" : "hsla("); + visitor._writeNumber$1(_this.get$hue(_this)); + t1.write$1(0, "deg"); + t1.write$1(0, ", "); + visitor._writeNumber$1(_this.get$saturation(_this)); + t1.writeCharCode$1(37); + t1.write$1(0, ", "); + visitor._writeNumber$1(_this.get$lightness(_this)); + t1.writeCharCode$1(37); + if (!opaque) { + t1.write$1(0, ", "); + visitor._writeNumber$1(t2); + } + t1.writeCharCode$1(41); + } else + t1.write$1(0, type$.SpanColorFormat._as(format)._color$_span.get$text()); + } + else { + t1 = $.$get$namesByColor(); + if (t1.containsKey$1(_this) && !A.fuzzyEquals(_this._alpha, 0)) + visitor._serialize$_buffer.write$1(0, t1.$index(0, _this)); + else if (A.fuzzyEquals(_this._alpha, 1)) { + visitor._serialize$_buffer.writeCharCode$1(35); + visitor._writeHexComponent$1(_this.get$red(_this)); + visitor._writeHexComponent$1(_this.get$green(_this)); + visitor._writeHexComponent$1(_this.get$blue(_this)); + } else + visitor._writeRgb$1(_this); + } + } + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + changeRgb$4$alpha$blue$green$red(alpha, blue, green, red) { + return A.SassColor$rgb(red, green, blue, alpha == null ? this._alpha : alpha); + }, + changeRgb$3$blue$green$red(blue, green, red) { + return this.changeRgb$4$alpha$blue$green$red(null, blue, green, red); + }, + changeHsl$4$alpha$hue$lightness$saturation(alpha, hue, lightness, saturation) { + var _this = this, _null = null, + t1 = hue == null ? _this.get$hue(_this) : hue, + t2 = saturation == null ? _this.get$saturation(_this) : saturation, + t3 = lightness == null ? _this.get$lightness(_this) : lightness, + t4 = alpha == null ? _this._alpha : alpha; + t1 = B.JSNumber_methods.$mod(t1, 360); + t2 = A.fuzzyAssertRange(t2, 0, 100, "saturation"); + t3 = A.fuzzyAssertRange(t3, 0, 100, "lightness"); + t4 = A.fuzzyAssertRange(t4, 0, 1, "alpha"); + return new A.SassColor(_null, _null, _null, t1, t2, t3, t4, _null); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, hue, null, null); + }, + changeAlpha$1(alpha) { + var _this = this; + return new A.SassColor(_this._red, _this._green, _this._blue, _this._hue, _this._saturation, _this._lightness, A.fuzzyAssertRange(alpha, 0, 1, "alpha"), null); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$dividedBy(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.SassColor && other.get$red(other) === _this.get$red(_this) && other.get$green(other) === _this.get$green(_this) && other.get$blue(other) === _this.get$blue(_this) && other._alpha === _this._alpha; + }, + get$hashCode(_) { + var _this = this; + return B.JSInt_methods.get$hashCode(_this.get$red(_this)) ^ B.JSInt_methods.get$hashCode(_this.get$green(_this)) ^ B.JSInt_methods.get$hashCode(_this.get$blue(_this)) ^ B.JSNumber_methods.get$hashCode(_this._alpha); + }, + _rgbToHsl$0() { + var t2, lightness, _this = this, + scaledRed = _this.get$red(_this) / 255, + scaledGreen = _this.get$green(_this) / 255, + scaledBlue = _this.get$blue(_this) / 255, + max = Math.max(Math.max(scaledRed, scaledGreen), scaledBlue), + min = Math.min(Math.min(scaledRed, scaledGreen), scaledBlue), + delta = max - min, + t1 = max === min; + if (t1) + _this._hue = 0; + else if (max === scaledRed) + _this._hue = B.JSNumber_methods.$mod(60 * (scaledGreen - scaledBlue) / delta, 360); + else if (max === scaledGreen) + _this._hue = B.JSNumber_methods.$mod(120 + 60 * (scaledBlue - scaledRed) / delta, 360); + else if (max === scaledBlue) + _this._hue = B.JSNumber_methods.$mod(240 + 60 * (scaledRed - scaledGreen) / delta, 360); + t2 = max + min; + lightness = 50 * t2; + _this._lightness = lightness; + if (t1) + _this._saturation = 0; + else { + t1 = 100 * delta; + if (lightness < 50) + _this._saturation = t1 / t2; + else + _this._saturation = t1 / (2 - max - min); + } + }, + _hslToRgb$0() { + var _this = this, + scaledHue = _this.get$hue(_this) / 360, + scaledSaturation = _this.get$saturation(_this) / 100, + scaledLightness = _this.get$lightness(_this) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + _this._red = A.fuzzyRound(A.SassColor__hueToRgb(m1, m2, scaledHue + 0.3333333333333333) * 255); + _this._green = A.fuzzyRound(A.SassColor__hueToRgb(m1, m2, scaledHue) * 255); + _this._blue = A.fuzzyRound(A.SassColor__hueToRgb(m1, m2, scaledHue - 0.3333333333333333) * 255); + } + }; + A.SassColor_SassColor$hwb_toRgb.prototype = { + call$1(hue) { + return A.fuzzyRound((A.SassColor__hueToRgb(0, 1, hue) * this.factor + this._box_0.scaledWhiteness) * 255); + }, + $signature: 178 + }; + A._ColorFormatEnum.prototype = { + toString$0(_) { + return this._color$_name; + } + }; + A.SpanColorFormat.prototype = {}; + A.SassFunction.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._inspect) + A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.SassList.prototype = { + get$separator(_) { + return this._separator; + }, + get$hasBrackets() { + return this._hasBrackets; + }, + get$isBlank() { + return !this._hasBrackets && B.JSArray_methods.every$1(this._list$_contents, new A.SassList_isBlank_closure()); + }, + get$asList() { + return this._list$_contents; + }, + get$lengthAsList() { + return this._list$_contents.length; + }, + SassList$3$brackets(contents, _separator, brackets) { + if (this._separator === B.ListSeparator_undecided_null_undecided && this._list$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : this.super$Value$assertMap($name); + }, + tryMap$0() { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList && other._separator === _this._separator && other._hasBrackets === _this._hasBrackets && B.C_ListEquality.equals$2(0, other._list$_contents, _this._list$_contents))) + t1 = _this._list$_contents.length === 0 && other instanceof A.SassMap && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list$_contents); + } + }; + A.SassList_isBlank_closure.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 62 + }; + A.ListSeparator.prototype = { + toString$0(_) { + return this._list$_name; + } + }; + A.SassMap.prototype = { + get$separator(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided : B.ListSeparator_rXA; + }, + get$asList() { + var result = A._setArrayType([], type$.JSArray_Value); + this._map$_contents.forEach$1(0, new A.SassMap_asList_closure(result)); + return result; + }, + get$lengthAsList() { + var t1 = this._map$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap && B.C_MapEquality.equals$2(0, other._map$_contents, this._map$_contents))) { + t1 = this._map$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList && other._list$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty7) : B.C_MapEquality.hash$1(t1); + } + }; + A.SassMap_asList_closure.prototype = { + call$2(key, value) { + this.result.push(A.SassList$(A._setArrayType([key, value], type$.JSArray_Value), B.ListSeparator_EVt, false)); + }, + $signature: 60 + }; + A._SassNull.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._inspect) + visitor._serialize$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true; + } + }; + A.SassNumber.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var integer = A.fuzzyAsInt(this._number$_value); + if (integer != null) + return integer; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + result = A.fuzzyCheckRange(_this._number$_value, min, max); + if (result != null) + return result; + throw A.wrapException(A.SassScriptException$("Expected " + _this.toString$0(0) + " to be within " + min + _this.get$unitString() + " and " + max + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var result = A.fuzzyCheckRange(this._number$_value, min, max); + if (result != null) + return result; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var otherHasUnits, t1, compatibilityException, oldNumerators, _i, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number$_value; + otherHasUnits = newNumerators.length !== 0 || newDenominators.length !== 0; + if (coerceUnitless) + t1 = !_this.get$hasUnits() || !otherHasUnits; + else + t1 = false; + if (t1) + return _this._number$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number$_value; + t1 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newNumerators.length, _i = 0; _i < newNumerators.length; newNumerators.length === t1 || (0, A.throwConcurrentModificationError)(newNumerators), ++_i) + A.removeFirstWhere(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure(_box_0, newNumerators[_i]), new A.SassNumber__coerceOrConvertValue_closure0(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newDenominators.length, _i = 0; _i < newDenominators.length; newDenominators.length === t1 || (0, A.throwConcurrentModificationError)(newDenominators), ++_i) + A.removeFirstWhere(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure1(_box_0, newDenominators[_i]), new A.SassNumber__coerceOrConvertValue_closure2(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return this.withValue$1(this._coerceUnits$2(other, A.number0__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_plus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_minus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value * other._number$_value); + return _this.multiplyUnits$3(_this._number$_value * other._number$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value / other._number$_value); + return _this.multiplyUnits$3(_this._number$_value / other._number$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy(other); + }, + unaryPlus$0() { + return this; + }, + _coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _coerceUnits$2(other, operation) { + return this._coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var newNumerators, mutableOtherDenominators, t1, t2, _i, numerator, mutableDenominatorUnits, _this = this, _box_0 = {}; + _box_0.value = value; + if (_this.get$numeratorUnits(_this).length === 0) { + if (otherDenominators.length === 0 && !_this._areAnyConvertible$2(_this.get$denominatorUnits(_this), otherNumerators)) + return A.SassNumber_SassNumber$withUnits(value, _this.get$denominatorUnits(_this), otherNumerators); + else if (_this.get$denominatorUnits(_this).length === 0) + return A.SassNumber_SassNumber$withUnits(value, otherDenominators, otherNumerators); + } else if (otherNumerators.length === 0) + if (otherDenominators.length === 0) + return A.SassNumber_SassNumber$withUnits(value, otherDenominators, _this.get$numeratorUnits(_this)); + else if (_this.get$denominatorUnits(_this).length === 0 && !_this._areAnyConvertible$2(_this.get$numeratorUnits(_this), otherDenominators)) + return A.SassNumber_SassNumber$withUnits(value, otherDenominators, _this.get$numeratorUnits(_this)); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure(_box_0, numerator), new A.SassNumber_multiplyUnits_closure0(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure1(_box_0, numerator), new A.SassNumber_multiplyUnits_closure2(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits(t1, mutableDenominatorUnits, newNumerators); + }, + _areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure(units2)); + }, + _unitString$2(numerators, denominators) { + var t1; + if (numerators.length === 0) { + t1 = denominators.length; + if (t1 === 0) + return "no units"; + if (t1 === 1) + return J.$add$ansx(B.JSArray_methods.get$single(denominators), "^-1"); + return "(" + B.JSArray_methods.join$1(denominators, "*") + ")^-1"; + } + if (denominators.length === 0) + return B.JSArray_methods.join$1(numerators, "*"); + return B.JSArray_methods.join$1(numerators, "*") + "/" + B.JSArray_methods.join$1(denominators, "*"); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (other instanceof A.SassNumber) { + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals(_this._number$_value, other._number$_value); + if (!B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number$_value * _this._canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._canonicalMultiplier$1(other.get$denominatorUnits(other))); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_U8AHF.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure(), t1), true, t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_K2BWj.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + if (t1.length === 1 && _this.newDenominators.length === 0) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), B.JSString_methods._codeUnitAt$1(type, 0)) ? "an " + type : "a " + type; + t3 = B.Map_U8AHF.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t2 = _this.newDenominators; + unit = A.pluralize("unit", t1.length + t2.length, null); + t3 = _this.$this; + t2 = "Expected " + t3.toString$0(0) + " to have " + unit + " " + t3._unitString$2(t1, t2) + "."; + t1 = _this.name; + return new A.SassScriptException(t1 == null ? t2 : "$" + t1 + ": " + t2); + } + }, + $signature: 371 + }; + A.SassNumber__coerceOrConvertValue_closure.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber__coerceOrConvertValue_closure0.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure1.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber__coerceOrConvertValue_closure2.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 57 + }; + A.SassNumber_minus_closure.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 57 + }; + A.SassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber_multiplyUnits_closure0.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber_multiplyUnits_closure2.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure.prototype = { + call$1(unit1) { + var innerMap = B.Map_K2BWj.$index(0, unit1); + if (innerMap == null) + return B.JSArray_methods.contains$1(this.units2, unit1); + return B.JSArray_methods.any$1(this.units2, innerMap.get$containsKey()); + }, + $signature: 8 + }; + A.SassNumber__canonicalizeUnitList_closure.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_U8AHF.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 5 + }; + A.SassNumber__canonicalMultiplier_closure.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 182 + }; + A.ComplexSassNumber.prototype = { + get$numeratorUnits(_) { + return this._numeratorUnits; + }, + get$denominatorUnits(_) { + return this._denominatorUnits; + }, + get$hasUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, this._number$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber)); + } + }; + A.SingleUnitSassNumber.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber(this._unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber(this._unit, this._number$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber)); + }, + hasUnit$1(unit) { + return unit === this._unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber && A.conversionFactor(this._unit, other._unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit(); + knownCompatibilities = t1.$index(0, this._unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor(this._unit, unit) != null; + }, + coerceValueToMatch$1(other) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch(other, null, null) : t1; + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : t1; + }, + coerce$2(newNumerators, newDenominators) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerce(newNumerators, newDenominators, null) : t1; + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceValueToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerceValue(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit(unit, $name) : t1; + }, + _coerceToUnit$1(unit) { + var t1 = this._unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen(A.conversionFactor(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure(this, unit)); + }, + _coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen(A.conversionFactor(unit, this._unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure0(t1, this)); + return A.SassNumber_SassNumber$withUnits(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber(this._unit, -this._number$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber) { + factor = A.conversionFactor(other._unit, this._unit); + return factor != null && A.fuzzyEquals(this._number$_value * factor, other._number$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this.canonicalMultiplierForUnit$1(_this._unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber(this.unit, this.$this._number$_value * factor, null); + }, + $signature: 381 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure.prototype = { + call$1(factor) { + return this.$this._number$_value * factor; + }, + $signature: 29 + }; + A.SingleUnitSassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(denominator, this.$this._unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 8 + }; + A.SingleUnitSassNumber_multiplyUnits_closure0.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.UnitlessSassNumber.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber(this._number$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceValueToMatch$1(other) { + return this._number$_value; + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : this._number$_value; + }, + coerce$2(newNumerators, newDenominators) { + return A.SassNumber_SassNumber$withUnits(this._number$_value, newDenominators, newNumerators); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number$_value; + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThan(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThanOrEquals(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThan(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThanOrEquals(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(A.moduloLikeSass(this._number$_value, other._number$_value)); + return this.super$SassNumber$modulo(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value + other._number$_value); + return this.super$SassNumber$plus(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value - other._number$_value); + return this.super$SassNumber$minus(other); + }, + times$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value * other._number$_value); + return this.super$SassNumber$times(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value / other._number$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber(-this._number$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber && A.fuzzyEquals(this._number$_value, other._number$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode(this._number$_value) : t1; + } + }; + A.SassString.prototype = { + get$_sassLength() { + var t1, result, _this = this, + value = _this.__SassString__sassLength_FI; + if (value === $) { + t1 = new A.Runes(_this._string$_text); + result = t1.get$length(t1); + _this.__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, t2; + if (this._hasQuotes) + return false; + t1 = this._string$_text; + if (t1.length < 6) + return false; + t2 = B.JSString_methods._codeUnitAt$1(t1, 0) | 32; + if (t2 === 99) { + t2 = B.JSString_methods._codeUnitAt$1(t1, 1) | 32; + if (t2 === 108) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 97) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 3) | 32) !== 109) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 4) | 32) !== 112) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 5) === 40; + } else if (t2 === 97) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 108) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 3) | 32) !== 99) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 4) === 40; + } else + return false; + } else if (t2 === 118) { + if ((B.JSString_methods._codeUnitAt$1(t1, 1) | 32) !== 97) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 114) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 101) { + if ((B.JSString_methods._codeUnitAt$1(t1, 1) | 32) !== 110) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 118) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 109) { + t2 = B.JSString_methods._codeUnitAt$1(t1, 1) | 32; + if (t2 === 97) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 120) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 105) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 110) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else + return false; + } else + return false; + }, + get$isVar() { + if (this._hasQuotes) + return false; + var t1 = this._string$_text; + if (t1.length < 8) + return false; + return (B.JSString_methods._codeUnitAt$1(t1, 0) | 32) === 118 && (B.JSString_methods._codeUnitAt$1(t1, 1) | 32) === 97 && (B.JSString_methods._codeUnitAt$1(t1, 2) | 32) === 114 && B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + }, + get$isBlank() { + return !this._hasQuotes && this._string$_text.length === 0; + }, + accept$1$1(visitor) { + var t1 = visitor._quote && this._hasQuotes, + t2 = this._string$_text; + if (t1) + visitor._visitQuotedString$1(t2); + else + visitor._visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string$_text, + t2 = this._hasQuotes; + if (other instanceof A.SassString) + return new A.SassString(t1 + other._string$_text, t2); + else + return new A.SassString(t1 + A.serializeValue(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString && this._string$_text === other._string$_text; + }, + get$hashCode(_) { + var t1 = this._hashCache; + return t1 == null ? this._hashCache = B.JSString_methods.get$hashCode(this._string$_text) : t1; + } + }; + A.AnySelectorVisitor.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure(this)); + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(attribute) { + return false; + }, + visitClassSelector$1(klass) { + return false; + }, + visitIDSelector$1(id) { + return false; + }, + visitParentSelector$1($parent) { + return false; + }, + visitPlaceholderSelector$1(placeholder) { + return false; + }, + visitTypeSelector$1(type) { + return false; + }, + visitUniversalSelector$1(universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 45 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 14 + }; + A._EvaluateVisitor0.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + t1 = type$.JSArray_AsyncBuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure9(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure10(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure11(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure12(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure13(_this), _s9_), A.BuiltInCallable$function("module-variables", "$module", new A._EvaluateVisitor_closure14(_this), _s9_), A.BuiltInCallable$function("module-functions", "$module", new A._EvaluateVisitor_closure15(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure16(_this), _s9_), new A.AsyncBuiltInCallable("call", A.ScssParser$("@function call($function, $args...) {", null, _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure17(_this))], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure18(_this), _s9_)], t1); + t1 = type$.AsyncBuiltInCallable; + t2 = A.List_List$of($.$get$global(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$local()); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_AsyncBuiltInCallable), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = A._setArrayType([], type$.JSArray_AsyncCallable); + B.JSArray_methods.addAll$1(t1, $.$get$globalFunctions()); + B.JSArray_methods.addAll$1(t1, metaFunctions); + for (t2 = t1.length, t3 = _this._async_evaluate$_builtInFunctions, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + $function = t1[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor(0, importer, node); + }, + run$body$_EvaluateVisitor(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.EvaluateResult), + $async$returnValue, $async$self = this, t1; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.nullable_Object; + $async$returnValue = A.runZoned(new A._EvaluateVisitor_run_closure0($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext0($async$self, node)], t1, t1), type$.FutureOr_EvaluateResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate$_assertInModule$2(value, $name) { + return this._async_evaluate$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, builtInModule; + var $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + builtInModule = $async$self._async_evaluate$_builtInModules.$index(0, url); + $async$goto = builtInModule != null ? 3 : 4; + break; + case 3: + // then + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure1(callback, builtInModule), type$.void), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure2($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate$_execute$2(importer, stylesheet) { + return this._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable), + $async$returnValue, $async$self = this, alreadyLoaded, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, extensionStore, module, t1, url; + var $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = stylesheet.span; + url = t1.get$sourceUrl(t1); + t1 = $async$self._async_evaluate$_modules; + alreadyLoaded = t1.$index(0, url); + if (alreadyLoaded != null) { + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate$_configuration : configuration; + t2 = $async$self._async_evaluate$_moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { + message = namesInErrors ? $.$get$context().prettyUri$1(url) + string$.x20was_a : string$.This_mw; + t2 = $async$self._async_evaluate$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : J.get$span$z(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(t1) ? $async$self._async_evaluate$_exception$1(message) : $async$self._async_evaluate$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = alreadyLoaded; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$(); + css = A._Cell$(); + extensionStore = A.ExtensionStore$(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure0($async$self, importer, stylesheet, extensionStore, configuration, css), type$.Null), $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + module = environment.toModule$2(css._readLocal$0(), extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + $async$self._async_evaluate$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate$_configuration); + if (nodeWithSpan != null) + $async$self._async_evaluate$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + outOfOrderImports = _this._async_evaluate$_outOfOrderImports; + if (outOfOrderImports == null) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListMixin.E")), true, type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, outOfOrderImports); + t2 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), null, t2.$ti._eval$1("ListMixin.E"))); + return t1; + }, + _async_evaluate$_combineCss$2$clone(root, clone) { + var selectors, unsatisfiedExtension, sortedModules, t1, imports, css, t2, t3, statements, index, _this = this; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure2())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + unsatisfiedExtension = A.firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure3(selectors))); + if (unsatisfiedExtension != null) + _this._async_evaluate$_throwForUnsatisfiedExtension$1(unsatisfiedExtension); + return root.get$css(root); + } + sortedModules = _this._async_evaluate$_topologicalModules$1(root); + if (clone) { + t1 = sortedModules.$ti._eval$1("MappedListIterable>"); + sortedModules = A.List_List$of(new A.MappedListIterable(sortedModules, new A._EvaluateVisitor__combineCss_closure4(), t1), true, t1._eval$1("ListIterable.E")); + } + _this._async_evaluate$_extendModules$1(sortedModules); + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + for (t1 = J.get$reversed$ax(sortedModules), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t3 = t3.get$css(t3); + statements = t3.get$children(t3); + index = _this._async_evaluate$_indexAfterImports$1(statements); + t3 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(imports, t3.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(css, t3.getRange$2(statements, index, t3.get$length(statements))); + } + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _async_evaluate$_combineCss$1(root) { + return this._async_evaluate$_combineCss$2$clone(root, false); + }, + _async_evaluate$_extendModules$1(sortedModules) { + var t1, t2, originalSelectors, $self, t3, t4, _i, upstream, url, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = J.get$iterator$ax(sortedModules); t1.moveNext$0();) { + t2 = t1.get$current(t1); + originalSelectors = t2.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t2.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure1(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t2.get$url(t2)); + t3 = t2.get$extensionStore().get$addExtensions(); + if ($self != null) + t3.call$1($self); + t3 = t2.get$extensionStore(); + if (t3.get$isEmpty(t3)) + continue; + for (t3 = t2.get$upstream(), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + upstream = t3[_i]; + url = upstream.get$url(upstream); + if (url == null) + continue; + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(url, new A._EvaluateVisitor__extendModules_closure2()), t2.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t2.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(unsatisfiedExtensions)); + }, + _async_evaluate$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span)); + }, + _async_evaluate$_topologicalModules$1(root) { + var t1 = type$.Module_AsyncCallable, + sorted = A.QueueList$(null, t1); + new A._EvaluateVisitor__topologicalModules_visitModule0(A.LinkedHashSet_LinkedHashSet$_empty(t1), sorted).call$1(root); + return sorted; + }, + _async_evaluate$_indexAfterImports$1(statements) { + var t1, t2, t3, lastImport, i, statement; + for (t1 = J.getInterceptor$asx(statements), t2 = type$.CssComment, t3 = type$.CssImport, lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + statement = t1.$index(statements, i); + if (t3._is(statement)) + lastImport = i; + else if (!t2._is(statement)) + break; + } + return lastImport + 1; + }, + visitStylesheet$1(node) { + return this.visitStylesheet$body$_EvaluateVisitor(node); + }, + visitStylesheet$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _i; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(node) { + return this.visitAtRootRule$body$_EvaluateVisitor(node); + }, + visitAtRootRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, grandparent, root, innerCopy, t2, outerCopy, t3, copy, unparsedQuery, query, $parent, included, $async$temp1, $async$temp2; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + unparsedQuery = node.query; + $async$goto = unparsedQuery != null ? 3 : 5; + break; + case 3: + // then + $async$temp1 = unparsedQuery; + $async$temp2 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(unparsedQuery, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + $async$result = $async$self._async_evaluate$_adjustParseError$2($async$temp1, new $async$temp2._EvaluateVisitor_visitAtRootRule_closure2($async$self, $async$result)); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$result = B.AtRootQuery_UsS; + case 4: + // join + query = $async$result; + $parent = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = grandparent) { + if (!query.excludes$1($parent)) + included.push($parent); + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure3($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length !== 0) { + innerCopy = B.JSArray_methods.get$first(included).copyWithoutChildren$0(); + for (t1 = A.SubListIterable$(included, 1, null, type$.ModifiableCssParentNode), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, outerCopy = innerCopy; t1.moveNext$0(); outerCopy = copy) { + t3 = t1.__internal$_current; + copy = (t3 == null ? t2._as(t3) : t3).copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure4($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, grandparent, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + $parent = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = grandparent) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = grandparent) { + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_)) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure5(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure6(_this, scope); + if (_this._async_evaluate$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure7(_this, scope); + if (_this._async_evaluate$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure8(_this, scope); + return _this._async_evaluate$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure9()) ? new A._EvaluateVisitor__scopeForAtRoot_closure10(_this, scope) : scope; + }, + visitContentBlock$1(node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(node) { + return this.visitContentRule$body$_EvaluateVisitor(node); + }, + visitContentRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate$_environment._async_environment$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure0($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(node) { + return this.visitDebugRule$body$_EvaluateVisitor(node); + }, + visitDebugRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + $async$self._async_evaluate$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(node) { + return this.visitDeclaration$body$_EvaluateVisitor(node); + }, + visitDeclaration$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, $name, t2, cssValue, t3, t4, children, oldDeclarationName; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate$_inUnknownAtRule && !$async$self._async_evaluate$_inKeyframes) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarm, node.span)); + t1 = node.name; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + t2 = $async$self._async_evaluate$_declarationName; + if (t2 != null) + $name = new A.CssValue(t2 + "-" + A.S($name.get$value($name)), $name.get$span($name), type$.CssValue_String); + t2 = node.value; + $async$goto = 4; + return A._asyncAwait(A.NullableExtension_andThen(t2, new A._EvaluateVisitor_visitDeclaration_closure1($async$self)), $async$visitDeclaration$1); + case 4: + // returning from await. + cssValue = $async$result; + t3 = cssValue != null; + if (t3) + t4 = !cssValue.get$value(cssValue).get$isBlank() || cssValue.get$value(cssValue).get$asList().length === 0; + else + t4 = false; + if (t4) { + t3 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + if ($async$self._async_evaluate$_sourceMap) { + t2 = A.NullableExtension_andThen(t2, $async$self.get$_async_evaluate$_expressionNode()); + t2 = t2 == null ? null : J.get$span$z(t2); + } else + t2 = null; + t3.addChild$1(A.ModifiableCssDeclaration$($name, cssValue, node.span, t1, t2)); + } else if (J.startsWith$1$s($name.get$value($name), "--") && t3) + throw A.wrapException($async$self._async_evaluate$_exception$2("Custom property values may not be empty.", cssValue.get$span(cssValue))); + children = node.children; + $async$goto = children != null ? 5 : 6; + break; + case 5: + // then + oldDeclarationName = $async$self._async_evaluate$_declarationName; + $async$self._async_evaluate$_declarationName = $name.get$value($name); + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure2($async$self, children), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 7: + // returning from await. + $async$self._async_evaluate$_declarationName = oldDeclarationName; + case 6: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(node) { + return this.visitEachRule$body$_EvaluateVisitor(node); + }, + visitEachRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, list, nodeWithSpan, setVariables; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t1); + setVariables = node.variables.length === 1 ? new A._EvaluateVisitor_visitEachRule_closure2($async$self, node, nodeWithSpan) : new A._EvaluateVisitor_visitEachRule_closure3($async$self, node, nodeWithSpan); + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure4($async$self, list, setVariables, node), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], this._async_evaluate$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(node) { + return this.visitErrorRule$body$_EvaluateVisitor(node); + }, + visitErrorRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(node) { + return this.visitExtendRule$body$_EvaluateVisitor(node); + }, + visitExtendRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, t7, _i, complex, visitor, t8, t9, targetText, compound, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = styleRule.selector, t4 = t3.span, t5 = node.span, t6 = type$.SourceSpan, t7 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + complex.accept$1(visitor); + t8 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t9 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + $async$self._async_evaluate$_warn$3$deprecation('The selector "' + t8 + '" is invalid CSS and ' + t9 + string$.x20be_an, new A.MultiSpan(t4, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t5, "@extend rule"], t6, t7), t6, t7)), true); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + targetText = $async$result; + for (t1 = $async$self._async_evaluate$_adjustParseError$2(targetText, new A._EvaluateVisitor_visitExtendRule_closure0($async$self, targetText)).components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t4 = complex.components; + t4 = t4.length === 1 && B.JSArray_methods.get$first(t4).combinators.length === 0; + } else + t4 = false; + compound = t4 ? B.JSArray_methods.get$first(complex.components).selector : null; + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", targetText.get$span(targetText))); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, targetText.get$span(targetText))); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addExtension$4(t3, t5, node, $async$self._async_evaluate$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(node) { + return this.visitAtRule$body$_EvaluateVisitor(node); + }, + visitAtRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $name, value, children, wasInKeyframes, wasInUnknownAtRule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + $async$goto = 4; + return A._asyncAwait(A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure2($async$self)), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + if (A.unvendor($name.get$value($name)) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure3($async$self, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure4(), type$.ModifiableCssAtRule, type$.Null), $async$visitAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(node) { + return this.visitForRule$body$_EvaluateVisitor(node); + }, + visitForRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber; + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure4($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure5($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure6(fromNumber)); + to = t1.to = $async$self._async_evaluate$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure7(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure8(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(node) { + return this.visitForwardRule$body$_EvaluateVisitor(node); + }, + visitForwardRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure1($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure2($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration), + $async$returnValue, $async$self = this, t2, t3, _i, variable, t4, t5, variableNodeWithSpan, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + t2 = node.configuration, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + t5 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t4); + if (t5 != null && !t5.value.$eq(0, B.C__SassNull)) { + newValues.$indexSet(0, t4, t5); + // goto for update + $async$goto = 4; + break; + } + } + t4 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t4); + $async$temp1 = newValues; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t4.accept$1($async$self), $async$_async_evaluate$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, entry; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._values; + if (t1.get$isEmpty(t1)) + return; + t1 = t1.get$entries(t1); + entry = t1.get$first(t1); + t1 = nameInError ? "$" + A.S(entry.key) + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate$_exception$2(t1, entry.value.configurationSpan)); + }, + _async_evaluate$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(node) { + return this.visitFunctionRule$body$_EvaluateVisitor(node); + }, + visitFunctionRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(node) { + return this.visitIfRule$body$_EvaluateVisitor(node); + }, + visitIfRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, _box_0; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + _box_0.clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = _box_0.clause; + if (t1 == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule_closure0(_box_0, $async$self), true, t1.hasDeclarations, type$.nullable_Value), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(node) { + return this.visitImportRule$body$_EvaluateVisitor(node); + }, + visitImportRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate$_visitDynamicImport$1($import) { + return this._async_evaluate$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure0(this, $import), type$.void); + }, + _async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport); + }, + _async_evaluate$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$._LoadedStylesheet), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, importCache, tuple, isDependency, stylesheet, result, error, stackTrace, error0, stackTrace0, message, t1, t2, t3, t4, exception, message0, $async$exception; + var $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate$_importSpan = span; + importCache = $async$self._async_evaluate$_importCache; + $async$goto = importCache != null ? 7 : 9; + break; + case 7: + // then + if (baseUrl == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + $async$goto = 10; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate$_importer, baseUrl, forImport), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 10: + // returning from await. + tuple = $async$result; + $async$goto = tuple != null ? 11 : 12; + break; + case 11: + // then + isDependency = $async$self._async_evaluate$_inDependency || tuple.item1 !== $async$self._async_evaluate$_importer; + t1 = tuple.item1; + t2 = tuple.item2; + t3 = tuple.item3; + t4 = $async$self._async_evaluate$_quietDeps && isDependency; + $async$goto = 13; + return A._asyncAwait(importCache.importCanonical$4$originalUrl$quiet(t1, t2, t3, t4), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 13: + // returning from await. + stylesheet = $async$result; + if (stylesheet != null) { + $async$self._async_evaluate$_loadedUrls.add$1(0, tuple.item2); + t1 = tuple.item1; + $async$returnValue = new A._LoadedStylesheet0(stylesheet, t1, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 12: + // join + // goto join + $async$goto = 8; + break; + case 9: + // else + t1 = baseUrl; + if (t1 == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").span; + t1 = t1.get$sourceUrl(t1); + } + $async$goto = 14; + return A._asyncAwait($async$self._async_evaluate$_importLikeNode$3(url, t1, forImport), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 14: + // returning from await. + result = $async$result; + if (result != null) { + t1 = result.stylesheet.span; + t2 = $async$self._async_evaluate$_loadedUrls; + A.NullableExtension_andThen(t1.get$sourceUrl(t1), t2.get$add(t2)); + $async$returnValue = result; + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 8: + // join + if (B.JSString_methods.startsWith$1(url, "package:") && true) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace($async$self._async_evaluate$_exception$2(error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t2, t1)), stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + message = null; + try { + message = A._asString(J.get$message$x(error0)); + } catch (exception) { + message0 = J.toString$0$(error0); + message = message0; + } + A.throwWithTrace($async$self._async_evaluate$_exception$1(message), stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _async_evaluate$_importLikeNode$3(originalUrl, previous, forImport) { + return this._importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport); + }, + _importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable__LoadedStylesheet), + $async$returnValue, $async$self = this, result, isDependency, url, t1, t2; + var $async$_async_evaluate$_importLikeNode$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate$_nodeImporter.loadRelative$3(originalUrl, previous, forImport); + isDependency = $async$self._async_evaluate$_inDependency; + url = result.item2; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath(url) : B.Syntax_SCSS_scss; + t2 = $async$self._async_evaluate$_quietDeps && isDependency ? $.$get$Logger_quiet() : $async$self._async_evaluate$_logger; + $async$returnValue = new A._LoadedStylesheet0(A.Stylesheet_Stylesheet$parse(result.item1, t1, t2, url), null, isDependency); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_importLikeNode$3, $async$completer); + }, + _visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor($import); + }, + _visitStaticImport$body$_EvaluateVisitor($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, node, $async$temp1, $async$temp2; + var $async$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1($import.url), $async$_visitStaticImport$1); + case 2: + // returning from await. + $async$temp2 = $async$result; + $async$goto = 3; + return A._asyncAwait(A.NullableExtension_andThen($import.modifiers, $async$self.get$_async_evaluate$_interpolationToValue()), $async$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(node); + else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(node); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_visitStaticImport$1, $async$completer); + }, + visitIncludeRule$1(node) { + return this.visitIncludeRule$body$_EvaluateVisitor(node); + }, + visitIncludeRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, nodeWithSpan, t1, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure3($async$self, node)); + if (mixin == null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined mixin.", node.span)); + nodeWithSpan = new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure4(node)); + $async$goto = type$.AsyncBuiltInCallable._is(mixin) ? 3 : 5; + break; + case 3: + // then + if (node.content != null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Mixin doesn't accept a content block.", node.span)); + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_runBuiltInCallable$3(node.$arguments, mixin, nodeWithSpan), $async$visitIncludeRule$1); + case 6: + // returning from await. + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment._is(mixin) ? 7 : 9; + break; + case 7: + // then + t1 = node.content; + if (t1 != null && !type$.MixinRule._as(mixin.declaration).get$hasContent()) + throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", node.get$spanWithoutContent(), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(node.get$spanWithoutContent()))); + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4(node.$arguments, mixin, nodeWithSpan, new A._EvaluateVisitor_visitIncludeRule_closure5($async$self, A.NullableExtension_andThen(t1, new A._EvaluateVisitor_visitIncludeRule_closure6($async$self)), mixin, nodeWithSpan), type$.Null), $async$visitIncludeRule$1); + case 10: + // returning from await. + // goto join + $async$goto = 8; + break; + case 9: + // else + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 8: + // join + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(node) { + return this.visitMixinRule$body$_EvaluateVisitor(node); + }, + visitMixinRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(node) { + return this.visitLoudComment$body$_EvaluateVisitor(node); + }, + visitLoudComment$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$temp1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + $async$temp1.addChild$1(new $async$temp2.ModifiableCssComment($async$result, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(node) { + return this.visitMediaRule$body$_EvaluateVisitor(node); + }, + visitMediaRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure2($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty0; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure3($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitMediaRule$1); + case 4: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _async_evaluate$_visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2; + var $async$_async_evaluate$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = interpolation; + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(interpolation, true), $async$_async_evaluate$_visitMediaQueries$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_adjustParseError$2($async$temp1, new $async$temp2._EvaluateVisitor__visitMediaQueries_closure0($async$self, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2), t3 = type$.MediaQuerySuccessfulMergeResult; t1.moveNext$0();) { + t4 = t1.get$current(t1); + for (t5 = t2.get$iterator(queries2); t5.moveNext$0();) { + result = t4.merge$1(t5.get$current(t5)); + if (result === B._SingletonCssMediaQueryMergeResult_empty) + continue; + if (result === B._SingletonCssMediaQueryMergeResult_unrepresentable) + return null; + queries.push(t3._as(result).query); + } + } + return queries; + }, + visitReturnRule$1(node) { + return this.visitReturnRule$body$_EvaluateVisitor(node); + }, + visitReturnRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(node) { + return this.visitSilentComment$body$_EvaluateVisitor(node); + }, + visitSilentComment$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(node) { + return this.visitStyleRule$body$_EvaluateVisitor(node); + }, + visitStyleRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, selectorText, rule, oldAtRootExcludingStyleRule, t2, t3, t4, t5, t6, _i, complex, visitor, t7, t8, t9, _box_0; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_, node.span)); + t1 = node.selector; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$3$trim$warnForColor(t1, true, true), $async$visitStyleRule$1); + case 3: + // returning from await. + selectorText = $async$result; + $async$goto = $async$self._async_evaluate$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable($async$self._async_evaluate$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure7($async$self, selectorText)), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure8($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure9(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + _box_0.parsedSelector = $async$self._async_evaluate$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure10($async$self, selectorText)); + _box_0.parsedSelector = $async$self._async_evaluate$_addExceptionSpan$2(t1, new A._EvaluateVisitor_visitStyleRule_closure11(_box_0, $async$self)); + t1 = t1.span; + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$3(_box_0.parsedSelector, t1, $async$self._async_evaluate$_mediaQueries), node.span, _box_0.parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + $async$self._async_evaluate$_atRootExcludingStyleRule = false; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure12($async$self, rule, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure13(), type$.ModifiableCssStyleRule, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t2 = _box_0.parsedSelector.components, t3 = t2.length, t4 = type$.SourceSpan, t5 = type$.String, t6 = rule.children, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + complex.accept$1(visitor); + $async$self._async_evaluate$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, t1, true); + } else if (complex.leadingCombinators.length !== 0) { + visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + complex.accept$1(visitor); + $async$self._async_evaluate$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, t1, true); + } else { + visitor = A._SerializeVisitor$(null, true, null, true, false, null, true); + complex.accept$1(visitor); + t7 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t8 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + if (t6.get$length(t6) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t6.$index(0, 0)); + $async$self._async_evaluate$_warn$3$deprecation('The selector "' + t7 + string$.x22x20is_o + t8 + string$.x0aThis_, new A.MultiSpan(t1, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t6.every$1(t6, new A._EvaluateVisitor_visitStyleRule_closure14()) ? "\n(try converting to a //-style comment)" : "")], t4, t5), t4, t5)), true); + } + } + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + visitSupportsRule$1(node) { + return this.visitSupportsRule$body$_EvaluateVisitor(node); + }, + visitSupportsRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 4: + // returning from await. + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$(new $async$temp2.CssValue($async$result, t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure1($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitSupportsRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, oldInSupportsDeclaration, t2, t3, $async$temp1, $async$temp2; + var $async$_async_evaluate$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = condition instanceof A.SupportsOperation ? 3 : 5; + break; + case 3: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.left, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.right, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 7: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = condition instanceof A.SupportsNegation ? 8 : 10; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$1(condition.condition), $async$_async_evaluate$_visitSupportsCondition$1); + case 11: + // returning from await. + $async$returnValue = "not " + $async$temp1.S($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 9; + break; + case 10: + // else + $async$goto = condition instanceof A.SupportsInterpolation ? 12 : 14; + break; + case 12: + // then + $async$goto = 15; + return A._asyncAwait($async$self._evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate$_visitSupportsCondition$1); + case 15: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 13; + break; + case 14: + // else + $async$goto = condition instanceof A.SupportsDeclaration ? 16 : 18; + break; + case 16: + // then + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = true; + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._evaluateToCss$1(condition.name), $async$_async_evaluate$_visitSupportsCondition$1); + case 19: + // returning from await. + t1 = $async$temp1.S($async$result); + t2 = condition.get$isCustomProperty() ? "" : " "; + $async$temp1 = A; + $async$goto = 20; + return A._asyncAwait($async$self._evaluateToCss$1(condition.value), $async$_async_evaluate$_visitSupportsCondition$1); + case 20: + // returning from await. + t3 = $async$temp1.S($async$result); + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = "(" + t1 + ":" + t2 + t3 + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 17; + break; + case 18: + // else + $async$goto = condition instanceof A.SupportsFunction ? 21 : 23; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 24; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.name), $async$_async_evaluate$_visitSupportsCondition$1); + case 24: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 25; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.$arguments), $async$_async_evaluate$_visitSupportsCondition$1); + case 25: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 22; + break; + case 23: + // else + $async$goto = condition instanceof A.SupportsAnything ? 26 : 28; + break; + case 26: + // then + $async$temp1 = A; + $async$goto = 29; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.contents), $async$_async_evaluate$_visitSupportsCondition$1); + case 29: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 27; + break; + case 28: + // else + throw A.wrapException(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeType(condition).toString$0(0) + ".", null)); + case 27: + // join + case 22: + // join + case 17: + // join + case 13: + // join + case 9: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor(condition, operator); + }, + _async_evaluate$_parenthesize$1(condition) { + return this._async_evaluate$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 5; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor(node); + }, + visitVariableDeclaration$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, value, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate$_environment._async_environment$_variables.length === 1) { + t1 = $async$self._async_evaluate$_configuration._values; + t1 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, node.name); + if (t1 != null && !t1.value.$eq(0, B.C__SassNull)) { + $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure2($async$self, node, t1)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure3($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate$_environment._async_environment$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate$_warn$3$deprecation(t1, node.span, true); + } + t1 = node.expression; + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure4($async$self, $async$temp3, $async$self._async_evaluate$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(node) { + return this.visitUseRule$body$_EvaluateVisitor(node); + }, + visitUseRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, values, _i, variable, t3, variableNodeWithSpan, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t3); + $async$temp1 = values; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t3.accept$1($async$self), $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure0($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(node) { + return this.visitWarnRule$body$_EvaluateVisitor(node); + }, + visitWarnRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure0($async$self, node), type$.Value), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : $async$self._async_evaluate$_serialize$2(value, node.expression); + $async$self._async_evaluate$_logger.warn$2$trace(0, t1, $async$self._async_evaluate$_stackTrace$1(node.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(node) { + return this._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure0(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(node) { + return this._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure0(this, node), type$.Value); + }, + visitValueExpression$1(node) { + return this.visitValueExpression$body$_EvaluateVisitor(node); + }, + visitValueExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(node) { + return this.visitVariableExpression$body$_EvaluateVisitor(node); + }, + visitVariableExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure0($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor(node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure0($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(node) { + return this.visitBooleanExpression$body$_EvaluateVisitor(node); + }, + visitBooleanExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true : B.SassBoolean_false; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(node) { + return this.visitIfExpression$body$_EvaluateVisitor(node); + }, + visitIfExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, condition, t2, ifTrue, ifFalse, result, pair, positional, named, t1; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); + case 3: + // returning from await. + pair = $async$result; + positional = pair.item1; + named = pair.item2; + t1 = J.getInterceptor$asx(positional); + $async$self._async_evaluate$_verifyArguments$4(t1.get$length(positional), named, $.$get$IfExpression_declaration(), node); + if (t1.get$length(positional) > 0) + condition = t1.$index(positional, 0); + else { + t2 = named.$index(0, "condition"); + t2.toString; + condition = t2; + } + if (t1.get$length(positional) > 1) + ifTrue = t1.$index(positional, 1); + else { + t2 = named.$index(0, "if-true"); + t2.toString; + ifTrue = t2; + } + if (t1.get$length(positional) > 2) + ifFalse = t1.$index(positional, 2); + else { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + $async$goto = 5; + return A._asyncAwait(result.accept$1($async$self), $async$visitIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, $async$self._async_evaluate$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitNullExpression$1(node) { + return this.visitNullExpression$body$_EvaluateVisitor(node); + }, + visitNullExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(node) { + return this.visitNumberExpression$body$_EvaluateVisitor(node); + }, + visitNumberExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(node) { + return node.expression.accept$1(this); + }, + visitCalculationExpression$1(node) { + return this.visitCalculationExpression$body$_EvaluateVisitor(node); + }, + visitCalculationExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, $arguments, error, stackTrace, t2, t3, t4, t5, t6, _i, argument, exception, t1, $async$temp1; + var $async$visitCalculationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + $async$outer: + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.$arguments, t3 = t2.length, t4 = node.name, t5 = t4 !== "min", t6 = t4 === "max", _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + argument = t2[_i]; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationValue$2$inMinMax(argument, !t5 || t6), $async$visitCalculationExpression$1); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t1; + if ($async$self._async_evaluate$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation(t4, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + try { + switch (t4) { + case "calc": + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "min": + t1 = A.SassCalculation_min($arguments); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "max": + t1 = A.SassCalculation_max($arguments); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "clamp": + t1 = J.$index$asx($arguments, 0); + t3 = J.get$length$asx($arguments) > 1 ? J.$index$asx($arguments, 1) : null; + t1 = A.SassCalculation_clamp(t1, t3, J.get$length$asx($arguments) > 2 ? J.$index$asx($arguments, 2) : null); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + default: + t1 = A.UnsupportedError$('Unknown calculation name "' + t4 + '".'); + throw A.wrapException(t1); + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + $async$self._async_evaluate$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace($async$self._async_evaluate$_exception$2(error.message, node.span), stackTrace); + } else + throw exception; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCalculationExpression$1, $async$completer); + }, + _async_evaluate$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + arg = args[i]; + if (!(arg instanceof A.SassNumber)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(this._async_evaluate$_exception$2("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])))); + } + } + }, + _async_evaluate$_visitCalculationValue$2$inMinMax(node, inMinMax) { + return this._visitCalculationValue$body$_EvaluateVisitor(node, inMinMax); + }, + _visitCalculationValue$body$_EvaluateVisitor(node, inMinMax) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, inner, result, t1, $async$temp1; + var $async$_async_evaluate$_visitCalculationValue$2$inMinMax = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = node instanceof A.ParenthesizedExpression ? 3 : 5; + break; + case 3: + // then + inner = node.expression; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationValue$2$inMinMax(inner, inMinMax), $async$_async_evaluate$_visitCalculationValue$2$inMinMax); + case 6: + // returning from await. + result = $async$result; + if (inner instanceof A.FunctionExpression) + t1 = A.stringReplaceAllUnchecked(inner.originalName, "_", "-").toLowerCase() === "var" && result instanceof A.SassString && !result._hasQuotes; + else + t1 = false; + $async$returnValue = t1 ? new A.SassString("(" + result._string$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = node instanceof A.StringExpression ? 7 : 9; + break; + case 7: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.text), $async$_async_evaluate$_visitCalculationValue$2$inMinMax); + case 10: + // returning from await. + $async$returnValue = new $async$temp1.CalculationInterpolation($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = node instanceof A.BinaryOperationExpression ? 11 : 13; + break; + case 11: + // then + $async$goto = 14; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationValue_closure0($async$self, node, inMinMax), type$.Object), $async$_async_evaluate$_visitCalculationValue$2$inMinMax); + case 14: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate$_visitCalculationValue$2$inMinMax); + case 15: + // returning from await. + result = $async$result; + if (result instanceof A.SassNumber || result instanceof A.SassCalculation) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (result instanceof A.SassString && !result._hasQuotes) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate$_exception$2("Value " + result.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitCalculationValue$2$inMinMax, $async$completer); + }, + _async_evaluate$_binaryOperatorToCalculationOperator$1(operator) { + switch (operator) { + case B.BinaryOperator_qbf: + return B.CalculationOperator_IyK; + case B.BinaryOperator_KlB: + return B.CalculationOperator_2bx; + case B.BinaryOperator_6pl: + return B.CalculationOperator_jFr; + case B.BinaryOperator_qpm: + return B.CalculationOperator_OvN; + default: + throw A.wrapException(A.UnsupportedError$("Invalid calculation operator " + operator.toString$0(0) + ".")); + } + }, + visitColorExpression$1(node) { + return this.visitColorExpression$body$_EvaluateVisitor(node); + }, + visitColorExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(node) { + return this.visitListExpression$body$_EvaluateVisitor(node); + }, + visitListExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync(node.contents, new A._EvaluateVisitor_visitListExpression_closure0($async$self), type$.Expression, type$.Value), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(node) { + return this.visitMapExpression$body$_EvaluateVisitor(node); + }, + visitMapExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap), + $async$returnValue, $async$self = this, t2, t3, _i, pair, t4, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + pair = t2[_i]; + t4 = pair.item1; + $async$goto = 6; + return A._asyncAwait(t4.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(pair.item2.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.$index(0, keyValue) != null) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = J.getInterceptor$z(t4); + t2 = t1.get$span(t4); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t3.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t2, "second key", t3, $async$self._async_evaluate$_stackTrace$1(t1.get$span(t4)))); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(node) { + return this.visitFunctionExpression$body$_EvaluateVisitor(node); + }, + visitFunctionExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure1($async$self, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined function.", node.span)); + t1.$function = new A.PlainCssCallable(node.originalName); + } + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure2(t1, $async$self, node), type$.Value), $async$visitFunctionExpression$1); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + visitInterpolatedFunctionExpression$1(node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor(node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0($async$self, node, new A.PlainCssCallable(t1)), type$.Value), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate$_getFunction$2$namespace($name, namespace) { + var local = this._async_evaluate$_environment.getFunction$2$namespace($name, namespace); + if (local != null || namespace != null) + return local; + return this._async_evaluate$_builtInFunctions.$index(0, $name); + }, + _async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; + var $async$_async_evaluate$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = $async$self._async_evaluate$_currentCallable; + $async$self._async_evaluate$_currentCallable = callable; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure0($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_currentCallable = oldCallable; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2, t3, first, _i, argument, restArg, rest, $async$temp1; + var $async$_async_evaluate$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure0($async$self, callable), type$.Value), $async$_async_evaluate$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + t1 = callable.name + "("; + t2 = $arguments.positional, t3 = t2.length, first = true, _i = 0; + case 14: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 16; + break; + } + argument = t2[_i]; + if (first) + first = false; + else + t1 += ", "; + $async$temp1 = A; + $async$goto = 17; + return A._asyncAwait($async$self._evaluateToCss$1(argument), $async$_async_evaluate$_runFunctionCallable$3); + case 17: + // returning from await. + t1 += $async$temp1.S($async$result); + case 15: + // for update + ++_i; + // goto for condition + $async$goto = 14; + break; + case 16: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 18 : 19; + break; + case 18: + // then + $async$goto = 20; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate$_runFunctionCallable$3); + case 20: + // returning from await. + rest = $async$result; + if (!first) + t1 += ", "; + t1 += $async$self._async_evaluate$_serialize$2(rest, restArg); + case 19: + // join + t1 += A.Primitives_stringFromCharCode(41); + $async$returnValue = new A.SassString(t1.charCodeAt(0) == 0 ? t1 : t1, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$u(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, callback, result, error, stackTrace, error0, stackTrace0, error1, stackTrace1, message, namedSet, tuple, overload, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, t4, t5, t6, message0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate$_callableNode; + $async$self._async_evaluate$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated.named, type$.MapKeySet_String); + tuple = callable.callbackFor$2(evaluated.positional.length, namedSet); + overload = tuple.item1; + callback = tuple.item2; + $async$self._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure1(overload, evaluated, namedSet)); + declaredArguments = overload.$arguments; + i = evaluated.positional.length, t1 = declaredArguments.length; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + argument = declaredArguments[i]; + t2 = evaluated.positional; + t3 = evaluated.named.remove$1(0, argument.name); + $async$goto = t3 == null ? 7 : 8; + break; + case 7: + // then + t3 = argument.defaultValue; + $async$goto = 9; + return A._asyncAwait(t3.accept$1($async$self), $async$_async_evaluate$_runBuiltInCallable$3); + case 9: + // returning from await. + t3 = $async$self._async_evaluate$_withoutSlash$2($async$result, t3); + case 8: + // join + t2.push(t3); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (overload.restArgument != null) { + if (evaluated.positional.length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated.positional, t1); + B.JSArray_methods.removeRange$2(evaluated.positional, t1, evaluated.positional.length); + } else + rest = B.List_empty7; + t1 = evaluated.named; + argumentList = A.SassArgumentList$(rest, t1, evaluated.separator === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_rXA : evaluated.separator); + evaluated.positional.push(argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait(callback.call$1(evaluated.positional), $async$_async_evaluate$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) + throw $async$exception; + else if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace(new A.MultiSpanSassRuntimeException($async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.MultiSpanSassException) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + t1 = error0._span_exception$_message; + t2 = error0; + t3 = J.getInterceptor$z(t2); + t2 = A.SourceSpanException.prototype.get$span.call(t3, t2); + t3 = error0.primaryLabel; + t4 = error0.secondarySpans; + t5 = error0; + t6 = J.getInterceptor$z(t5); + A.throwWithTrace(new A.MultiSpanSassRuntimeException($async$self._async_evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t6, t5)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace0); + } else { + error1 = t1; + stackTrace1 = A.getTraceFromException($async$exception); + message = null; + try { + message = A._asString(J.get$message$x(error1)); + } catch (exception) { + message0 = J.toString$0$(error1); + message = message0; + } + A.throwWithTrace($async$self._async_evaluate$_exception$2(message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace1); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (evaluated.named.__js_helper$_length === 0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated.named; + t1 = t1.get$keys(t1); + t1 = A.pluralize("argument", t1.get$length(t1), null); + t2 = evaluated.named; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + t1 + " named " + A.S(A.toSentence(t2.get$keys(t2).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure2(), type$.Object), "or")) + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$._ArgumentResults), + $async$returnValue, $async$self = this, t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, t5, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(expression); + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(expression.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t3 = $arguments.named, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); + case 7: + // for condition + if (!t3.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t4 = t3.get$current(t3); + t5 = t4.value; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(t5); + t4 = t4.key; + $async$temp1 = named; + $async$temp2 = t4; + $async$goto = 9; + return A._asyncAwait(t5.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, t4, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._ArgumentResults0(positional, positionalNodes, named, namedNodes, B.ListSeparator_undecided_null_undecided); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure3()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure4($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure5($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._ArgumentResults0(positional, positionalNodes, named, namedNodes, separator); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure6()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._ArgumentResults0(positional, positionalNodes, named, namedNodes, separator); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateArguments$1, $async$completer); + }, + _async_evaluate$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Tuple2_of_List_Expression_and_Map_String_Expression), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A.Tuple2(t1.positional, t1.named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + $async$self._async_evaluate$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure3(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure4($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure5($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure6($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure0(this, values, convert, this._async_evaluate$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure0($arguments, positional, named)); + }, + visitSelectorExpression$1(node) { + return this.visitSelectorExpression$body$_EvaluateVisitor(node); + }, + visitSelectorExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(node) { + return this.visitStringExpression$body$_EvaluateVisitor(node); + }, + visitStringExpression$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, t1, oldInSupportsDeclaration, $async$temp1; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + $async$temp1 = J; + $async$goto = 3; + return A._asyncAwait(A.mapAsync(node.text.contents, new A._EvaluateVisitor_visitStringExpression_closure0($async$self), type$.Object, type$.String), $async$visitStringExpression$1); + case 3: + // returning from await. + t1 = $async$temp1.join$0$ax($async$result); + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor(expression); + }, + visitSupportsExpression$body$_EvaluateVisitor(expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor(node); + }, + visitCssAtRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.get$value(t1)) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure2(), type$.ModifiableCssAtRule, type$.Null), $async$visitCssAtRule$1); + case 3: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor(node); + }, + visitCssComment$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor(node); + }, + visitCssDeclaration$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.name; + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(t1, node.value, node.span, J.startsWith$1$s(t1.get$value(t1), "--"), node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor(node); + }, + visitCssImport$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(modifiableNode); + else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure2(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor(node); + }, + visitCssMediaRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure2($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty0; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure3($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitCssMediaRule$1); + case 3: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor(node); + }, + visitCssStyleRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, t2, t3, t4, t5, originalSelector, rule, oldAtRootExcludingStyleRule; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_, node.span)); + t1 = $async$self._async_evaluate$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t2 = node.selector; + t3 = t2.value; + t4 = styleRule == null; + t5 = t4 ? null : styleRule.originalSelector; + originalSelector = t3.resolveParentSelectors$2$implicitParent(t5, !t1); + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$3(originalSelector, t2.span, $async$self._async_evaluate$_mediaQueries), node.span, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + $async$self._async_evaluate$_atRootExcludingStyleRule = false; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure1($async$self, rule, node), false, new A._EvaluateVisitor_visitCssStyleRule_closure2(), type$.ModifiableCssStyleRule, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (t4) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor(node); + }, + visitCssStylesheet$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitCssSupportsRule$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor(list, callback); + }, + _async_evaluate$_handleReturn$2(list, callback) { + return this._async_evaluate$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, t1, _i, result; + var $async$_async_evaluate$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate$_handleReturn$1$2); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_handleReturn$1$2, $async$completer); + }, + _async_evaluate$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate$_environment; + $async$self._async_evaluate$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor); + }, + _async_evaluate$_interpolationToValue$1(interpolation) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii(result, true) : result; + $async$returnValue = new A.CssValue(t1, interpolation.span, type$.CssValue_String); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor); + }, + _async_evaluate$_performInterpolation$1(interpolation) { + return this._async_evaluate$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, result, oldInSupportsDeclaration, $async$temp1; + var $async$_async_evaluate$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + $async$temp1 = J; + $async$goto = 3; + return A._asyncAwait(A.mapAsync(interpolation.contents, new A._EvaluateVisitor__performInterpolation_closure0($async$self, warnForColor, interpolation), type$.Object, type$.String), $async$_async_evaluate$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + result = $async$temp1.join$0$ax($async$result); + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolation$2$warnForColor, $async$completer); + }, + _evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor(expression, quote); + }, + _evaluateToCss$1(expression) { + return this._evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(expression.accept$1($async$self), $async$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure0(value, quote)); + }, + _async_evaluate$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._async_evaluate$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure0(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _async_evaluate$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_evaluate$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate$_addChild$2$through(node, through); + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + $async$self._async_evaluate$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$__parent = t1; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate$_addChild$2$through(node, through) { + var grandparent, t1, + $parent = this._async_evaluate$_assertInModule$2(this._async_evaluate$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = grandparent) { + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + t1 = $parent._parent; + t1.toString; + $parent = $parent.copyWithoutChildren$0(); + t1.addChild$1($parent); + } + } + $parent.addChild$1(node); + }, + _async_evaluate$_addChild$1(node) { + return this._async_evaluate$_addChild$2$through(node, null); + }, + _async_evaluate$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate$_mediaQueries; + oldSources = $async$self._async_evaluate$_mediaQuerySources; + $async$self._async_evaluate$_mediaQueries = queries; + $async$self._async_evaluate$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_stack; + t1.push(new A.Tuple2($async$self._async_evaluate$_member, nodeWithSpan, type$.Tuple2_String_AstNode)); + oldMember = $async$self._async_evaluate$_member; + $async$self._async_evaluate$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate$_withoutSlash$2(value, nodeForSpan) { + if (value instanceof A.SassNumber && value.asSlash != null) + this._async_evaluate$_warn$3$deprecation(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation0().call$1(value)) + string$.x0a_More, nodeForSpan.get$span(nodeForSpan), true); + return value.withoutSlash$0(); + }, + _async_evaluate$_stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure0(this))); + }, + _async_evaluate$_stackTrace$1(span) { + var _this = this, + t1 = _this._async_evaluate$_stack; + t1 = A.List_List$of(new A.MappedListIterable(t1, new A._EvaluateVisitor__stackTrace_closure0(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Frame>")), true, type$.Frame); + if (span != null) + t1.push(_this._async_evaluate$_stackFrame$2(_this._async_evaluate$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>")), null); + }, + _async_evaluate$_stackTrace$0() { + return this._async_evaluate$_stackTrace$1(null); + }, + _async_evaluate$_warn$3$deprecation(message, span, deprecation) { + var t1, _this = this; + if (_this._async_evaluate$_quietDeps) + if (!_this._async_evaluate$_inDependency) { + t1 = _this._async_evaluate$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._async_evaluate$_warningsEmitted.add$1(0, new A.Tuple2(message, span, type$.Tuple2_String_SourceSpan))) + return; + _this._async_evaluate$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, _this._async_evaluate$_stackTrace$1(span)); + }, + _async_evaluate$_warn$2(message, span) { + return this._async_evaluate$_warn$3$deprecation(message, span, false); + }, + _async_evaluate$_exception$2(message, span) { + var t1 = span == null ? J.get$span$z(B.JSArray_methods.get$last(this._async_evaluate$_stack).item2) : span; + return new A.SassRuntimeException(this._async_evaluate$_stackTrace$1(span), message, t1); + }, + _async_evaluate$_exception$1(message) { + return this._async_evaluate$_exception$2(message, null); + }, + _async_evaluate$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = J.get$span$z(B.JSArray_methods.get$last(this._async_evaluate$_stack).item2); + return new A.MultiSpanSassRuntimeException(this._async_evaluate$_stackTrace$0(), primaryLabel, A.ConstantMap_ConstantMap$from(secondaryLabels, type$.FileSpan, type$.String), message, t1); + }, + _async_evaluate$_adjustParseError$1$2(nodeWithSpan, callback) { + var error, stackTrace, errorText, span, syntheticFile, syntheticSpan, t1, exception, t2, t3, t4, t5, t6, _null = null; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + errorText = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, _null), 0, _null); + span = nodeWithSpan.get$span(nodeWithSpan); + syntheticFile = B.JSString_methods.replaceRange$3(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(J.get$file$x(span)._decodedChars, 0, _null), 0, _null), J.get$start$z(span).offset, J.get$end$z(span).offset, errorText); + t1 = A.SourceFile$fromString(syntheticFile, J.get$file$x(span).url); + t2 = J.get$start$z(span); + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t3 = t3.get$start(t3); + t4 = J.get$start$z(span); + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + syntheticSpan = t1.span$2(0, t2.offset + t3.offset, t4.offset + t5.get$end(t5).offset); + A.throwWithTrace(this._async_evaluate$_exception$2(error._span_exception$_message, syntheticSpan), stackTrace); + } else + throw exception; + } + }, + _async_evaluate$_adjustParseError$2(nodeWithSpan, callback) { + return this._async_evaluate$_adjustParseError$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace(new A.MultiSpanSassRuntimeException(this._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace(this._async_evaluate$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw exception; + } + }, + _async_evaluate$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4, $async$exception; + var $async$_addExceptionSpanAsync$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_addExceptionSpanAsync$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace(new A.MultiSpanSassRuntimeException($async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_addExceptionSpanAsync$1$2, $async$completer); + }, + _async_evaluate$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + A.throwWithTrace(new A.SassRuntimeException($async$self._async_evaluate$_stackTrace$0(), t1, t2), stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addErrorSpan$1$2, $async$completer); + } + }; + A._EvaluateVisitor_closure9.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure10.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure11.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate$_environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._async_evaluate$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure12.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure13.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate$_environment; + if (!t1._async_environment$_inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._async_environment$_content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure14.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$variables(), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4.key, true), t4.value); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 37 + }; + A._EvaluateVisitor_closure15.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$functions(module), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4.key, true), new A.SassFunction(t4.value)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 37 + }; + A._EvaluateVisitor_closure16.prototype = { + call$1($arguments) { + var module, callable, t2, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css && module != null) + throw A.wrapException(string$.x24css_a); + if (css) + callable = new A.PlainCssCallable($name._string$_text); + else { + t1 = this.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure4(t1, $name, module)); + } + if (callable != null) + return new A.SassFunction(callable); + throw A.wrapException("Function not found: " + $name.toString$0(0)); + }, + $signature: 184 + }; + A._EvaluateVisitor__closure4.prototype = { + call$0() { + var t1 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t2 = this.module; + t2 = t2 == null ? null : t2._string$_text; + return this.$this._async_evaluate$_getFunction$2$namespace(t1, t2); + }, + $signature: 111 + }; + A._EvaluateVisitor_closure17.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure0($arguments); + }, + $call$body$_EvaluateVisitor_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression); + t4 = type$.String; + t5 = type$.Expression; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._wereKeywordsAccessed = true; + t8 = args._keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._wereKeywordsAccessed = true, t8 = t8.get$entries(t8), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString(t11.key, false), t11.value); + } + t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); + $async$goto = $function instanceof A.SassString ? 3 : 4; + break; + case 3: + // then + t2 = $function.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, string$.Passin + t2 + "))", true); + callableNode = t1._async_evaluate$_callableNode; + $async$goto = 5; + return A._asyncAwait(t1.visitFunctionExpression$1(new A.FunctionExpression(null, $function._string$_text, invocation, callableNode.get$span(callableNode))), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function"); + t3 = t1._async_evaluate$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 211 + }; + A._EvaluateVisitor_closure18.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure($arguments); + }, + $call$body$_EvaluateVisitor_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, values, configuration, t3, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + withMap.forEach$1(0, new A._EvaluateVisitor__closure2(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure3(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 391 + }; + A._EvaluateVisitor__closure2.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); + }, + $signature: 60 + }; + A._EvaluateVisitor__closure3.prototype = { + call$1(module) { + var t1 = this.$this; + return t1._async_evaluate$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 186 + }; + A._EvaluateVisitor_run_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.EvaluateResult), + $async$returnValue, $async$self = this, t1, t2, url, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = t1.span; + url = t2.get$sourceUrl(t2); + if (url != null) { + t2 = $async$self.$this; + t2._async_evaluate$_activeModules.$indexSet(0, url, null); + t2._async_evaluate$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$temp1 = A; + $async$temp2 = t2; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate$_execute$2($async$self.importer, t1), $async$call$0); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.EvaluateResult($async$temp2._async_evaluate$_combineCss$1($async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 395 + }; + A._EvaluateVisitor__loadModule_closure1.prototype = { + call$0() { + return this.callback.call$1(this.builtInModule); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, oldInDependency, module, error, stackTrace, error0, stackTrace0, error1, stackTrace1, error2, stackTrace2, message, exception, t4, t5, t6, t7, t1, t2, result, stylesheet, t3, canonicalUrl, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t2.get$span(t2), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + result = $async$result; + stylesheet = result.stylesheet; + t3 = stylesheet.span; + canonicalUrl = t3.get$sourceUrl(t3); + if (canonicalUrl != null && t1._async_evaluate$_activeModules.containsKey$1(canonicalUrl)) { + message = $async$self.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t2 = A.NullableExtension_andThen(t1._async_evaluate$_activeModules.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure0(t1, message)); + throw A.wrapException(t2 == null ? t1._async_evaluate$_exception$1(message) : t2); + } + if (canonicalUrl != null) + t1._async_evaluate$_activeModules.$indexSet(0, canonicalUrl, t2); + oldInDependency = t1._async_evaluate$_inDependency; + t1._async_evaluate$_inDependency = result.isDependency; + module = null; + $async$handler = 3; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(result.importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t2), $async$call$0); + case 6: + // returning from await. + module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t1._async_evaluate$_activeModules.remove$1(0, canonicalUrl); + t1._async_evaluate$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$handler = 8; + $async$goto = 11; + return A._asyncAwait($async$self.callback.call$1(module), $async$call$0); + case 11: + // returning from await. + $async$handler = 1; + // goto after finally + $async$goto = 10; + break; + case 8: + // catch + $async$handler = 7; + $async$exception = $async$currentError; + t2 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t2)) + throw $async$exception; + else if (t2 instanceof A.MultiSpanSassException) { + error = t2; + stackTrace = A.getTraceFromException($async$exception); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t4 = error.primaryLabel; + t5 = error.secondarySpans; + t6 = error; + t7 = J.getInterceptor$z(t6); + A.throwWithTrace(new A.MultiSpanSassRuntimeException(t1._async_evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t7, t6)), t4, A.ConstantMap_ConstantMap$from(t5, type$.FileSpan, type$.String), t2, t3), stackTrace); + } else if (t2 instanceof A.SassException) { + error0 = t2; + stackTrace0 = A.getTraceFromException($async$exception); + t2 = error0; + t3 = J.getInterceptor$z(t2); + A.throwWithTrace(t1._async_evaluate$_exception$2(error0._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t3, t2)), stackTrace0); + } else if (t2 instanceof A.MultiSpanSassScriptException) { + error1 = t2; + stackTrace1 = A.getTraceFromException($async$exception); + A.throwWithTrace(t1._async_evaluate$_multiSpanException$3(error1.message, error1.primaryLabel, error1.secondarySpans), stackTrace1); + } else if (t2 instanceof A.SassScriptException) { + error2 = t2; + stackTrace2 = A.getTraceFromException($async$exception); + A.throwWithTrace(t1._async_evaluate$_exception$1(error2.message), stackTrace2); + } else + throw $async$exception; + // goto after finally + $async$goto = 10; + break; + case 7: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 10: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure0.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__execute_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + oldStylesheet = t1._async_evaluate$__stylesheet; + oldRoot = t1._async_evaluate$__root; + oldParent = t1._async_evaluate$__parent; + oldEndOfImports = t1._async_evaluate$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate$__extensionStore; + t2 = t1._async_evaluate$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate$_mediaQueries; + oldDeclarationName = t1._async_evaluate$_declarationName; + oldInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate$_inKeyframes; + oldConfiguration = t1._async_evaluate$_configuration; + t1._async_evaluate$_importer = $async$self.importer; + t3 = t1._async_evaluate$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate$__parent = t1._async_evaluate$__root = A.ModifiableCssStylesheet$(t4); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + t1._async_evaluate$__extensionStore = $async$self.extensionStore; + t1._async_evaluate$_declarationName = t1._async_evaluate$_mediaQueries = t1._async_evaluate$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate$_inKeyframes = t1._async_evaluate$_atRootExcludingStyleRule = t1._async_evaluate$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate$_outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._async_evaluate$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + $async$self.css._value = t3; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = oldStylesheet; + t1._async_evaluate$__root = oldRoot; + t1._async_evaluate$__parent = oldParent; + t1._async_evaluate$__endOfImports = oldEndOfImports; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate$__extensionStore = oldExtensionStore; + t1._async_evaluate$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate$_mediaQueries = oldMediaQueries; + t1._async_evaluate$_declarationName = oldDeclarationName; + t1._async_evaluate$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate$_atRootExcludingStyleRule = t2; + t1._async_evaluate$_inKeyframes = oldInKeyframes; + t1._async_evaluate$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure2.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 132 + }; + A._EvaluateVisitor__combineCss_closure3.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_closure4.prototype = { + call$1(module) { + return module.cloneCss$0(); + }, + $signature: 400 + }; + A._EvaluateVisitor__extendModules_closure1.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure2.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 188 + }; + A._EvaluateVisitor__topologicalModules_visitModule0.prototype = { + call$1(module) { + var t1, t2, t3, _i, upstream; + for (t1 = module.get$upstream(), t2 = t1.length, t3 = this.seen, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss() && t3.add$1(0, upstream)) + this.call$1(upstream); + } + this.sorted.addFirst$1(module); + }, + $signature: 186 + }; + A._EvaluateVisitor_visitAtRootRule_closure2.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.AtRootQueryParser(t1, this.$this._async_evaluate$_logger).parse$0(); + }, + $signature: 117 + }; + A._EvaluateVisitor_visitAtRootRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure4.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor__scopeForAtRoot_closure5.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + t1._async_evaluate$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$__parent = t2; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure6.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate$_atRootExcludingStyleRule; + t1._async_evaluate$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure7.prototype = { + call$1(callback) { + return this.$this._async_evaluate$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure0(this.innerScope, callback), type$.Null); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot__closure0.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure8.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate$_inKeyframes; + t1._async_evaluate$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure9.prototype = { + call$1($parent) { + return type$.CssAtRule._is($parent); + }, + $signature: 190 + }; + A._EvaluateVisitor__scopeForAtRoot_closure10.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + t1._async_evaluate$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor_visitContentRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure1.prototype = { + call$1(value) { + return this.$call$body$_EvaluateVisitor_visitDeclaration_closure(value); + }, + $call$body$_EvaluateVisitor_visitDeclaration_closure(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_Value), + $async$returnValue, $async$self = this, $async$temp1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(value.accept$1($async$self.$this), $async$call$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.CssValue($async$result, value.get$span(value), type$.CssValue_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 410 + }; + A._EvaluateVisitor_visitDeclaration_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure2.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate$_environment.setLocalVariable$3(B.JSArray_methods.get$first(this.node.variables), t1._async_evaluate$_withoutSlash$2(value, t2), t2); + }, + $signature: 52 + }; + A._EvaluateVisitor_visitEachRule_closure3.prototype = { + call$1(value) { + return this.$this._async_evaluate$_setMultipleVariables$3(this.node.variables, value, this.nodeWithSpan); + }, + $signature: 52 + }; + A._EvaluateVisitor_visitEachRule_closure4.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure0(t1, _this.setVariables, _this.node)); + }, + $signature: 71 + }; + A._EvaluateVisitor_visitEachRule__closure0.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure0(t1)); + }, + $signature: 433 + }; + A._EvaluateVisitor_visitEachRule___closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitExtendRule_closure0.prototype = { + call$0() { + var t1 = this.targetText; + return A.SelectorList_SelectorList$parse(A.trimAscii(t1.get$value(t1), true), false, true, this.$this._async_evaluate$_logger); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitAtRule_closure2.prototype = { + call$1(value) { + return this.$this._async_evaluate$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 437 + }; + A._EvaluateVisitor_visitAtRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate$_inKeyframes ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure0(t1, $async$self.children), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitForRule_closure4.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 200 + }; + A._EvaluateVisitor_visitForRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 200 + }; + A._EvaluateVisitor_visitForRule_closure6.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure7.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, result, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure0(t1)), $async$call$0); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 71 + }; + A._EvaluateVisitor_visitForRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitForwardRule_closure1.prototype = { + call$1(module) { + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 108 + }; + A._EvaluateVisitor_visitForwardRule_closure2.prototype = { + call$1(module) { + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 108 + }; + A._EvaluateVisitor_visitIfRule_closure0.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this._box_0.clause.children, new A._EvaluateVisitor_visitIfRule__closure0(t1)); + }, + $signature: 71 + }; + A._EvaluateVisitor_visitIfRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitDynamicImport_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t4, oldImporter, oldInDependency, loadsUserDefinedModules, children, t5, t6, t7, t8, t9, t10, environment, module, visitor, t1, t2, result, stylesheet, t3, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + result = $async$result; + stylesheet = result.stylesheet; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._async_evaluate$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure3(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + t4 = new A.UnmodifiableListView(t2, t3); + if (t4.get$length(t4) === 0) { + t4 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + t4 = t4.get$length(t4) === 0; + } else + t4 = false; + $async$goto = t4 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate$_importer; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate$_inDependency; + t1._async_evaluate$_importer = result.importer; + t1._async_evaluate$__stylesheet = stylesheet; + t1._async_evaluate$_inDependency = result.isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = t2; + t1._async_evaluate$_inDependency = oldInDependency; + t1._async_evaluate$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure4())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure5()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable; + t5 = type$.AstNode; + t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable); + t7 = t2._async_environment$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._async_environment$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.AsyncEnvironment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment$_content); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure6(t1, result, stylesheet, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor0(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor__visitDynamicImport__closure3.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__visitDynamicImport__closure4.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 203 + }; + A._EvaluateVisitor__visitDynamicImport__closure5.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 204 + }; + A._EvaluateVisitor__visitDynamicImport__closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t7, t8, t9, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + t3 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root"); + t4 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + t5 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldConfiguration = t1._async_evaluate$_configuration; + oldInDependency = t1._async_evaluate$_inDependency; + t6 = $async$self.result; + t1._async_evaluate$_importer = t6.importer; + t7 = t1._async_evaluate$__stylesheet = $async$self.stylesheet; + t8 = $async$self.loadsUserDefinedModules; + if (t8) { + t9 = A.ModifiableCssStylesheet$(t7.span); + t1._async_evaluate$__root = t9; + t1._async_evaluate$__parent = t1._async_evaluate$_assertInModule$2(t9, "_root"); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + } + t1._async_evaluate$_inDependency = t6.isDependency; + t6 = new A.UnmodifiableListView(t7._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t6.get$isEmpty(t6)) + t1._async_evaluate$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(t7), $async$call$0); + case 2: + // returning from await. + t6 = t8 ? t1._async_evaluate$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + $async$self.children._value = t6; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = t2; + if (t8) { + t1._async_evaluate$__root = t3; + t1._async_evaluate$__parent = t4; + t1._async_evaluate$__endOfImports = t5; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate$_configuration = oldConfiguration; + t1._async_evaluate$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitIncludeRule_closure3.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 111 + }; + A._EvaluateVisitor_visitIncludeRule_closure4.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 31 + }; + A._EvaluateVisitor_visitIncludeRule_closure6.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._async_evaluate$_environment.closure$0(), t1._async_evaluate$_inDependency, type$.UserDefinedCallable_AsyncEnvironment); + }, + $signature: 482 + }; + A._EvaluateVisitor_visitIncludeRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor_visitIncludeRule__closure0(t1, $async$self.mixin, $async$self.nodeWithSpan)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitIncludeRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor_visitIncludeRule___closure0(t1, $async$self.mixin, $async$self.nodeWithSpan)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor_visitIncludeRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpan, t5 = type$.nullable_Value, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate$_addErrorSpan$1$2(t4, new A._EvaluateVisitor_visitIncludeRule____closure0(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor_visitIncludeRule____closure0.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 71 + }; + A._EvaluateVisitor_visitMediaRule_closure2.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure4.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._EvaluateVisitor__visitMediaQueries_closure0.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.MediaQueryParser(t1, this.$this._async_evaluate$_logger).parse$0(); + }, + $signature: 116 + }; + A._EvaluateVisitor_visitStyleRule_closure7.prototype = { + call$0() { + var t1 = this.selectorText; + return A.KeyframeSelectorParser$(t1.get$value(t1), this.$this._async_evaluate$_logger).parse$0(); + }, + $signature: 48 + }; + A._EvaluateVisitor_visitStyleRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure9.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitStyleRule_closure10.prototype = { + call$0() { + var _s11_ = "_stylesheet", + t1 = this.selectorText, + t2 = this.$this; + return A.SelectorList_SelectorList$parse(t1.get$value(t1), !t2._async_evaluate$_assertInModule$2(t2._async_evaluate$__stylesheet, _s11_).plainCss, !t2._async_evaluate$_assertInModule$2(t2._async_evaluate$__stylesheet, _s11_).plainCss, t2._async_evaluate$_logger); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitStyleRule_closure11.prototype = { + call$0() { + var t1 = this._box_0.parsedSelector, + t2 = this.$this, + t3 = t2._async_evaluate$_styleRuleIgnoringAtRoot; + t3 = t3 == null ? null : t3.originalSelector; + return t1.resolveParentSelectors$2$implicitParent(t3, !t2._async_evaluate$_atRootExcludingStyleRule); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitStyleRule_closure12.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure13.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitStyleRule_closure14.prototype = { + call$1(child) { + return type$.CssComment._is(child); + }, + $signature: 136 + }; + A._EvaluateVisitor_visitSupportsRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure2.prototype = { + call$0() { + var t1 = this.override; + this.$this._async_evaluate$_environment.setVariable$4$global(this.node.name, t1.value, t1.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure3.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure0.prototype = { + call$1(module) { + var t1 = this.node; + this.$this._async_evaluate$_environment.addModule$3$namespace(module, t1, t1.namespace); + }, + $signature: 108 + }; + A._EvaluateVisitor_visitWarnRule_closure0.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 61 + }; + A._EvaluateVisitor_visitWhileRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure0(t3)), $async$call$0); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 71 + }; + A._EvaluateVisitor_visitWhileRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, right, result, t1, t2, left, t3, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + t3 = t1.operator; + case 4: + // switch + switch (t3) { + case B.BinaryOperator_axY: + // goto case + $async$goto = 6; + break; + case B.BinaryOperator_or_or_1_or: + // goto case + $async$goto = 7; + break; + case B.BinaryOperator_and_and_2_and: + // goto case + $async$goto = 8; + break; + case B.BinaryOperator_nZh: + // goto case + $async$goto = 9; + break; + case B.BinaryOperator_Vr9: + // goto case + $async$goto = 10; + break; + case B.BinaryOperator_cw1: + // goto case + $async$goto = 11; + break; + case B.BinaryOperator_Wma: + // goto case + $async$goto = 12; + break; + case B.BinaryOperator_apg: + // goto case + $async$goto = 13; + break; + case B.BinaryOperator_oqF: + // goto case + $async$goto = 14; + break; + case B.BinaryOperator_qbf: + // goto case + $async$goto = 15; + break; + case B.BinaryOperator_KlB: + // goto case + $async$goto = 16; + break; + case B.BinaryOperator_6pl: + // goto case + $async$goto = 17; + break; + case B.BinaryOperator_qpm: + // goto case + $async$goto = 18; + break; + case B.BinaryOperator_PHH: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + $async$goto = 21; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 21: + // returning from await. + right = $async$result; + $async$returnValue = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(right, false, true), false); + // goto return + $async$goto = 1; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + $async$result = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + $async$goto = 25; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 25: + // returning from await. + case 23: + // join + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + $async$goto = 29; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 29: + // returning from await. + // goto join + $async$goto = 27; + break; + case 28: + // else + $async$result = left; + case 27: + // join + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + $async$returnValue = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto return + $async$goto = 1; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + $async$returnValue = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto return + $async$goto = 1; + break; + case 11: + // case + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 32: + // returning from await. + $async$returnValue = $async$temp1.greaterThan$1($async$result); + // goto return + $async$goto = 1; + break; + case 12: + // case + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 33: + // returning from await. + $async$returnValue = $async$temp1.greaterThanOrEquals$1($async$result); + // goto return + $async$goto = 1; + break; + case 13: + // case + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 34: + // returning from await. + $async$returnValue = $async$temp1.lessThan$1($async$result); + // goto return + $async$goto = 1; + break; + case 14: + // case + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 35: + // returning from await. + $async$returnValue = $async$temp1.lessThanOrEquals$1($async$result); + // goto return + $async$goto = 1; + break; + case 15: + // case + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 36: + // returning from await. + $async$returnValue = $async$temp1.plus$1($async$result); + // goto return + $async$goto = 1; + break; + case 16: + // case + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 37: + // returning from await. + $async$returnValue = $async$temp1.minus$1($async$result); + // goto return + $async$goto = 1; + break; + case 17: + // case + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 38: + // returning from await. + $async$returnValue = $async$temp1.times$1($async$result); + // goto return + $async$goto = 1; + break; + case 18: + // case + $async$goto = 39; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 39: + // returning from await. + right = $async$result; + result = left.dividedBy$1(right); + if (t1.allowsSlash && left instanceof A.SassNumber && right instanceof A.SassNumber) { + $async$returnValue = type$.SassNumber._as(result).withSlash$2(left, right); + // goto return + $async$goto = 1; + break; + } else { + if (left instanceof A.SassNumber && right instanceof A.SassNumber) + t2._async_evaluate$_warn$3$deprecation(string$.Using__o + A.S(new A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation0().call$1(t1)) + " or calc(" + t1.toString$0(0) + string$.x29x0a_Morx20, t1.get$span(t1), true); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 19: + // case + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 40: + // returning from await. + $async$returnValue = $async$temp1.modulo$1($async$result); + // goto return + $async$goto = 1; + break; + case 20: + // default + throw A.wrapException(A.ArgumentError$("Unknown binary operator " + t3.toString$0(0) + ".", null)); + case 5: + // after switch + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 61 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation0.prototype = { + call$1(expression) { + if (expression instanceof A.BinaryOperationExpression && expression.operator === B.BinaryOperator_qpm) + return "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + else if (expression instanceof A.ParenthesizedExpression) + return expression.expression.toString$0(0); + else + return expression.toString$0(0); + }, + $signature: 135 + }; + A._EvaluateVisitor_visitVariableExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.node.operator; + switch (t1) { + case B.UnaryOperator_gg4: + return _this.operand.unaryPlus$0(); + case B.UnaryOperator_TLI: + return _this.operand.unaryMinus$0(); + case B.UnaryOperator_Ix1: + return new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + case B.UnaryOperator_not_not_not: + return _this.operand.unaryNot$0(); + default: + throw A.wrapException(A.StateError$("Unknown unary operator " + t1.toString$0(0) + ".")); + } + }, + $signature: 41 + }; + A._EvaluateVisitor__visitCalculationValue_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + t3 = $async$self.inMinMax; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate$_binaryOperatorToCalculationOperator$1(t2.operator); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_visitCalculationValue$2$inMinMax(t2.left, t3), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate$_visitCalculationValue$2$inMinMax(t2.right, t3), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal($async$temp2, $async$temp3, $async$result, t3, !t1._async_evaluate$_inSupportsDeclaration); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitListExpression_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 495 + }; + A._EvaluateVisitor_visitFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_getFunction$2$namespace(A.stringReplaceAllUnchecked(t1.originalName, "_", "-"), t1.namespace); + }, + $signature: 111 + }; + A._EvaluateVisitor_visitFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 61 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 61 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure0(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure0(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure0.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, declaredArguments, t7, minLength, t8, i, argument, t9, value, t10, t11, restArgument, rest, argumentList, result, t1, t2, t3, t4, t5, t6, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated; + t3 = t2.positional; + t4 = t2.named; + t5 = $async$self.callable.declaration.$arguments; + t6 = $async$self.nodeWithSpan; + t1._async_evaluate$_verifyArguments$4(t3.length, t4, t5, t6); + declaredArguments = t5.$arguments; + t7 = declaredArguments.length; + minLength = Math.min(t3.length, t7); + for (t8 = t2.positionalNodes, i = 0; i < minLength; ++i) + t1._async_evaluate$_environment.setLocalVariable$3(declaredArguments[i].name, t3[i], t8[i]); + i = t3.length, t8 = t2.namedNodes; + case 3: + // for condition + if (!(i < t7)) { + // goto after for + $async$goto = 5; + break; + } + argument = declaredArguments[i]; + t9 = argument.name; + value = t4.remove$1(0, t9); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t10 = argument.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t10.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate$_withoutSlash$2($async$result, t1._async_evaluate$_expressionNode$1(t10)); + case 7: + // join + t10 = t1._async_evaluate$_environment; + t11 = t8.$index(0, t9); + if (t11 == null) { + t11 = argument.defaultValue; + t11.toString; + t11 = t1._async_evaluate$_expressionNode$1(t11); + } + t10.setLocalVariable$3(t9, value, t11); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restArgument = t5.restArgument; + if (restArgument != null) { + rest = t3.length > t7 ? B.JSArray_methods.sublist$1(t3, t7) : B.List_empty7; + t2 = t2.separator; + argumentList = A.SassArgumentList$(rest, t4, t2 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_rXA : t2); + t1._async_evaluate$_environment.setLocalVariable$3(restArgument, argumentList, t6); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t2 = t4.__js_helper$_length; + if (t2 === 0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t3 = A._instanceType(t4)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + A.pluralize("argument", t2, null) + " named " + A.toSentence(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t4, t3), new A._EvaluateVisitor__runUserDefinedCallable____closure0(), t3._eval$1("Iterable.E"), type$.Object), "or") + ".", t6.get$span(t6), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t5.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate$_stackTrace$1(t6.get$span(t6)))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__runFunctionCallable_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 61 + }; + A._EvaluateVisitor__runBuiltInCallable_closure1.prototype = { + call$0() { + return this.overload.verify$2(this.evaluated.positional.length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__evaluateArguments_closure3.prototype = { + call$1(value) { + return value; + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateArguments_closure4.prototype = { + call$1(value) { + return this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 78 + }; + A._EvaluateVisitor__evaluateArguments_closure6.prototype = { + call$1(value) { + return value; + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure3.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure4.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._async_evaluate$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 78 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure6.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__addRestMap_closure0.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._async_evaluate$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 60 + }; + A._EvaluateVisitor__verifyArguments_closure0.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitStringExpression_closure0.prototype = { + call$1(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, result; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (typeof value == "string") { + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + } + type$.Expression._as(value); + t1 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(value.accept$1(t1), $async$call$1); + case 3: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString ? result._string$_text : t1._async_evaluate$_serialize$3$quote(result, value, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor_visitCssAtRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssMediaRule_closure2.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitCssMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; + case 5: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 6; + break; + } + t4 = t2.__internal$_current; + $async$goto = 7; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 7: + // returning from await. + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 8; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 8: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure4.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssStyleRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; + case 5: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 6; + break; + } + t4 = t2.__internal$_current; + $async$goto = 7; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 7: + // returning from await. + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 8; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 8: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor__performInterpolation_closure0.prototype = { + call$1(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, result, t2, t3; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (typeof value == "string") { + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + } + type$.Expression._as(value); + t1 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(value.accept$1(t1), $async$call$1); + case 3: + // returning from await. + result = $async$result; + if ($async$self.warnForColor && result instanceof A.SassColor && $.$get$namesByColor().containsKey$1(result)) { + t2 = A.Interpolation$(A._setArrayType([""], type$.JSArray_Object), $async$self.interpolation.span); + t3 = $.$get$namesByColor(); + t1._async_evaluate$_warn$2(string$.You_pr + A.S(t3.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t3.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_qbf, new A.StringExpression(t2, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + $async$returnValue = t1._async_evaluate$_serialize$3$quote(result, value, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor__serialize_closure0.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 30 + }; + A._EvaluateVisitor__expressionNode_closure0.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 222 + }; + A._EvaluateVisitor__withoutSlash_recommendation0.prototype = { + call$1(number) { + var asSlash = number.asSlash; + if (asSlash != null) + return "math.div(" + A.S(this.call$1(asSlash.item1)) + ", " + A.S(this.call$1(asSlash.item2)) + ")"; + else + return A.serializeValue(number, true, true); + }, + $signature: 224 + }; + A._EvaluateVisitor__stackFrame_closure0.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 81 + }; + A._EvaluateVisitor__stackTrace_closure0.prototype = { + call$1(tuple) { + return this.$this._async_evaluate$_stackFrame$2(tuple.item1, J.get$span$z(tuple.item2)); + }, + $signature: 229 + }; + A._ImportedCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure0(); + this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate$_visitor; + if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent") !== t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root")) + t1._async_evaluate$_addChild$1(node); + else if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root").children._collection$_source)) { + t1._async_evaluate$_addChild$1(node); + t1._async_evaluate$__endOfImports = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate$_outOfOrderImports; + (t2 == null ? t1._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate$_visitor, + mediaQueries = t1._async_evaluate$_mediaQueries; + t1._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure0(mediaQueries == null || t1._async_evaluate$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure0()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure0()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) + t1 = this.hasBeenMerged && type$.CssMediaRule._is(node); + else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A.EvaluateResult.prototype = {}; + A._EvaluationContext0.prototype = { + get$currentCallableSpan() { + var callableNode = this._async_evaluate$_visitor._async_evaluate$_callableNode; + if (callableNode != null) + return callableNode.get$span(callableNode); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2$deprecation(_, message, deprecation) { + var t1 = this._async_evaluate$_visitor, + t2 = t1._async_evaluate$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate$_warn$3$deprecation(message, t2 == null ? this._async_evaluate$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext: 1 + }; + A._ArgumentResults0.prototype = {}; + A._LoadedStylesheet0.prototype = {}; + A._CloneCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$(node.name, node.span, t1, node.value); + return t1 ? rule : this._visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$(node.name, node.value, node.span, node.parsedAsCustomProperty, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._visitChildren$2(A.ModifiableCssKeyframeBlock$(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._visitChildren$2(A.ModifiableCssMediaRule$(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var newSelector = this._oldToNewSelectors.$index(0, node.selector); + if (newSelector == null) + throw A.wrapException(A.StateError$(string$.The_Ex)); + return this._visitChildren$2(A.ModifiableCssStyleRule$(newSelector, node.span, node.originalSelector), node); + }, + visitCssStylesheet$1(node) { + return this._visitChildren$2(A.ModifiableCssStylesheet$(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._visitChildren$2(A.ModifiableCssSupportsRule$(node.condition, node.span), node); + }, + _visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _visitChildren$2(newParent, oldParent) { + return this._visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode); + } + }; + A.Evaluator.prototype = {}; + A._EvaluateVisitor.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + t1 = type$.JSArray_BuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure0(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure1(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure2(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure3(_this), _s9_), A.BuiltInCallable$function("module-variables", "$module", new A._EvaluateVisitor_closure4(_this), _s9_), A.BuiltInCallable$function("module-functions", "$module", new A._EvaluateVisitor_closure5(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure6(_this), _s9_), A.BuiltInCallable$function("call", "$function, $args...", new A._EvaluateVisitor_closure7(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure8(_this), _s9_)], t1); + t1 = type$.BuiltInCallable; + t2 = A.List_List$of($.$get$global(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$local()); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_BuiltInCallable), t1.push(metaModule), t2 = t1.length, t3 = _this._builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = A._setArrayType([], type$.JSArray_Callable); + B.JSArray_methods.addAll$1(t1, $.$get$globalFunctions()); + B.JSArray_methods.addAll$1(t1, metaFunctions); + for (t2 = t1.length, t3 = _this._builtInFunctions, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + $function = t1[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_run_closure(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, node)], t1, t1), type$.EvaluateResult); + }, + runExpression$2(importer, expression) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runExpression_closure(this, importer, expression), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, expression)], t1, t1), type$.Value); + }, + runStatement$2(importer, statement) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runStatement_closure(this, importer, statement), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, statement)], t1, t1), type$.void); + }, + _assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _assertInModule$2(value, $name) { + return this._assertInModule$1$2(value, $name, type$.dynamic); + }, + _withFakeStylesheet$1$3(importer, nodeWithSpan, callback) { + var t1, _this = this, + oldImporter = _this._importer; + _this._importer = importer; + _this.__stylesheet = A.Stylesheet$(B.List_empty12, nodeWithSpan.get$span(nodeWithSpan)); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._importer = oldImporter; + _this.__stylesheet = null; + } + }, + _withFakeStylesheet$3(importer, nodeWithSpan, callback) { + return this._withFakeStylesheet$1$3(importer, nodeWithSpan, callback, type$.dynamic); + }, + _loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t1, t2, _this = this, + builtInModule = _this._builtInModules.$index(0, url); + if (builtInModule != null) { + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate$_exception$2(t1, t2.get$span(t2))); + } + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure(callback, builtInModule)); + return; + } + _this._withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure0(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var alreadyLoaded, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, extensionStore, module, _this = this, + t1 = stylesheet.span, + url = t1.get$sourceUrl(t1); + t1 = _this._modules; + alreadyLoaded = t1.$index(0, url); + if (alreadyLoaded != null) { + t1 = configuration == null; + currentConfiguration = t1 ? _this._configuration : configuration; + t2 = _this._moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { + message = namesInErrors ? $.$get$context().prettyUri$1(url) + string$.x20was_a : string$.This_mw; + t2 = _this._moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : J.get$span$z(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(t1) ? _this._evaluate$_exception$1(message) : _this._multiSpanException$3(message, "new load", t1)); + } + return alreadyLoaded; + } + environment = A.Environment$(); + css = A._Cell$(); + extensionStore = A.ExtensionStore$(); + _this._withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure(_this, importer, stylesheet, extensionStore, configuration, css)); + module = environment.toModule$2(css._readLocal$0(), extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + _this._moduleConfigurations.$indexSet(0, url, _this._configuration); + if (nodeWithSpan != null) + _this._moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _execute$2(importer, stylesheet) { + return this._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + outOfOrderImports = _this._outOfOrderImports; + if (outOfOrderImports == null) + return _this._assertInModule$2(_this.__root, _s5_).children; + t1 = _this._assertInModule$2(_this.__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._assertInModule$2(_this.__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListMixin.E")), true, type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, outOfOrderImports); + t2 = _this._assertInModule$2(_this.__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._assertInModule$2(_this.__endOfImports, _s13_), null, t2.$ti._eval$1("ListMixin.E"))); + return t1; + }, + _combineCss$2$clone(root, clone) { + var selectors, unsatisfiedExtension, sortedModules, t1, imports, css, t2, t3, statements, index, _this = this; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + unsatisfiedExtension = A.firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure0(selectors))); + if (unsatisfiedExtension != null) + _this._throwForUnsatisfiedExtension$1(unsatisfiedExtension); + return root.get$css(root); + } + sortedModules = _this._topologicalModules$1(root); + if (clone) { + t1 = sortedModules.$ti._eval$1("MappedListIterable>"); + sortedModules = A.List_List$of(new A.MappedListIterable(sortedModules, new A._EvaluateVisitor__combineCss_closure1(), t1), true, t1._eval$1("ListIterable.E")); + } + _this._extendModules$1(sortedModules); + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + for (t1 = J.get$reversed$ax(sortedModules), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t3 = t3.get$css(t3); + statements = t3.get$children(t3); + index = _this._indexAfterImports$1(statements); + t3 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(imports, t3.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(css, t3.getRange$2(statements, index, t3.get$length(statements))); + } + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _combineCss$1(root) { + return this._combineCss$2$clone(root, false); + }, + _extendModules$1(sortedModules) { + var t1, t2, originalSelectors, $self, t3, t4, _i, upstream, url, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = J.get$iterator$ax(sortedModules); t1.moveNext$0();) { + t2 = t1.get$current(t1); + originalSelectors = t2.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t2.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t2.get$url(t2)); + t3 = t2.get$extensionStore().get$addExtensions(); + if ($self != null) + t3.call$1($self); + t3 = t2.get$extensionStore(); + if (t3.get$isEmpty(t3)) + continue; + for (t3 = t2.get$upstream(), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + upstream = t3[_i]; + url = upstream.get$url(upstream); + if (url == null) + continue; + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(url, new A._EvaluateVisitor__extendModules_closure0()), t2.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t2.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(unsatisfiedExtensions)); + }, + _throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span)); + }, + _topologicalModules$1(root) { + var t1 = type$.Module_Callable, + sorted = A.QueueList$(null, t1); + new A._EvaluateVisitor__topologicalModules_visitModule(A.LinkedHashSet_LinkedHashSet$_empty(t1), sorted).call$1(root); + return sorted; + }, + _indexAfterImports$1(statements) { + var t1, t2, t3, lastImport, i, statement; + for (t1 = J.getInterceptor$asx(statements), t2 = type$.CssComment, t3 = type$.CssImport, lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + statement = t1.$index(statements, i); + if (t3._is(statement)) + lastImport = i; + else if (!t2._is(statement)) + break; + } + return lastImport + 1; + }, + visitStylesheet$1(node) { + var t1, t2, _i; + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + return null; + }, + visitAtRootRule$1(node) { + var t1, grandparent, root, innerCopy, t2, outerCopy, t3, copy, _this = this, + _s8_ = "__parent", + unparsedQuery = node.query, + query = unparsedQuery != null ? _this._adjustParseError$2(unparsedQuery, new A._EvaluateVisitor_visitAtRootRule_closure(_this, _this._performInterpolation$2$warnForColor(unparsedQuery, true))) : B.AtRootQuery_UsS, + $parent = _this._assertInModule$2(_this.__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = grandparent) { + if (!query.excludes$1($parent)) + included.push($parent); + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._trimIncluded$1(included); + if (root === _this._assertInModule$2(_this.__parent, _s8_)) { + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure0(_this, node), node.hasDeclarations, type$.Null); + return null; + } + if (included.length !== 0) { + innerCopy = B.JSArray_methods.get$first(included).copyWithoutChildren$0(); + for (t1 = A.SubListIterable$(included, 1, null, type$.ModifiableCssParentNode), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, outerCopy = innerCopy; t1.moveNext$0(); outerCopy = copy) { + t3 = t1.__internal$_current; + copy = (t3 == null ? t2._as(t3) : t3).copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure1(_this, node)); + return null; + }, + _trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, grandparent, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._assertInModule$2(_this.__root, _s5_); + $parent = _this._assertInModule$2(_this.__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = grandparent) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = grandparent) { + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._assertInModule$2(_this.__root, _s5_)) + return _this._assertInModule$2(_this.__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure0(_this, scope); + if (_this._mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure1(_this, scope); + if (_this._inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure2(_this, scope); + return _this._inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure3()) ? new A._EvaluateVisitor__scopeForAtRoot_closure4(_this, scope) : scope; + }, + visitContentBlock$1(node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(node) { + var $content = this._environment._content; + if ($content == null) + return null; + this._runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + this._evaluate$_logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(node) { + var t1, $name, t2, cssValue, t3, t4, children, oldDeclarationName, _this = this, _null = null; + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null && !_this._inUnknownAtRule && !_this._inKeyframes) + throw A.wrapException(_this._evaluate$_exception$2(string$.Declarm, node.span)); + t1 = node.name; + $name = _this._interpolationToValue$2$warnForColor(t1, true); + t2 = _this._declarationName; + if (t2 != null) + $name = new A.CssValue(t2 + "-" + A.S($name.value), $name.span, type$.CssValue_String); + t2 = node.value; + cssValue = A.NullableExtension_andThen(t2, new A._EvaluateVisitor_visitDeclaration_closure(_this)); + t3 = cssValue != null; + if (t3) + t4 = !cssValue.get$value(cssValue).get$isBlank() || cssValue.get$value(cssValue).get$asList().length === 0; + else + t4 = false; + if (t4) { + t3 = _this._assertInModule$2(_this.__parent, "__parent"); + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + if (_this._sourceMap) { + t2 = A.NullableExtension_andThen(t2, _this.get$_expressionNode()); + t2 = t2 == null ? _null : J.get$span$z(t2); + } else + t2 = _null; + t3.addChild$1(A.ModifiableCssDeclaration$($name, cssValue, node.span, t1, t2)); + } else if (J.startsWith$1$s($name.value, "--") && t3) + throw A.wrapException(_this._evaluate$_exception$2("Custom property values may not be empty.", cssValue.get$span(cssValue))); + children = node.children; + if (children != null) { + oldDeclarationName = _this._declarationName; + _this._declarationName = $name.value; + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure0(_this, children), node.hasDeclarations, type$.Null); + _this._declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(node) { + var _this = this, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._expressionNode$1(t1), + setVariables = node.variables.length === 1 ? new A._EvaluateVisitor_visitEachRule_closure(_this, node, nodeWithSpan) : new A._EvaluateVisitor_visitEachRule_closure0(_this, node, nodeWithSpan); + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure1(_this, list, setVariables, node), true, type$.nullable_Value); + }, + _setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._environment.setLocalVariable$3(variables[i], this._withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(node) { + throw A.wrapException(this._evaluate$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); + }, + visitExtendRule$1(node) { + var t1, t2, t3, t4, t5, t6, t7, _i, complex, visitor, t8, t9, targetText, compound, _this = this, _null = null, + styleRule = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; + if (styleRule == null || _this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = styleRule.selector, t4 = t3.span, t5 = node.span, t6 = type$.SourceSpan, t7 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + t8 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t9 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + _this._warn$3$deprecation('The selector "' + t8 + '" is invalid CSS and ' + t9 + string$.x20be_an, new A.MultiSpan(t4, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t5, "@extend rule"], t6, t7), t6, t7)), true); + } + targetText = _this._interpolationToValue$2$warnForColor(node.selector, true); + for (t1 = _this._adjustParseError$2(targetText, new A._EvaluateVisitor_visitExtendRule_closure(_this, targetText)).components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t4 = complex.components; + t4 = t4.length === 1 && B.JSArray_methods.get$first(t4).combinators.length === 0; + } else + t4 = false; + compound = t4 ? B.JSArray_methods.get$first(complex.components).selector : _null; + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", targetText.span)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, targetText.span)); + _this._assertInModule$2(_this.__extensionStore, "_extensionStore").addExtension$4(t3, t5, node, _this._mediaQueries); + } + return _null; + }, + visitAtRule$1(node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + $name = _this._interpolationToValue$1(node.name); + value = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure(_this)); + children = node.children; + if (children == null) { + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + if (A.unvendor($name.value) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure0(_this, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure1(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure(_this, node)), + t3 = node.to, + toNumber = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure0(_this, node)), + from = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure1(fromNumber)), + to = t1.to = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure2(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure3(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value); + }, + visitForwardRule$1(node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._addForwardConfiguration$2(adjustedConfiguration, node); + _this._loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._configuration = adjustedConfiguration; + _this._loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure0(_this, node)); + _this._configuration = oldConfiguration; + } + return null; + }, + _addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, t5, variableNodeWithSpan, + t1 = configuration._values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + t5 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t4); + if (t5 != null && !t5.value.$eq(0, B.C__SassNull)) { + newValues.$indexSet(0, t4, t5); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue(this._withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration(node, newValues, null); + else + return new A.Configuration(newValues, null); + }, + _removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, entry; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._values; + if (t1.get$isEmpty(t1)) + return; + t1 = t1.get$entries(t1); + entry = t1.get$first(t1); + t1 = nameInError ? "$" + A.S(entry.key) + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate$_exception$2(t1, entry.value.configurationSpan)); + }, + _assertConfigurationIsEmpty$1(configuration) { + return this._assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._functions, + index = t4.length - 1, + t5 = node.name; + t1._functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitIfRule$1(node) { + var t1, t2, _i, clauseToCheck, _box_0 = {}; + _box_0.clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + _box_0.clause = clauseToCheck; + break; + } + } + t1 = _box_0.clause; + if (t1 == null) + return null; + return this._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule_closure(_box_0, this), true, t1.hasDeclarations, type$.nullable_Value); + }, + visitImportRule$1(node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, result, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String, t4 = _this.get$_interpolationToValue(), t5 = type$.StaticImport, t6 = type$.JSArray_ModifiableCssImport, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + _this._visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + result = _this._performInterpolation$2$warnForColor(t7, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport(new A.CssValue(result, t7.span, t3), t8, $import.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(node); + else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + t7 = _this._assertInModule$2(_this.__root, _s5_); + node._parent = t7; + t7 = t7._children; + node._indexInParent = t7.length; + t7.push(node); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t7 = _this._outOfOrderImports; + (t7 == null ? _this._outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _visitDynamicImport$1($import) { + return this._withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure(this, $import)); + }, + _loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var importCache, tuple, isDependency, stylesheet, result, error, stackTrace, error0, stackTrace0, message, t1, t2, t3, t4, exception, message0, _this = this, + _s11_ = "_stylesheet"; + baseUrl = baseUrl; + try { + _this._importSpan = span; + importCache = _this._evaluate$_importCache; + if (importCache != null) { + if (baseUrl == null) { + t1 = _this._assertInModule$2(_this.__stylesheet, _s11_).span; + baseUrl = t1.get$sourceUrl(t1); + } + tuple = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._importer, baseUrl, forImport); + if (tuple != null) { + isDependency = _this._inDependency || tuple.item1 !== _this._importer; + t1 = tuple.item1; + t2 = tuple.item2; + t3 = tuple.item3; + t4 = _this._quietDeps && isDependency; + stylesheet = importCache.importCanonical$4$originalUrl$quiet(t1, t2, t3, t4); + if (stylesheet != null) { + _this._loadedUrls.add$1(0, tuple.item2); + t1 = tuple.item1; + return new A._LoadedStylesheet(stylesheet, t1, isDependency); + } + } + } else { + t1 = baseUrl; + if (t1 == null) { + t1 = _this._assertInModule$2(_this.__stylesheet, _s11_).span; + t1 = t1.get$sourceUrl(t1); + } + result = _this._importLikeNode$3(url, t1, forImport); + if (result != null) { + t1 = result.stylesheet.span; + t2 = _this._loadedUrls; + A.NullableExtension_andThen(t1.get$sourceUrl(t1), t2.get$add(t2)); + return result; + } + } + if (B.JSString_methods.startsWith$1(url, "package:") && true) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace(_this._evaluate$_exception$2(error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t2, t1)), stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + message = null; + try { + message = A._asString(J.get$message$x(error0)); + } catch (exception) { + message0 = J.toString$0$(error0); + message = message0; + } + A.throwWithTrace(_this._evaluate$_exception$1(message), stackTrace0); + } + } finally { + _this._importSpan = null; + } + }, + _loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _loadStylesheet$3$forImport(url, span, forImport) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _importLikeNode$3(originalUrl, previous, forImport) { + var _this = this, + result = _this._nodeImporter.loadRelative$3(originalUrl, previous, forImport), + isDependency = _this._inDependency, + contents = result.get$item1(), + url = result.get$item2(), + t1 = url.startsWith$1(0, "file") ? A.Syntax_forPath(url) : B.Syntax_SCSS_scss; + return new A._LoadedStylesheet(A.Stylesheet_Stylesheet$parse(contents, t1, _this._quietDeps && isDependency ? $.$get$Logger_quiet() : _this._evaluate$_logger, url), null, isDependency); + }, + visitIncludeRule$1(node) { + var nodeWithSpan, t1, _this = this, + _s37_ = "Mixin doesn't accept a content block.", + mixin = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure(_this, node)); + if (mixin == null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined mixin.", node.span)); + nodeWithSpan = new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure0(node)); + if (mixin instanceof A.BuiltInCallable) { + if (node.content != null) + throw A.wrapException(_this._evaluate$_exception$2(_s37_, node.span)); + _this._runBuiltInCallable$3(node.$arguments, mixin, nodeWithSpan); + } else if (type$.UserDefinedCallable_Environment._is(mixin)) { + t1 = node.content; + if (t1 != null && !type$.MixinRule._as(mixin.declaration).get$hasContent()) + throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, node.get$spanWithoutContent(), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(node.get$spanWithoutContent()))); + _this._runUserDefinedCallable$1$4(node.$arguments, mixin, nodeWithSpan, new A._EvaluateVisitor_visitIncludeRule_closure1(_this, A.NullableExtension_andThen(t1, new A._EvaluateVisitor_visitIncludeRule_closure2(_this)), mixin, nodeWithSpan), type$.Null); + } else + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + return null; + }, + visitMixinRule$1(node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._mixins, + index = t4.length - 1, + t5 = node.name; + t1._mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitLoudComment$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._inFunction) + return null; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + t1 = node.text; + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(_this._performInterpolation$1(t1), t1.span)); + return null; + }, + visitMediaRule$1(node) { + var queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + queries = _this._visitMediaQueries$1(node.query); + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return null; + if (t1) + mergedSources = B.Set_empty0; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure0(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + return null; + }, + _visitMediaQueries$1(interpolation) { + return this._adjustParseError$2(interpolation, new A._EvaluateVisitor__visitMediaQueries_closure(this, this._performInterpolation$2$warnForColor(interpolation, true))); + }, + _mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2), t3 = type$.MediaQuerySuccessfulMergeResult; t1.moveNext$0();) { + t4 = t1.get$current(t1); + for (t5 = t2.get$iterator(queries2); t5.moveNext$0();) { + result = t4.merge$1(t5.get$current(t5)); + if (result === B._SingletonCssMediaQueryMergeResult_empty) + continue; + if (result === B._SingletonCssMediaQueryMergeResult_unrepresentable) + return null; + queries.push(t3._as(result).query); + } + } + return queries; + }, + visitReturnRule$1(node) { + var t1 = node.expression; + return this._withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(node) { + return null; + }, + visitStyleRule$1(node) { + var t1, selectorText, rule, oldAtRootExcludingStyleRule, t2, t3, t4, t5, t6, _i, complex, visitor, t7, t8, t9, _this = this, _null = null, + _s8_ = "__parent", + _box_0 = {}; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_, node.span)); + t1 = node.selector; + selectorText = _this._interpolationToValue$3$trim$warnForColor(t1, true, true); + if (_this._inKeyframes) { + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(_this._adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure(_this, selectorText)), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure0(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure1(), type$.ModifiableCssKeyframeBlock, type$.Null); + return _null; + } + _box_0.parsedSelector = _this._adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure2(_this, selectorText)); + _box_0.parsedSelector = _this._addExceptionSpan$2(t1, new A._EvaluateVisitor_visitStyleRule_closure3(_box_0, _this)); + t1 = t1.span; + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$3(_box_0.parsedSelector, t1, _this._mediaQueries), node.span, _box_0.parsedSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + _this._atRootExcludingStyleRule = false; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure4(_this, rule, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure5(), type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t2 = _box_0.parsedSelector.components, t3 = t2.length, t4 = type$.SourceSpan, t5 = type$.String, t6 = rule.children, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, t1, true); + } else if (complex.leadingCombinators.length !== 0) { + visitor = A._SerializeVisitor$(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, t1, true); + } else { + visitor = A._SerializeVisitor$(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + t7 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t8 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + if (t6.get$length(t6) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t6.$index(0, 0)); + _this._warn$3$deprecation('The selector "' + t7 + string$.x22x20is_o + t8 + string$.x0aThis_, new A.MultiSpan(t1, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t6.every$1(t6, new A._EvaluateVisitor_visitStyleRule_closure6()) ? "\n(try converting to a //-style comment)" : "")], t4, t5), t4, t5)), true); + } + } + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + visitSupportsRule$1(node) { + var t1, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(new A.CssValue(_this._visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); + return null; + }, + _visitSupportsCondition$1(condition) { + var t1, oldInSupportsDeclaration, t2, t3, _this = this; + if (condition instanceof A.SupportsOperation) { + t1 = condition.operator; + return _this._parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._parenthesize$2(condition.right, t1); + } else if (condition instanceof A.SupportsNegation) + return "not " + _this._parenthesize$1(condition.condition); + else if (condition instanceof A.SupportsInterpolation) { + t1 = condition.expression; + return _this._evaluate$_serialize$3$quote(t1.accept$1(_this), t1, false); + } else if (condition instanceof A.SupportsDeclaration) { + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = true; + t1 = condition.name; + t1 = _this._evaluate$_serialize$3$quote(t1.accept$1(_this), t1, true); + t2 = condition.get$isCustomProperty() ? "" : " "; + t3 = condition.value; + t3 = _this._evaluate$_serialize$3$quote(t3.accept$1(_this), t3, true); + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return "(" + t1 + ":" + t2 + t3 + ")"; + } else if (condition instanceof A.SupportsFunction) + return _this._performInterpolation$1(condition.name) + "(" + _this._performInterpolation$1(condition.$arguments) + ")"; + else if (condition instanceof A.SupportsAnything) + return "(" + _this._performInterpolation$1(condition.contents) + ")"; + else + throw A.wrapException(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeType(condition).toString$0(0) + ".", null)); + }, + _parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._visitSupportsCondition$1(condition) + ")"; + else + return this._visitSupportsCondition$1(condition); + }, + _parenthesize$1(condition) { + return this._parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(node) { + var t1, value, _this = this, _null = null; + if (node.isGuarded) { + if (node.namespace == null && _this._environment._variables.length === 1) { + t1 = _this._configuration._values; + t1 = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, node.name); + if (t1 != null && !t1.value.$eq(0, B.C__SassNull)) { + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure(_this, node, t1)); + return _null; + } + } + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure0(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) + return _null; + } + if (node.isGlobal && !_this._environment.globalVariableExists$1(node.name)) { + t1 = _this._environment._variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + _this._warn$3$deprecation(t1, node.span, true); + } + t1 = node.expression; + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure1(_this, node, _this._withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue(_this._withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration(node, values, null); + } else + configuration = B.Configuration_Map_empty_null; + _this._loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure(_this, node), configuration); + _this._assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(node) { + var _this = this, + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure(_this, node)), + t1 = value instanceof A.SassString ? value._string$_text : _this._evaluate$_serialize$2(value, node.expression); + _this._evaluate$_logger.warn$2$trace(0, t1, _this._evaluate$_stackTrace$1(node.span)); + return null; + }, + visitWhileRule$1(node) { + return this._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(node) { + return this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure(this, node)); + }, + visitValueExpression$1(node) { + return node.value; + }, + visitVariableExpression$1(node) { + var result = this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(node) { + return this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(node) { + return node.value ? B.SassBoolean_true : B.SassBoolean_false; + }, + visitIfExpression$1(node) { + var condition, t2, ifTrue, ifFalse, result, _this = this, + pair = _this._evaluateMacroArguments$1(node), + positional = pair.item1, + named = pair.item2, + t1 = J.getInterceptor$asx(positional); + _this._verifyArguments$4(t1.get$length(positional), named, $.$get$IfExpression_declaration(), node); + if (t1.get$length(positional) > 0) + condition = t1.$index(positional, 0); + else { + t2 = named.$index(0, "condition"); + t2.toString; + condition = t2; + } + if (t1.get$length(positional) > 1) + ifTrue = t1.$index(positional, 1); + else { + t2 = named.$index(0, "if-true"); + t2.toString; + ifTrue = t2; + } + if (t1.get$length(positional) > 2) + ifFalse = t1.$index(positional, 2); + else { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._withoutSlash$2(result.accept$1(_this), _this._expressionNode$1(result)); + }, + visitNullExpression$1(node) { + return B.C__SassNull; + }, + visitNumberExpression$1(node) { + return A.SassNumber_SassNumber(node.value, node.unit); + }, + visitParenthesizedExpression$1(node) { + return node.expression.accept$1(this); + }, + visitCalculationExpression$1(node) { + var $arguments, error, stackTrace, t2, t3, t4, t5, t6, _i, argument, exception, _this = this, + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.$arguments, t3 = t2.length, t4 = node.name, t5 = t4 !== "min", t6 = t4 === "max", _i = 0; _i < t3; ++_i) { + argument = t2[_i]; + t1.push(_this._visitCalculationValue$2$inMinMax(argument, !t5 || t6)); + } + $arguments = t1; + if (_this._inSupportsDeclaration) + return new A.SassCalculation(t4, A.List_List$unmodifiable($arguments, type$.Object)); + try { + switch (t4) { + case "calc": + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + return t1; + case "min": + t1 = A.SassCalculation_min($arguments); + return t1; + case "max": + t1 = A.SassCalculation_max($arguments); + return t1; + case "clamp": + t1 = J.$index$asx($arguments, 0); + t3 = J.get$length$asx($arguments) > 1 ? J.$index$asx($arguments, 1) : null; + t1 = A.SassCalculation_clamp(t1, t3, J.get$length$asx($arguments) > 2 ? J.$index$asx($arguments, 2) : null); + return t1; + default: + t1 = A.UnsupportedError$('Unknown calculation name "' + t4 + '".'); + throw A.wrapException(t1); + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + _this._verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace(_this._evaluate$_exception$2(error.message, node.span), stackTrace); + } else + throw exception; + } + }, + _verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + arg = args[i]; + if (!(arg instanceof A.SassNumber)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(this._evaluate$_exception$2("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])))); + } + } + }, + _visitCalculationValue$2$inMinMax(node, inMinMax) { + var inner, result, t1, _this = this; + if (node instanceof A.ParenthesizedExpression) { + inner = node.expression; + result = _this._visitCalculationValue$2$inMinMax(inner, inMinMax); + if (inner instanceof A.FunctionExpression) + t1 = A.stringReplaceAllUnchecked(inner.originalName, "_", "-").toLowerCase() === "var" && result instanceof A.SassString && !result._hasQuotes; + else + t1 = false; + return t1 ? new A.SassString("(" + result._string$_text + ")", false) : result; + } else if (node instanceof A.StringExpression) + return new A.CalculationInterpolation(_this._performInterpolation$1(node.text)); + else if (node instanceof A.BinaryOperationExpression) + return _this._addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationValue_closure(_this, node, inMinMax)); + else { + result = node.accept$1(_this); + if (result instanceof A.SassNumber || result instanceof A.SassCalculation) + return result; + if (result instanceof A.SassString && !result._hasQuotes) + return result; + throw A.wrapException(_this._evaluate$_exception$2("Value " + result.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + }, + _binaryOperatorToCalculationOperator$1(operator) { + switch (operator) { + case B.BinaryOperator_qbf: + return B.CalculationOperator_IyK; + case B.BinaryOperator_KlB: + return B.CalculationOperator_2bx; + case B.BinaryOperator_6pl: + return B.CalculationOperator_jFr; + case B.BinaryOperator_qpm: + return B.CalculationOperator_OvN; + default: + throw A.wrapException(A.UnsupportedError$("Invalid calculation operator " + operator.toString$0(0) + ".")); + } + }, + visitColorExpression$1(node) { + return node.value; + }, + visitListExpression$1(node) { + var t1 = node.contents; + return A.SassList$(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(node) { + var t2, t3, _i, pair, t4, keyValue, valueValue, oldValueSpan, + t1 = type$.Value, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + pair = t2[_i]; + t4 = pair.item1; + keyValue = t4.accept$1(this); + valueValue = pair.item2.accept$1(this); + if (map.$index(0, keyValue) != null) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = J.getInterceptor$z(t4); + t2 = t1.get$span(t4); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t3.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t2, "second key", t3, this._evaluate$_stackTrace$1(t1.get$span(t4)))); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, t4); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(node) { + var oldInFunction, result, _this = this, t1 = {}, + $function = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure(_this, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined function.", node.span)); + t1.$function = new A.PlainCssCallable(node.originalName); + } + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure0(t1, _this, node)); + _this._inFunction = oldInFunction; + return result; + }, + visitInterpolatedFunctionExpression$1(node) { + var result, _this = this, + t1 = _this._performInterpolation$1(node.name), + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure(_this, node, new A.PlainCssCallable(t1))); + _this._inFunction = oldInFunction; + return result; + }, + _getFunction$2$namespace($name, namespace) { + var local = this._environment.getFunction$2$namespace($name, namespace); + if (local != null || namespace != null) + return local; + return this._builtInFunctions.$index(0, $name); + }, + _runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldCallable, result, _this = this, + evaluated = _this._evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = _this._currentCallable; + _this._currentCallable = callable; + result = _this._withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._currentCallable = oldCallable; + return result; + }, + _runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var t1, t2, t3, first, _i, argument, restArg, rest, _this = this; + if (callable instanceof A.BuiltInCallable) + return _this._withoutSlash$2(_this._runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment._is(callable)) + return _this._runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure(_this, callable), type$.Value); + else if (callable instanceof A.PlainCssCallable) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + t1 = callable.name + "("; + for (t2 = $arguments.positional, t3 = t2.length, first = true, _i = 0; _i < t3; ++_i) { + argument = t2[_i]; + if (first) + first = false; + else + t1 += ", "; + t1 += _this._evaluate$_serialize$3$quote(argument.accept$1(_this), argument, true); + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + t1 += ", "; + t1 += _this._evaluate$_serialize$2(rest, restArg); + } + t1 += A.Primitives_stringFromCharCode(41); + return new A.SassString(t1.charCodeAt(0) == 0 ? t1 : t1, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$u(callable).toString$0(0) + ".", null)); + }, + _runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var callback, result, error, stackTrace, error0, stackTrace0, error1, stackTrace1, message, namedSet, tuple, overload, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, t4, t5, t6, message0, _this = this, + evaluated = _this._evaluateArguments$1($arguments), + oldCallableNode = _this._callableNode; + _this._callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated.named, type$.MapKeySet_String); + tuple = callable.callbackFor$2(evaluated.positional.length, namedSet); + overload = tuple.item1; + callback = tuple.item2; + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure(overload, evaluated, namedSet)); + declaredArguments = overload.$arguments; + for (i = evaluated.positional.length, t1 = declaredArguments.length; i < t1; ++i) { + argument = declaredArguments[i]; + t2 = evaluated.positional; + t3 = evaluated.named.remove$1(0, argument.name); + if (t3 == null) { + t3 = argument.defaultValue; + t3 = _this._withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (overload.restArgument != null) { + if (evaluated.positional.length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated.positional, t1); + B.JSArray_methods.removeRange$2(evaluated.positional, t1, evaluated.positional.length); + } else + rest = B.List_empty7; + t1 = evaluated.named; + argumentList = A.SassArgumentList$(rest, t1, evaluated.separator === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_rXA : evaluated.separator); + evaluated.positional.push(argumentList); + } else + argumentList = null; + result = null; + try { + result = callback.call$1(evaluated.positional); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) + throw exception; + else if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace(new A.MultiSpanSassRuntimeException(_this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.MultiSpanSassException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0._span_exception$_message; + t2 = error0; + t3 = J.getInterceptor$z(t2); + t2 = A.SourceSpanException.prototype.get$span.call(t3, t2); + t3 = error0.primaryLabel; + t4 = error0.secondarySpans; + t5 = error0; + t6 = J.getInterceptor$z(t5); + A.throwWithTrace(new A.MultiSpanSassRuntimeException(_this._evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t6, t5)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace0); + } else { + error1 = t1; + stackTrace1 = A.getTraceFromException(exception); + message = null; + try { + message = A._asString(J.get$message$x(error1)); + } catch (exception) { + message0 = J.toString$0$(error1); + message = message0; + } + A.throwWithTrace(_this._evaluate$_exception$2(message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace1); + } + } + _this._callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated.named.__js_helper$_length === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + t1 = evaluated.named; + t1 = t1.get$keys(t1); + t1 = A.pluralize("argument", t1.get$length(t1), null); + t2 = evaluated.named; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + t1 + " named " + A.S(A.toSentence(t2.get$keys(t2).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure0(), type$.Object), "or")) + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)))); + }, + _evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, t5, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._expressionNode$1(expression); + positional.push(_this._withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = $arguments.named, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.value; + nodeForSpan = _this._expressionNode$1(t5); + t4 = t4.key; + named.$indexSet(0, t4, _this._withoutSlash$2(t5.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, t4, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._ArgumentResults(positional, positionalNodes, named, namedNodes, B.ListSeparator_undecided_null_undecided); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + _this._addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure0(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure1(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._ArgumentResults(positional, positionalNodes, named, namedNodes, separator); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure2()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._ArgumentResults(positional, positionalNodes, named, namedNodes, separator); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A.Tuple2(t1.positional, t1.named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + _this._addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure0(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure1(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression(_this._withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure2(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure(this, values, convert, this._expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _addRestMap$4(values, map, nodeWithSpan, convert) { + return this._addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure($arguments, positional, named)); + }, + visitSelectorExpression$1(node) { + var t1 = this._styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull : t1; + }, + visitStringExpression$1(node) { + var t1, _this = this, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + t1 = node.text.contents; + t1 = new A.MappedListIterable(t1, new A._EvaluateVisitor_visitStringExpression_closure(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString(t1, node.hasQuotes); + }, + visitSupportsExpression$1(expression) { + return new A.SassString(this._visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.get$value(t1)) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure0(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + var t1 = node.name; + this._assertInModule$2(this.__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(t1, node.value, node.span, J.startsWith$1$s(t1.get$value(t1), "--"), node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(modifiableNode); + else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + _this._assertInModule$2(_this.__root, _s5_).addChild$1(modifiableNode); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t1 = _this._outOfOrderImports; + (t1 == null ? _this._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty0; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure0(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, t2, t3, t4, t5, originalSelector, rule, oldAtRootExcludingStyleRule, _this = this, + _s8_ = "__parent"; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_, node.span)); + t1 = _this._atRootExcludingStyleRule; + styleRule = t1 ? null : _this._styleRuleIgnoringAtRoot; + t2 = node.selector; + t3 = t2.value; + t4 = styleRule == null; + t5 = t4 ? null : styleRule.originalSelector; + originalSelector = t3.resolveParentSelectors$2$implicitParent(t5, !t1); + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$3(originalSelector, t2.span, _this._mediaQueries), node.span, originalSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + _this._atRootExcludingStyleRule = false; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure(_this, rule, node), false, new A._EvaluateVisitor_visitCssStyleRule_closure0(), type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (t4) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); + }, + _handleReturn$1$2(list, callback) { + var t1, _i, result; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + result = callback.call$1(list[_i]); + if (result != null) + return result; + } + return null; + }, + _handleReturn$2(list, callback) { + return this._handleReturn$1$2(list, callback, type$.dynamic); + }, + _withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._environment; + this._environment = environment; + result = callback.call$0(); + this._environment = oldEnvironment; + return result; + }, + _withEnvironment$2(environment, callback) { + return this._withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii(result, true) : result; + return new A.CssValue(t1, interpolation.span, type$.CssValue_String); + }, + _interpolationToValue$1(interpolation) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _performInterpolation$2$warnForColor(interpolation, warnForColor) { + var t1, result, _this = this, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + t1 = interpolation.contents; + result = new A.MappedListIterable(t1, new A._EvaluateVisitor__performInterpolation_closure(_this, warnForColor, interpolation), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return result; + }, + _performInterpolation$1(interpolation) { + return this._performInterpolation$2$warnForColor(interpolation, false); + }, + _evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure(value, quote)); + }, + _evaluate$_serialize$2(value, nodeWithSpan) { + return this._evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var t1, result, _this = this; + _this._addChild$2$through(node, through); + t1 = _this._assertInModule$2(_this.__parent, "__parent"); + _this.__parent = node; + result = _this._environment.scope$1$2$when(callback, scopeWhen, $T); + _this.__parent = t1; + return result; + }, + _withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$2$2(node, callback, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _addChild$2$through(node, through) { + var grandparent, t1, + $parent = this._assertInModule$2(this.__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = grandparent) { + grandparent = $parent._parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + t1 = $parent._parent; + t1.toString; + $parent = $parent.copyWithoutChildren$0(); + t1.addChild$1($parent); + } + } + $parent.addChild$1(node); + }, + _addChild$1(node) { + return this._addChild$2$through(node, null); + }, + _withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._styleRuleIgnoringAtRoot; + this._styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _withStyleRule$2(rule, callback) { + return this._withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._mediaQueries, + oldSources = _this._mediaQuerySources; + _this._mediaQueries = queries; + _this._mediaQuerySources = sources; + result = callback.call$0(); + _this._mediaQueries = oldMediaQueries; + _this._mediaQuerySources = oldSources; + return result; + }, + _withMediaQueries$3(queries, sources, callback) { + return this._withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._stack; + t1.push(new A.Tuple2(_this._member, nodeWithSpan, type$.Tuple2_String_AstNode)); + oldMember = _this._member; + _this._member = member; + result = callback.call$0(); + _this._member = oldMember; + t1.pop(); + return result; + }, + _withStackFrame$3(member, nodeWithSpan, callback) { + return this._withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _withoutSlash$2(value, nodeForSpan) { + if (value instanceof A.SassNumber && value.asSlash != null) + this._warn$3$deprecation(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation().call$1(value)) + string$.x0a_More, nodeForSpan.get$span(nodeForSpan), true); + return value.withoutSlash$0(); + }, + _stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure(this))); + }, + _evaluate$_stackTrace$1(span) { + var _this = this, + t1 = _this._stack; + t1 = A.List_List$of(new A.MappedListIterable(t1, new A._EvaluateVisitor__stackTrace_closure(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Frame>")), true, type$.Frame); + if (span != null) + t1.push(_this._stackFrame$2(_this._member, span)); + return A.Trace$(new A.ReversedListIterable(t1, A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>")), null); + }, + _evaluate$_stackTrace$0() { + return this._evaluate$_stackTrace$1(null); + }, + _warn$3$deprecation(message, span, deprecation) { + var t1, _this = this; + if (_this._quietDeps) + if (!_this._inDependency) { + t1 = _this._currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._warningsEmitted.add$1(0, new A.Tuple2(message, span, type$.Tuple2_String_SourceSpan))) + return; + _this._evaluate$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, _this._evaluate$_stackTrace$1(span)); + }, + _warn$2(message, span) { + return this._warn$3$deprecation(message, span, false); + }, + _evaluate$_exception$2(message, span) { + var t1 = span == null ? J.get$span$z(B.JSArray_methods.get$last(this._stack).item2) : span; + return new A.SassRuntimeException(this._evaluate$_stackTrace$1(span), message, t1); + }, + _evaluate$_exception$1(message) { + return this._evaluate$_exception$2(message, null); + }, + _multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = J.get$span$z(B.JSArray_methods.get$last(this._stack).item2); + return new A.MultiSpanSassRuntimeException(this._evaluate$_stackTrace$0(), primaryLabel, A.ConstantMap_ConstantMap$from(secondaryLabels, type$.FileSpan, type$.String), message, t1); + }, + _adjustParseError$1$2(nodeWithSpan, callback) { + var error, stackTrace, errorText, span, syntheticFile, syntheticSpan, t1, exception, t2, t3, t4, t5, t6, _null = null; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + errorText = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, _null), 0, _null); + span = nodeWithSpan.get$span(nodeWithSpan); + syntheticFile = B.JSString_methods.replaceRange$3(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(J.get$file$x(span)._decodedChars, 0, _null), 0, _null), J.get$start$z(span).offset, J.get$end$z(span).offset, errorText); + t1 = A.SourceFile$fromString(syntheticFile, J.get$file$x(span).url); + t2 = J.get$start$z(span); + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t3 = t3.get$start(t3); + t4 = J.get$start$z(span); + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + syntheticSpan = t1.span$2(0, t2.offset + t3.offset, t4.offset + t5.get$end(t5).offset); + A.throwWithTrace(this._evaluate$_exception$2(error._span_exception$_message, syntheticSpan), stackTrace); + } else + throw exception; + } + }, + _adjustParseError$2(nodeWithSpan, callback) { + return this._adjustParseError$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace(new A.MultiSpanSassRuntimeException(this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace(this._evaluate$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw exception; + } + }, + _addExceptionSpan$2(nodeWithSpan, callback) { + return this._addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + A.throwWithTrace(new A.SassRuntimeException(this._evaluate$_stackTrace$0(), t1, t2), stackTrace); + } else + throw exception; + } + }, + _addErrorSpan$2(nodeWithSpan, callback) { + return this._addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + } + }; + A._EvaluateVisitor_closure.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure0.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure1.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure2.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure3.prototype = { + call$1($arguments) { + var t1 = this.$this._environment; + if (!t1._inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 20 + }; + A._EvaluateVisitor_closure4.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$variables(), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4.key, true), t4.value); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 37 + }; + A._EvaluateVisitor_closure5.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$functions(module), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4.key, true), new A.SassFunction(t4.value)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 37 + }; + A._EvaluateVisitor_closure6.prototype = { + call$1($arguments) { + var module, callable, t2, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css && module != null) + throw A.wrapException(string$.x24css_a); + if (css) + callable = new A.PlainCssCallable($name._string$_text); + else { + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure1(t1, $name, module)); + } + if (callable != null) + return new A.SassFunction(callable); + throw A.wrapException("Function not found: " + $name.toString$0(0)); + }, + $signature: 184 + }; + A._EvaluateVisitor__closure1.prototype = { + call$0() { + var t1 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t2 = this.module; + t2 = t2 == null ? null : t2._string$_text; + return this.$this._getFunction$2$namespace(t1, t2); + }, + $signature: 106 + }; + A._EvaluateVisitor_closure7.prototype = { + call$1($arguments) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression); + t4 = type$.String; + t5 = type$.Expression; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._wereKeywordsAccessed = true; + t8 = args._keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._wereKeywordsAccessed = true, t8 = t8.get$entries(t8), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString(t11.key, false), t11.value); + } + t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); + if ($function instanceof A.SassString) { + t2 = $function.toString$0(0); + A.EvaluationContext_current().warn$2$deprecation(0, string$.Passin + t2 + "))", true); + callableNode = t1._callableNode; + return t1.visitFunctionExpression$1(new A.FunctionExpression(null, $function._string$_text, invocation, callableNode.get$span(callableNode))); + } + callable = $function.assertFunction$1("function").callable; + if (type$.Callable._is(callable)) { + t2 = t1._callableNode; + t2.toString; + return t1._runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 4 + }; + A._EvaluateVisitor_closure8.prototype = { + call$1($arguments) { + var withMap, t2, values, configuration, t3, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + withMap.forEach$1(0, new A._EvaluateVisitor__closure(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + t1._loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure0(t1), t3.get$sourceUrl(t3), configuration, true); + t1._assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 535 + }; + A._EvaluateVisitor__closure.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); + }, + $signature: 60 + }; + A._EvaluateVisitor__closure0.prototype = { + call$1(module) { + var t1 = this.$this; + return t1._combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 75 + }; + A._EvaluateVisitor_run_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.node, + t2 = t1.span, + url = t2.get$sourceUrl(t2); + if (url != null) { + t2 = _this.$this; + t2._activeModules.$indexSet(0, url, null); + t2._loadedUrls.add$1(0, url); + } + t2 = _this.$this; + return new A.EvaluateResult(t2._combineCss$1(t2._execute$2(_this.importer, t1))); + }, + $signature: 555 + }; + A._EvaluateVisitor_runExpression_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.expression; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runExpression__closure(t1, t2)); + }, + $signature: 41 + }; + A._EvaluateVisitor_runExpression__closure.prototype = { + call$0() { + return this.expression.accept$1(this.$this); + }, + $signature: 41 + }; + A._EvaluateVisitor_runStatement_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.statement; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runStatement__closure(t1, t2)); + }, + $signature: 0 + }; + A._EvaluateVisitor_runStatement__closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure.prototype = { + call$0() { + return this.callback.call$1(this.builtInModule); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure0.prototype = { + call$0() { + var oldInDependency, module, error, stackTrace, error0, stackTrace0, error1, stackTrace1, error2, stackTrace2, message, exception, t4, t5, t6, t7, _this = this, + t1 = _this.$this, + t2 = _this.nodeWithSpan, + result = t1._loadStylesheet$3$baseUrl(_this.url.toString$0(0), t2.get$span(t2), _this.baseUrl), + stylesheet = result.stylesheet, + t3 = stylesheet.span, + canonicalUrl = t3.get$sourceUrl(t3); + if (canonicalUrl != null && t1._activeModules.containsKey$1(canonicalUrl)) { + message = _this.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t2 = A.NullableExtension_andThen(t1._activeModules.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure(t1, message)); + throw A.wrapException(t2 == null ? t1._evaluate$_exception$1(message) : t2); + } + if (canonicalUrl != null) + t1._activeModules.$indexSet(0, canonicalUrl, t2); + oldInDependency = t1._inDependency; + t1._inDependency = result.isDependency; + module = null; + try { + module = t1._execute$5$configuration$namesInErrors$nodeWithSpan(result.importer, stylesheet, _this.configuration, _this.namesInErrors, t2); + } finally { + t1._activeModules.remove$1(0, canonicalUrl); + t1._inDependency = oldInDependency; + } + try { + _this.callback.call$1(module); + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t2)) + throw exception; + else if (t2 instanceof A.MultiSpanSassException) { + error = t2; + stackTrace = A.getTraceFromException(exception); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t4 = error.primaryLabel; + t5 = error.secondarySpans; + t6 = error; + t7 = J.getInterceptor$z(t6); + A.throwWithTrace(new A.MultiSpanSassRuntimeException(t1._evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t7, t6)), t4, A.ConstantMap_ConstantMap$from(t5, type$.FileSpan, type$.String), t2, t3), stackTrace); + } else if (t2 instanceof A.SassException) { + error0 = t2; + stackTrace0 = A.getTraceFromException(exception); + t2 = error0; + t3 = J.getInterceptor$z(t2); + A.throwWithTrace(t1._evaluate$_exception$2(error0._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t3, t2)), stackTrace0); + } else if (t2 instanceof A.MultiSpanSassScriptException) { + error1 = t2; + stackTrace1 = A.getTraceFromException(exception); + A.throwWithTrace(t1._multiSpanException$3(error1.message, error1.primaryLabel, error1.secondarySpans), stackTrace1); + } else if (t2 instanceof A.SassScriptException) { + error2 = t2; + stackTrace2 = A.getTraceFromException(exception); + A.throwWithTrace(t1._evaluate$_exception$1(error2.message), stackTrace2); + } else + throw exception; + } + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__execute_closure.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + oldStylesheet = t1.__stylesheet, + oldRoot = t1.__root, + oldParent = t1.__parent, + oldEndOfImports = t1.__endOfImports, + oldOutOfOrderImports = t1._outOfOrderImports, + oldExtensionStore = t1.__extensionStore, + t2 = t1._atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._styleRuleIgnoringAtRoot, + oldMediaQueries = t1._mediaQueries, + oldDeclarationName = t1._declarationName, + oldInUnknownAtRule = t1._inUnknownAtRule, + oldInKeyframes = t1._inKeyframes, + oldConfiguration = t1._configuration; + t1._importer = _this.importer; + t3 = t1.__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1.__parent = t1.__root = A.ModifiableCssStylesheet$(t4); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + t1.__extensionStore = _this.extensionStore; + t1._declarationName = t1._mediaQueries = t1._styleRuleIgnoringAtRoot = null; + t1._inKeyframes = t1._atRootExcludingStyleRule = t1._inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._configuration = t6; + t1.visitStylesheet$1(t3); + t3 = t1._outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + _this.css._value = t3; + t1._importer = oldImporter; + t1.__stylesheet = oldStylesheet; + t1.__root = oldRoot; + t1.__parent = oldParent; + t1.__endOfImports = oldEndOfImports; + t1._outOfOrderImports = oldOutOfOrderImports; + t1.__extensionStore = oldExtensionStore; + t1._styleRuleIgnoringAtRoot = oldStyleRule; + t1._mediaQueries = oldMediaQueries; + t1._declarationName = oldDeclarationName; + t1._inUnknownAtRule = oldInUnknownAtRule; + t1._atRootExcludingStyleRule = t2; + t1._inKeyframes = oldInKeyframes; + t1._configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 125 + }; + A._EvaluateVisitor__combineCss_closure0.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_closure1.prototype = { + call$1(module) { + return module.cloneCss$0(); + }, + $signature: 556 + }; + A._EvaluateVisitor__extendModules_closure.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 188 + }; + A._EvaluateVisitor__topologicalModules_visitModule.prototype = { + call$1(module) { + var t1, t2, t3, _i, upstream; + for (t1 = module.get$upstream(), t2 = t1.length, t3 = this.seen, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss() && t3.add$1(0, upstream)) + this.call$1(upstream); + } + this.sorted.addFirst$1(module); + }, + $signature: 75 + }; + A._EvaluateVisitor_visitAtRootRule_closure.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.AtRootQueryParser(t1, this.$this._evaluate$_logger).parse$0(); + }, + $signature: 117 + }; + A._EvaluateVisitor_visitAtRootRule_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure.prototype = { + call$1(callback) { + var t1 = this.$this, + t2 = t1._assertInModule$2(t1.__parent, "__parent"); + t1.__parent = this.newParent; + t1._environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1.__parent = t2; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure0.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._atRootExcludingStyleRule; + t1._atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure1.prototype = { + call$1(callback) { + return this.$this._withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure(this.innerScope, callback)); + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot__closure.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure2.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._inKeyframes; + t1._inKeyframes = false; + this.innerScope.call$1(callback); + t1._inKeyframes = wasInKeyframes; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure3.prototype = { + call$1($parent) { + return type$.CssAtRule._is($parent); + }, + $signature: 190 + }; + A._EvaluateVisitor__scopeForAtRoot_closure4.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._inUnknownAtRule; + t1._inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 27 + }; + A._EvaluateVisitor_visitContentRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure.prototype = { + call$1(value) { + return new A.CssValue(value.accept$1(this.$this), value.get$span(value), type$.CssValue_Value); + }, + $signature: 570 + }; + A._EvaluateVisitor_visitDeclaration_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._environment.setLocalVariable$3(B.JSArray_methods.get$first(this.node.variables), t1._withoutSlash$2(value, t2), t2); + }, + $signature: 52 + }; + A._EvaluateVisitor_visitEachRule_closure0.prototype = { + call$1(value) { + return this.$this._setMultipleVariables$3(this.node.variables, value, this.nodeWithSpan); + }, + $signature: 52 + }; + A._EvaluateVisitor_visitEachRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure(t1, _this.setVariables, _this.node)); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitEachRule__closure.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure(t1)); + }, + $signature: 572 + }; + A._EvaluateVisitor_visitEachRule___closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 84 + }; + A._EvaluateVisitor_visitExtendRule_closure.prototype = { + call$0() { + return A.SelectorList_SelectorList$parse(A.trimAscii(this.targetText.value, true), false, true, this.$this._evaluate$_logger); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitAtRule_closure.prototype = { + call$1(value) { + return this.$this._interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 257 + }; + A._EvaluateVisitor_visitAtRule_closure0.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null || t1._inKeyframes) + for (t2 = this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure(t1, this.children), false, type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure1.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitForRule_closure.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 253 + }; + A._EvaluateVisitor_visitForRule_closure0.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 253 + }; + A._EvaluateVisitor_visitForRule_closure1.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure2.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure3.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, result, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + result = t1._handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure(t1)); + if (result != null) + return result; + } + return null; + }, + $signature: 35 + }; + A._EvaluateVisitor_visitForRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 84 + }; + A._EvaluateVisitor_visitForwardRule_closure.prototype = { + call$1(module) { + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 75 + }; + A._EvaluateVisitor_visitForwardRule_closure0.prototype = { + call$1(module) { + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 75 + }; + A._EvaluateVisitor_visitIfRule_closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._handleReturn$2(this._box_0.clause.children, new A._EvaluateVisitor_visitIfRule__closure(t1)); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitIfRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 84 + }; + A._EvaluateVisitor__visitDynamicImport_closure.prototype = { + call$0() { + var t4, oldImporter, oldInDependency, loadsUserDefinedModules, children, t5, t6, t7, t8, t9, t10, environment, module, visitor, + t1 = this.$this, + t2 = this.$import, + result = t1._loadStylesheet$3$forImport(t2.urlString, t2.span, true), + stylesheet = result.stylesheet, + t3 = stylesheet.span, + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure(t1)); + throw A.wrapException(t2 == null ? t1._evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + t4 = new A.UnmodifiableListView(t2, t3); + if (t4.get$length(t4) === 0) { + t4 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + t4 = t4.get$length(t4) === 0; + } else + t4 = false; + if (t4) { + oldImporter = t1._importer; + t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"); + oldInDependency = t1._inDependency; + t1._importer = result.importer; + t1.__stylesheet = stylesheet; + t1._inDependency = result.isDependency; + t1.visitStylesheet$1(stylesheet); + t1._importer = oldImporter; + t1.__stylesheet = t2; + t1._inDependency = oldInDependency; + t1._activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure0())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure1()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._environment; + t3 = type$.String; + t4 = type$.Module_Callable; + t5 = type$.AstNode; + t6 = A._setArrayType([], type$.JSArray_Module_Callable); + t7 = t2._variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.Environment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._importedModules, null, null, t6, t7, t8, t9, t10, t2._content); + t1._withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure2(t1, result, stylesheet, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__visitDynamicImport__closure0.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 203 + }; + A._EvaluateVisitor__visitDynamicImport__closure1.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 204 + }; + A._EvaluateVisitor__visitDynamicImport__closure2.prototype = { + call$0() { + var t7, t8, t9, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"), + t3 = t1._assertInModule$2(t1.__root, "_root"), + t4 = t1._assertInModule$2(t1.__parent, "__parent"), + t5 = t1._assertInModule$2(t1.__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._outOfOrderImports, + oldConfiguration = t1._configuration, + oldInDependency = t1._inDependency, + t6 = _this.result; + t1._importer = t6.importer; + t7 = t1.__stylesheet = _this.stylesheet; + t8 = _this.loadsUserDefinedModules; + if (t8) { + t9 = A.ModifiableCssStylesheet$(t7.span); + t1.__root = t9; + t1.__parent = t1._assertInModule$2(t9, "_root"); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + } + t1._inDependency = t6.isDependency; + t6 = new A.UnmodifiableListView(t7._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t6.get$isEmpty(t6)) + t1._configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(t7); + t6 = t8 ? t1._addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + _this.children._value = t6; + t1._importer = oldImporter; + t1.__stylesheet = t2; + if (t8) { + t1.__root = t3; + t1.__parent = t4; + t1.__endOfImports = t5; + t1._outOfOrderImports = oldOutOfOrderImports; + } + t1._configuration = oldConfiguration; + t1._inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitIncludeRule_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 106 + }; + A._EvaluateVisitor_visitIncludeRule_closure0.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 31 + }; + A._EvaluateVisitor_visitIncludeRule_closure2.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._environment.closure$0(), t1._inDependency, type$.UserDefinedCallable_Environment); + }, + $signature: 259 + }; + A._EvaluateVisitor_visitIncludeRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = t1._environment, + oldContent = t2._content; + t2._content = _this.contentCallable; + new A._EvaluateVisitor_visitIncludeRule__closure(t1, _this.mixin, _this.nodeWithSpan).call$0(); + t2._content = oldContent; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitIncludeRule__closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._environment, + oldInMixin = t2._inMixin; + t2._inMixin = true; + new A._EvaluateVisitor_visitIncludeRule___closure(t1, this.mixin, this.nodeWithSpan).call$0(); + t2._inMixin = oldInMixin; + }, + $signature: 0 + }; + A._EvaluateVisitor_visitIncludeRule___closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpan, _i = 0; _i < t2; ++_i) + t3._addErrorSpan$2(t4, new A._EvaluateVisitor_visitIncludeRule____closure(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitIncludeRule____closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitMediaRule_closure.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitMediaRule_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._EvaluateVisitor__visitMediaQueries_closure.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.MediaQueryParser(t1, this.$this._evaluate$_logger).parse$0(); + }, + $signature: 116 + }; + A._EvaluateVisitor_visitStyleRule_closure.prototype = { + call$0() { + return A.KeyframeSelectorParser$(this.selectorText.value, this.$this._evaluate$_logger).parse$0(); + }, + $signature: 48 + }; + A._EvaluateVisitor_visitStyleRule_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure1.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitStyleRule_closure2.prototype = { + call$0() { + var _s11_ = "_stylesheet", + t1 = this.$this; + return A.SelectorList_SelectorList$parse(this.selectorText.value, !t1._assertInModule$2(t1.__stylesheet, _s11_).plainCss, !t1._assertInModule$2(t1.__stylesheet, _s11_).plainCss, t1._evaluate$_logger); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitStyleRule_closure3.prototype = { + call$0() { + var t1 = this._box_0.parsedSelector, + t2 = this.$this, + t3 = t2._styleRuleIgnoringAtRoot; + t3 = t3 == null ? null : t3.originalSelector; + return t1.resolveParentSelectors$2$implicitParent(t3, !t2._atRootExcludingStyleRule); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitStyleRule_closure4.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure5.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitStyleRule_closure6.prototype = { + call$1(child) { + return type$.CssComment._is(child); + }, + $signature: 136 + }; + A._EvaluateVisitor_visitSupportsRule_closure.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._withParent$2$2(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.override; + this.$this._environment.setVariable$4$global(this.node.name, t1.value, t1.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._environment.setVariable$5$global$namespace(t2.name, this.value, t1._expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure.prototype = { + call$1(module) { + var t1 = this.node; + this.$this._environment.addModule$3$namespace(module, t1, t1.namespace); + }, + $signature: 75 + }; + A._EvaluateVisitor_visitWarnRule_closure.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 41 + }; + A._EvaluateVisitor_visitWhileRule_closure.prototype = { + call$0() { + var t1, t2, t3, result; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + result = t3._handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure(t3)); + if (result != null) + return result; + } + return null; + }, + $signature: 35 + }; + A._EvaluateVisitor_visitWhileRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 84 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure.prototype = { + call$0() { + var right, result, + t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2), + t3 = t1.operator; + switch (t3) { + case B.BinaryOperator_axY: + right = t1.right.accept$1(t2); + return new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(right, false, true), false); + case B.BinaryOperator_or_or_1_or: + return left.get$isTruthy() ? left : t1.right.accept$1(t2); + case B.BinaryOperator_and_and_2_and: + return left.get$isTruthy() ? t1.right.accept$1(t2) : left; + case B.BinaryOperator_nZh: + return left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + case B.BinaryOperator_Vr9: + return !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + case B.BinaryOperator_cw1: + return left.greaterThan$1(t1.right.accept$1(t2)); + case B.BinaryOperator_Wma: + return left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + case B.BinaryOperator_apg: + return left.lessThan$1(t1.right.accept$1(t2)); + case B.BinaryOperator_oqF: + return left.lessThanOrEquals$1(t1.right.accept$1(t2)); + case B.BinaryOperator_qbf: + return left.plus$1(t1.right.accept$1(t2)); + case B.BinaryOperator_KlB: + return left.minus$1(t1.right.accept$1(t2)); + case B.BinaryOperator_6pl: + return left.times$1(t1.right.accept$1(t2)); + case B.BinaryOperator_qpm: + right = t1.right.accept$1(t2); + result = left.dividedBy$1(right); + if (t1.allowsSlash && left instanceof A.SassNumber && right instanceof A.SassNumber) + return type$.SassNumber._as(result).withSlash$2(left, right); + else { + if (left instanceof A.SassNumber && right instanceof A.SassNumber) + t2._warn$3$deprecation(string$.Using__o + A.S(new A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation().call$1(t1)) + " or calc(" + t1.toString$0(0) + string$.x29x0a_Morx20, t1.get$span(t1), true); + return result; + } + case B.BinaryOperator_PHH: + return left.modulo$1(t1.right.accept$1(t2)); + default: + throw A.wrapException(A.ArgumentError$("Unknown binary operator " + t3.toString$0(0) + ".", null)); + } + }, + $signature: 41 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation.prototype = { + call$1(expression) { + if (expression instanceof A.BinaryOperationExpression && expression.operator === B.BinaryOperator_qpm) + return "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + else if (expression instanceof A.ParenthesizedExpression) + return expression.expression.toString$0(0); + else + return expression.toString$0(0); + }, + $signature: 135 + }; + A._EvaluateVisitor_visitVariableExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 35 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.node.operator; + switch (t1) { + case B.UnaryOperator_gg4: + return _this.operand.unaryPlus$0(); + case B.UnaryOperator_TLI: + return _this.operand.unaryMinus$0(); + case B.UnaryOperator_Ix1: + return new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + case B.UnaryOperator_not_not_not: + return _this.operand.unaryNot$0(); + default: + throw A.wrapException(A.StateError$("Unknown unary operator " + t1.toString$0(0) + ".")); + } + }, + $signature: 41 + }; + A._EvaluateVisitor__visitCalculationValue_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node, + t3 = this.inMinMax; + return A.SassCalculation_operateInternal(t1._binaryOperatorToCalculationOperator$1(t2.operator), t1._visitCalculationValue$2$inMinMax(t2.left, t3), t1._visitCalculationValue$2$inMinMax(t2.right, t3), t3, !t1._inSupportsDeclaration); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitListExpression_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 261 + }; + A._EvaluateVisitor_visitFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._getFunction$2$namespace(A.stringReplaceAllUnchecked(t1.originalName, "_", "-"), t1.namespace); + }, + $signature: 106 + }; + A._EvaluateVisitor_visitFunctionExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 41 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 41 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure.prototype = { + call$0() { + var declaredArguments, t7, minLength, t8, i, argument, t9, value, t10, t11, restArgument, rest, argumentList, result, _this = this, + t1 = _this.$this, + t2 = _this.evaluated, + t3 = t2.positional, + t4 = t2.named, + t5 = _this.callable.declaration.$arguments, + t6 = _this.nodeWithSpan; + t1._verifyArguments$4(t3.length, t4, t5, t6); + declaredArguments = t5.$arguments; + t7 = declaredArguments.length; + minLength = Math.min(t3.length, t7); + for (t8 = t2.positionalNodes, i = 0; i < minLength; ++i) + t1._environment.setLocalVariable$3(declaredArguments[i].name, t3[i], t8[i]); + for (i = t3.length, t8 = t2.namedNodes; i < t7; ++i) { + argument = declaredArguments[i]; + t9 = argument.name; + value = t4.remove$1(0, t9); + if (value == null) { + t10 = argument.defaultValue; + value = t1._withoutSlash$2(t10.accept$1(t1), t1._expressionNode$1(t10)); + } + t10 = t1._environment; + t11 = t8.$index(0, t9); + if (t11 == null) { + t11 = argument.defaultValue; + t11.toString; + t11 = t1._expressionNode$1(t11); + } + t10.setLocalVariable$3(t9, value, t11); + } + restArgument = t5.restArgument; + if (restArgument != null) { + rest = t3.length > t7 ? B.JSArray_methods.sublist$1(t3, t7) : B.List_empty7; + t2 = t2.separator; + argumentList = A.SassArgumentList$(rest, t4, t2 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_rXA : t2); + t1._environment.setLocalVariable$3(restArgument, argumentList, t6); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t2 = t4.__js_helper$_length; + if (t2 === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + t3 = A._instanceType(t4)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + A.pluralize("argument", t2, null) + " named " + A.toSentence(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t4, t3), new A._EvaluateVisitor__runUserDefinedCallable____closure(), t3._eval$1("Iterable.E"), type$.Object), "or") + ".", t6.get$span(t6), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t5.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate$_stackTrace$1(t6.get$span(t6)))); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__runFunctionCallable_closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value) + return $returnValue; + } + throw A.wrapException(t4._evaluate$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 41 + }; + A._EvaluateVisitor__runBuiltInCallable_closure.prototype = { + call$0() { + return this.overload.verify$2(this.evaluated.positional.length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__evaluateArguments_closure.prototype = { + call$1(value) { + return value; + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateArguments_closure0.prototype = { + call$1(value) { + return this.$this._withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 78 + }; + A._EvaluateVisitor__evaluateArguments_closure2.prototype = { + call$1(value) { + return value; + }, + $signature: 36 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure0.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 78 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure2.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 53 + }; + A._EvaluateVisitor__addRestMap_closure.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 60 + }; + A._EvaluateVisitor__verifyArguments_closure.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitStringExpression_closure.prototype = { + call$1(value) { + var t1, result; + if (typeof value == "string") + return value; + type$.Expression._as(value); + t1 = this.$this; + result = value.accept$1(t1); + return result instanceof A.SassString ? result._string$_text : t1._evaluate$_serialize$3$quote(result, value, false); + }, + $signature: 46 + }; + A._EvaluateVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssMediaRule_closure.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitCssMediaRule_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + else + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssStyleRule_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + else + t1._withParent$2$2(A.ModifiableCssStyleRule$(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluateVisitor__performInterpolation_closure.prototype = { + call$1(value) { + var t1, result, t2, t3; + if (typeof value == "string") + return value; + type$.Expression._as(value); + t1 = this.$this; + result = value.accept$1(t1); + if (this.warnForColor && result instanceof A.SassColor && $.$get$namesByColor().containsKey$1(result)) { + t2 = A.Interpolation$(A._setArrayType([""], type$.JSArray_Object), this.interpolation.span); + t3 = $.$get$namesByColor(); + t1._warn$2(string$.You_pr + A.S(t3.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t3.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_qbf, new A.StringExpression(t2, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + return t1._evaluate$_serialize$3$quote(result, value, false); + }, + $signature: 46 + }; + A._EvaluateVisitor__serialize_closure.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 30 + }; + A._EvaluateVisitor__expressionNode_closure.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 222 + }; + A._EvaluateVisitor__withoutSlash_recommendation.prototype = { + call$1(number) { + var asSlash = number.asSlash; + if (asSlash != null) + return "math.div(" + A.S(this.call$1(asSlash.item1)) + ", " + A.S(this.call$1(asSlash.item2)) + ")"; + else + return A.serializeValue(number, true, true); + }, + $signature: 224 + }; + A._EvaluateVisitor__stackFrame_closure.prototype = { + call$1(url) { + var t1 = this.$this._evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 81 + }; + A._EvaluateVisitor__stackTrace_closure.prototype = { + call$1(tuple) { + return this.$this._stackFrame$2(tuple.item1, J.get$span$z(tuple.item2)); + }, + $signature: 229 + }; + A._ImportedCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure(); + this._visitor._addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._visitor._addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._visitor; + if (t1._assertInModule$2(t1.__parent, "__parent") !== t1._assertInModule$2(t1.__root, "_root")) + t1._addChild$1(node); + else if (t1._assertInModule$2(t1.__endOfImports, _s13_) === J.get$length$asx(t1._assertInModule$2(t1.__root, "_root").children._collection$_source)) { + t1._addChild$1(node); + t1.__endOfImports = t1._assertInModule$2(t1.__endOfImports, _s13_) + 1; + } else { + t2 = t1._outOfOrderImports; + (t2 == null ? t1._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._visitor, + mediaQueries = t1._mediaQueries; + t1._addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure(mediaQueries == null || t1._mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule._is(node)) + t1 = this.hasBeenMerged && type$.CssMediaRule._is(node); + else + t1 = true; + return t1; + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(node) { + return type$.CssStyleRule._is(node); + }, + $signature: 6 + }; + A._EvaluationContext.prototype = { + get$currentCallableSpan() { + var callableNode = this._visitor._callableNode; + if (callableNode != null) + return callableNode.get$span(callableNode); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2$deprecation(_, message, deprecation) { + var t1 = this._visitor, + t2 = t1._importSpan; + if (t2 == null) { + t2 = t1._callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + if (t2 == null) { + t2 = this._defaultWarnNodeWithSpan; + t2 = t2.get$span(t2); + } + t1._warn$3$deprecation(message, t2, deprecation); + }, + $isEvaluationContext: 1 + }; + A._ArgumentResults.prototype = {}; + A._LoadedStylesheet.prototype = {}; + A.EveryCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A.EveryCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A.EveryCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A.EveryCssVisitor_visitCssStylesheet_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 6 + }; + A._FindDependenciesVisitor.prototype = { + visitEachRule$1(node) { + }, + visitForRule$1(node) { + }, + visitIfRule$1(node) { + }, + visitWhileRule$1(node) { + }, + visitUseRule$1(node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._usesAndForwards.push(t1); + }, + visitForwardRule$1(node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._usesAndForwards.push(t1); + }, + visitImportRule$1(node) { + var t1, t2, t3, _i, $import; + for (t1 = node.imports, t2 = t1.length, t3 = this._imports, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + t3.push(A.Uri_parse($import.urlString)); + } + } + }; + A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor.prototype = {}; + A.RecursiveStatementVisitor.prototype = { + visitAtRootRule$1(node) { + this.visitChildren$1(node.children); + }, + visitAtRule$1(node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(node) { + return null; + }, + visitContentRule$1(node) { + }, + visitDebugRule$1(node) { + }, + visitDeclaration$1(node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitErrorRule$1(node) { + }, + visitExtendRule$1(node) { + }, + visitFunctionRule$1(node) { + return null; + }, + visitIncludeRule$1(node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock()); + }, + visitLoudComment$1(node) { + }, + visitMediaRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(node) { + return null; + }, + visitReturnRule$1(node) { + }, + visitSilentComment$1(node) { + }, + visitStyleRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitVariableDeclaration$1(node) { + }, + visitWarnRule$1(node) { + }, + visitChildren$1(children) { + var t1; + for (t1 = J.get$iterator$ax(children); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + } + }; + A.serialize_closure.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 54 + }; + A._SerializeVisitor.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, t7, previous, previous0, t8, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._inspect, t3 = _this._style === B.OutputStyle_1, t4 = !t3, t5 = type$.CssComment, t6 = type$.CssParentNode, t7 = _this._serialize$_buffer, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t8 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t8 = false; + if (t8) + continue; + if (previous != null) { + if (t6._is(previous) ? previous.get$isChildless() : !t5._is(previous)) + t7.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, previous)) { + if (t4) + t7.writeCharCode$1(32); + } else { + if (t4) + t7.write$1(0, "\n"); + if (previous.get$isGroupEnd()) + if (t4) + t7.write$1(0, "\n"); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t6._is(previous) ? previous.get$isChildless() : !t5._is(previous)) && t4; + else + t1 = false; + if (t1) + t7.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure(_this, node)); + if (!node.isChildless) { + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._writeIndentation$0(); + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure(this, node)); + }, + _writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._style !== B.OutputStyle_1 || B.JSString_methods._codeUnitAt$1(url, 0) !== 117) { + _this._serialize$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = B.JSString_methods._codeUnitAt$1(urlContents, 0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize$_buffer.write$1(0, urlContents); + else + _this._visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + _visitMediaQuery$1(query) { + var t2, condition, operator, t3, _this = this, + t1 = query.modifier; + if (t1 != null) { + t2 = _this._serialize$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(32); + } + t1 = query.type; + if (t1 != null) { + t2 = _this._serialize$_buffer; + t2.write$1(0, t1); + if (query.conditions.length !== 0) + t2.write$1(0, " and "); + } + t1 = query.conditions; + if (t1.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t1), "(not ")) { + t2 = _this._serialize$_buffer; + t2.write$1(0, "not "); + condition = B.JSArray_methods.get$first(t1); + t2.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t2 = _this._style === B.OutputStyle_1 ? operator + " " : " " + operator + " "; + t3 = _this._serialize$_buffer; + _this._writeBetween$3(t1, t2, t3.get$write(t3)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssStyleRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this; + _this._writeIndentation$0(); + t1 = node.name; + _this._serialize$_write$1(t1); + t2 = _this._serialize$_buffer; + t2.writeCharCode$1(58); + if (J.startsWith$1$s(t1.get$value(t1), "--") && node.parsedAsCustomProperty) { + t1 = node.value; + t2.forSpan$2(t1.get$span(t1), new A._SerializeVisitor_visitCssDeclaration_closure(_this, node)); + } else { + if (_this._style !== B.OutputStyle_1) + t2.writeCharCode$1(32); + try { + t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure0(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = node.value; + t2 = t2.get$span(t2); + A.throwWithTrace(new A.MultiSpanSassException(error.primaryLabel, A.ConstantMap_ConstantMap$from(error.secondarySpans, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = node.value; + A.throwWithTrace(new A.SassException(error0.message, t1.get$span(t1)), stackTrace0); + } else + throw exception; + } + } + }, + _writeFoldedValue$1(node) { + var t2, next, t3, + t1 = node.value, + scanner = A.StringScanner$(type$.SassString._as(t1.get$value(t1))._string$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + while (true) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _writeReindentedValue$1(node) { + var _this = this, + t1 = node.value, + value = type$.SassString._as(t1.get$value(t1))._string$_text, + minimumIndentation = _this._minimumIndentation$1(value); + if (minimumIndentation == null) { + _this._serialize$_buffer.write$1(0, value); + return; + } else if (minimumIndentation === -1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, A.trimAsciiRight(value, true)); + t1.writeCharCode$1(32); + return; + } + t1 = node.name; + t1 = t1.get$span(t1); + t1 = t1.get$start(t1); + _this._writeWithIndent$2(value, Math.min(minimumIndentation, t1.file.getColumn$1(t1.offset))); + }, + _minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + for (; scanner._string_scanner$_position !== t1;) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (; true;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1; true;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 32 || character === 9) + continue; + if (character !== 10) + break; + lineStart = scanner._string_scanner$_position; + ++newlines; + } + this._writeTimes$2(10, newlines); + this._writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (; true;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + _writeCalculationValue$1(value) { + var left, parenthesizeLeft, operatorWhitespace, t1, t2, right, parenthesizeRight, _this = this; + if (value instanceof A.Value) + value.accept$1(_this); + else if (value instanceof A.CalculationInterpolation) + _this._serialize$_buffer.write$1(0, value.value); + else if (value instanceof A.CalculationOperation) { + left = value.left; + if (!(left instanceof A.CalculationInterpolation)) + parenthesizeLeft = left instanceof A.CalculationOperation && left.operator.precedence < value.operator.precedence; + else + parenthesizeLeft = true; + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(40); + _this._writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._style !== B.OutputStyle_1 || value.operator.precedence === 1; + if (operatorWhitespace) + _this._serialize$_buffer.writeCharCode$1(32); + t1 = _this._serialize$_buffer; + t2 = value.operator; + t1.write$1(0, t2.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + right = value.right; + if (!(right instanceof A.CalculationInterpolation)) + parenthesizeRight = right instanceof A.CalculationOperation && _this._parenthesizeCalculationRhs$2(t2, right.operator); + else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + }, + _parenthesizeCalculationRhs$2(outer, right) { + if (outer === B.CalculationOperator_OvN) + return true; + if (outer === B.CalculationOperator_IyK) + return false; + return right === B.CalculationOperator_IyK || right === B.CalculationOperator_2bx; + }, + _writeRgb$1(value) { + var t3, + t1 = value._alpha, + opaque = A.fuzzyEquals(t1, 1), + t2 = this._serialize$_buffer; + t2.write$1(0, opaque ? "rgb(" : "rgba("); + t2.write$1(0, value.get$red(value)); + t3 = this._style === B.OutputStyle_1; + t2.write$1(0, t3 ? "," : ", "); + t2.write$1(0, value.get$green(value)); + t2.write$1(0, t3 ? "," : ", "); + t2.write$1(0, value.get$blue(value)); + if (!opaque) { + t2.write$1(0, t3 ? "," : ", "); + this._writeNumber$1(t1); + } + t2.writeCharCode$1(41); + }, + _canUseShortHex$1(color) { + var t1 = color.get$red(color); + if ((t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4)) { + t1 = color.get$green(color); + if ((t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4)) { + t1 = color.get$blue(color); + t1 = (t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4); + } else + t1 = false; + } else + t1 = false; + return t1; + }, + _writeHexComponent$1(color) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(A.hexCharFor(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor(color & 15)); + }, + visitList$1(value) { + var t2, t3, singleton, t4, t5, _this = this, + t1 = value._hasBrackets; + if (t1) + _this._serialize$_buffer.writeCharCode$1(91); + else if (value._list$_contents.length === 0) { + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$("() isn't a valid CSS value.", null)); + _this._serialize$_buffer.write$1(0, "()"); + return; + } + t2 = _this._inspect; + if (t2) + if (value._list$_contents.length === 1) { + t3 = value._separator; + t3 = t3 === B.ListSeparator_rXA || t3 === B.ListSeparator_zg9; + singleton = t3; + } else + singleton = false; + else + singleton = false; + if (singleton && !t1) + _this._serialize$_buffer.writeCharCode$1(40); + t3 = value._list$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._separator; + t5 = _this._separatorString$1(t4); + _this._writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure0(_this, value) : new A._SerializeVisitor_visitList_closure1(_this)); + if (singleton) { + t2 = _this._serialize$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize$_buffer.writeCharCode$1(93); + }, + _separatorString$1(separator) { + switch (separator) { + case B.ListSeparator_rXA: + return this._style === B.OutputStyle_1 ? "," : ", "; + case B.ListSeparator_zg9: + return this._style === B.OutputStyle_1 ? "/" : " / "; + case B.ListSeparator_EVt: + return " "; + default: + return ""; + } + }, + _elementNeedsParens$2(separator, value) { + var t1; + if (value instanceof A.SassList) { + if (value._list$_contents.length < 2) + return false; + if (value._hasBrackets) + return false; + switch (separator) { + case B.ListSeparator_rXA: + return value._separator === B.ListSeparator_rXA; + case B.ListSeparator_zg9: + t1 = value._separator; + return t1 === B.ListSeparator_rXA || t1 === B.ListSeparator_zg9; + default: + return value._separator !== B.ListSeparator_undecided_null_undecided; + } + } + return false; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(40); + t2 = map._map$_contents; + _this._writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure(_this)); + t1.writeCharCode$1(41); + }, + _writeMapElement$1(value) { + var needsParens = value instanceof A.SassList && value._separator === B.ListSeparator_rXA && !value._hasBrackets; + if (needsParens) + this._serialize$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var _this = this, + asSlash = value.asSlash; + if (asSlash != null) { + _this.visitNumber$1(asSlash.item1); + _this._serialize$_buffer.writeCharCode$1(47); + _this.visitNumber$1(asSlash.item2); + return; + } + _this._writeNumber$1(value._number$_value); + if (!_this._inspect) { + if (value.get$numeratorUnits(value).length > 1 || value.get$denominatorUnits(value).length !== 0) + throw A.wrapException(A.SassScriptException$(value.toString$0(0) + " isn't a valid CSS value.", null)); + if (value.get$numeratorUnits(value).length !== 0) + _this._serialize$_buffer.write$1(0, B.JSArray_methods.get$first(value.get$numeratorUnits(value))); + } else + _this._serialize$_buffer.write$1(0, value.get$unitString()); + }, + _writeNumber$1(number) { + var text, _this = this, + integer = A.fuzzyAsInt(number); + if (integer != null) { + _this._serialize$_buffer.write$1(0, _this._removeExponent$1(B.JSInt_methods.toString$0(integer))); + return; + } + text = _this._removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (text.length < 12) { + if (_this._style === B.OutputStyle_1 && B.JSString_methods._codeUnitAt$1(text, 0) === 48) + text = B.JSString_methods.substring$1(text, 1); + _this._serialize$_buffer.write$1(0, text); + return; + } + _this._writeRounded$1(text); + }, + _removeExponent$1(text) { + var buffer, t3, additionalZeroes, + t1 = B.JSString_methods._codeUnitAt$1(text, 0), + negative = t1 === 45, + exponent = A._Cell$(), + t2 = text.length, + i = 0; + while (true) { + if (!(i < t2)) { + buffer = null; + break; + } + c$0: { + if (B.JSString_methods._codeUnitAt$1(text, i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t1 = buffer._contents = "" + A.Primitives_stringFromCharCode(t1); + if (negative) { + t1 += A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(text, 1)); + buffer._contents = t1; + if (i > 3) + buffer._contents = t1 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t1 + B.JSString_methods.substring$2(text, 2, i); + exponent._value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t2), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 += A.Primitives_stringFromCharCode(48); + buffer._contents = t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; + t2 = exponent.__late_helper$_name; + i = -1; + while (true) { + t3 = exponent._value; + if (t3 === exponent) + A.throwExpression(A.LateError$localNI(t2)); + if (!(i > t3)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _writeRounded$1(text) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex, t2, _this = this; + if (B.JSString_methods.endsWith$1(text, ".0")) { + _this._serialize$_buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = B.JSString_methods._codeUnitAt$1(text, 0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + _this._serialize$_buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = B.JSString_methods._codeUnitAt$1(text, textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + _this._serialize$_buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = B.JSString_methods._codeUnitAt$1(text, textIndex) - 48; + } + if (B.JSString_methods._codeUnitAt$1(text, textIndex) - 48 >= 5) + for (; true; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + while (true) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + _this._serialize$_buffer.writeCharCode$1(48); + return; + } + if (negative) + _this._serialize$_buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = _this._style === B.OutputStyle_1 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (t2 = _this._serialize$_buffer; writtenIndex < digitsIndex; ++writtenIndex) + t2.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + t2.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + t2.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, newIndex, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(string, i); + switch (char) { + case 39: + if (forceDoubleQuote) + buffer.writeCharCode$1(39); + else { + if (includesDoubleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } else + buffer.writeCharCode$1(39); + includesSingleQuote = true; + } + break; + case 34: + if (forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + } else { + if (includesSingleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } else + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + } + break; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + _this._writeEscape$4(buffer, char, string, i); + break; + case 92: + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + break; + default: + newIndex = _this._tryPrivateUseCharacter$4(buffer, char, string, i); + if (newIndex != null) { + i = newIndex; + break; + } + buffer.writeCharCode$1(char); + break; + } + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _visitQuotedString$1(string) { + return this._visitQuotedString$2$forceDoubleQuote(string, false); + }, + _visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, char, newIndex; + for (t1 = string.length, t2 = this._serialize$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(string, i); + switch (char) { + case 10: + t2.writeCharCode$1(32); + afterNewline = true; + break; + case 32: + if (!afterNewline) + t2.writeCharCode$1(32); + break; + default: + newIndex = this._tryPrivateUseCharacter$4(t2, char, string, i); + if (newIndex != null) { + i = newIndex; + afterNewline = false; + break; + } + t2.writeCharCode$1(char); + afterNewline = false; + break; + } + } + }, + _tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._style === B.OutputStyle_1) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (B.JSString_methods._codeUnitAt$1(string, t1) & 1023), string, t1); + return t1; + } + return null; + }, + _writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = B.JSString_methods._codeUnitAt$1(string, t1); + if (A.isHex(next) || next === 32 || next === 9) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(attribute) { + var value, t2, + t1 = this._serialize$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + value = attribute.value; + if (value != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier(value) && !B.JSString_methods.startsWith$1(value, "--")) { + t1.write$1(0, value); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._visitQuotedString$1(value); + t2 = attribute.modifier; + if (t2 != null) + if (this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + } + if (t2 != null) + t1.write$1(0, t2); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(klass) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._writeCombinators$1(t1); + if (t1.length !== 0 && complex.components.length !== 0) + if (_this._style !== B.OutputStyle_1) + _this._serialize$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize$_buffer, t5 = _this._style === B.OutputStyle_1, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _writeCombinators$1(combinators) { + var t1 = this._style === B.OutputStyle_1 ? "" : " ", + t2 = this._serialize$_buffer; + return this._writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(id) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, first, t4, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._style !== B.OutputStyle_1, t3 = _this._serialize$_buffer, first = true; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t4.lineBreak) { + if (t2) + t3.write$1(0, "\n"); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t4); + } + }, + visitParentSelector$1($parent) { + var t2, + t1 = this._serialize$_buffer; + t1.writeCharCode$1(38); + t2 = $parent.suffix; + if (t2 != null) + t1.write$1(0, t2); + }, + visitPlaceholderSelector$1(placeholder) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(pseudo) { + var t3, t4, t5, + innerSelector = pseudo.selector, + t1 = innerSelector == null, + t2 = !t1; + if (t2 && pseudo.name === "not" && innerSelector.accept$1(B._IsInvisibleVisitor_true)) + return; + t3 = this._serialize$_buffer; + t3.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t3.writeCharCode$1(58); + t3.write$1(0, pseudo.name); + t4 = pseudo.argument; + t5 = t4 == null; + if (t5 && t1) + return; + t3.writeCharCode$1(40); + if (!t5) { + t3.write$1(0, t4); + if (t2) + t3.writeCharCode$1(32); + } + if (t2) + this.visitSelectorList$1(innerSelector); + t3.writeCharCode$1(41); + }, + visitTypeSelector$1(type) { + this._serialize$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize$_buffer.writeCharCode$1(42); + }, + _serialize$_write$1(value) { + return this._serialize$_buffer.forSpan$2(value.get$span(value), new A._SerializeVisitor__write_closure(this, value)); + }, + _serialize$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, t8, prePrevious, previous, t9, previous0, t10, savedIndentation, _this = this, + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = _this._style === B.OutputStyle_1, t4 = !t3, t5 = !_this._inspect, t6 = A._instanceType(t2)._precomputed1, t7 = type$.CssComment, t8 = type$.CssParentNode, prePrevious = null, previous = null; t2.moveNext$0();) { + t9 = t2.__internal$_current; + previous0 = t9 == null ? t6._as(t9) : t9; + if (t5) + t9 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t9 = false; + if (t9) + continue; + t9 = previous == null; + if (!t9) + t10 = t8._is(previous) ? previous.get$isChildless() : !t7._is(previous); + else + t10 = false; + if (t10) + t1.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, t9 ? $parent : previous)) { + if (t4) + t1.writeCharCode$1(32); + savedIndentation = _this._indentation; + _this._indentation = 0; + new A._SerializeVisitor__visitChildren_closure(_this, previous0).call$0(); + _this._indentation = savedIndentation; + } else { + if (t4) + t1.write$1(0, "\n"); + ++_this._indentation; + new A._SerializeVisitor__visitChildren_closure0(_this, previous0).call$0(); + --_this._indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((t8._is(previous) ? previous.get$isChildless() : !t7._is(previous)) && t4) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._isTrailingComment$2(previous, $parent)) { + if (t4) + t1.writeCharCode$1(32); + } else { + _this._writeLineFeed$0(); + _this._writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._style === B.OutputStyle_1) + return false; + if (!type$.CssComment._is(node)) + return false; + t1 = previous.get$span(previous); + t2 = node.span; + if (!(J.$eq$(t1.get$file(t1).url, t2.get$file(t2).url) && t1.get$start(t1).offset <= t2.get$start(t2).offset && t1.get$end(t1).offset >= t2.get$end(t2).offset)) { + t1 = t2.get$start(t2); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t1 = t2.get$start(t2); + t3 = previous.get$span(previous); + searchFrom = t1.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t1 = previous.get$span(previous); + t1 = t1.get$file(t1); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t1.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t2 = t2.get$start(t2); + t2 = t2.file.getLine$1(t2.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t2 === t4.file.getLine$1(t4.offset); + }, + _writeLineFeed$0() { + if (this._style !== B.OutputStyle_1) + this._serialize$_buffer.write$1(0, "\n"); + }, + _writeIndentation$0() { + var _this = this; + if (_this._style === B.OutputStyle_1) + return; + _this._writeTimes$2(_this._indentCharacter, _this._indentation * _this._indentWidth); + }, + _writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _writeBetween$3(iterable, text, callback) { + return this._writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure.prototype = { + call$0() { + var t2, t3, minimumIndentation, + t1 = this.$this; + if (t1._style === B.OutputStyle_1 && B.JSString_methods._codeUnitAt$1(this.node.text, 2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + minimumIndentation = t1._minimumIndentation$1(t3); + if (minimumIndentation == null) { + t1._writeIndentation$0(); + t1._serialize$_buffer.write$1(0, t3); + return; + } + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(minimumIndentation, t2.file.getColumn$1(t2.offset)); + t1._writeIndentation$0(); + t1._writeWithIndent$2(t3, minimumIndentation); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t3, value, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize$_write$1(t3.name); + value = t3.value; + if (value != null) { + t2.writeCharCode$1(32); + t1._serialize$_write$1(value); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._style === B.OutputStyle_1; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); + } else + t5 = true; + else + t5 = true; + else + t5 = true; + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._writeBetween$3(t3, t2, t1.get$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure.prototype = { + call$0() { + var t3, t4, t5, modifiers, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@import"); + t3 = t1._style !== B.OutputStyle_1; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t5 = t4.url; + t2.forSpan$2(t5.get$span(t5), new A._SerializeVisitor_visitCssImport__closure(t1, t4)); + modifiers = t4.modifiers; + if (modifiers != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, modifiers); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure.prototype = { + call$0() { + var t1 = this.node.url; + return this.$this._writeImportUrl$1(t1.get$value(t1)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._style === B.OutputStyle_1 ? "," : ", ", + t3 = t1._serialize$_buffer; + return t1._writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node.selector.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._style === B.OutputStyle_1 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) + t2.writeCharCode$1(32); + t1._serialize$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._style === B.OutputStyle_1) + t1._writeFoldedValue$1(t2); + else + t1._writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure0.prototype = { + call$0() { + var t1 = this.node.value; + return t1.get$value(t1).accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 62 + }; + A._SerializeVisitor_visitList_closure0.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._elementNeedsParens$2(this.value._separator, element); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(41); + }, + $signature: 52 + }; + A._SerializeVisitor_visitList_closure1.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 52 + }; + A._SerializeVisitor_visitMap_closure.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._writeMapElement$1(entry.key); + t1._serialize$_buffer.write$1(0, ": "); + t1._writeMapElement$1(entry.value); + }, + $signature: 265 + }; + A._SerializeVisitor_visitSelectorList_closure.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true); + }, + $signature: 16 + }; + A._SerializeVisitor__write_closure.prototype = { + call$0() { + var t1 = this.value; + return this.$this._serialize$_buffer.write$1(0, t1.get$value(t1)); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure0.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle.prototype = { + toString$0(_) { + return "OutputStyle." + this._name; + } + }; + A.LineFeed.prototype = { + toString$0(_) { + return "lf"; + } + }; + A.SerializeResult.prototype = {}; + A.StatementSearchVisitor.prototype = { + visitAtRootRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(node) { + return this.visitChildren$1(node.children); + }, + visitDebugRule$1(node) { + return null; + }, + visitDeclaration$1(node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitEachRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(node) { + return null; + }, + visitExtendRule$1(node) { + return null; + }, + visitForRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(node) { + return null; + }, + visitFunctionRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(node) { + var t1 = A._IterableExtension__search(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure(this)); + return t1 == null ? A.NullableExtension_andThen(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure0(this)) : t1; + }, + visitImportRule$1(node) { + return null; + }, + visitIncludeRule$1(node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock()); + }, + visitLoudComment$1(node) { + return null; + }, + visitMediaRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(node) { + return null; + }, + visitSilentComment$1(node) { + return null; + }, + visitStyleRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(node) { + return null; + }, + visitVariableDeclaration$1(node) { + return null; + }, + visitWarnRule$1(node) { + return null; + }, + visitWhileRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A._IterableExtension__search(children, new A.StatementSearchVisitor_visitChildren_closure(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure.prototype = { + call$1(clause) { + return A._IterableExtension__search(clause.children, new A.StatementSearchVisitor_visitIfRule__closure0(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(IfClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure0.prototype = { + call$1(lastClause) { + return A._IterableExtension__search(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(ElseClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.Entry.prototype = { + compareTo$1(_, other) { + var t1, t2, + res = this.target.compareTo$1(0, other.target); + if (res !== 0) + return res; + t1 = this.source; + t2 = other.source; + res = B.JSString_methods.compareTo$1(J.toString$0$(t1.file.url), J.toString$0$(t2.file.url)); + if (res !== 0) + return res; + return t1.compareTo$1(0, t2); + }, + $isComparable: 1 + }; + A.Mapping.prototype = {}; + A.SingleMapping.prototype = { + toJson$1$includeSourceContents(includeSourceContents) { + var t1, t2, line, column, srcLine, srcColumn, srcUrlId, srcNameId, first, _i, entry, nextLine, i, t3, t4, column0, t5, newUrlId, srcLine0, srcColumn0, srcNameId0, result, _this = this, + buff = new A.StringBuffer(""); + for (t1 = _this.lines, t2 = t1.length, line = 0, column = 0, srcLine = 0, srcColumn = 0, srcUrlId = 0, srcNameId = 0, first = true, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + entry = t1[_i]; + nextLine = entry.line; + if (nextLine > line) { + for (i = line; i < nextLine; ++i) + buff._contents += ";"; + line = nextLine; + column = 0; + first = true; + } + for (t3 = J.get$iterator$ax(entry.entries); t3.moveNext$0(); column = column0, first = false) { + t4 = t3.get$current(t3); + if (!first) + buff._contents += ","; + column0 = t4.column; + t5 = A.encodeVlq(column0 - column); + t5 = A.StringBuffer__writeAll(buff._contents, t5, ""); + buff._contents = t5; + newUrlId = t4.sourceUrlId; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(newUrlId - srcUrlId), ""); + buff._contents = t5; + srcLine0 = t4.sourceLine; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcLine0 - srcLine), ""); + buff._contents = t5; + srcColumn0 = t4.sourceColumn; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcColumn0 - srcColumn), ""); + buff._contents = t5; + srcNameId0 = t4.sourceNameId; + if (srcNameId0 == null) { + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + continue; + } + buff._contents = A.StringBuffer__writeAll(t5, A.encodeVlq(srcNameId0 - srcNameId), ""); + srcNameId = srcNameId0; + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + } + } + t1 = _this.sourceRoot; + if (t1 == null) + t1 = ""; + t2 = buff._contents; + result = A.LinkedHashMap_LinkedHashMap$_literal(["version", 3, "sourceRoot", t1, "sources", _this.urls, "names", _this.names, "mappings", t2.charCodeAt(0) == 0 ? t2 : t2], type$.String, type$.Object); + t1 = _this.targetUrl; + if (t1 != null) + result.$indexSet(0, "file", t1); + if (includeSourceContents) { + t1 = _this.files; + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String?>"); + result.$indexSet(0, "sourcesContent", A.List_List$of(new A.MappedListIterable(t1, new A.SingleMapping_toJson_closure(), t2), true, t2._eval$1("ListIterable.E"))); + } + _this.extensions.forEach$1(0, new A.SingleMapping_toJson_closure0(result)); + return result; + }, + toJson$0() { + return this.toJson$1$includeSourceContents(false); + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeType(_this).toString$0(0) + " : [" + "targetUrl: " + A.S(_this.targetUrl) + ", sourceRoot: " + A.S(_this.sourceRoot) + ", urls: " + A.S(_this.urls) + ", names: " + A.S(_this.names) + ", lines: " + A.S(_this.lines) + "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.SingleMapping_SingleMapping$fromEntries_closure.prototype = { + call$0() { + return this.urls.__js_helper$_length; + }, + $signature: 12 + }; + A.SingleMapping_SingleMapping$fromEntries_closure0.prototype = { + call$0() { + return this.sourceEntry.source.file; + }, + $signature: 266 + }; + A.SingleMapping_SingleMapping$fromEntries_closure1.prototype = { + call$1(i) { + return this.files.$index(0, i); + }, + $signature: 267 + }; + A.SingleMapping_toJson_closure.prototype = { + call$1(file) { + return file == null ? null : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(file._decodedChars, 0, null), 0, null); + }, + $signature: 268 + }; + A.SingleMapping_toJson_closure0.prototype = { + call$2($name, value) { + this.result.$indexSet(0, $name, value); + return value; + }, + $signature: 225 + }; + A.TargetLineEntry.prototype = { + toString$0(_) { + return A.getRuntimeType(this).toString$0(0) + ": " + this.line + " " + A.S(this.entries); + } + }; + A.TargetEntry.prototype = { + toString$0(_) { + var _this = this; + return A.getRuntimeType(_this).toString$0(0) + ": (" + _this.column + ", " + _this.sourceUrlId + ", " + _this.sourceLine + ", " + _this.sourceColumn + ", " + A.S(_this.sourceNameId) + ")"; + } + }; + A.SourceFile.prototype = { + get$length(_) { + return this._decodedChars.length; + }, + get$lines() { + return this._lineStarts.length; + }, + SourceFile$decoded$2$url(decodedChars, url) { + var t1, t2, t3, i, c, j; + for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) { + c = t1[i]; + if (c === 13) { + j = i + 1; + if (j >= t2 || t1[j] !== 10) + c = 10; + } + if (c === 10) + t3.push(i + 1); + } + }, + span$2(_, start, end) { + return A._FileSpan$(this, start, end == null ? this._decodedChars.length : end); + }, + span$1($receiver, start) { + return this.span$2($receiver, start, null); + }, + getLine$1(offset) { + var t1, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + string$.x20must_ + _this.get$length(_this) + ".")); + t1 = _this._lineStarts; + if (offset < B.JSArray_methods.get$first(t1)) + return -1; + if (offset >= B.JSArray_methods.get$last(t1)) + return t1.length - 1; + if (_this._isNearCachedLine$1(offset)) { + t1 = _this._cachedLine; + t1.toString; + return t1; + } + return _this._cachedLine = _this._binarySearch$1(offset) - 1; + }, + _isNearCachedLine$1(offset) { + var t2, t3, + t1 = this._cachedLine; + if (t1 == null) + return false; + t2 = this._lineStarts; + if (offset < t2[t1]) + return false; + t3 = t2.length; + if (t1 >= t3 - 1 || offset < t2[t1 + 1]) + return true; + if (t1 >= t3 - 2 || offset < t2[t1 + 2]) { + this._cachedLine = t1 + 1; + return true; + } + return false; + }, + _binarySearch$1(offset) { + var min, half, + t1 = this._lineStarts, + max = t1.length - 1; + for (min = 0; min < max;) { + half = min + B.JSInt_methods._tdivFast$1(max - min, 2); + if (t1[half] > offset) + max = half; + else + min = half + 1; + } + return max; + }, + getColumn$1(offset) { + var line, lineStart, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + " must be not be greater than the number of characters in the file, " + _this.get$length(_this) + ".")); + line = _this.getLine$1(offset); + lineStart = _this._lineStarts[line]; + if (lineStart > offset) + throw A.wrapException(A.RangeError$("Line " + line + " comes after offset " + offset + ".")); + return offset - lineStart; + }, + getOffset$1(line) { + var t1, t2, result, t3; + if (line < 0) + throw A.wrapException(A.RangeError$("Line may not be negative, was " + line + ".")); + else { + t1 = this._lineStarts; + t2 = t1.length; + if (line >= t2) + throw A.wrapException(A.RangeError$("Line " + line + " must be less than the number of lines in the file, " + this.get$lines() + ".")); + } + result = t1[line]; + if (result <= this._decodedChars.length) { + t3 = line + 1; + t1 = t3 < t2 && result >= t1[t3]; + } else + t1 = true; + if (t1) + throw A.wrapException(A.RangeError$("Line " + line + " doesn't have 0 columns.")); + return result; + } + }; + A.FileLocation.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$line() { + return this.file.getLine$1(this.offset); + }, + get$column() { + return this.file.getColumn$1(this.offset); + }, + FileLocation$_$2(file, offset) { + var t2, + t1 = this.offset; + if (t1 < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + t1 + ".")); + else { + t2 = this.file; + if (t1 > t2._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + t1 + string$.x20must_ + t2.get$length(t2) + ".")); + } + }, + pointSpan$0() { + var t1 = this.offset; + return A._FileSpan$(this.file, t1, t1); + }, + get$offset() { + return this.offset; + } + }; + A._FileSpan.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$length(_) { + return this._end - this._file$_start; + }, + get$start(_) { + return A.FileLocation$_(this.file, this._file$_start); + }, + get$end(_) { + return A.FileLocation$_(this.file, this._end); + }, + get$text() { + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.file._decodedChars, this._file$_start, this._end), 0, null); + }, + get$context(_) { + var _this = this, + t1 = _this.file, + endOffset = _this._end, + endLine = t1.getLine$1(endOffset); + if (t1.getColumn$1(endOffset) === 0 && endLine !== 0) { + if (endOffset - _this._file$_start === 0) + return endLine === t1._lineStarts.length - 1 ? "" : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(endLine), t1.getOffset$1(endLine + 1)), 0, null); + } else + endOffset = endLine === t1._lineStarts.length - 1 ? t1._decodedChars.length : t1.getOffset$1(endLine + 1); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(t1.getLine$1(_this._file$_start)), endOffset), 0, null); + }, + _FileSpan$3(file, _start, _end) { + var t3, + t1 = this._end, + t2 = this._file$_start; + if (t1 < t2) + throw A.wrapException(A.ArgumentError$("End " + t1 + " must come after start " + t2 + ".", null)); + else { + t3 = this.file; + if (t1 > t3._decodedChars.length) + throw A.wrapException(A.RangeError$("End " + t1 + string$.x20must_ + t3.get$length(t3) + ".")); + else if (t2 < 0) + throw A.wrapException(A.RangeError$("Start may not be negative, was " + t2 + ".")); + } + }, + compareTo$1(_, other) { + var result; + if (!(other instanceof A._FileSpan)) + return this.super$SourceSpanMixin$compareTo(0, other); + result = B.JSInt_methods.compareTo$1(this._file$_start, other._file$_start); + return result === 0 ? B.JSInt_methods.compareTo$1(this._end, other._end) : result; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!type$.FileSpan._is(other)) + return _this.super$SourceSpanMixin$$eq(0, other); + if (!(other instanceof A._FileSpan)) + return _this.super$SourceSpanMixin$$eq(0, other) && J.$eq$(_this.file.url, other.get$sourceUrl(other)); + return _this._file$_start === other._file$_start && _this._end === other._end && J.$eq$(_this.file.url, other.file.url); + }, + get$hashCode(_) { + return A.Object_hash(this._file$_start, this._end, this.file.url); + }, + expand$1(_, other) { + var t2, t3, _this = this, + t1 = _this.file; + if (!J.$eq$(t1.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(_this)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + t2 = _this._file$_start; + t3 = _this._end; + if (other instanceof A._FileSpan) + return A._FileSpan$(t1, Math.min(t2, other._file$_start), Math.max(t3, other._end)); + else + return A._FileSpan$(t1, Math.min(t2, other.get$start(other).offset), Math.max(t3, other.get$end(other).offset)); + }, + $isFileSpan: 1, + $isSourceSpanWithContext: 1, + get$file(receiver) { + return this.file; + } + }; + A.Highlighter.prototype = { + highlight$0() { + var t2, highlightsByColumn, t3, t4, i, line, lastLine, t5, t6, t7, t8, t9, t10, t11, index, primaryIdx, primary, _i, highlight, _this = this, _null = null, + t1 = _this._lines; + _this._writeFileStart$1(B.JSArray_methods.get$first(t1).url); + t2 = _this._maxMultilineSpans; + highlightsByColumn = A.List_List$filled(t2, _null, false, type$.nullable__Highlight); + for (t3 = _this._highlighter$_buffer, t2 = t2 !== 0, t4 = _this._primaryColor, i = 0; i < t1.length; ++i) { + line = t1[i]; + if (i > 0) { + lastLine = t1[i - 1]; + t5 = lastLine.url; + t6 = line.url; + if (!J.$eq$(t5, t6)) { + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t3._contents += "\n"; + _this._writeFileStart$1(t6); + } else if (lastLine.number + 1 !== line.number) { + _this._writeSidebar$1$text("..."); + t3._contents += "\n"; + } + } + for (t5 = line.highlights, t6 = new A.ReversedListIterable(t5, A._arrayInstanceType(t5)._eval$1("ReversedListIterable<1>")), t6 = new A.ListIterator(t6, t6.get$length(t6)), t7 = A._instanceType(t6)._precomputed1, t8 = line.number, t9 = line.text; t6.moveNext$0();) { + t10 = t6.__internal$_current; + if (t10 == null) + t10 = t7._as(t10); + t11 = t10.span; + if (t11.get$start(t11).get$line() !== t11.get$end(t11).get$line() && t11.get$start(t11).get$line() === t8 && _this._isOnlyWhitespace$1(B.JSString_methods.substring$2(t9, 0, t11.get$start(t11).get$column()))) { + index = B.JSArray_methods.indexOf$1(highlightsByColumn, _null); + if (index < 0) + A.throwExpression(A.ArgumentError$(A.S(highlightsByColumn) + " contains no null elements.", _null)); + highlightsByColumn[index] = t10; + } + } + _this._writeSidebar$1$line(t8); + t3._contents += " "; + _this._writeMultilineHighlights$2(line, highlightsByColumn); + if (t2) + t3._contents += " "; + primaryIdx = B.JSArray_methods.indexWhere$1(t5, new A.Highlighter_highlight_closure()); + primary = primaryIdx === -1 ? _null : t5[primaryIdx]; + t6 = primary != null; + if (t6) { + t7 = primary.span; + t10 = t7.get$start(t7).get$line() === t8 ? t7.get$start(t7).get$column() : 0; + _this._writeHighlightedText$4$color(t9, t10, t7.get$end(t7).get$line() === t8 ? t7.get$end(t7).get$column() : t9.length, t4); + } else + _this._writeText$1(t9); + t3._contents += "\n"; + if (t6) + _this._writeIndicator$3(line, primary, highlightsByColumn); + for (t6 = t5.length, _i = 0; _i < t5.length; t5.length === t6 || (0, A.throwConcurrentModificationError)(t5), ++_i) { + highlight = t5[_i]; + if (highlight.isPrimary) + continue; + _this._writeIndicator$3(line, highlight, highlightsByColumn); + } + } + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t1 = t3._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeFileStart$1(url) { + var _this = this, + t1 = !_this._multipleFiles || !type$.Uri._is(url), + t2 = $._glyphs; + if (t1) + _this._writeSidebar$1$end(t2.get$downEnd()); + else { + _this._writeSidebar$1$end(t2.get$topLeftCorner()); + _this._colorize$2$color(new A.Highlighter__writeFileStart_closure(_this), "\x1b[34m"); + _this._highlighter$_buffer._contents += " " + $.$get$context().prettyUri$1(url); + } + _this._highlighter$_buffer._contents += "\n"; + }, + _writeMultilineHighlights$3$current(line, highlightsByColumn, current) { + var t1, currentColor, t2, t3, t4, t5, foundCurrent, _i, highlight, t6, startLine, t7, endLine, _this = this, _box_0 = {}; + _box_0.openedOnThisLine = false; + _box_0.openedOnThisLineColor = null; + t1 = current == null; + if (t1) + currentColor = null; + else + currentColor = current.isPrimary ? _this._primaryColor : _this._secondaryColor; + for (t2 = highlightsByColumn.length, t3 = _this._secondaryColor, t1 = !t1, t4 = _this._primaryColor, t5 = _this._highlighter$_buffer, foundCurrent = false, _i = 0; _i < t2; ++_i) { + highlight = highlightsByColumn[_i]; + t6 = highlight == null; + if (t6) + startLine = null; + else { + t7 = highlight.span; + startLine = t7.get$start(t7).get$line(); + } + if (t6) + endLine = null; + else { + t7 = highlight.span; + endLine = t7.get$end(t7).get$line(); + } + if (t1 && highlight === current) { + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure(_this, startLine, line), currentColor); + foundCurrent = true; + } else if (foundCurrent) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure0(_this, highlight), currentColor); + else if (t6) + if (_box_0.openedOnThisLine) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure1(_this), _box_0.openedOnThisLineColor); + else + t5._contents += " "; + else { + t6 = highlight.isPrimary ? t4 : t3; + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure2(_box_0, _this, current, startLine, line, highlight, endLine), t6); + } + } + }, + _writeMultilineHighlights$2(line, highlightsByColumn) { + return this._writeMultilineHighlights$3$current(line, highlightsByColumn, null); + }, + _writeHighlightedText$4$color(text, startColumn, endColumn, color) { + var _this = this; + _this._writeText$1(B.JSString_methods.substring$2(text, 0, startColumn)); + _this._colorize$2$color(new A.Highlighter__writeHighlightedText_closure(_this, text, startColumn, endColumn), color); + _this._writeText$1(B.JSString_methods.substring$2(text, endColumn, text.length)); + }, + _writeIndicator$3(line, highlight, highlightsByColumn) { + var t2, coversWholeLine, _this = this, + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor, + t1 = highlight.span; + if (t1.get$start(t1).get$line() === t1.get$end(t1).get$line()) { + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + if (highlightsByColumn.length !== 0) + t1._contents += " "; + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure(_this, line, highlight), color)); + } else { + t2 = line.number; + if (t1.get$start(t1).get$line() === t2) { + if (B.JSArray_methods.contains$1(highlightsByColumn, highlight)) + return; + A.replaceFirstNull(highlightsByColumn, highlight); + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._colorize$2$color(new A.Highlighter__writeIndicator_closure0(_this, line, highlight), color); + t1._contents += "\n"; + } else if (t1.get$end(t1).get$line() === t2) { + coversWholeLine = t1.get$end(t1).get$column() === line.text.length; + if (coversWholeLine && highlight.label == null) { + A.replaceWithNull(highlightsByColumn, highlight); + return; + } + _this._writeSidebar$0(); + _this._highlighter$_buffer._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure1(_this, coversWholeLine, line, highlight), color)); + A.replaceWithNull(highlightsByColumn, highlight); + } + } + }, + _writeArrow$3$beginning(line, column, beginning) { + var t2, + t1 = beginning ? 0 : 1, + tabs = this._countTabs$1(B.JSString_methods.substring$2(line.text, 0, column + t1)); + t1 = this._highlighter$_buffer; + t2 = t1._contents += B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 1 + column + tabs * 3); + t1._contents = t2 + "^"; + }, + _writeArrow$2(line, column) { + return this._writeArrow$3$beginning(line, column, true); + }, + _writeLabel$3(highlight, highlightsByColumn, underlineLength) { + var lines, color, t1, t2, t3, t4, t5, t6, _i, columnHighlight, _this = this, + label = highlight.label; + if (label == null) { + _this._highlighter$_buffer._contents += "\n"; + return; + } + lines = A._setArrayType(label.split("\n"), type$.JSArray_String); + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor; + _this._colorize$2$color(new A.Highlighter__writeLabel_closure(_this, lines), color); + t1 = _this._highlighter$_buffer; + t1._contents += "\n"; + for (t2 = A.SubListIterable$(lines, 1, null, type$.String), t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = highlightsByColumn.length, t4 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t5 = t2.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + _this._writeSidebar$0(); + t6 = t1._contents += " "; + for (_i = 0; _i < t3; ++_i) { + columnHighlight = highlightsByColumn[_i]; + if (columnHighlight == null || columnHighlight === highlight) { + t6 += " "; + t1._contents = t6; + } else + t6 = t1._contents += $._glyphs.get$verticalLine(); + } + t1._contents += B.JSString_methods.$mul(" ", underlineLength); + _this._colorize$2$color(new A.Highlighter__writeLabel_closure0(_this, t5), color); + t1._contents += "\n"; + } + }, + _writeText$1(text) { + var t1, t2, t3, t4; + for (t1 = new A.CodeUnits(text), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this._highlighter$_buffer, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + if (t4 == null) + t4 = t3._as(t4); + if (t4 === 9) + t2._contents += B.JSString_methods.$mul(" ", 4); + else + t2._contents += A.Primitives_stringFromCharCode(t4); + } + }, + _writeSidebar$3$end$line$text(end, line, text) { + var t1 = {}; + t1.text = text; + if (line != null) + t1.text = B.JSInt_methods.toString$0(line + 1); + this._colorize$2$color(new A.Highlighter__writeSidebar_closure(t1, this, end), "\x1b[34m"); + }, + _writeSidebar$1$end(end) { + return this._writeSidebar$3$end$line$text(end, null, null); + }, + _writeSidebar$1$text(text) { + return this._writeSidebar$3$end$line$text(null, null, text); + }, + _writeSidebar$1$line(line) { + return this._writeSidebar$3$end$line$text(null, line, null); + }, + _writeSidebar$0() { + return this._writeSidebar$3$end$line$text(null, null, null); + }, + _countTabs$1(text) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(text), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === 9) + ++count; + } + return count; + }, + _isOnlyWhitespace$1(text) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 !== 32 && t3 !== 9) + return false; + } + return true; + }, + _colorize$1$2$color(callback, color) { + var result, + t1 = this._primaryColor != null; + if (t1 && color != null) + this._highlighter$_buffer._contents += color; + result = callback.call$0(); + if (t1 && color != null) + this._highlighter$_buffer._contents += "\x1b[0m"; + return result; + }, + _colorize$2$color(callback, color) { + return this._colorize$1$2$color(callback, color, type$.dynamic); + } + }; + A.Highlighter_closure.prototype = { + call$0() { + var t1 = this.color, + t2 = J.getInterceptor$(t1); + if (t2.$eq(t1, true)) + return "\x1b[31m"; + if (t2.$eq(t1, false)) + return null; + return A._asStringQ(t1); + }, + $signature: 42 + }; + A.Highlighter$__closure.prototype = { + call$1(line) { + var t1 = line.highlights; + t1 = new A.WhereIterable(t1, new A.Highlighter$___closure(), A._arrayInstanceType(t1)._eval$1("WhereIterable<1>")); + return t1.get$length(t1); + }, + $signature: 269 + }; + A.Highlighter$___closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$start(t1).get$line() !== t1.get$end(t1).get$line(); + }, + $signature: 105 + }; + A.Highlighter$__closure0.prototype = { + call$1(line) { + return line.url; + }, + $signature: 271 + }; + A.Highlighter__collateLines_closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + t1 = t1.get$sourceUrl(t1); + return t1 == null ? new A.Object() : t1; + }, + $signature: 272 + }; + A.Highlighter__collateLines_closure0.prototype = { + call$2(highlight1, highlight2) { + return highlight1.span.compareTo$1(0, highlight2.span); + }, + $signature: 273 + }; + A.Highlighter__collateLines_closure1.prototype = { + call$1(entry) { + var t1, t2, t3, t4, context, t5, linesBeforeSpan, lineNumber, _i, line, activeHighlights, highlightIndex, oldHighlightLength, + url = entry.key, + highlightsForFile = entry.value, + lines = A._setArrayType([], type$.JSArray__Line); + for (t1 = J.getInterceptor$ax(highlightsForFile), t2 = t1.get$iterator(highlightsForFile), t3 = type$.JSArray__Highlight; t2.moveNext$0();) { + t4 = t2.get$current(t2).span; + context = t4.get$context(t4); + t5 = A.findLineStart(context, t4.get$text(), t4.get$start(t4).get$column()); + t5.toString; + t5 = B.JSString_methods.allMatches$1("\n", B.JSString_methods.substring$2(context, 0, t5)); + linesBeforeSpan = t5.get$length(t5); + lineNumber = t4.get$start(t4).get$line() - linesBeforeSpan; + for (t4 = context.split("\n"), t5 = t4.length, _i = 0; _i < t5; ++_i) { + line = t4[_i]; + if (lines.length === 0 || lineNumber > B.JSArray_methods.get$last(lines).number) + lines.push(new A._Line(line, lineNumber, url, A._setArrayType([], t3))); + ++lineNumber; + } + } + activeHighlights = A._setArrayType([], t3); + for (t2 = lines.length, highlightIndex = 0, _i = 0; _i < lines.length; lines.length === t2 || (0, A.throwConcurrentModificationError)(lines), ++_i) { + line = lines[_i]; + if (!!activeHighlights.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(activeHighlights, new A.Highlighter__collateLines__closure(line), true); + oldHighlightLength = activeHighlights.length; + for (t3 = t1.skip$1(highlightsForFile, highlightIndex), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.span; + if (t5.get$start(t5).get$line() > line.number) + break; + activeHighlights.push(t4); + } + highlightIndex += activeHighlights.length - oldHighlightLength; + B.JSArray_methods.addAll$1(line.highlights, activeHighlights); + } + return lines; + }, + $signature: 274 + }; + A.Highlighter__collateLines__closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$end(t1).get$line() < this.line.number; + }, + $signature: 105 + }; + A.Highlighter_highlight_closure.prototype = { + call$1(highlight) { + return highlight.isPrimary; + }, + $signature: 105 + }; + A.Highlighter__writeFileStart_closure.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 2) + ">"; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure.prototype = { + call$0() { + var t1 = $._glyphs; + t1 = this.startLine === this.line.number ? t1.get$topLeftCorner() : t1.get$bottomLeftCorner(); + this.$this._highlighter$_buffer._contents += t1; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure0.prototype = { + call$0() { + var t1 = $._glyphs; + t1 = this.highlight == null ? t1.get$horizontalLine() : t1.get$cross(); + this.$this._highlighter$_buffer._contents += t1; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure1.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += $._glyphs.get$horizontalLine(); + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this._box_0, + t2 = t1.openedOnThisLine, + t3 = $._glyphs, + vertical = t2 ? t3.get$cross() : t3.get$verticalLine(); + if (_this.current != null) + _this.$this._highlighter$_buffer._contents += vertical; + else { + t2 = _this.line; + t3 = t2.number; + if (_this.startLine === t3) { + t2 = _this.$this; + t2._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure(t1, t2), t1.openedOnThisLineColor); + t1.openedOnThisLine = true; + if (t1.openedOnThisLineColor == null) + t1.openedOnThisLineColor = _this.highlight.isPrimary ? t2._primaryColor : t2._secondaryColor; + } else { + if (_this.endLine === t3) { + t3 = _this.highlight.span; + t2 = t3.get$end(t3).get$column() === t2.text.length; + } else + t2 = false; + t3 = _this.$this; + if (t2) { + t1 = _this.highlight.label == null ? $._glyphs.glyphOrAscii$2("\u2514", "\\") : vertical; + t3._highlighter$_buffer._contents += t1; + } else + t3._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure0(t3, vertical), t1.openedOnThisLineColor); + } + } + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure.prototype = { + call$0() { + var t1 = this._box_0.openedOnThisLine ? "\u252c" : "\u250c"; + this.$this._highlighter$_buffer._contents += $._glyphs.glyphOrAscii$2(t1, "/"); + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += this.vertical; + }, + $signature: 1 + }; + A.Highlighter__writeHighlightedText_closure.prototype = { + call$0() { + var _this = this; + return _this.$this._writeText$1(B.JSString_methods.substring$2(_this.text, _this.startColumn, _this.endColumn)); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure.prototype = { + call$0() { + var startColumn, endColumn, tabsBefore, tabsInside, + t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents, + t4 = this.highlight, + t5 = t4.span; + t4 = t4.isPrimary ? "^" : $._glyphs.get$horizontalLineBold(); + startColumn = t5.get$start(t5).get$column(); + endColumn = t5.get$end(t5).get$column(); + t5 = this.line.text; + tabsBefore = t1._countTabs$1(B.JSString_methods.substring$2(t5, 0, startColumn)); + tabsInside = t1._countTabs$1(B.JSString_methods.substring$2(t5, startColumn, endColumn)); + startColumn += tabsBefore * 3; + t2._contents += B.JSString_methods.$mul(" ", startColumn); + t4 = t2._contents += B.JSString_methods.$mul(t4, Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); + return t4.length - t3.length; + }, + $signature: 12 + }; + A.Highlighter__writeIndicator_closure0.prototype = { + call$0() { + var t1 = this.highlight.span; + return this.$this._writeArrow$2(this.line, t1.get$start(t1).get$column()); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure1.prototype = { + call$0() { + var t4, _this = this, + t1 = _this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents; + if (_this.coversWholeLine) + t2._contents += B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 3); + else { + t4 = _this.highlight.span; + t1._writeArrow$3$beginning(_this.line, Math.max(t4.get$end(t4).get$column() - 1, 0), false); + } + return t2._contents.length - t3.length; + }, + $signature: 12 + }; + A.Highlighter__writeLabel_closure.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += " " + A.S(B.JSArray_methods.get$first(this.lines)); + return null; + }, + $signature: 0 + }; + A.Highlighter__writeLabel_closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += " " + this.text; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeSidebar_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = this._box_0.text; + if (t3 == null) + t3 = ""; + t2._contents += B.JSString_methods.padRight$1(t3, t1._paddingBeforeSidebar); + t1 = this.end; + t2._contents += t1 == null ? $._glyphs.get$verticalLine() : t1; + }, + $signature: 1 + }; + A._Highlight.prototype = { + toString$0(_) { + var t1 = this.isPrimary ? "" + "primary " : "", + t2 = this.span; + t2 = t1 + ("" + t2.get$start(t2).get$line() + ":" + t2.get$start(t2).get$column() + "-" + t2.get$end(t2).get$line() + ":" + t2.get$end(t2).get$column()); + t1 = this.label; + t1 = t1 != null ? t2 + (" (" + t1 + ")") : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Highlight_closure.prototype = { + call$0() { + var t2, t3, t4, t5, + t1 = this.span; + if (!(type$.SourceSpanWithContext._is(t1) && A.findLineStart(t1.get$context(t1), t1.get$text(), t1.get$start(t1).get$column()) != null)) { + t2 = A.SourceLocation$(t1.get$start(t1).get$offset(), 0, 0, t1.get$sourceUrl(t1)); + t3 = t1.get$end(t1).get$offset(); + t4 = t1.get$sourceUrl(t1); + t5 = A.countCodeUnits(t1.get$text(), 10); + t1 = A.SourceSpanWithContext$(t2, A.SourceLocation$(t3, A._Highlight__lastLineLength(t1.get$text()), t5, t4), t1.get$text(), t1.get$text()); + } + return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(t1))); + }, + $signature: 275 + }; + A._Line.prototype = { + toString$0(_) { + return "" + this.number + ': "' + this.text + '" (' + B.JSArray_methods.join$1(this.highlights, ", ") + ")"; + } + }; + A.SourceLocation.prototype = { + distance$1(other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.sourceUrl, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.sourceUrl; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeType(_this).toString$0(0), + source = _this.sourceUrl; + return "<" + t1 + ": " + _this.offset + " " + (A.S(source == null ? "unknown source" : source) + ":" + (_this.line + 1) + ":" + (_this.column + 1)) + ">"; + }, + $isComparable: 1, + get$sourceUrl(receiver) { + return this.sourceUrl; + }, + get$offset() { + return this.offset; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + } + }; + A.SourceLocationMixin.prototype = { + distance$1(other) { + var _this = this; + if (!J.$eq$(_this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(_this)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(_this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + var _this = this; + if (!J.$eq$(_this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(_this)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return _this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.file.url, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.file.url; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var t1 = A.getRuntimeType(this).toString$0(0), + t2 = this.offset, + t3 = this.file, + source = t3.url; + return "<" + t1 + ": " + t2 + " " + (A.S(source == null ? "unknown source" : source) + ":" + (t3.getLine$1(t2) + 1) + ":" + (t3.getColumn$1(t2) + 1)) + ">"; + }, + $isComparable: 1, + $isSourceLocation: 1 + }; + A.SourceSpanBase.prototype = { + SourceSpanBase$3(start, end, text) { + var t3, + t1 = this.end, + t2 = this.start; + if (!J.$eq$(t1.get$sourceUrl(t1), t2.get$sourceUrl(t2))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t2.get$sourceUrl(t2)) + '" and "' + A.S(t1.get$sourceUrl(t1)) + "\" don't match.", null)); + else if (t1.get$offset() < t2.get$offset()) + throw A.wrapException(A.ArgumentError$("End " + t1.toString$0(0) + " must come after start " + t2.toString$0(0) + ".", null)); + else { + t3 = this.text; + if (t3.length !== t2.distance$1(t1)) + throw A.wrapException(A.ArgumentError$('Text "' + t3 + '" must be ' + t2.distance$1(t1) + " characters long.", null)); + } + }, + get$start(receiver) { + return this.start; + }, + get$end(receiver) { + return this.end; + }, + get$text() { + return this.text; + } + }; + A.SourceSpanException.prototype = { + get$message(_) { + return this._span_exception$_message; + }, + get$span(_) { + return this._span; + }, + toString$1$color(_, color) { + var _this = this; + _this.get$span(_this); + return "Error on " + _this.get$span(_this).message$2$color(0, _this._span_exception$_message, color); + }, + toString$0($receiver) { + return this.toString$1$color($receiver, null); + }, + $isException: 1 + }; + A.SourceSpanFormatException.prototype = {$isFormatException: 1, + get$source() { + return this.source; + } + }; + A.SourceSpanMixin.prototype = { + get$sourceUrl(_) { + var t1 = this.get$start(this); + return t1.get$sourceUrl(t1); + }, + get$length(_) { + var _this = this; + return _this.get$end(_this).get$offset() - _this.get$start(_this).get$offset(); + }, + compareTo$1(_, other) { + var _this = this, + result = _this.get$start(_this).compareTo$1(0, other.get$start(other)); + return result === 0 ? _this.get$end(_this).compareTo$1(0, other.get$end(other)) : result; + }, + message$2$color(_, message, color) { + var t2, highlight, _this = this, + t1 = "" + ("line " + (_this.get$start(_this).get$line() + 1) + ", column " + (_this.get$start(_this).get$column() + 1)); + if (_this.get$sourceUrl(_this) != null) { + t2 = _this.get$sourceUrl(_this); + t2 = t1 + (" of " + $.$get$context().prettyUri$1(t2)); + t1 = t2; + } + t1 += ": " + message; + highlight = _this.highlight$1$color(color); + if (highlight.length !== 0) + t1 = t1 + "\n" + highlight; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + message$1($receiver, message) { + return this.message$2$color($receiver, message, null); + }, + highlight$1$color(color) { + var _this = this; + if (!type$.SourceSpanWithContext._is(_this) && _this.get$length(_this) === 0) + return ""; + return A.Highlighter$(_this, color).highlight$0(); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return type$.SourceSpan._is(other) && _this.get$start(_this).$eq(0, other.get$start(other)) && _this.get$end(_this).$eq(0, other.get$end(other)); + }, + get$hashCode(_) { + var _this = this; + return A.Object_hash(_this.get$start(_this), _this.get$end(_this), B.C_SentinelValue); + }, + toString$0(_) { + var _this = this; + return "<" + A.getRuntimeType(_this).toString$0(0) + ": from " + _this.get$start(_this).toString$0(0) + " to " + _this.get$end(_this).toString$0(0) + ' "' + _this.get$text() + '">'; + }, + $isComparable: 1, + $isSourceSpan: 1 + }; + A.SourceSpanWithContext.prototype = { + get$context(_) { + return this._context; + } + }; + A.Chain.prototype = { + toTrace$0() { + var t1 = this.traces; + return A.Trace$(new A.ExpandIterable(t1, new A.Chain_toTrace_closure(), A._arrayInstanceType(t1)._eval$1("ExpandIterable<1,Frame>")), null); + }, + toString$0(_) { + var t1 = this.traces, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Chain_toString_closure(new A.MappedListIterable(t1, new A.Chain_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$1(0, string$.x3d_____); + }, + $isStackTrace: 1 + }; + A.Chain_Chain$parse_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 8 + }; + A.Chain_Chain$parse_closure0.prototype = { + call$1(trace) { + return A.Trace$parseVM(trace); + }, + $signature: 144 + }; + A.Chain_Chain$parse_closure1.prototype = { + call$1(trace) { + return A.Trace$parseFriendly(trace); + }, + $signature: 144 + }; + A.Chain_toTrace_closure.prototype = { + call$1(trace) { + return trace.get$frames(); + }, + $signature: 277 + }; + A.Chain_toString_closure0.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT); + }, + $signature: 278 + }; + A.Chain_toString__closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 145 + }; + A.Chain_toString_closure.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure(this.longest), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $signature: 280 + }; + A.Chain_toString__closure.prototype = { + call$1(frame) { + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 146 + }; + A.Frame.prototype = { + get$isCore() { + return this.uri.get$scheme() === "dart"; + }, + get$library() { + var t1 = this.uri; + if (t1.get$scheme() === "data") + return "data:..."; + return $.$get$context().prettyUri$1(t1); + }, + get$$package() { + var t1 = this.uri; + if (t1.get$scheme() !== "package") + return null; + return B.JSArray_methods.get$first(t1.get$path(t1).split("/")); + }, + get$location() { + var t2, _this = this, + t1 = _this.line; + if (t1 == null) + return _this.get$library(); + t2 = _this.column; + if (t2 == null) + return _this.get$library() + " " + A.S(t1); + return _this.get$library() + " " + A.S(t1) + ":" + A.S(t2); + }, + toString$0(_) { + return this.get$location() + " in " + A.S(this.member); + }, + get$uri() { + return this.uri; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + }, + get$member() { + return this.member; + } + }; + A.Frame_Frame$parseVM_closure.prototype = { + call$0() { + var match, t2, t3, member, uri, lineAndColumn, line, _null = null, + t1 = this.frame; + if (t1 === "...") + return new A.Frame(A._Uri__Uri(_null, _null, _null, _null), _null, _null, "..."); + match = $.$get$_vmFrame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + t3 = $.$get$_asyncBody(); + t2 = A.stringReplaceAllUnchecked(t2, t3, ""); + member = A.stringReplaceAllUnchecked(t2, "", ""); + t2 = t1[2]; + t3 = t2; + t3.toString; + if (B.JSString_methods.startsWith$1(t3, " 1 ? A.int_parse(lineAndColumn[1], _null) : _null; + return new A.Frame(uri, line, t1 > 2 ? A.int_parse(lineAndColumn[2], _null) : _null, member); + }, + $signature: 68 + }; + A.Frame_Frame$parseV8_closure.prototype = { + call$0() { + var t2, t3, _s4_ = "", + t1 = this.frame, + match = $.$get$_v8Frame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), t1); + t1 = new A.Frame_Frame$parseV8_closure_parseLocation(t1); + t2 = match._match; + t3 = t2[2]; + if (t3 != null) { + t3 = t3; + t3.toString; + t2 = t2[1]; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "", _s4_); + t2 = A.stringReplaceAllUnchecked(t2, "Anonymous function", _s4_); + return t1.call$2(t3, A.stringReplaceAllUnchecked(t2, "(anonymous function)", _s4_)); + } else { + t2 = t2[3]; + t2.toString; + return t1.call$2(t2, _s4_); + } + }, + $signature: 68 + }; + A.Frame_Frame$parseV8_closure_parseLocation.prototype = { + call$2($location, member) { + var t2, urlMatch, uri, line, columnMatch, _null = null, + t1 = $.$get$_v8EvalLocation(), + evalMatch = t1.firstMatch$1($location); + for (; evalMatch != null; $location = t2) { + t2 = evalMatch._match[1]; + t2.toString; + evalMatch = t1.firstMatch$1(t2); + } + if ($location === "native") + return new A.Frame(A.Uri_parse("native"), _null, _null, member); + urlMatch = $.$get$_v8UrlLocation().firstMatch$1($location); + if (urlMatch == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), this.frame); + t1 = urlMatch._match; + t2 = t1[1]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t2 = t1[2]; + t2.toString; + line = A.int_parse(t2, _null); + columnMatch = t1[3]; + return new A.Frame(uri, line, columnMatch != null ? A.int_parse(columnMatch, _null) : _null, member); + }, + $signature: 283 + }; + A.Frame_Frame$_parseFirefoxEval_closure.prototype = { + call$0() { + var t2, member, uri, line, _null = null, + t1 = this.frame, + match = $.$get$_firefoxEvalLocation().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + member = A.stringReplaceAllUnchecked(t2, "/<", ""); + t2 = t1[2]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t1 = t1[3]; + t1.toString; + line = A.int_parse(t1, _null); + return new A.Frame(uri, line, _null, member.length === 0 || member === "anonymous" ? "" : member); + }, + $signature: 68 + }; + A.Frame_Frame$parseFirefox_closure.prototype = { + call$0() { + var t2, t3, t4, uri, member, line, column, _null = null, + t1 = this.frame, + match = $.$get$_firefoxSafariFrame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t2 = match._match; + t3 = t2[3]; + t4 = t3; + t4.toString; + if (B.JSString_methods.contains$1(t4, " line ")) + return A.Frame_Frame$_parseFirefoxEval(t1); + t1 = t3; + t1.toString; + uri = A.Frame__uriOrPathToUri(t1); + member = t2[1]; + if (member != null) { + t1 = t2[2]; + t1.toString; + t1 = B.JSString_methods.allMatches$1("/", t1); + member += B.JSArray_methods.join$0(A.List_List$filled(t1.get$length(t1), ".", false, type$.String)); + if (member === "") + member = ""; + member = B.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); + } else + member = ""; + t1 = t2[4]; + if (t1 === "") + line = _null; + else { + t1 = t1; + t1.toString; + line = A.int_parse(t1, _null); + } + t1 = t2[5]; + if (t1 == null || t1 === "") + column = _null; + else { + t1 = t1; + t1.toString; + column = A.int_parse(t1, _null); + } + return new A.Frame(uri, line, column, member); + }, + $signature: 68 + }; + A.Frame_Frame$parseFriendly_closure.prototype = { + call$0() { + var t2, uri, line, column, _null = null, + t1 = this.frame, + match = $.$get$_friendlyFrame().firstMatch$1(t1); + if (match == null) + throw A.wrapException(A.FormatException$("Couldn't parse package:stack_trace stack trace line '" + t1 + "'.", _null, _null)); + t1 = match._match; + t2 = t1[1]; + if (t2 === "data:...") + uri = A.Uri_Uri$dataFromString("", _null, _null); + else { + t2 = t2; + t2.toString; + uri = A.Uri_parse(t2); + } + if (uri.get$scheme() === "") { + t2 = $.$get$context(); + uri = t2.toUri$1(t2.absolute$7(t2.style.pathFromUri$1(A._parseUri(uri)), _null, _null, _null, _null, _null, _null)); + } + t2 = t1[2]; + if (t2 == null) + line = _null; + else { + t2 = t2; + t2.toString; + line = A.int_parse(t2, _null); + } + t2 = t1[3]; + if (t2 == null) + column = _null; + else { + t2 = t2; + t2.toString; + column = A.int_parse(t2, _null); + } + return new A.Frame(uri, line, column, t1[4]); + }, + $signature: 68 + }; + A.LazyTrace.prototype = { + get$_lazy_trace$_trace() { + var result, _this = this, + value = _this.__LazyTrace__trace_FI; + if (value === $) { + result = _this._thunk.call$0(); + _this.__LazyTrace__trace_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__LazyTrace__trace_FI = result; + value = result; + } + return value; + }, + get$frames() { + return this.get$_lazy_trace$_trace().get$frames(); + }, + get$terse() { + return new A.LazyTrace(new A.LazyTrace_terse_closure(this)); + }, + toString$0(_) { + return this.get$_lazy_trace$_trace().toString$0(0); + }, + $isStackTrace: 1, + $isTrace: 1 + }; + A.LazyTrace_terse_closure.prototype = { + call$0() { + return this.$this.get$_lazy_trace$_trace().get$terse(); + }, + $signature: 148 + }; + A.Trace.prototype = { + get$terse() { + return this.foldFrames$2$terse(new A.Trace_terse_closure(), true); + }, + foldFrames$2$terse(predicate, terse) { + var newFrames, t1, t2, t3, _box_0 = {}; + _box_0.predicate = predicate; + _box_0.predicate = new A.Trace_foldFrames_closure(predicate); + newFrames = A._setArrayType([], type$.JSArray_Frame); + for (t1 = this.frames, t1 = new A.ReversedListIterable(t1, A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 instanceof A.UnparsedFrame || !_box_0.predicate.call$1(t3)) + newFrames.push(t3); + else if (newFrames.length === 0 || !_box_0.predicate.call$1(B.JSArray_methods.get$last(newFrames))) + newFrames.push(new A.Frame(t3.get$uri(), t3.get$line(), t3.get$column(), t3.get$member())); + } + t1 = type$.MappedListIterable_Frame_Frame; + newFrames = A.List_List$of(new A.MappedListIterable(newFrames, new A.Trace_foldFrames_closure0(_box_0), t1), true, t1._eval$1("ListIterable.E")); + if (newFrames.length > 1 && _box_0.predicate.call$1(B.JSArray_methods.get$first(newFrames))) + B.JSArray_methods.removeAt$1(newFrames, 0); + return A.Trace$(new A.ReversedListIterable(newFrames, A._arrayInstanceType(newFrames)._eval$1("ReversedListIterable<1>")), this.original._stackTrace); + }, + toString$0(_) { + var t1 = this.frames, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Trace_toString_closure(new A.MappedListIterable(t1, new A.Trace_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isStackTrace: 1, + get$frames() { + return this.frames; + } + }; + A.Trace_Trace$from_closure.prototype = { + call$0() { + return A.Trace_Trace$parse(this.trace.toString$0(0)); + }, + $signature: 148 + }; + A.Trace__parseVM_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 8 + }; + A.Trace__parseVM_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseVM(line); + }, + $signature: 63 + }; + A.Trace$parseV8_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, $.$get$_v8TraceLine()); + }, + $signature: 8 + }; + A.Trace$parseV8_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseV8(line); + }, + $signature: 63 + }; + A.Trace$parseJSCore_closure.prototype = { + call$1(line) { + return line !== "\tat "; + }, + $signature: 8 + }; + A.Trace$parseJSCore_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseV8(line); + }, + $signature: 63 + }; + A.Trace$parseFirefox_closure.prototype = { + call$1(line) { + return line.length !== 0 && line !== "[native code]"; + }, + $signature: 8 + }; + A.Trace$parseFirefox_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseFirefox(line); + }, + $signature: 63 + }; + A.Trace$parseFriendly_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, "====="); + }, + $signature: 8 + }; + A.Trace$parseFriendly_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseFriendly(line); + }, + $signature: 63 + }; + A.Trace_terse_closure.prototype = { + call$1(_) { + return false; + }, + $signature: 150 + }; + A.Trace_foldFrames_closure.prototype = { + call$1(frame) { + var t1; + if (this.oldPredicate.call$1(frame)) + return true; + if (frame.get$isCore()) + return true; + if (frame.get$$package() === "stack_trace") + return true; + t1 = frame.get$member(); + t1.toString; + if (!B.JSString_methods.contains$1(t1, "")) + return false; + return frame.get$line() == null; + }, + $signature: 150 + }; + A.Trace_foldFrames_closure0.prototype = { + call$1(frame) { + var t1, t2; + if (frame instanceof A.UnparsedFrame || !this._box_0.predicate.call$1(frame)) + return frame; + t1 = frame.get$library(); + t2 = $.$get$_terseRegExp(); + return new A.Frame(A.Uri_parse(A.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); + }, + $signature: 287 + }; + A.Trace_toString_closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 145 + }; + A.Trace_toString_closure.prototype = { + call$1(frame) { + if (frame instanceof A.UnparsedFrame) + return frame.toString$0(0) + "\n"; + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 146 + }; + A.UnparsedFrame.prototype = { + toString$0(_) { + return this.member; + }, + $isFrame: 1, + get$uri() { + return this.uri; + }, + get$line() { + return null; + }, + get$column() { + return null; + }, + get$isCore() { + return false; + }, + get$library() { + return "unparsed"; + }, + get$$package() { + return null; + }, + get$location() { + return "unparsed"; + }, + get$member() { + return this.member; + } + }; + A.TransformByHandlers_transformByHandlers_closure.prototype = { + call$0() { + var t2, subscription, t3, t4, _this = this, t1 = {}; + t1.valuesDone = false; + t2 = _this.controller; + subscription = _this._this.listen$3$onDone$onError(0, new A.TransformByHandlers_transformByHandlers__closure(_this.handleData, t2, _this.S), new A.TransformByHandlers_transformByHandlers__closure0(t1, _this.handleDone, t2), new A.TransformByHandlers_transformByHandlers__closure1(_this.handleError, t2)); + t3 = _this._box_1; + t3.subscription = subscription; + t2.set$onPause(subscription.get$pause(subscription)); + t4 = t3.subscription; + t2.set$onResume(t4.get$resume(t4)); + t2.set$onCancel(new A.TransformByHandlers_transformByHandlers__closure2(t3, t1)); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure.prototype = { + call$1(value) { + return this.handleData.call$2(value, this.controller); + }, + $signature() { + return this.S._eval$1("~(0)"); + } + }; + A.TransformByHandlers_transformByHandlers__closure1.prototype = { + call$2(error, stackTrace) { + this.handleError.call$3(error, stackTrace, this.controller); + }, + $signature: 73 + }; + A.TransformByHandlers_transformByHandlers__closure0.prototype = { + call$0() { + this._box_0.valuesDone = true; + this.handleDone.call$1(this.controller); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure2.prototype = { + call$0() { + var t1 = this._box_1, + toCancel = t1.subscription; + t1.subscription = null; + if (!this._box_0.valuesDone) + return toCancel.cancel$0(); + return null; + }, + $signature: 156 + }; + A.RateLimit__debounceAggregate_closure.prototype = { + call$2(value, sink) { + var _this = this, + t1 = _this._box_0, + t2 = new A.RateLimit__debounceAggregate_closure_emit(t1, sink, _this.S), + t3 = t1.timer; + if (t3 != null) + t3.cancel$0(); + t1.soFar = _this.collect.call$2(value, t1.soFar); + t1.hasPending = true; + if (t1.timer == null && _this.leading) { + t1.emittedLatestAsLeading = true; + t2.call$0(); + } else + t1.emittedLatestAsLeading = false; + t1.timer = A.Timer_Timer(_this.duration, new A.RateLimit__debounceAggregate__closure(t1, _this.trailing, t2, sink)); + }, + $signature() { + return this.T._eval$1("@<0>")._bind$1(this.S)._eval$1("~(1,EventSink<2>)"); + } + }; + A.RateLimit__debounceAggregate_closure_emit.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.soFar; + if (t2 == null) + t2 = this.S._as(t2); + this.sink.add$1(0, t2); + t1.soFar = null; + t1.hasPending = false; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate__closure.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.emittedLatestAsLeading; + if (!t2) + this.emit.call$0(); + if (t1.shouldClose) + this.sink.close$0(0); + t1.timer = null; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate_closure0.prototype = { + call$1(sink) { + var t1 = this._box_0; + if (t1.hasPending && this.trailing) + t1.shouldClose = true; + else { + t1 = t1.timer; + if (t1 != null) + t1.cancel$0(); + sink.close$0(0); + } + }, + $signature() { + return this.S._eval$1("~(EventSink<0>)"); + } + }; + A.StringScannerException.prototype = { + get$source() { + return A._asString(this.source); + } + }; + A.LineScanner.prototype = { + scanChar$1(character) { + if (!this.super$StringScanner$scanChar(character)) + return false; + this._adjustLineAndColumn$1(character); + return true; + }, + _adjustLineAndColumn$1(character) { + var t1, _this = this; + if (character !== 10) + t1 = character === 13 && _this.peekChar$0() !== 10; + else + t1 = true; + if (t1) { + ++_this._line_scanner$_line; + _this._line_scanner$_column = 0; + } else + ++_this._line_scanner$_column; + }, + scan$1(pattern) { + var t1, newlines, t2, _this = this; + if (!_this.super$StringScanner$scan(pattern)) + return false; + t1 = _this.get$lastMatch(); + newlines = _this._newlinesIn$1(t1.pattern); + t1 = _this._line_scanner$_line; + t2 = newlines.length; + _this._line_scanner$_line = t1 + t2; + if (t2 === 0) { + t1 = _this._line_scanner$_column; + t2 = _this.get$lastMatch(); + _this._line_scanner$_column = t1 + t2.pattern.length; + } else { + t1 = _this.get$lastMatch(); + _this._line_scanner$_column = t1.pattern.length - J.get$end$z(B.JSArray_methods.get$last(newlines)); + } + return true; + }, + _newlinesIn$1(text) { + var t1 = $.$get$_newlineRegExp().allMatches$1(0, text), + newlines = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + if (this.peekChar$1(-1) === 13 && this.peekChar$0() === 10) + B.JSArray_methods.removeLast$0(newlines); + return newlines; + } + }; + A.SpanScanner.prototype = { + set$state(state) { + if (state._scanner !== this) + throw A.wrapException(A.ArgumentError$(string$.The_gi, null)); + this.set$position(state.position); + }, + spanFrom$2(startState, endState) { + var endPosition = endState == null ? this._string_scanner$_position : endState.position; + return this._sourceFile.span$2(0, startState.position, endPosition); + }, + spanFrom$1(startState) { + return this.spanFrom$2(startState, null); + }, + matches$1(pattern) { + var t1, t2, _this = this; + if (!_this.super$StringScanner$matches(pattern)) + return false; + t1 = _this._string_scanner$_position; + t2 = _this.get$lastMatch(); + _this._sourceFile.span$2(0, t1, t2.start + t2.pattern.length); + return true; + }, + error$3$length$position(_, message, $length, position) { + var match, t2, _this = this, + t1 = _this.string; + A.validateErrorArgs(t1, null, position, $length); + match = position == null && $length == null ? _this.get$lastMatch() : null; + if (position == null) + position = match == null ? _this._string_scanner$_position : match.start; + if ($length == null) + if (match == null) + $length = 0; + else { + t2 = match.start; + $length = t2 + match.pattern.length - t2; + } + throw A.wrapException(A.StringScannerException$(message, _this._sourceFile.span$2(0, position, position + $length), t1)); + }, + error$1($receiver, message) { + return this.error$3$length$position($receiver, message, null, null); + }, + error$2$position($receiver, message, position) { + return this.error$3$length$position($receiver, message, null, position); + }, + error$2$length($receiver, message, $length) { + return this.error$3$length$position($receiver, message, $length, null); + } + }; + A._SpanScannerState.prototype = {}; + A.StringScanner.prototype = { + set$position(position) { + if (B.JSInt_methods.get$isNegative(position) || position > this.string.length) + throw A.wrapException(A.ArgumentError$("Invalid position " + position, null)); + this._string_scanner$_position = position; + this._lastMatch = null; + }, + get$lastMatch() { + var _this = this; + if (_this._string_scanner$_position !== _this._lastMatchPosition) + _this._lastMatch = null; + return _this._lastMatch; + }, + readChar$0() { + var _this = this, + t1 = _this._string_scanner$_position, + t2 = _this.string; + if (t1 === t2.length) + _this.error$3$length$position(0, "expected more input.", 0, t1); + return B.JSString_methods.codeUnitAt$1(t2, _this._string_scanner$_position++); + }, + peekChar$1(offset) { + var index; + if (offset == null) + offset = 0; + index = this._string_scanner$_position + offset; + if (index < 0 || index >= this.string.length) + return null; + return B.JSString_methods.codeUnitAt$1(this.string, index); + }, + peekChar$0() { + return this.peekChar$1(null); + }, + scanChar$1(character) { + var t1 = this._string_scanner$_position, + t2 = this.string; + if (t1 === t2.length) + return false; + if (B.JSString_methods.codeUnitAt$1(t2, t1) !== character) + return false; + this._string_scanner$_position = t1 + 1; + return true; + }, + expectChar$2$name(character, $name) { + if (this.scanChar$1(character)) + return; + if ($name == null) + if (character === 92) + $name = '"\\"'; + else + $name = character === 34 ? '"\\""' : '"' + A.Primitives_stringFromCharCode(character) + '"'; + this.error$3$length$position(0, "expected " + $name + ".", 0, this._string_scanner$_position); + }, + expectChar$1(character) { + return this.expectChar$2$name(character, null); + }, + scan$1(pattern) { + var t1, _this = this, + success = _this.matches$1(pattern); + if (success) { + t1 = _this._lastMatch; + _this._lastMatchPosition = _this._string_scanner$_position = t1.start + t1.pattern.length; + } + return success; + }, + expect$1(pattern) { + var t1, $name; + if (this.scan$1(pattern)) + return; + t1 = A.stringReplaceAllUnchecked(pattern, "\\", "\\\\"); + $name = '"' + A.stringReplaceAllUnchecked(t1, '"', '\\"') + '"'; + this.error$3$length$position(0, "expected " + $name + ".", 0, this._string_scanner$_position); + }, + expectDone$0() { + var t1 = this._string_scanner$_position; + if (t1 === this.string.length) + return; + this.error$3$length$position(0, "expected no more input.", 0, t1); + }, + matches$1(pattern) { + var _this = this, + t1 = B.JSString_methods.matchAsPrefix$2(pattern, _this.string, _this._string_scanner$_position); + _this._lastMatch = t1; + _this._lastMatchPosition = _this._string_scanner$_position; + return t1 != null; + }, + substring$1(_, start) { + var end = this._string_scanner$_position; + return B.JSString_methods.substring$2(this.string, start, end); + }, + error$3$length$position(_, message, $length, position) { + var t1 = this.string; + A.validateErrorArgs(t1, null, position, $length); + throw A.wrapException(A.StringScannerException$(message, A.SourceFile$fromString(t1, this.sourceUrl).span$2(0, position, position + $length), t1)); + } + }; + A.AsciiGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return alternative; + }, + get$horizontalLine() { + return "-"; + }, + get$verticalLine() { + return "|"; + }, + get$topLeftCorner() { + return ","; + }, + get$bottomLeftCorner() { + return "'"; + }, + get$cross() { + return "+"; + }, + get$upEnd() { + return "'"; + }, + get$downEnd() { + return ","; + }, + get$horizontalLineBold() { + return "="; + } + }; + A.UnicodeGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return glyph; + }, + get$horizontalLine() { + return "\u2500"; + }, + get$verticalLine() { + return "\u2502"; + }, + get$topLeftCorner() { + return "\u250c"; + }, + get$bottomLeftCorner() { + return "\u2514"; + }, + get$cross() { + return "\u253c"; + }, + get$upEnd() { + return "\u2575"; + }, + get$downEnd() { + return "\u2577"; + }, + get$horizontalLineBold() { + return "\u2501"; + } + }; + A.Tuple2.prototype = { + toString$0(_) { + return "[" + A.S(this.item1) + ", " + A.S(this.item2) + "]"; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Tuple2 && J.$eq$(other.item1, this.item1) && J.$eq$(other.item2, this.item2); + }, + get$hashCode(_) { + var t1 = J.get$hashCode$(this.item1), + t2 = J.get$hashCode$(this.item2); + return A._finish(A._combine(A._combine(0, B.JSInt_methods.get$hashCode(t1)), B.JSInt_methods.get$hashCode(t2))); + } + }; + A.Tuple3.prototype = { + toString$0(_) { + return "[" + this.item1.toString$0(0) + ", " + this.item2.toString$0(0) + ", " + this.item3.toString$0(0) + "]"; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Tuple3 && other.item1 === this.item1 && other.item2.$eq(0, this.item2) && other.item3.$eq(0, this.item3); + }, + get$hashCode(_) { + var t3, + t1 = A.Primitives_objectHashCode(this.item1), + t2 = this.item2; + t2 = t2.get$hashCode(t2); + t3 = this.item3; + t3 = t3.get$hashCode(t3); + return A._finish(A._combine(A._combine(A._combine(0, B.JSInt_methods.get$hashCode(t1)), B.JSInt_methods.get$hashCode(t2)), B.JSInt_methods.get$hashCode(t3))); + } + }; + A.Tuple4.prototype = { + toString$0(_) { + var _this = this; + return "[" + _this.item1.toString$0(0) + ", " + _this.item2 + ", " + _this.item3.toString$0(0) + ", " + A.S(_this.item4) + "]"; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.Tuple4 && other.item1.$eq(0, _this.item1) && other.item2 === _this.item2 && other.item3 === _this.item3 && J.$eq$(other.item4, _this.item4); + }, + get$hashCode(_) { + var t2, t3, t4, _this = this, + t1 = _this.item1; + t1 = t1.get$hashCode(t1); + t2 = B.JSBool_methods.get$hashCode(_this.item2); + t3 = A.Primitives_objectHashCode(_this.item3); + t4 = J.get$hashCode$(_this.item4); + return A._finish(A._combine(A._combine(A._combine(A._combine(0, B.JSInt_methods.get$hashCode(t1)), B.JSInt_methods.get$hashCode(t2)), B.JSInt_methods.get$hashCode(t3)), B.JSInt_methods.get$hashCode(t4))); + } + }; + A.WatchEvent.prototype = { + toString$0(_) { + return this.type.toString$0(0) + " " + this.path; + } + }; + A.ChangeType.prototype = { + toString$0(_) { + return this._watch_event$_name; + } + }; + A.AnySelectorVisitor0.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure0(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure0(this)); + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(attribute) { + return false; + }, + visitClassSelector$1(klass) { + return false; + }, + visitIDSelector$1(id) { + return false; + }, + visitParentSelector$1($parent) { + return false; + }, + visitPlaceholderSelector$1(placeholder) { + return false; + }, + visitTypeSelector$1(type) { + return false; + }, + visitUniversalSelector$1(universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 51 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure0.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 13 + }; + A.SupportsAnything0.prototype = { + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.Argument0.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration0.prototype = { + get$spanWithName() { + var t3, t4, + t1 = this.span, + t2 = t1.file, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), + i = A.FileLocation$_(t2, t1._file$_start).offset - 1; + while (true) { + if (i > 0) { + t3 = B.JSString_methods.codeUnitAt$1(text, i); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = B.JSString_methods.codeUnitAt$1(text, i); + if (!(t3 === 95 || A.isAlphabetic1(t3) || t3 >= 128 || A.isDigit0(t3) || t3 === 45)) + return t1; + --i; + while (true) { + if (i >= 0) { + t3 = B.JSString_methods.codeUnitAt$1(text, i); + if (t3 !== 95) { + if (!(t3 >= 97 && t3 <= 122)) + t4 = t3 >= 65 && t3 <= 90; + else + t4 = true; + t4 = t4 || t3 >= 128; + } else + t4 = true; + if (!t4) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = i + 1; + t4 = B.JSString_methods.codeUnitAt$1(text, t3); + if (!(t4 === 95 || A.isAlphabetic1(t4) || t4 >= 128)) + return t1; + return A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, + _s10_ = "invocation", + _s8_ = "argument"; + for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + t4 = argument.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$0("Argument " + _this._argument_declaration$_originalArgumentName$1(t4) + string$.x20was_p, null)); + } else { + t4 = argument.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (argument.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$0("Missing argument " + _this._argument_declaration$_originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restArgument != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(names) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$0("Only " + t2 + " " + t1 + A.pluralize0(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize0("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$0("No " + A.pluralize0(_s8_, unknownNames._collection$_length, null) + " named " + A.S(A.toSentence0(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure2(), type$.Object), "or")) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _argument_declaration$_originalArgumentName$1($name) { + var t1, text, t2, _i, argument, t3, t4, end, _null = null; + if ($name === this.restArgument) { + t1 = this.span; + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, _null); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (argument.name === $name) { + t1 = argument.defaultValue; + t2 = argument.span; + t3 = t2.file; + t4 = t2._file$_start; + t2 = t2._end; + if (t1 == null) { + t1 = t3._decodedChars; + t1 = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + } else { + t1 = t3._decodedChars; + text = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace0(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', _null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument; + for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + if (t3.containsKey$1(argument.name)) + return false; + } else if (t3.containsKey$1(argument.name)) + ++namedUsed; + else if (argument.defaultValue == null) + return false; + } + if (this.restArgument != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + A.S(t2[_i])); + t2 = this.restArgument; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration_verify_closure1.prototype = { + call$1(argument) { + return argument.name; + }, + $signature: 291 + }; + A.ArgumentDeclaration_verify_closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A.ArgumentInvocation0.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, t4, _this = this, + t1 = A.List_List$of(_this.positional, true, type$.Object); + for (t2 = _this.named, t3 = J.get$iterator$ax(t2.get$keys(t2)); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t1.push("$" + t4 + ": " + A.S(t2.$index(0, t4))); + } + t2 = _this.rest; + if (t2 != null) + t1.push(t2.toString$0(0) + "..."); + t2 = _this.keywordRest; + if (t2 != null) + t1.push(t2.toString$0(0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.argumentListClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassArgumentList", new A.argumentListClass__closure())); + A.defineGetter(J.get$$prototype$x(jsClass), "keywords", new A.argumentListClass__closure0(), null); + A.JSClassExtension_injectSuperclass(t1._as(A.SassArgumentList$0(A._setArrayType([], type$.JSArray_Value_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Value_2), B.ListSeparator_undecided_null_undecided0).constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.argumentListClass__closure.prototype = { + call$4($self, contents, keywords, separator) { + var t3, + t1 = self.immutable.isOrderedMap(contents) ? J.toArray$0$x(type$.ImmutableList._as(contents)) : type$.List_dynamic._as(contents), + t2 = type$.Value_2; + t1 = J.cast$1$0$ax(t1, t2); + t3 = self.immutable.isOrderedMap(keywords) ? A.immutableMapToDartMap(type$.ImmutableMap._as(keywords)) : A.objectToMap(keywords); + return A.SassArgumentList$0(t1, t3.cast$2$0(0, type$.String, t2), A.jsToDartSeparator(separator)); + }, + call$3($self, contents, keywords) { + return this.call$4($self, contents, keywords, ","); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [","]; + }, + $signature: 293 + }; + A.argumentListClass__closure0.prototype = { + call$1($self) { + $self._argument_list$_wereKeywordsAccessed = true; + return A.dartMapToImmutableMap($self._argument_list$_keywords); + }, + $signature: 294 + }; + A.SassArgumentList0.prototype = {}; + A.JSArray1.prototype = {}; + A.AsyncImporter0.prototype = {}; + A.NodeToDartAsyncImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$NodeToDartAsyncImporter(0, url); + }, + canonicalize$body$NodeToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, t1, result; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async0$_canonicalize.call$2(url.toString$0(0), {fromImport: A.fromImport0()}); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (result instanceof t1) { + $async$returnValue = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + // goto return + $async$goto = 1; + break; + } + A.jsThrow(new self.Error(string$.The_ca)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return this.load$body$NodeToDartAsyncImporter(0, url); + }, + load$body$NodeToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_ImporterResult), + $async$returnValue, $async$self = this, t1, contents, syntax, t2, result; + var $async$load$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._load.call$1(new self.URL(url.toString$0(0))); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$load$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + type$.NodeImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + $async$returnValue = A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils1__jsToDartUrl$closure()), t2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$load$1, $async$completer); + } + }; + A.AsyncBuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + return new A.Tuple2(this._async_built_in0$_arguments, this._async_built_in0$_callback, type$.Tuple2_of_ArgumentDeclaration_and_FutureOr_Value_Function_List_Value_2); + }, + $isAsyncCallable0: 1, + get$name(receiver) { + return this.name; + } + }; + A.AsyncBuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure0($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.callback.call$1($arguments), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 96 + }; + A._compileStylesheet_closure2.prototype = { + call$1(url) { + return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + }, + $signature: 5 + }; + A.AsyncEnvironment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment0$_forwardedModules, + t2 = _this._async_environment0$_nestedForwardedModules, + t3 = _this._async_environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_0(_this._async_environment0$_modules, _this._async_environment0$_namespaceNodes, _this._async_environment0$_globalModules, _this._async_environment0$_importedModules, t1, t2, _this._async_environment0$_allModules, t3, t4, t5, t6, _this._async_environment0$_content); + }, + addModule$3$namespace(module, nodeWithSpan, namespace) { + var t1, t2, span, _this = this; + if (namespace == null) { + _this._async_environment0$_globalModules.$indexSet(0, module, nodeWithSpan); + _this._async_environment0$_allModules.push(module); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.get$first(_this._async_environment0$_variables))); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (module.get$variables().containsKey$1(t2)) + throw A.wrapException(A.SassScriptException$0(string$.This_ma + t2 + '".', null)); + } + } else { + t1 = _this._async_environment0$_modules; + if (t1.containsKey$1(namespace)) { + t1 = _this._async_environment0$_namespaceNodes.$index(0, namespace); + span = t1 == null ? null : t1.span; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @use"); + throw A.wrapException(A.MultiSpanSassScriptException$0(string$.There_ + namespace + '".', "new @use", t1)); + } + t1.$indexSet(0, namespace, module); + _this._async_environment0$_namespaceNodes.$indexSet(0, namespace, nodeWithSpan); + _this._async_environment0$_allModules.push(module); + } + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.AsyncCallable_2); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules._modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, $name, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = J.get$iterator$ax(smaller.get$keys(smaller)), t2 = type === "variable"; t1.moveNext$0();) { + $name = t1.get$current(t1); + if (!larger.containsKey$1($name)) + continue; + if (t2 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(larger.$index(0, $name), smaller.$index(0, $name))) + continue; + if (t2) + $name = "$" + $name; + t1 = this._async_environment0$_forwardedModules; + if (t1 == null) + span = null; + else { + t1 = t1.$index(0, oldModule); + span = t1 == null ? null : J.get$span$z(t1); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t1)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, t5, forwardedVariableNames, forwardedFunctionNames, forwardedMixinNames, _i, entry, shadowed, t6, _length, _list, _this = this, + forwarded = module._async_environment0$_environment._async_environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + for (t2 = forwarded.get$entries(forwarded), t2 = t2.get$iterator(t2), t3 = _this._async_environment0$_globalModules; t2.moveNext$0();) { + t4 = t2.get$current(t2); + t5 = t4.key; + if (!forwardedModules.containsKey$1(t5) || !t3.containsKey$1(t5)) + t1.$indexSet(0, t5, t4.value); + } + forwarded = t1; + } else + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + t1 = A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"); + t2 = t1._eval$1("ExpandIterable"); + t3 = t2._eval$1("Iterable.E"); + forwardedVariableNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure2(), t2), t3); + forwardedFunctionNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure3(), t2), t3); + forwardedMixinNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.AsyncEnvironment_importForwards_closure4(), t2), t3); + t2 = _this._async_environment0$_variables; + t3 = t2.length; + if (t3 === 1) { + for (t1 = _this._async_environment0$_importedModules, t3 = t1.get$entries(t1).toList$0(0), t4 = t3.length, t5 = type$.AsyncCallable_2, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary0(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + t1.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view0$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + t1.$indexSet(0, shadowed, entry.value); + } + } + for (t3 = forwardedModules.get$entries(forwardedModules).toList$0(0), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary0(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view0$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + forwardedModules.$indexSet(0, shadowed, entry.value); + } + } + t1.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t4 = _this._async_environment0$_nestedForwardedModules; + if (t4 == null) { + _length = t3 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable_2); + for (t3 = type$.JSArray_Module_AsyncCallable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t3); + _this._async_environment0$_nestedForwardedModules = _list; + t3 = _list; + } else + t3 = t4; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t3), new A.LinkedHashMapKeyIterable(forwarded, t1)); + } + for (t1 = A._LinkedHashSetIterator$(forwardedVariableNames, forwardedVariableNames._collection$_modifications), t3 = _this._async_environment0$_variableIndices, t4 = _this._async_environment0$_variableNodes, t5 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t6 = t1._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t2), t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(forwardedFunctionNames, forwardedFunctionNames._collection$_modifications), t2 = _this._async_environment0$_functionIndices, t3 = _this._async_environment0$_functions, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + for (t1 = A._LinkedHashSetIterator$(forwardedMixinNames, forwardedMixinNames._collection$_modifications), t2 = _this._async_environment0$_mixinIndices, t3 = _this._async_environment0$_mixins, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment0$_variables[t1], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + t1 = J.$index$asx(_this._async_environment0$_variables[index], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } + index = _this._async_environment0$_variableIndex$1($name); + if (index == null) + return _this._async_environment0$_getVariableFromGlobalModule$1($name); + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment0$_variables[index], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment0$_getVariableFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$1$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure0($name), type$.Value_2); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment0$_variableNodes[t1], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + t1 = J.$index$asx(_this._async_environment0$_variableNodes[index], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + index = _this._async_environment0$_variableIndex$1($name); + if (index == null) + return _this._async_environment0$_getVariableNodeFromGlobalModule$1($name); + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment0$_variableNodes[index], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + }, + _async_environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, value; + for (t1 = this._async_environment0$_importedModules, t2 = this._async_environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + value = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (value != null) + return value; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment0$_variables).containsKey$1($name)) + return true; + return this._async_environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment0$_variables.length === 1) { + _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure2(_this, $name)); + t1 = _this._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment0$_fromOneModule$1$3($name, "variable", new A.AsyncEnvironment_setVariable_closure3($name), type$.Module_AsyncCallable_2); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment0$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment0$_variableIndices.containsKey$1($name) && _this._async_environment0$_variableIndex$1($name) == null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A.instanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure4(_this, $name)); + if (!_this._async_environment0$_inSemiGlobalScope && index === 0) { + index = _this._async_environment0$_variables.length - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + J.$indexSet$ax(_this._async_environment0$_variables[index], $name, value); + J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment0$_variables, + t2 = t1.length; + _this._async_environment0$_lastVariableName = $name; + index = _this._async_environment0$_lastVariableIndex = t2 - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) { + t1 = _this._async_environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment0$_functionIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._async_environment0$_functions[index], $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + } + index = _this._async_environment0$_functionIndex$1($name); + if (index == null) + return _this._async_environment0$_getFunctionFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment0$_functions[index], $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + }, + _async_environment0$_getFunctionFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$1$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure0($name), type$.AsyncCallable_2); + }, + _async_environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment0$_mixinIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._async_environment0$_mixins[index], $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + } + index = _this._async_environment0$_mixinIndex$1($name); + if (index == null) + return _this._async_environment0$_getMixinFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._async_environment0$_mixins[index], $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + }, + _async_environment0$_getMixinFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$1$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure0($name), type$.AsyncCallable_2); + }, + _async_environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment0($content, callback); + }, + withContent$body$AsyncEnvironment0($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment0$_content; + $async$self._async_environment0$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment0$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment0$_inMixin; + $async$self._async_environment0$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment0$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment0$_inSemiGlobalScope; + $async$self._async_environment0$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = $async$self._async_environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = $async$self._async_environment0$_functions; + t5 = type$.AsyncCallable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable_2)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment0$_lastVariableIndex = $async$self._async_environment0$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t1, t2, i, values, nodes, t3, t4, t5, t6, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + for (t1 = this._async_environment0$_variables, t2 = this._async_environment0$_variableNodes, i = 0; i < t1.length; ++i) { + values = t1[i]; + nodes = t2[i]; + for (t3 = values.get$entries(values), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.key; + t4 = t4.value; + t6 = nodes.$index(0, t5); + t6.toString; + configuration.$indexSet(0, t5, new A.ConfiguredValue0(t4, null, t6)); + } + } + return new A.Configuration0(configuration, null); + }, + toModule$2(css, extensionStore) { + return A._EnvironmentModule__EnvironmentModule2(this, css, extensionStore, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule2(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty16, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure0())); + }, + _async_environment0$_getModule$1(namespace) { + var module = this._async_environment0$_modules.$index(0, namespace); + if (module != null) + return module; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment0$_fromOneModule$1$3($name, type, callback, $T) { + var t1, t2, t3, t4, t5, value, identity, valueInModule, identityFromModule, spans, + nestedForwardedModules = this._async_environment0$_nestedForwardedModules; + if (nestedForwardedModules != null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + value = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (value != null) + return value; + } + } + for (t1 = this._async_environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1._modifications); t1.moveNext$0();) { + value = callback.call$1(t1.__js_helper$_current); + if (value != null) + return value; + } + for (t1 = this._async_environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1._modifications), t3 = type$.AsyncCallable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + spans = t1.get$entries(t1).map$1$1(0, new A.AsyncEnvironment__fromOneModule_closure0(callback, $T), type$.nullable_FileSpan); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t1 = spans.get$iterator(spans), t3 = "includes " + type; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t4 != null) + t2.$indexSet(0, t4, t3); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + } + }; + A.AsyncEnvironment_importForwards_closure2.prototype = { + call$1(module) { + var t1 = module.get$variables(); + return t1.get$keys(t1); + }, + $signature: 103 + }; + A.AsyncEnvironment_importForwards_closure3.prototype = { + call$1(module) { + var t1 = module.get$functions(module); + return t1.get$keys(t1); + }, + $signature: 103 + }; + A.AsyncEnvironment_importForwards_closure4.prototype = { + call$1(module) { + var t1 = module.get$mixins(); + return t1.get$keys(t1); + }, + $signature: 103 + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 297 + }; + A.AsyncEnvironment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment0$_lastVariableName = this.name; + return t1._async_environment0$_lastVariableIndex = 0; + }, + $signature: 12 + }; + A.AsyncEnvironment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 298 + }; + A.AsyncEnvironment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment0$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment0$_variables.length - 1 : t2; + }, + $signature: 12 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 157 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 157 + }; + A.AsyncEnvironment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 158 + }; + A.AsyncEnvironment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 158 + }; + A.AsyncEnvironment__fromOneModule_closure0.prototype = { + call$1(entry) { + return A.NullableExtension_andThen0(this.callback.call$1(entry.key), new A.AsyncEnvironment__fromOneModule__closure0(entry, this.T)); + }, + $signature: 301 + }; + A.AsyncEnvironment__fromOneModule__closure0.prototype = { + call$1(_) { + return J.get$span$z(this.entry.value); + }, + $signature() { + return this.T._eval$1("FileSpan(0)"); + } + }; + A._EnvironmentModule2.prototype = { + get$url(_) { + var t1 = this.css; + return t1.get$span(t1).file.url; + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + module = this._async_environment0$_modulesByVariable.$index(0, $name); + if (module != null) { + module.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment0$_environment; + t2 = t1._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment0$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var newCssAndExtensionStore, _this = this, + t1 = _this.css; + if (J.get$isEmpty$asx(t1.get$children(t1))) + return _this; + newCssAndExtensionStore = A.cloneCssStylesheet0(t1, _this.extensionStore); + return A._EnvironmentModule$_2(_this._async_environment0$_environment, newCssAndExtensionStore.item1, newCssAndExtensionStore.item2, _this._async_environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.transitivelyContainsCss, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css; + if (t1.get$span(t1).file.url == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = $.$get$context().prettyUri$1(t1.file.url); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure17.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 302 + }; + A._EnvironmentModule__EnvironmentModule_closure18.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 303 + }; + A._EnvironmentModule__EnvironmentModule_closure19.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 159 + }; + A._EnvironmentModule__EnvironmentModule_closure20.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 159 + }; + A._EnvironmentModule__EnvironmentModule_closure21.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 102 + }; + A._EnvironmentModule__EnvironmentModule_closure22.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 102 + }; + A._EvaluateVisitor2.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + t1 = type$.JSArray_AsyncBuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure29(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure30(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure31(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure32(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure33(_this), _s9_), A.BuiltInCallable$function0("module-variables", "$module", new A._EvaluateVisitor_closure34(_this), _s9_), A.BuiltInCallable$function0("module-functions", "$module", new A._EvaluateVisitor_closure35(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure36(_this), _s9_), new A.AsyncBuiltInCallable0("call", A.ScssParser$0("@function call($function, $args...) {", null, _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure37(_this))], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure38(_this), _s9_)], t1); + t1 = type$.AsyncBuiltInCallable_2; + t2 = A.List_List$of($.$get$global6(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$local0()); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_AsyncBuiltInCallable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = A._setArrayType([], type$.JSArray_AsyncCallable_2); + B.JSArray_methods.addAll$1(t1, functions); + B.JSArray_methods.addAll$1(t1, $.$get$globalFunctions0()); + B.JSArray_methods.addAll$1(t1, metaFunctions); + for (t2 = t1.length, t3 = _this._async_evaluate0$_builtInFunctions, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + $function = t1[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor0(0, importer, node); + }, + run$body$_EvaluateVisitor0(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.EvaluateResult_2), + $async$returnValue, $async$self = this, t1; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.nullable_Object; + $async$returnValue = A.runZoned(new A._EvaluateVisitor_run_closure2($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext2($async$self, node)], t1, t1), type$.FutureOr_EvaluateResult_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate0$_assertInModule$2(value, $name) { + return this._async_evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, builtInModule; + var $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + builtInModule = $async$self._async_evaluate0$_builtInModules.$index(0, url); + $async$goto = builtInModule != null ? 3 : 4; + break; + case 3: + // then + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate0$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure5(callback, builtInModule), type$.void), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure6($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate0$_execute$2(importer, stylesheet) { + return this._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable_2), + $async$returnValue, $async$self = this, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, extensionStore, module, url, t1, alreadyLoaded; + var $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + url = stylesheet.span.file.url; + t1 = $async$self._async_evaluate0$_modules; + alreadyLoaded = t1.$index(0, url); + if (alreadyLoaded != null) { + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate0$_configuration : configuration; + t2 = $async$self._async_evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { + message = namesInErrors ? $.$get$context().prettyUri$1(url) + string$.x20was_a : string$.This_mw; + t2 = $async$self._async_evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : J.get$span$z(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(t1) ? $async$self._async_evaluate0$_exception$1(message) : $async$self._async_evaluate0$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = alreadyLoaded; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$0(); + css = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure2($async$self, importer, stylesheet, extensionStore, configuration, css), type$.Null), $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + module = environment.toModule$2(css._readLocal$0(), extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + $async$self._async_evaluate0$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate0$_configuration); + if (nodeWithSpan != null) + $async$self._async_evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + outOfOrderImports = _this._async_evaluate0$_outOfOrderImports; + if (outOfOrderImports == null) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListMixin.E")), true, type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, outOfOrderImports); + t2 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListMixin.E"))); + return t1; + }, + _async_evaluate0$_combineCss$2$clone(root, clone) { + var selectors, unsatisfiedExtension, sortedModules, t1, imports, css, t2, t3, statements, index, _this = this; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure8())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + unsatisfiedExtension = A.firstOrNull0(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure9(selectors))); + if (unsatisfiedExtension != null) + _this._async_evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtension); + return root.get$css(root); + } + sortedModules = _this._async_evaluate0$_topologicalModules$1(root); + if (clone) { + t1 = sortedModules.$ti._eval$1("MappedListIterable>"); + sortedModules = A.List_List$of(new A.MappedListIterable(sortedModules, new A._EvaluateVisitor__combineCss_closure10(), t1), true, t1._eval$1("ListIterable.E")); + } + _this._async_evaluate0$_extendModules$1(sortedModules); + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + for (t1 = J.get$reversed$ax(sortedModules), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t3 = t3.get$css(t3); + statements = t3.get$children(t3); + index = _this._async_evaluate0$_indexAfterImports$1(statements); + t3 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(imports, t3.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(css, t3.getRange$2(statements, index, t3.get$length(statements))); + } + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _async_evaluate0$_combineCss$1(root) { + return this._async_evaluate0$_combineCss$2$clone(root, false); + }, + _async_evaluate0$_extendModules$1(sortedModules) { + var t1, t2, originalSelectors, $self, t3, t4, _i, upstream, url, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = J.get$iterator$ax(sortedModules); t1.moveNext$0();) { + t2 = t1.get$current(t1); + originalSelectors = t2.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t2.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure5(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t2.get$url(t2)); + t3 = t2.get$extensionStore().get$addExtensions(); + if ($self != null) + t3.call$1($self); + t3 = t2.get$extensionStore(); + if (t3.get$isEmpty(t3)) + continue; + for (t3 = t2.get$upstream(), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + upstream = t3[_i]; + url = upstream.get$url(upstream); + if (url == null) + continue; + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(url, new A._EvaluateVisitor__extendModules_closure6()), t2.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t2.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(unsatisfiedExtensions)); + }, + _async_evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span)); + }, + _async_evaluate0$_topologicalModules$1(root) { + var t1 = type$.Module_AsyncCallable_2, + sorted = A.QueueList$(null, t1); + new A._EvaluateVisitor__topologicalModules_visitModule2(A.LinkedHashSet_LinkedHashSet$_empty(t1), sorted).call$1(root); + return sorted; + }, + _async_evaluate0$_indexAfterImports$1(statements) { + var t1, t2, t3, lastImport, i, statement; + for (t1 = J.getInterceptor$asx(statements), t2 = type$.CssComment_2, t3 = type$.CssImport_2, lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + statement = t1.$index(statements, i); + if (t3._is(statement)) + lastImport = i; + else if (!t2._is(statement)) + break; + } + return lastImport + 1; + }, + visitStylesheet$1(node) { + return this.visitStylesheet$body$_EvaluateVisitor0(node); + }, + visitStylesheet$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _i; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(node) { + return this.visitAtRootRule$body$_EvaluateVisitor0(node); + }, + visitAtRootRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, grandparent, root, innerCopy, t2, outerCopy, t3, copy, unparsedQuery, query, $parent, included, $async$temp1, $async$temp2; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + unparsedQuery = node.query; + $async$goto = unparsedQuery != null ? 3 : 5; + break; + case 3: + // then + $async$temp1 = unparsedQuery; + $async$temp2 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(unparsedQuery, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + $async$result = $async$self._async_evaluate0$_adjustParseError$2($async$temp1, new $async$temp2._EvaluateVisitor_visitAtRootRule_closure8($async$self, $async$result)); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$result = B.AtRootQuery_UsS0; + case 4: + // join + query = $async$result; + $parent = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = grandparent) { + if (!query.excludes$1($parent)) + included.push($parent); + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate0$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure9($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length !== 0) { + innerCopy = B.JSArray_methods.get$first(included).copyWithoutChildren$0(); + for (t1 = A.SubListIterable$(included, 1, null, type$.ModifiableCssParentNode_2), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, outerCopy = innerCopy; t1.moveNext$0(); outerCopy = copy) { + t3 = t1.__internal$_current; + copy = (t3 == null ? t2._as(t3) : t3).copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure10($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, grandparent, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + $parent = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = grandparent) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = grandparent) { + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_)) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure17(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure18(_this, scope); + if (_this._async_evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure19(_this, scope); + if (_this._async_evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure20(_this, scope); + return _this._async_evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure21()) ? new A._EvaluateVisitor__scopeForAtRoot_closure22(_this, scope) : scope; + }, + visitContentBlock$1(node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(node) { + return this.visitContentRule$body$_EvaluateVisitor0(node); + }, + visitContentRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate0$_environment._async_environment0$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure2($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(node) { + return this.visitDebugRule$body$_EvaluateVisitor0(node); + }, + visitDebugRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + $async$self._async_evaluate0$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(node) { + return this.visitDeclaration$body$_EvaluateVisitor0(node); + }, + visitDeclaration$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, $name, t2, cssValue, t3, t4, children, oldDeclarationName; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate0$_inUnknownAtRule && !$async$self._async_evaluate0$_inKeyframes) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarm, node.span)); + t1 = node.name; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + t2 = $async$self._async_evaluate0$_declarationName; + if (t2 != null) + $name = new A.CssValue0(t2 + "-" + A.S($name.get$value($name)), $name.get$span($name), type$.CssValue_String_2); + t2 = node.value; + $async$goto = 4; + return A._asyncAwait(A.NullableExtension_andThen0(t2, new A._EvaluateVisitor_visitDeclaration_closure5($async$self)), $async$visitDeclaration$1); + case 4: + // returning from await. + cssValue = $async$result; + t3 = cssValue != null; + if (t3) + t4 = !cssValue.get$value(cssValue).get$isBlank() || cssValue.get$value(cssValue).get$asList().length === 0; + else + t4 = false; + if (t4) { + t3 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + if ($async$self._async_evaluate0$_sourceMap) { + t2 = A.NullableExtension_andThen0(t2, $async$self.get$_async_evaluate0$_expressionNode()); + t2 = t2 == null ? null : J.get$span$z(t2); + } else + t2 = null; + t3.addChild$1(A.ModifiableCssDeclaration$0($name, cssValue, node.span, t1, t2)); + } else if (J.startsWith$1$s($name.get$value($name), "--") && t3) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Custom property values may not be empty.", cssValue.get$span(cssValue))); + children = node.children; + $async$goto = children != null ? 5 : 6; + break; + case 5: + // then + oldDeclarationName = $async$self._async_evaluate0$_declarationName; + $async$self._async_evaluate0$_declarationName = $name.get$value($name); + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure6($async$self, children), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 7: + // returning from await. + $async$self._async_evaluate0$_declarationName = oldDeclarationName; + case 6: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(node) { + return this.visitEachRule$body$_EvaluateVisitor0(node); + }, + visitEachRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, list, nodeWithSpan, setVariables; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t1); + setVariables = node.variables.length === 1 ? new A._EvaluateVisitor_visitEachRule_closure8($async$self, node, nodeWithSpan) : new A._EvaluateVisitor_visitEachRule_closure9($async$self, node, nodeWithSpan); + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure10($async$self, list, setVariables, node), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], this._async_evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(node) { + return this.visitErrorRule$body$_EvaluateVisitor0(node); + }, + visitErrorRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate0$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(node) { + return this.visitExtendRule$body$_EvaluateVisitor0(node); + }, + visitExtendRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, t7, _i, complex, visitor, t8, t9, targetText, compound, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = styleRule.selector, t4 = t3.span, t5 = node.span, t6 = type$.SourceSpan, t7 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + complex.accept$1(visitor); + t8 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t9 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + $async$self._async_evaluate0$_warn$3$deprecation('The selector "' + t8 + '" is invalid CSS and ' + t9 + string$.x20be_an, new A.MultiSpan0(t4, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t5, "@extend rule"], t6, t7), t6, t7)), true); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + targetText = $async$result; + for (t1 = $async$self._async_evaluate0$_adjustParseError$2(targetText, new A._EvaluateVisitor_visitExtendRule_closure2($async$self, targetText)).components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t4 = complex.components; + t4 = t4.length === 1 && B.JSArray_methods.get$first(t4).combinators.length === 0; + } else + t4 = false; + compound = t4 ? B.JSArray_methods.get$first(complex.components).selector : null; + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", targetText.get$span(targetText))); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, targetText.get$span(targetText))); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3, t5, node, $async$self._async_evaluate0$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(node) { + return this.visitAtRule$body$_EvaluateVisitor0(node); + }, + visitAtRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $name, value, children, wasInKeyframes, wasInUnknownAtRule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + $async$goto = 4; + return A._asyncAwait(A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure8($async$self)), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.get$value($name)) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure9($async$self, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure10(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(node) { + return this.visitForRule$body$_EvaluateVisitor0(node); + }, + visitForRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber_2; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure14($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure15($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure16(fromNumber)); + to = t1.to = $async$self._async_evaluate0$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure17(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure18(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(node) { + return this.visitForwardRule$body$_EvaluateVisitor0(node); + }, + visitForwardRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate0$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure5($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate0$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure6($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate0$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate0$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor0(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor0(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration_2), + $async$returnValue, $async$self = this, t2, t3, _i, variable, t4, t5, variableNodeWithSpan, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate0$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._configuration$_values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + t2 = node.configuration, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + t5 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t4); + if (t5 != null && !t5.value.$eq(0, B.C__SassNull0)) { + newValues.$indexSet(0, t4, t5); + // goto for update + $async$goto = 4; + break; + } + } + t4 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t4); + $async$temp1 = newValues; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t4.accept$1($async$self), $async$_async_evaluate0$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration0(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration0(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, entry; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = t1.get$entries(t1); + entry = t1.get$first(t1); + t1 = nameInError ? "$" + A.S(entry.key) + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate0$_exception$2(t1, entry.value.configurationSpan)); + }, + _async_evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(node) { + return this.visitFunctionRule$body$_EvaluateVisitor0(node); + }, + visitFunctionRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(node) { + return this.visitIfRule$body$_EvaluateVisitor0(node); + }, + visitIfRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, _box_0; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + _box_0.clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = _box_0.clause; + if (t1 == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule_closure2(_box_0, $async$self), true, t1.hasDeclarations, type$.nullable_Value_2), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(node) { + return this.visitImportRule$body$_EvaluateVisitor0(node); + }, + visitImportRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport_2, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport0 ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate0$_visitDynamicImport$1($import) { + return this._async_evaluate0$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure2(this, $import), type$.void); + }, + _async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport); + }, + _async_evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$._LoadedStylesheet_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, importCache, tuple, isDependency, stylesheet, result, error, stackTrace, error0, stackTrace0, message, t1, t2, t3, t4, exception, message0, $async$exception; + var $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate0$_importSpan = span; + importCache = $async$self._async_evaluate0$_importCache; + $async$goto = importCache != null ? 7 : 9; + break; + case 7: + // then + if (baseUrl == null) + baseUrl = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url; + $async$goto = 10; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate0$_importer, baseUrl, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 10: + // returning from await. + tuple = $async$result; + $async$goto = tuple != null ? 11 : 12; + break; + case 11: + // then + isDependency = $async$self._async_evaluate0$_inDependency || tuple.item1 !== $async$self._async_evaluate0$_importer; + t1 = tuple.item1; + t2 = tuple.item2; + t3 = tuple.item3; + t4 = $async$self._async_evaluate0$_quietDeps && isDependency; + $async$goto = 13; + return A._asyncAwait(importCache.importCanonical$4$originalUrl$quiet(t1, t2, t3, t4), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 13: + // returning from await. + stylesheet = $async$result; + if (stylesheet != null) { + $async$self._async_evaluate0$_loadedUrls.add$1(0, tuple.item2); + t1 = tuple.item1; + $async$returnValue = new A._LoadedStylesheet2(stylesheet, t1, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 12: + // join + // goto join + $async$goto = 8; + break; + case 9: + // else + t1 = baseUrl; + $async$goto = 14; + return A._asyncAwait($async$self._async_evaluate0$_importLikeNode$3(url, t1 == null ? $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url : t1, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 14: + // returning from await. + result = $async$result; + if (result != null) { + t1 = $async$self._async_evaluate0$_loadedUrls; + A.NullableExtension_andThen0(result.stylesheet.span.file.url, t1.get$add(t1)); + $async$returnValue = result; + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 8: + // join + if (B.JSString_methods.startsWith$1(url, "package:") && true) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t2, t1)), stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + message = null; + try { + message = A._asString(J.get$message$x(error0)); + } catch (exception) { + message0 = J.toString$0$(error0); + message = message0; + } + A.throwWithTrace0($async$self._async_evaluate0$_exception$1(message), stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate0$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _async_evaluate0$_importLikeNode$3(originalUrl, previous, forImport) { + return this._importLikeNode$body$_EvaluateVisitor0(originalUrl, previous, forImport); + }, + _importLikeNode$body$_EvaluateVisitor0(originalUrl, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable__LoadedStylesheet_2), + $async$returnValue, $async$self = this, isDependency, url, t2, t1, result; + var $async$_async_evaluate0$_importLikeNode$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_nodeImporter; + result = t1.loadRelative$3(originalUrl, previous, forImport); + $async$goto = result != null ? 3 : 5; + break; + case 3: + // then + isDependency = $async$self._async_evaluate0$_inDependency; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = 6; + return A._asyncAwait(t1.loadAsync$3(originalUrl, previous, forImport), $async$_async_evaluate0$_importLikeNode$3); + case 6: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + isDependency = true; + case 4: + // join + url = result.item2; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; + t2 = $async$self._async_evaluate0$_quietDeps && isDependency ? $.$get$Logger_quiet0() : $async$self._async_evaluate0$_logger; + $async$returnValue = new A._LoadedStylesheet2(A.Stylesheet_Stylesheet$parse0(result.item1, t1, t2, url), null, isDependency); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_importLikeNode$3, $async$completer); + }, + _async_evaluate0$_visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor0($import); + }, + _visitStaticImport$body$_EvaluateVisitor0($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, node, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1($import.url), $async$_async_evaluate0$_visitStaticImport$1); + case 2: + // returning from await. + $async$temp2 = $async$result; + $async$goto = 3; + return A._asyncAwait(A.NullableExtension_andThen0($import.modifiers, $async$self.get$_async_evaluate0$_interpolationToValue()), $async$_async_evaluate0$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport0($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(node); + else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(node); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitStaticImport$1, $async$completer); + }, + visitIncludeRule$1(node) { + return this.visitIncludeRule$body$_EvaluateVisitor0(node); + }, + visitIncludeRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, nodeWithSpan, t1, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure11($async$self, node)); + if (mixin == null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined mixin.", node.span)); + nodeWithSpan = new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure12(node)); + $async$goto = type$.AsyncBuiltInCallable_2._is(mixin) ? 3 : 5; + break; + case 3: + // then + if (node.content != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Mixin doesn't accept a content block.", node.span)); + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_runBuiltInCallable$3(node.$arguments, mixin, nodeWithSpan), $async$visitIncludeRule$1); + case 6: + // returning from await. + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment_2._is(mixin) ? 7 : 9; + break; + case 7: + // then + t1 = node.content; + if (t1 != null && !type$.MixinRule_2._as(mixin.declaration).get$hasContent()) + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", node.get$spanWithoutContent(), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(node.get$spanWithoutContent()))); + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4(node.$arguments, mixin, nodeWithSpan, new A._EvaluateVisitor_visitIncludeRule_closure13($async$self, A.NullableExtension_andThen0(t1, new A._EvaluateVisitor_visitIncludeRule_closure14($async$self)), mixin, nodeWithSpan), type$.Null), $async$visitIncludeRule$1); + case 10: + // returning from await. + // goto join + $async$goto = 8; + break; + case 9: + // else + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 8: + // join + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(node) { + return this.visitMixinRule$body$_EvaluateVisitor0(node); + }, + visitMixinRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(node) { + return this.visitLoudComment$body$_EvaluateVisitor0(node); + }, + visitLoudComment$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$temp1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + $async$temp1.addChild$1(new $async$temp2.ModifiableCssComment0($async$result, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(node) { + return this.visitMediaRule$body$_EvaluateVisitor0(node); + }, + visitMediaRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure8($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty4; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure9($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitMediaRule$1); + case 4: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _async_evaluate0$_visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor0(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor0(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery_2), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = interpolation; + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, true), $async$_async_evaluate0$_visitMediaQueries$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_adjustParseError$2($async$temp1, new $async$temp2._EvaluateVisitor__visitMediaQueries_closure2($async$self, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2), t3 = type$.MediaQuerySuccessfulMergeResult_2; t1.moveNext$0();) { + t4 = t1.get$current(t1); + for (t5 = t2.get$iterator(queries2); t5.moveNext$0();) { + result = t4.merge$1(t5.get$current(t5)); + if (result === B._SingletonCssMediaQueryMergeResult_empty0) + continue; + if (result === B._SingletonCssMediaQueryMergeResult_unrepresentable0) + return null; + queries.push(t3._as(result).query); + } + } + return queries; + }, + visitReturnRule$1(node) { + return this.visitReturnRule$body$_EvaluateVisitor0(node); + }, + visitReturnRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(node) { + return this.visitSilentComment$body$_EvaluateVisitor0(node); + }, + visitSilentComment$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(node) { + return this.visitStyleRule$body$_EvaluateVisitor0(node); + }, + visitStyleRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, selectorText, rule, oldAtRootExcludingStyleRule, t2, t3, t4, t5, t6, _i, complex, visitor, t7, t8, t9, _box_0; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_, node.span)); + t1 = node.selector; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$3$trim$warnForColor(t1, true, true), $async$visitStyleRule$1); + case 3: + // returning from await. + selectorText = $async$result; + $async$goto = $async$self._async_evaluate0$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable($async$self._async_evaluate0$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure23($async$self, selectorText)), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure24($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure25(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + _box_0.parsedSelector = $async$self._async_evaluate0$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure26($async$self, selectorText)); + _box_0.parsedSelector = $async$self._async_evaluate0$_addExceptionSpan$2(t1, new A._EvaluateVisitor_visitStyleRule_closure27(_box_0, $async$self)); + t1 = t1.span; + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$3(_box_0.parsedSelector, t1, $async$self._async_evaluate0$_mediaQueries), node.span, _box_0.parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure28($async$self, rule, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure29(), type$.ModifiableCssStyleRule_2, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t2 = _box_0.parsedSelector.components, t3 = t2.length, t4 = type$.SourceSpan, t5 = type$.String, t6 = rule.children, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + complex.accept$1(visitor); + $async$self._async_evaluate0$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, t1, true); + } else if (complex.leadingCombinators.length !== 0) { + visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + complex.accept$1(visitor); + $async$self._async_evaluate0$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, t1, true); + } else { + visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + complex.accept$1(visitor); + t7 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t8 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + if (t6.get$length(t6) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t6.$index(0, 0)); + $async$self._async_evaluate0$_warn$3$deprecation('The selector "' + t7 + string$.x22x20is_o + t8 + string$.x0aThis_, new A.MultiSpan0(t1, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t6.every$1(t6, new A._EvaluateVisitor_visitStyleRule_closure30()) ? "\n(try converting to a //-style comment)" : "")], t4, t5), t4, t5)), true); + } + } + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + visitSupportsRule$1(node) { + return this.visitSupportsRule$body$_EvaluateVisitor0(node); + }, + visitSupportsRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 4: + // returning from await. + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$0(new $async$temp2.CssValue0($async$result, t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure5($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitSupportsRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate0$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor0(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor0(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, oldInSupportsDeclaration, t2, t3, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = condition instanceof A.SupportsOperation0 ? 3 : 5; + break; + case 3: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.left, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.right, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 7: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = condition instanceof A.SupportsNegation0 ? 8 : 10; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$1(condition.condition), $async$_async_evaluate0$_visitSupportsCondition$1); + case 11: + // returning from await. + $async$returnValue = "not " + $async$temp1.S($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 9; + break; + case 10: + // else + $async$goto = condition instanceof A.SupportsInterpolation0 ? 12 : 14; + break; + case 12: + // then + $async$goto = 15; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate0$_visitSupportsCondition$1); + case 15: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 13; + break; + case 14: + // else + $async$goto = condition instanceof A.SupportsDeclaration0 ? 16 : 18; + break; + case 16: + // then + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = true; + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(condition.name), $async$_async_evaluate0$_visitSupportsCondition$1); + case 19: + // returning from await. + t1 = $async$temp1.S($async$result); + t2 = condition.get$isCustomProperty() ? "" : " "; + $async$temp1 = A; + $async$goto = 20; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(condition.value), $async$_async_evaluate0$_visitSupportsCondition$1); + case 20: + // returning from await. + t3 = $async$temp1.S($async$result); + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = "(" + t1 + ":" + t2 + t3 + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 17; + break; + case 18: + // else + $async$goto = condition instanceof A.SupportsFunction0 ? 21 : 23; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 24; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.name), $async$_async_evaluate0$_visitSupportsCondition$1); + case 24: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 25; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.$arguments), $async$_async_evaluate0$_visitSupportsCondition$1); + case 25: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 22; + break; + case 23: + // else + $async$goto = condition instanceof A.SupportsAnything0 ? 26 : 28; + break; + case 26: + // then + $async$temp1 = A; + $async$goto = 29; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.contents), $async$_async_evaluate0$_visitSupportsCondition$1); + case 29: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 27; + break; + case 28: + // else + throw A.wrapException(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeType(condition).toString$0(0) + ".", null)); + case 27: + // join + case 22: + // join + case 17: + // join + case 13: + // join + case 9: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate0$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor0(condition, operator); + }, + _async_evaluate0$_parenthesize$1(condition) { + return this._async_evaluate0$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor0(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate0$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 5; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor0(node); + }, + visitVariableDeclaration$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, value, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1) { + t1 = $async$self._async_evaluate0$_configuration._configuration$_values; + t1 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, node.name); + if (t1 != null && !t1.value.$eq(0, B.C__SassNull0)) { + $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure8($async$self, node, t1)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure9($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate0$_warn$3$deprecation(t1, node.span, true); + } + t1 = node.expression; + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure10($async$self, $async$temp3, $async$self._async_evaluate0$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(node) { + return this.visitUseRule$body$_EvaluateVisitor0(node); + }, + visitUseRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, values, _i, variable, t3, variableNodeWithSpan, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t3); + $async$temp1 = values; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t3.accept$1($async$self), $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration0(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null0; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure2($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(node) { + return this.visitWarnRule$body$_EvaluateVisitor0(node); + }, + visitWarnRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure2($async$self, node), type$.Value_2), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : $async$self._async_evaluate0$_serialize$2(value, node.expression); + $async$self._async_evaluate0$_logger.warn$2$trace(0, t1, $async$self._async_evaluate0$_stackTrace$1(node.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(node) { + return this._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure2(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(node) { + return this._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure2(this, node), type$.Value_2); + }, + visitValueExpression$1(node) { + return this.visitValueExpression$body$_EvaluateVisitor0(node); + }, + visitValueExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(node) { + return this.visitVariableExpression$body$_EvaluateVisitor0(node); + }, + visitVariableExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure2($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor0(node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure2($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(node) { + return this.visitBooleanExpression$body$_EvaluateVisitor0(node); + }, + visitBooleanExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean_2), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(node) { + return this.visitIfExpression$body$_EvaluateVisitor0(node); + }, + visitIfExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, condition, t2, ifTrue, ifFalse, result, pair, positional, named, t1; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); + case 3: + // returning from await. + pair = $async$result; + positional = pair.item1; + named = pair.item2; + t1 = J.getInterceptor$asx(positional); + $async$self._async_evaluate0$_verifyArguments$4(t1.get$length(positional), named, $.$get$IfExpression_declaration0(), node); + if (t1.get$length(positional) > 0) + condition = t1.$index(positional, 0); + else { + t2 = named.$index(0, "condition"); + t2.toString; + condition = t2; + } + if (t1.get$length(positional) > 1) + ifTrue = t1.$index(positional, 1); + else { + t2 = named.$index(0, "if-true"); + t2.toString; + ifTrue = t2; + } + if (t1.get$length(positional) > 2) + ifFalse = t1.$index(positional, 2); + else { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + $async$goto = 5; + return A._asyncAwait(result.accept$1($async$self), $async$visitIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, $async$self._async_evaluate0$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitNullExpression$1(node) { + return this.visitNullExpression$body$_EvaluateVisitor0(node); + }, + visitNullExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(node) { + return this.visitNumberExpression$body$_EvaluateVisitor0(node); + }, + visitNumberExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber0(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(node) { + return node.expression.accept$1(this); + }, + visitCalculationExpression$1(node) { + return this.visitCalculationExpression$body$_EvaluateVisitor0(node); + }, + visitCalculationExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, $arguments, error, stackTrace, t2, t3, t4, t5, t6, _i, argument, exception, t1, $async$temp1; + var $async$visitCalculationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + $async$outer: + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.$arguments, t3 = t2.length, t4 = node.name, t5 = t4 !== "min", t6 = t4 === "max", _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + argument = t2[_i]; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationValue$2$inMinMax(argument, !t5 || t6), $async$visitCalculationExpression$1); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t1; + if ($async$self._async_evaluate0$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation0(t4, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + try { + switch (t4) { + case "calc": + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "min": + t1 = A.SassCalculation_min0($arguments); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "max": + t1 = A.SassCalculation_max0($arguments); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + case "clamp": + t1 = J.$index$asx($arguments, 0); + t3 = J.get$length$asx($arguments) > 1 ? J.$index$asx($arguments, 1) : null; + t1 = A.SassCalculation_clamp0(t1, t3, J.get$length$asx($arguments) > 2 ? J.$index$asx($arguments, 2) : null); + $async$returnValue = t1; + // goto return + $async$goto = 1; + break $async$outer; + default: + t1 = A.UnsupportedError$('Unknown calculation name "' + t4 + '".'); + throw A.wrapException(t1); + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + $async$self._async_evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error.message, node.span), stackTrace); + } else + throw exception; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCalculationExpression$1, $async$completer); + }, + _async_evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + arg = args[i]; + if (!(arg instanceof A.SassNumber0)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(this._async_evaluate0$_exception$2("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])))); + } + } + }, + _async_evaluate0$_visitCalculationValue$2$inMinMax(node, inMinMax) { + return this._visitCalculationValue$body$_EvaluateVisitor0(node, inMinMax); + }, + _visitCalculationValue$body$_EvaluateVisitor0(node, inMinMax) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, inner, result, t1, $async$temp1; + var $async$_async_evaluate0$_visitCalculationValue$2$inMinMax = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = node instanceof A.ParenthesizedExpression0 ? 3 : 5; + break; + case 3: + // then + inner = node.expression; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationValue$2$inMinMax(inner, inMinMax), $async$_async_evaluate0$_visitCalculationValue$2$inMinMax); + case 6: + // returning from await. + result = $async$result; + if (inner instanceof A.FunctionExpression0) + t1 = A.stringReplaceAllUnchecked(inner.originalName, "_", "-").toLowerCase() === "var" && result instanceof A.SassString0 && !result._string0$_hasQuotes; + else + t1 = false; + $async$returnValue = t1 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = node instanceof A.StringExpression0 ? 7 : 9; + break; + case 7: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.text), $async$_async_evaluate0$_visitCalculationValue$2$inMinMax); + case 10: + // returning from await. + $async$returnValue = new $async$temp1.CalculationInterpolation0($async$result); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = node instanceof A.BinaryOperationExpression0 ? 11 : 13; + break; + case 11: + // then + $async$goto = 14; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationValue_closure2($async$self, node, inMinMax), type$.Object), $async$_async_evaluate0$_visitCalculationValue$2$inMinMax); + case 14: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate0$_visitCalculationValue$2$inMinMax); + case 15: + // returning from await. + result = $async$result; + if (result instanceof A.SassNumber0 || result instanceof A.SassCalculation0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (result instanceof A.SassString0 && !result._string0$_hasQuotes) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate0$_exception$2("Value " + result.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitCalculationValue$2$inMinMax, $async$completer); + }, + _async_evaluate0$_binaryOperatorToCalculationOperator$1(operator) { + switch (operator) { + case B.BinaryOperator_qbf0: + return B.CalculationOperator_IyK0; + case B.BinaryOperator_KlB0: + return B.CalculationOperator_2bx0; + case B.BinaryOperator_6pl0: + return B.CalculationOperator_jFr0; + case B.BinaryOperator_qpm0: + return B.CalculationOperator_OvN0; + default: + throw A.wrapException(A.UnsupportedError$("Invalid calculation operator " + operator.toString$0(0) + ".")); + } + }, + visitColorExpression$1(node) { + return this.visitColorExpression$body$_EvaluateVisitor0(node); + }, + visitColorExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor_2), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(node) { + return this.visitListExpression$body$_EvaluateVisitor0(node); + }, + visitListExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync0(node.contents, new A._EvaluateVisitor_visitListExpression_closure2($async$self), type$.Expression_2, type$.Value_2), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$0($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(node) { + return this.visitMapExpression$body$_EvaluateVisitor0(node); + }, + visitMapExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap_2), + $async$returnValue, $async$self = this, t2, t3, _i, pair, t4, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value_2; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + pair = t2[_i]; + t4 = pair.item1; + $async$goto = 6; + return A._asyncAwait(t4.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(pair.item2.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.$index(0, keyValue) != null) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = J.getInterceptor$z(t4); + t2 = t1.get$span(t4); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t3.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t2, "second key", t3, $async$self._async_evaluate0$_stackTrace$1(t1.get$span(t4)))); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(node) { + return this.visitFunctionExpression$body$_EvaluateVisitor0(node); + }, + visitFunctionExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure5($async$self, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined function.", node.span)); + t1.$function = new A.PlainCssCallable0(node.originalName); + } + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure6(t1, $async$self, node), type$.Value_2), $async$visitFunctionExpression$1); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + visitInterpolatedFunctionExpression$1(node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2($async$self, node, new A.PlainCssCallable0(t1)), type$.Value_2), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate0$_getFunction$2$namespace($name, namespace) { + var local = this._async_evaluate0$_environment.getFunction$2$namespace($name, namespace); + if (local != null || namespace != null) + return local; + return this._async_evaluate0$_builtInFunctions.$index(0, $name); + }, + _async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; + var $async$_async_evaluate0$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = $async$self._async_evaluate0$_currentCallable; + $async$self._async_evaluate0$_currentCallable = callable; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure2($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_currentCallable = oldCallable; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, first, _i, argument, restArg, rest, $async$temp1; + var $async$_async_evaluate0$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable_2._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate0$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment_2._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure2($async$self, callable), type$.Value_2), $async$_async_evaluate0$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable0 ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + t1 = callable.name + "("; + t2 = $arguments.positional, t3 = t2.length, first = true, _i = 0; + case 14: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 16; + break; + } + argument = t2[_i]; + if (first) + first = false; + else + t1 += ", "; + $async$temp1 = A; + $async$goto = 17; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(argument), $async$_async_evaluate0$_runFunctionCallable$3); + case 17: + // returning from await. + t1 += $async$temp1.S($async$result); + case 15: + // for update + ++_i; + // goto for condition + $async$goto = 14; + break; + case 16: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 18 : 19; + break; + case 18: + // then + $async$goto = 20; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate0$_runFunctionCallable$3); + case 20: + // returning from await. + rest = $async$result; + if (!first) + t1 += ", "; + t1 += $async$self._async_evaluate0$_serialize$2(rest, restArg); + case 19: + // join + t1 += A.Primitives_stringFromCharCode(41); + $async$returnValue = new A.SassString0(t1.charCodeAt(0) == 0 ? t1 : t1, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$u(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, callback, result, error, stackTrace, error0, stackTrace0, error1, stackTrace1, message, namedSet, tuple, overload, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, t4, t5, t6, message0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate0$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate0$_callableNode; + $async$self._async_evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated.named, type$.MapKeySet_String); + tuple = callable.callbackFor$2(evaluated.positional.length, namedSet); + overload = tuple.item1; + callback = tuple.item2; + $async$self._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure5(overload, evaluated, namedSet)); + declaredArguments = overload.$arguments; + i = evaluated.positional.length, t1 = declaredArguments.length; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + argument = declaredArguments[i]; + t2 = evaluated.positional; + t3 = evaluated.named.remove$1(0, argument.name); + $async$goto = t3 == null ? 7 : 8; + break; + case 7: + // then + t3 = argument.defaultValue; + $async$goto = 9; + return A._asyncAwait(t3.accept$1($async$self), $async$_async_evaluate0$_runBuiltInCallable$3); + case 9: + // returning from await. + t3 = $async$self._async_evaluate0$_withoutSlash$2($async$result, t3); + case 8: + // join + t2.push(t3); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (overload.restArgument != null) { + if (evaluated.positional.length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated.positional, t1); + B.JSArray_methods.removeRange$2(evaluated.positional, t1, evaluated.positional.length); + } else + rest = B.List_empty19; + t1 = evaluated.named; + argumentList = A.SassArgumentList$0(rest, t1, evaluated.separator === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_rXA0 : evaluated.separator); + evaluated.positional.push(argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait(callback.call$1(evaluated.positional), $async$_async_evaluate0$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) + throw $async$exception; + else if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0($async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.MultiSpanSassException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + t1 = error0._span_exception$_message; + t2 = error0; + t3 = J.getInterceptor$z(t2); + t2 = A.SourceSpanException.prototype.get$span.call(t3, t2); + t3 = error0.primaryLabel; + t4 = error0.secondarySpans; + t5 = error0; + t6 = J.getInterceptor$z(t5); + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0($async$self._async_evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t6, t5)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace0); + } else { + error1 = t1; + stackTrace1 = A.getTraceFromException($async$exception); + message = null; + try { + message = A._asString(J.get$message$x(error1)); + } catch (exception) { + message0 = J.toString$0$(error1); + message = message0; + } + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace1); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (evaluated.named.__js_helper$_length === 0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated.named; + t1 = t1.get$keys(t1); + t1 = A.pluralize0("argument", t1.get$length(t1), null); + t2 = evaluated.named; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + t1 + " named " + A.S(A.toSentence0(t2.get$keys(t2).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure6(), type$.Object), "or")) + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate0$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor0($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$._ArgumentResults_2), + $async$returnValue, $async$self = this, t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, t5, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value_2); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(expression); + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(expression.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t3 = $arguments.named, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); + case 7: + // for condition + if (!t3.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t4 = t3.get$current(t3); + t5 = t4.value; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(t5); + t4 = t4.key; + $async$temp1 = named; + $async$temp2 = t4; + $async$goto = 9; + return A._asyncAwait(t5.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, t4, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._ArgumentResults2(positional, positionalNodes, named, namedNodes, B.ListSeparator_undecided_null_undecided0); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure11()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure12($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure13($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._ArgumentResults2(positional, positionalNodes, named, namedNodes, separator); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure14()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._ArgumentResults2(positional, positionalNodes, named, namedNodes, separator); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateArguments$1, $async$completer); + }, + _async_evaluate0$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor0(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor0(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Tuple2_of_List_Expression_and_Map_String_Expression_2), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate0$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A.Tuple2(t1.positional, t1.named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + $async$self._async_evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure11(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure12($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure13($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure14($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure2(this, values, convert, this._async_evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure2($arguments, positional, named)); + }, + visitSelectorExpression$1(node) { + return this.visitSelectorExpression$body$_EvaluateVisitor0(node); + }, + visitSelectorExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull0 : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(node) { + return this.visitStringExpression$body$_EvaluateVisitor0(node); + }, + visitStringExpression$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, t1, oldInSupportsDeclaration, $async$temp1; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + $async$temp1 = J; + $async$goto = 3; + return A._asyncAwait(A.mapAsync0(node.text.contents, new A._EvaluateVisitor_visitStringExpression_closure2($async$self), type$.Object, type$.String), $async$visitStringExpression$1); + case 3: + // returning from await. + t1 = $async$temp1.join$0$ax($async$result); + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString0(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor0(expression); + }, + visitSupportsExpression$body$_EvaluateVisitor0(expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString0($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor0(node); + }, + visitCssAtRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.get$value(t1)) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure6(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitCssAtRule$1); + case 3: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor0(node); + }, + visitCssComment$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor0(node); + }, + visitCssDeclaration$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.name; + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(t1, node.value, node.span, J.startsWith$1$s(t1.get$value(t1), "--"), node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor0(node); + }, + visitCssImport$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(modifiableNode); + else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor0(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure6(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor0(node); + }, + visitCssMediaRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure8($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty4; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure9($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitCssMediaRule$1); + case 3: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor0(node); + }, + visitCssStyleRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, t2, t3, t4, t5, originalSelector, rule, oldAtRootExcludingStyleRule; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_, node.span)); + t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t2 = node.selector; + t3 = t2.value; + t4 = styleRule == null; + t5 = t4 ? null : styleRule.originalSelector; + originalSelector = t3.resolveParentSelectors$2$implicitParent(t5, !t1); + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$3(originalSelector, t2.span, $async$self._async_evaluate0$_mediaQueries), node.span, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure5($async$self, rule, node), false, new A._EvaluateVisitor_visitCssStyleRule_closure6(), type$.ModifiableCssStyleRule_2, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (t4) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor0(node); + }, + visitCssStylesheet$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor0(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitCssSupportsRule$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate0$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor0(list, callback); + }, + _async_evaluate0$_handleReturn$2(list, callback) { + return this._async_evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor0(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, t1, _i, result; + var $async$_async_evaluate0$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate0$_handleReturn$1$2); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_handleReturn$1$2, $async$completer); + }, + _async_evaluate0$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate0$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate0$_environment; + $async$self._async_evaluate0$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor); + }, + _async_evaluate0$_interpolationToValue$1(interpolation) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String_2), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii0(result, true) : result; + $async$returnValue = new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor); + }, + _async_evaluate0$_performInterpolation$1(interpolation) { + return this._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, result, oldInSupportsDeclaration, $async$temp1; + var $async$_async_evaluate0$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + $async$temp1 = J; + $async$goto = 3; + return A._asyncAwait(A.mapAsync0(interpolation.contents, new A._EvaluateVisitor__performInterpolation_closure2($async$self, warnForColor, interpolation), type$.Object, type$.String), $async$_async_evaluate0$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + result = $async$temp1.join$0$ax($async$result); + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolation$2$warnForColor, $async$completer); + }, + _async_evaluate0$_evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor0(expression, quote); + }, + _async_evaluate0$_evaluateToCss$1(expression) { + return this._async_evaluate0$_evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor0(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_async_evaluate0$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(expression.accept$1($async$self), $async$_async_evaluate0$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure2(value, quote)); + }, + _async_evaluate0$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._async_evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure2(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _async_evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_evaluate0$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate0$_addChild$2$through(node, through); + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + $async$self._async_evaluate0$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate0$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$__parent = t1; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate0$_addChild$2$through(node, through) { + var grandparent, t1, + $parent = this._async_evaluate0$_assertInModule$2(this._async_evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = grandparent) { + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + t1 = $parent._node0$_parent; + t1.toString; + $parent = $parent.copyWithoutChildren$0(); + t1.addChild$1($parent); + } + } + $parent.addChild$1(node); + }, + _async_evaluate0$_addChild$1(node) { + return this._async_evaluate0$_addChild$2$through(node, null); + }, + _async_evaluate0$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate0$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate0$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate0$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate0$_mediaQueries; + oldSources = $async$self._async_evaluate0$_mediaQuerySources; + $async$self._async_evaluate0$_mediaQueries = queries; + $async$self._async_evaluate0$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate0$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate0$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_stack; + t1.push(new A.Tuple2($async$self._async_evaluate0$_member, nodeWithSpan, type$.Tuple2_String_AstNode_2)); + oldMember = $async$self._async_evaluate0$_member; + $async$self._async_evaluate0$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate0$_withoutSlash$2(value, nodeForSpan) { + if (value instanceof A.SassNumber0 && value.asSlash != null) + this._async_evaluate0$_warn$3$deprecation(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation2().call$1(value)) + string$.x0a_More, nodeForSpan.get$span(nodeForSpan), true); + return value.withoutSlash$0(); + }, + _async_evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure2(this))); + }, + _async_evaluate0$_stackTrace$1(span) { + var _this = this, + t1 = _this._async_evaluate0$_stack; + t1 = A.List_List$of(new A.MappedListIterable(t1, new A._EvaluateVisitor__stackTrace_closure2(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Frame>")), true, type$.Frame); + if (span != null) + t1.push(_this._async_evaluate0$_stackFrame$2(_this._async_evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>")), null); + }, + _async_evaluate0$_stackTrace$0() { + return this._async_evaluate0$_stackTrace$1(null); + }, + _async_evaluate0$_warn$3$deprecation(message, span, deprecation) { + var t1, _this = this; + if (_this._async_evaluate0$_quietDeps) + if (!_this._async_evaluate0$_inDependency) { + t1 = _this._async_evaluate0$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._async_evaluate0$_warningsEmitted.add$1(0, new A.Tuple2(message, span, type$.Tuple2_String_SourceSpan))) + return; + _this._async_evaluate0$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, _this._async_evaluate0$_stackTrace$1(span)); + }, + _async_evaluate0$_warn$2(message, span) { + return this._async_evaluate0$_warn$3$deprecation(message, span, false); + }, + _async_evaluate0$_exception$2(message, span) { + var t1 = span == null ? J.get$span$z(B.JSArray_methods.get$last(this._async_evaluate0$_stack).item2) : span; + return new A.SassRuntimeException0(this._async_evaluate0$_stackTrace$1(span), message, t1); + }, + _async_evaluate0$_exception$1(message) { + return this._async_evaluate0$_exception$2(message, null); + }, + _async_evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = J.get$span$z(B.JSArray_methods.get$last(this._async_evaluate0$_stack).item2); + return new A.MultiSpanSassRuntimeException0(this._async_evaluate0$_stackTrace$0(), primaryLabel, A.ConstantMap_ConstantMap$from(secondaryLabels, type$.FileSpan, type$.String), message, t1); + }, + _async_evaluate0$_adjustParseError$1$2(nodeWithSpan, callback) { + var error, stackTrace, errorText, span, syntheticFile, syntheticSpan, t1, exception, t2, t3, t4, t5, t6, _null = null; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + errorText = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, _null), 0, _null); + span = nodeWithSpan.get$span(nodeWithSpan); + syntheticFile = B.JSString_methods.replaceRange$3(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(J.get$file$x(span)._decodedChars, 0, _null), 0, _null), J.get$start$z(span).offset, J.get$end$z(span).offset, errorText); + t1 = A.SourceFile$fromString(syntheticFile, J.get$file$x(span).url); + t2 = J.get$start$z(span); + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t3 = t3.get$start(t3); + t4 = J.get$start$z(span); + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + syntheticSpan = t1.span$2(0, t2.offset + t3.offset, t4.offset + t5.get$end(t5).offset); + A.throwWithTrace0(this._async_evaluate0$_exception$2(error._span_exception$_message, syntheticSpan), stackTrace); + } else + throw exception; + } + }, + _async_evaluate0$_adjustParseError$2(nodeWithSpan, callback) { + return this._async_evaluate0$_adjustParseError$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(this._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace0(this._async_evaluate0$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw exception; + } + }, + _async_evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4, $async$exception; + var $async$_async_evaluate0$_addExceptionSpanAsync$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_addExceptionSpanAsync$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0($async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addExceptionSpanAsync$1$2, $async$completer); + }, + _async_evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate0$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + A.throwWithTrace0(new A.SassRuntimeException0($async$self._async_evaluate0$_stackTrace$0(), t1, t2), stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addErrorSpan$1$2, $async$completer); + } + }; + A._EvaluateVisitor_closure29.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure30.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure31.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._async_evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure32.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure33.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate0$_environment; + if (!t1._async_environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._async_environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure34.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$variables(), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4.key, true), t4.value); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure35.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$functions(module), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4.key, true), new A.SassFunction0(t4.value)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure36.prototype = { + call$1($arguments) { + var module, callable, t2, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css && module != null) + throw A.wrapException(string$.x24css_a); + if (css) + callable = new A.PlainCssCallable0($name._string0$_text); + else { + t1 = this.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure10(t1, $name, module)); + } + if (callable != null) + return new A.SassFunction0(callable); + throw A.wrapException("Function not found: " + $name.toString$0(0)); + }, + $signature: 164 + }; + A._EvaluateVisitor__closure10.prototype = { + call$0() { + var t1 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t2 = this.module; + t2 = t2 == null ? null : t2._string0$_text; + return this.$this._async_evaluate0$_getFunction$2$namespace(t1, t2); + }, + $signature: 126 + }; + A._EvaluateVisitor_closure37.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure2($arguments); + }, + $call$body$_EvaluateVisitor_closure2($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression_2); + t4 = type$.String; + t5 = type$.Expression_2; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._argument_list$_wereKeywordsAccessed = true; + t8 = args._argument_list$_keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value_2; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._argument_list$_wereKeywordsAccessed = true, t8 = t8.get$entries(t8), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString0(t11.key, false), t11.value); + } + t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); + $async$goto = $function instanceof A.SassString0 ? 3 : 4; + break; + case 3: + // then + t2 = $function.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, string$.Passin + t2 + "))", true); + callableNode = t1._async_evaluate0$_callableNode; + $async$goto = 5; + return A._asyncAwait(t1.visitFunctionExpression$1(new A.FunctionExpression0(null, $function._string0$_text, invocation, callableNode.get$span(callableNode))), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function"); + t3 = t1._async_evaluate0$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 96 + }; + A._EvaluateVisitor_closure38.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure1($arguments); + }, + $call$body$_EvaluateVisitor_closure1($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, values, configuration, t3, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + withMap.forEach$1(0, new A._EvaluateVisitor__closure8(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure9(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 312 + }; + A._EvaluateVisitor__closure8.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); + }, + $signature: 58 + }; + A._EvaluateVisitor__closure9.prototype = { + call$1(module) { + var t1 = this.$this; + return t1._async_evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 167 + }; + A._EvaluateVisitor_run_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.EvaluateResult_2), + $async$returnValue, $async$self = this, t2, t1, url, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + url = t1.span.file.url; + if (url != null) { + t2 = $async$self.$this; + t2._async_evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._async_evaluate0$_nodeImporter != null && url.toString$0(0) === "stdin")) + t2._async_evaluate0$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$temp1 = A; + $async$temp2 = t2; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate0$_execute$2($async$self.importer, t1), $async$call$0); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.EvaluateResult0($async$temp2._async_evaluate0$_combineCss$1($async$result), t2._async_evaluate0$_loadedUrls); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 315 + }; + A._EvaluateVisitor__loadModule_closure5.prototype = { + call$0() { + return this.callback.call$1(this.builtInModule); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, oldInDependency, module, error, stackTrace, error0, stackTrace0, error1, stackTrace1, error2, stackTrace2, message, exception, t3, t4, t5, t6, t7, t1, t2, result, stylesheet, canonicalUrl, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t2.get$span(t2), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + result = $async$result; + stylesheet = result.stylesheet; + canonicalUrl = stylesheet.span.file.url; + if (canonicalUrl != null && t1._async_evaluate0$_activeModules.containsKey$1(canonicalUrl)) { + message = $async$self.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t2 = A.NullableExtension_andThen0(t1._async_evaluate0$_activeModules.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure2(t1, message)); + throw A.wrapException(t2 == null ? t1._async_evaluate0$_exception$1(message) : t2); + } + if (canonicalUrl != null) + t1._async_evaluate0$_activeModules.$indexSet(0, canonicalUrl, t2); + oldInDependency = t1._async_evaluate0$_inDependency; + t1._async_evaluate0$_inDependency = result.isDependency; + module = null; + $async$handler = 3; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(result.importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t2), $async$call$0); + case 6: + // returning from await. + module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t1._async_evaluate0$_activeModules.remove$1(0, canonicalUrl); + t1._async_evaluate0$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$handler = 8; + $async$goto = 11; + return A._asyncAwait($async$self.callback.call$1(module), $async$call$0); + case 11: + // returning from await. + $async$handler = 1; + // goto after finally + $async$goto = 10; + break; + case 8: + // catch + $async$handler = 7; + $async$exception = $async$currentError; + t2 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t2)) + throw $async$exception; + else if (t2 instanceof A.MultiSpanSassException0) { + error = t2; + stackTrace = A.getTraceFromException($async$exception); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t4 = error.primaryLabel; + t5 = error.secondarySpans; + t6 = error; + t7 = J.getInterceptor$z(t6); + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(t1._async_evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t7, t6)), t4, A.ConstantMap_ConstantMap$from(t5, type$.FileSpan, type$.String), t2, t3), stackTrace); + } else if (t2 instanceof A.SassException0) { + error0 = t2; + stackTrace0 = A.getTraceFromException($async$exception); + t2 = error0; + t3 = J.getInterceptor$z(t2); + A.throwWithTrace0(t1._async_evaluate0$_exception$2(error0._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t3, t2)), stackTrace0); + } else if (t2 instanceof A.MultiSpanSassScriptException0) { + error1 = t2; + stackTrace1 = A.getTraceFromException($async$exception); + A.throwWithTrace0(t1._async_evaluate0$_multiSpanException$3(error1.message, error1.primaryLabel, error1.secondarySpans), stackTrace1); + } else if (t2 instanceof A.SassScriptException0) { + error2 = t2; + stackTrace2 = A.getTraceFromException($async$exception); + A.throwWithTrace0(t1._async_evaluate0$_exception$1(error2.message), stackTrace2); + } else + throw $async$exception; + // goto after finally + $async$goto = 10; + break; + case 7: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 10: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure2.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__execute_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + oldStylesheet = t1._async_evaluate0$__stylesheet; + oldRoot = t1._async_evaluate0$__root; + oldParent = t1._async_evaluate0$__parent; + oldEndOfImports = t1._async_evaluate0$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate0$__extensionStore; + t2 = t1._async_evaluate0$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate0$_mediaQueries; + oldDeclarationName = t1._async_evaluate0$_declarationName; + oldInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate0$_inKeyframes; + oldConfiguration = t1._async_evaluate0$_configuration; + t1._async_evaluate0$_importer = $async$self.importer; + t3 = t1._async_evaluate0$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate0$__parent = t1._async_evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + t1._async_evaluate0$__extensionStore = $async$self.extensionStore; + t1._async_evaluate0$_declarationName = t1._async_evaluate0$_mediaQueries = t1._async_evaluate0$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate0$_inKeyframes = t1._async_evaluate0$_atRootExcludingStyleRule = t1._async_evaluate0$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate0$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._async_evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + $async$self.css._value = t3; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = oldStylesheet; + t1._async_evaluate0$__root = oldRoot; + t1._async_evaluate0$__parent = oldParent; + t1._async_evaluate0$__endOfImports = oldEndOfImports; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate0$__extensionStore = oldExtensionStore; + t1._async_evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate0$_mediaQueries = oldMediaQueries; + t1._async_evaluate0$_declarationName = oldDeclarationName; + t1._async_evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate0$_atRootExcludingStyleRule = t2; + t1._async_evaluate0$_inKeyframes = oldInKeyframes; + t1._async_evaluate0$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure8.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 102 + }; + A._EvaluateVisitor__combineCss_closure9.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__combineCss_closure10.prototype = { + call$1(module) { + return module.cloneCss$0(); + }, + $signature: 317 + }; + A._EvaluateVisitor__extendModules_closure5.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__extendModules_closure6.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 255 + }; + A._EvaluateVisitor__topologicalModules_visitModule2.prototype = { + call$1(module) { + var t1, t2, t3, _i, upstream; + for (t1 = module.get$upstream(), t2 = t1.length, t3 = this.seen, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss() && t3.add$1(0, upstream)) + this.call$1(upstream); + } + this.sorted.addFirst$1(module); + }, + $signature: 167 + }; + A._EvaluateVisitor_visitAtRootRule_closure8.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.AtRootQueryParser0(t1, this.$this._async_evaluate0$_logger).parse$0(); + }, + $signature: 114 + }; + A._EvaluateVisitor_visitAtRootRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure10.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor__scopeForAtRoot_closure17.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + t1._async_evaluate0$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$__parent = t2; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure18.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate0$_atRootExcludingStyleRule; + t1._async_evaluate0$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure19.prototype = { + call$1(callback) { + return this.$this._async_evaluate0$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure2(this.innerScope, callback), type$.Null); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot__closure2.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure20.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate0$_inKeyframes; + t1._async_evaluate0$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor__scopeForAtRoot_closure21.prototype = { + call$1($parent) { + return type$.CssAtRule_2._is($parent); + }, + $signature: 171 + }; + A._EvaluateVisitor__scopeForAtRoot_closure22.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + t1._async_evaluate0$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 33 + }; + A._EvaluateVisitor_visitContentRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure5.prototype = { + call$1(value) { + return this.$call$body$_EvaluateVisitor_visitDeclaration_closure0(value); + }, + $call$body$_EvaluateVisitor_visitDeclaration_closure0(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_Value_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(value.accept$1($async$self.$this), $async$call$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.CssValue0($async$result, value.get$span(value), type$.CssValue_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 321 + }; + A._EvaluateVisitor_visitDeclaration_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure8.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate0$_environment.setLocalVariable$3(B.JSArray_methods.get$first(this.node.variables), t1._async_evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 56 + }; + A._EvaluateVisitor_visitEachRule_closure9.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_setMultipleVariables$3(this.node.variables, value, this.nodeWithSpan); + }, + $signature: 56 + }; + A._EvaluateVisitor_visitEachRule_closure10.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure2(t1, _this.setVariables, _this.node)); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitEachRule__closure2.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure2(t1)); + }, + $signature: 324 + }; + A._EvaluateVisitor_visitEachRule___closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 93 + }; + A._EvaluateVisitor_visitExtendRule_closure2.prototype = { + call$0() { + var t1 = this.targetText; + return A.SelectorList_SelectorList$parse0(A.trimAscii0(t1.get$value(t1), true), false, true, this.$this._async_evaluate0$_logger); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitAtRule_closure8.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 327 + }; + A._EvaluateVisitor_visitAtRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate0$_inKeyframes ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure2(t1, $async$self.children), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure10.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 177 + }; + A._EvaluateVisitor_visitForRule_closure15.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 177 + }; + A._EvaluateVisitor_visitForRule_closure16.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure17.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure18.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, result, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate0$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure2(t1)), $async$call$0); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitForRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 93 + }; + A._EvaluateVisitor_visitForwardRule_closure5.prototype = { + call$1(module) { + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 107 + }; + A._EvaluateVisitor_visitForwardRule_closure6.prototype = { + call$1(module) { + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 107 + }; + A._EvaluateVisitor_visitIfRule_closure2.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this._box_0.clause.children, new A._EvaluateVisitor_visitIfRule__closure2(t1)); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitIfRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 93 + }; + A._EvaluateVisitor__visitDynamicImport_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t3, t4, oldImporter, oldInDependency, loadsUserDefinedModules, children, t5, t6, t7, t8, t9, t10, environment, module, visitor, t1, t2, result, stylesheet, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + result = $async$result; + stylesheet = result.stylesheet; + url = stylesheet.span.file.url; + if (url != null) { + t3 = t1._async_evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure11(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + t4 = new A.UnmodifiableListView(t2, t3); + if (t4.get$length(t4) === 0) { + t4 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + t4 = t4.get$length(t4) === 0; + } else + t4 = false; + $async$goto = t4 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate0$_importer; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate0$_inDependency; + t1._async_evaluate0$_importer = result.importer; + t1._async_evaluate0$__stylesheet = stylesheet; + t1._async_evaluate0$_inDependency = result.isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = t2; + t1._async_evaluate0$_inDependency = oldInDependency; + t1._async_evaluate0$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure12())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure13()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable_2; + t5 = type$.AstNode_2; + t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable_2); + t7 = t2._async_environment0$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._async_environment0$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment0$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment0$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.AsyncEnvironment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment0$_content); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure14(t1, result, stylesheet, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate0$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor2(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate0$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor__visitDynamicImport__closure11.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__visitDynamicImport__closure12.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 179 + }; + A._EvaluateVisitor__visitDynamicImport__closure13.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 180 + }; + A._EvaluateVisitor__visitDynamicImport__closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t7, t8, t9, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + t3 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root"); + t4 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + t5 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldConfiguration = t1._async_evaluate0$_configuration; + oldInDependency = t1._async_evaluate0$_inDependency; + t6 = $async$self.result; + t1._async_evaluate0$_importer = t6.importer; + t7 = t1._async_evaluate0$__stylesheet = $async$self.stylesheet; + t8 = $async$self.loadsUserDefinedModules; + if (t8) { + t9 = A.ModifiableCssStylesheet$0(t7.span); + t1._async_evaluate0$__root = t9; + t1._async_evaluate0$__parent = t1._async_evaluate0$_assertInModule$2(t9, "_root"); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + } + t1._async_evaluate0$_inDependency = t6.isDependency; + t6 = new A.UnmodifiableListView(t7._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t6.get$isEmpty(t6)) + t1._async_evaluate0$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(t7), $async$call$0); + case 2: + // returning from await. + t6 = t8 ? t1._async_evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + $async$self.children._value = t6; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = t2; + if (t8) { + t1._async_evaluate0$__root = t3; + t1._async_evaluate0$__parent = t4; + t1._async_evaluate0$__endOfImports = t5; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate0$_configuration = oldConfiguration; + t1._async_evaluate0$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitIncludeRule_closure11.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 126 + }; + A._EvaluateVisitor_visitIncludeRule_closure12.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 31 + }; + A._EvaluateVisitor_visitIncludeRule_closure14.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._async_evaluate0$_environment.closure$0(), t1._async_evaluate0$_inDependency, type$.UserDefinedCallable_AsyncEnvironment_2); + }, + $signature: 333 + }; + A._EvaluateVisitor_visitIncludeRule_closure13.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor_visitIncludeRule__closure2(t1, $async$self.mixin, $async$self.nodeWithSpan)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitIncludeRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor_visitIncludeRule___closure2(t1, $async$self.mixin, $async$self.nodeWithSpan)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor_visitIncludeRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpan, t5 = type$.nullable_Value_2, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate0$_addErrorSpan$1$2(t4, new A._EvaluateVisitor_visitIncludeRule____closure2(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 38 + }; + A._EvaluateVisitor_visitIncludeRule____closure2.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitMediaRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule_2._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitMediaQueries_closure2.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.MediaQueryParser0(t1, this.$this._async_evaluate0$_logger).parse$0(); + }, + $signature: 109 + }; + A._EvaluateVisitor_visitStyleRule_closure23.prototype = { + call$0() { + var t1 = this.selectorText; + return A.KeyframeSelectorParser$0(t1.get$value(t1), this.$this._async_evaluate0$_logger).parse$0(); + }, + $signature: 48 + }; + A._EvaluateVisitor_visitStyleRule_closure24.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure25.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure26.prototype = { + call$0() { + var _s11_ = "_stylesheet", + t1 = this.selectorText, + t2 = this.$this; + return A.SelectorList_SelectorList$parse0(t1.get$value(t1), !t2._async_evaluate0$_assertInModule$2(t2._async_evaluate0$__stylesheet, _s11_).plainCss, !t2._async_evaluate0$_assertInModule$2(t2._async_evaluate0$__stylesheet, _s11_).plainCss, t2._async_evaluate0$_logger); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitStyleRule_closure27.prototype = { + call$0() { + var t1 = this._box_0.parsedSelector, + t2 = this.$this, + t3 = t2._async_evaluate0$_styleRuleIgnoringAtRoot; + t3 = t3 == null ? null : t3.originalSelector; + return t1.resolveParentSelectors$2$implicitParent(t3, !t2._async_evaluate0$_atRootExcludingStyleRule); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitStyleRule_closure28.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure29.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure30.prototype = { + call$1(child) { + return type$.CssComment_2._is(child); + }, + $signature: 110 + }; + A._EvaluateVisitor_visitSupportsRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure6.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure8.prototype = { + call$0() { + var t1 = this.override; + this.$this._async_evaluate0$_environment.setVariable$4$global(this.node.name, t1.value, t1.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure9.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure10.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure2.prototype = { + call$1(module) { + var t1 = this.node; + this.$this._async_evaluate0$_environment.addModule$3$namespace(module, t1, t1.namespace); + }, + $signature: 107 + }; + A._EvaluateVisitor_visitWarnRule_closure2.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 65 + }; + A._EvaluateVisitor_visitWhileRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure2(t3)), $async$call$0); + case 6: + // returning from await. + result = $async$result; + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitWhileRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 93 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, right, result, t1, t2, left, t3, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + t3 = t1.operator; + case 4: + // switch + switch (t3) { + case B.BinaryOperator_axY0: + // goto case + $async$goto = 6; + break; + case B.BinaryOperator_or_or_1_or0: + // goto case + $async$goto = 7; + break; + case B.BinaryOperator_and_and_2_and0: + // goto case + $async$goto = 8; + break; + case B.BinaryOperator_nZh0: + // goto case + $async$goto = 9; + break; + case B.BinaryOperator_Vr90: + // goto case + $async$goto = 10; + break; + case B.BinaryOperator_cw10: + // goto case + $async$goto = 11; + break; + case B.BinaryOperator_Wma0: + // goto case + $async$goto = 12; + break; + case B.BinaryOperator_apg0: + // goto case + $async$goto = 13; + break; + case B.BinaryOperator_oqF0: + // goto case + $async$goto = 14; + break; + case B.BinaryOperator_qbf0: + // goto case + $async$goto = 15; + break; + case B.BinaryOperator_KlB0: + // goto case + $async$goto = 16; + break; + case B.BinaryOperator_6pl0: + // goto case + $async$goto = 17; + break; + case B.BinaryOperator_qpm0: + // goto case + $async$goto = 18; + break; + case B.BinaryOperator_PHH0: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + $async$goto = 21; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 21: + // returning from await. + right = $async$result; + $async$returnValue = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(right, false, true), false); + // goto return + $async$goto = 1; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + $async$result = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + $async$goto = 25; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 25: + // returning from await. + case 23: + // join + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + $async$goto = 29; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 29: + // returning from await. + // goto join + $async$goto = 27; + break; + case 28: + // else + $async$result = left; + case 27: + // join + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + $async$returnValue = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto return + $async$goto = 1; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + $async$returnValue = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto return + $async$goto = 1; + break; + case 11: + // case + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 32: + // returning from await. + $async$returnValue = $async$temp1.greaterThan$1($async$result); + // goto return + $async$goto = 1; + break; + case 12: + // case + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 33: + // returning from await. + $async$returnValue = $async$temp1.greaterThanOrEquals$1($async$result); + // goto return + $async$goto = 1; + break; + case 13: + // case + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 34: + // returning from await. + $async$returnValue = $async$temp1.lessThan$1($async$result); + // goto return + $async$goto = 1; + break; + case 14: + // case + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 35: + // returning from await. + $async$returnValue = $async$temp1.lessThanOrEquals$1($async$result); + // goto return + $async$goto = 1; + break; + case 15: + // case + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 36: + // returning from await. + $async$returnValue = $async$temp1.plus$1($async$result); + // goto return + $async$goto = 1; + break; + case 16: + // case + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 37: + // returning from await. + $async$returnValue = $async$temp1.minus$1($async$result); + // goto return + $async$goto = 1; + break; + case 17: + // case + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 38: + // returning from await. + $async$returnValue = $async$temp1.times$1($async$result); + // goto return + $async$goto = 1; + break; + case 18: + // case + $async$goto = 39; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 39: + // returning from await. + right = $async$result; + result = left.dividedBy$1(right); + if (t1.allowsSlash && left instanceof A.SassNumber0 && right instanceof A.SassNumber0) { + $async$returnValue = type$.SassNumber_2._as(result).withSlash$2(left, right); + // goto return + $async$goto = 1; + break; + } else { + if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + t2._async_evaluate0$_warn$3$deprecation(string$.Using__o + A.S(new A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation2().call$1(t1)) + " or calc(" + t1.toString$0(0) + string$.x29x0a_Morx20, t1.get$span(t1), true); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + case 19: + // case + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 40: + // returning from await. + $async$returnValue = $async$temp1.modulo$1($async$result); + // goto return + $async$goto = 1; + break; + case 20: + // default + throw A.wrapException(A.ArgumentError$("Unknown binary operator " + t3.toString$0(0) + ".", null)); + case 5: + // after switch + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 65 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation2.prototype = { + call$1(expression) { + if (expression instanceof A.BinaryOperationExpression0 && expression.operator === B.BinaryOperator_qpm0) + return "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + else if (expression instanceof A.ParenthesizedExpression0) + return expression.expression.toString$0(0); + else + return expression.toString$0(0); + }, + $signature: 113 + }; + A._EvaluateVisitor_visitVariableExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.node.operator; + switch (t1) { + case B.UnaryOperator_gg40: + return _this.operand.unaryPlus$0(); + case B.UnaryOperator_TLI0: + return _this.operand.unaryMinus$0(); + case B.UnaryOperator_Ix10: + return new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + case B.UnaryOperator_not_not_not0: + return _this.operand.unaryNot$0(); + default: + throw A.wrapException(A.StateError$("Unknown unary operator " + t1.toString$0(0) + ".")); + } + }, + $signature: 49 + }; + A._EvaluateVisitor__visitCalculationValue_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + t3 = $async$self.inMinMax; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate0$_binaryOperatorToCalculationOperator$1(t2.operator); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationValue$2$inMinMax(t2.left, t3), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationValue$2$inMinMax(t2.right, t3), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal0($async$temp2, $async$temp3, $async$result, t3, !t1._async_evaluate0$_inSupportsDeclaration); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitListExpression_closure2.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 341 + }; + A._EvaluateVisitor_visitFunctionExpression_closure5.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_getFunction$2$namespace(A.stringReplaceAllUnchecked(t1.originalName, "_", "-"), t1.namespace); + }, + $signature: 126 + }; + A._EvaluateVisitor_visitFunctionExpression_closure6.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 65 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 65 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate0$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure2(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure2(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure0(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure0($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, declaredArguments, t7, minLength, t8, i, argument, t9, value, t10, t11, restArgument, rest, argumentList, result, t1, t2, t3, t4, t5, t6, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated; + t3 = t2.positional; + t4 = t2.named; + t5 = $async$self.callable.declaration.$arguments; + t6 = $async$self.nodeWithSpan; + t1._async_evaluate0$_verifyArguments$4(t3.length, t4, t5, t6); + declaredArguments = t5.$arguments; + t7 = declaredArguments.length; + minLength = Math.min(t3.length, t7); + for (t8 = t2.positionalNodes, i = 0; i < minLength; ++i) + t1._async_evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, t3[i], t8[i]); + i = t3.length, t8 = t2.namedNodes; + case 3: + // for condition + if (!(i < t7)) { + // goto after for + $async$goto = 5; + break; + } + argument = declaredArguments[i]; + t9 = argument.name; + value = t4.remove$1(0, t9); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t10 = argument.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t10.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate0$_withoutSlash$2($async$result, t1._async_evaluate0$_expressionNode$1(t10)); + case 7: + // join + t10 = t1._async_evaluate0$_environment; + t11 = t8.$index(0, t9); + if (t11 == null) { + t11 = argument.defaultValue; + t11.toString; + t11 = t1._async_evaluate0$_expressionNode$1(t11); + } + t10.setLocalVariable$3(t9, value, t11); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restArgument = t5.restArgument; + if (restArgument != null) { + rest = t3.length > t7 ? B.JSArray_methods.sublist$1(t3, t7) : B.List_empty19; + t2 = t2.separator; + argumentList = A.SassArgumentList$0(rest, t4, t2 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_rXA0 : t2); + t1._async_evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t6); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t2 = t4.__js_helper$_length; + if (t2 === 0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t3 = A._instanceType(t4)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + A.pluralize0("argument", t2, null) + " named " + A.toSentence0(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t4, t3), new A._EvaluateVisitor__runUserDefinedCallable____closure2(), t3._eval$1("Iterable.E"), type$.Object), "or") + ".", t6.get$span(t6), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t5.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate0$_stackTrace$1(t6.get$span(t6)))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__runFunctionCallable_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value0) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate0$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 65 + }; + A._EvaluateVisitor__runBuiltInCallable_closure5.prototype = { + call$0() { + return this.overload.verify$2(this.evaluated.positional.length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure6.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__evaluateArguments_closure11.prototype = { + call$1(value) { + return value; + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateArguments_closure12.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 95 + }; + A._EvaluateVisitor__evaluateArguments_closure14.prototype = { + call$1(value) { + return value; + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure11.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure12.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._async_evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 95 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure14.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__addRestMap_closure2.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._async_evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 58 + }; + A._EvaluateVisitor__verifyArguments_closure2.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitStringExpression_closure2.prototype = { + call$1(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, result; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (typeof value == "string") { + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + } + type$.Expression_2._as(value); + t1 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(value.accept$1(t1), $async$call$1); + case 3: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString0 ? result._string0$_text : t1._async_evaluate0$_serialize$3$quote(result, value, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor_visitCssAtRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure6.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure6.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitCssMediaRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; + case 5: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 6; + break; + } + t4 = t2.__internal$_current; + $async$goto = 7; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 7: + // returning from await. + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 8; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 8: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule_2._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure6.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; + case 5: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 6; + break; + } + t4 = t2.__internal$_current; + $async$goto = 7; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 7: + // returning from await. + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 8; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 8: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = $async$self.$this, t3 = A._instanceType(t1)._precomputed1; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t2), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure6.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolation_closure2.prototype = { + call$1(value) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, result, t2, t3; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (typeof value == "string") { + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + } + type$.Expression_2._as(value); + t1 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(value.accept$1(t1), $async$call$1); + case 3: + // returning from await. + result = $async$result; + if ($async$self.warnForColor && result instanceof A.SassColor0 && $.$get$namesByColor0().containsKey$1(result)) { + t2 = A.Interpolation$0(A._setArrayType([""], type$.JSArray_Object), $async$self.interpolation.span); + t3 = $.$get$namesByColor0(); + t1._async_evaluate0$_warn$2(string$.You_pr + A.S(t3.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t3.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_qbf0, new A.StringExpression0(t2, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + $async$returnValue = t1._async_evaluate0$_serialize$3$quote(result, value, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor__serialize_closure2.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 30 + }; + A._EvaluateVisitor__expressionNode_closure2.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 191 + }; + A._EvaluateVisitor__withoutSlash_recommendation2.prototype = { + call$1(number) { + var asSlash = number.asSlash; + if (asSlash != null) + return "math.div(" + A.S(this.call$1(asSlash.item1)) + ", " + A.S(this.call$1(asSlash.item2)) + ")"; + else + return A.serializeValue0(number, true, true); + }, + $signature: 192 + }; + A._EvaluateVisitor__stackFrame_closure2.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 81 + }; + A._EvaluateVisitor__stackTrace_closure2.prototype = { + call$1(tuple) { + return this.$this._async_evaluate0$_stackFrame$2(tuple.item1, J.get$span$z(tuple.item2)); + }, + $signature: 193 + }; + A._ImportedCssVisitor2.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure2(); + this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate0$_visitor; + if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent") !== t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root")) + t1._async_evaluate0$_addChild$1(node); + else if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root").children._collection$_source)) { + t1._async_evaluate0$_addChild$1(node); + t1._async_evaluate0$__endOfImports = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate0$_outOfOrderImports; + (t2 == null ? t1._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate0$_visitor, + mediaQueries = t1._async_evaluate0$_mediaQueries; + t1._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure2(mediaQueries == null || t1._async_evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure2()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure2()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure2.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) + t1 = this.hasBeenMerged && type$.CssMediaRule_2._is(node); + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure2.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A.EvaluateResult0.prototype = {}; + A._EvaluationContext2.prototype = { + get$currentCallableSpan() { + var callableNode = this._async_evaluate0$_visitor._async_evaluate0$_callableNode; + if (callableNode != null) + return callableNode.get$span(callableNode); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2$deprecation(_, message, deprecation) { + var t1 = this._async_evaluate0$_visitor, + t2 = t1._async_evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate0$_warn$3$deprecation(message, t2 == null ? this._async_evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext0: 1 + }; + A._ArgumentResults2.prototype = {}; + A._LoadedStylesheet2.prototype = {}; + A.NodeToDartAsyncFileImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$NodeToDartAsyncFileImporter(0, url); + }, + canonicalize$body$NodeToDartAsyncFileImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, result, t1, resultUrl; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (url.get$scheme() === "file") { + $async$returnValue = $.$get$_filesystemImporter().canonicalize$1(0, url); + // goto return + $async$goto = 1; + break; + } + result = $async$self._findFileUrl.call$2(url.toString$0(0), {fromImport: A.fromImport0()}); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + $async$returnValue = $.$get$_filesystemImporter().canonicalize$1(0, resultUrl); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return $.$get$_filesystemImporter().load$1(0, url); + } + }; + A.AsyncImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache0(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache0(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2), + $async$returnValue, $async$self = this, t1, relativeResult; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseImporter != null ? 3 : 4; + break; + case 3: + // then + t1 = type$.Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri_2; + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_relativeCanonicalizeCache, new A.Tuple4(url, forImport, baseImporter, baseUrl, t1), new A.AsyncImportCache_canonicalize_closure1($async$self, baseUrl, url, baseImporter, forImport), t1, type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + t1 = type$.Tuple2_Uri_bool; + $async$goto = 6; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_canonicalizeCache, new A.Tuple2(url, forImport, t1), new A.AsyncImportCache_canonicalize_closure2($async$self, url, forImport), t1, type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache0$_canonicalize$3(importer, url, forImport) { + return this._canonicalize$body$AsyncImportCache0(importer, url, forImport); + }, + _canonicalize$body$AsyncImportCache0(importer, url, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_import_cache0$_canonicalize$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (forImport) { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__inImportRule, true], t1, t1), type$.FutureOr_nullable_Uri); + } else + t1 = importer.canonicalize$1(0, url); + $async$goto = 3; + return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$3); + case 3: + // returning from await. + result = $async$result; + if ((result == null ? null : result.get$scheme()) === "") + $async$self._async_import_cache0$_logger.warn$2$deprecation(0, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + A.S(result) + string$.x2e_Rela, true); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache0$_canonicalize$3, $async$completer); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this.importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl, quiet); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl, quiet) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this; + var $async$importCanonical$4$originalUrl$quiet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure0($async$self, importer, canonicalUrl, originalUrl, quiet), type$.Uri, type$.nullable_Stylesheet_2), $async$importCanonical$4$originalUrl$quiet); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$4$originalUrl$quiet, $async$completer); + }, + humanize$1(canonicalUrl) { + var t2, url, + t1 = this._async_import_cache0$_canonicalizeCache; + t1 = A.IterableNullableExtension_whereNotNull(t1.get$values(t1), type$.Tuple3_AsyncImporter_Uri_Uri_2); + t2 = t1.$ti; + url = A.minBy(new A.MappedIterable(new A.WhereIterable(t1, new A.AsyncImportCache_humanize_closure2(canonicalUrl), t2._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure3(), t2._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure4()); + if (url == null) + return canonicalUrl; + t1 = $.$get$url(); + return url.resolve$1(A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t1.style).get$basename()); + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache0$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(t1); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2), + $async$returnValue, $async$self = this, canonicalUrl, t1, resolvedUrl; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.baseUrl; + resolvedUrl = t1 == null ? null : t1.resolveUri$1($async$self.url); + if (resolvedUrl == null) + resolvedUrl = $async$self.url; + t1 = $async$self.baseImporter; + $async$goto = 3; + return A._asyncAwait($async$self.$this._async_import_cache0$_canonicalize$3(t1, resolvedUrl, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + canonicalUrl = $async$result; + if (canonicalUrl == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = new A.Tuple3(t1, canonicalUrl, resolvedUrl, type$.Tuple3_AsyncImporter_Uri_Uri_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 194 + }; + A.AsyncImportCache_canonicalize_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple3_AsyncImporter_Uri_Uri_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, importer, canonicalUrl; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this, t2 = t1._async_import_cache0$_importers, t3 = t2.length, t4 = $async$self.url, t5 = $async$self.forImport, _i = 0; + case 3: + // for condition + if (!(_i < t2.length)) { + // goto after for + $async$goto = 5; + break; + } + importer = t2[_i]; + $async$goto = 6; + return A._asyncAwait(t1._async_import_cache0$_canonicalize$3(importer, t4, t5), $async$call$0); + case 6: + // returning from await. + canonicalUrl = $async$result; + if (canonicalUrl != null) { + $async$returnValue = new A.Tuple3(importer, canonicalUrl, t4, type$.Tuple3_AsyncImporter_Uri_Uri_2); + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 194 + }; + A.AsyncImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 199 + }; + A.AsyncImportCache_importCanonical_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this, t2, t3, t4, t1, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.canonicalUrl; + $async$goto = 3; + return A._asyncAwait($async$self.importer.load$1(0, t1), $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t2 = $async$self.$this; + t2._async_import_cache0$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = $async$self.originalUrl.resolveUri$1(t1); + $async$returnValue = A.Stylesheet_Stylesheet$parse0(t3, t4, $async$self.quiet ? $.$get$Logger_quiet0() : t2._async_import_cache0$_logger, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 349 + }; + A.AsyncImportCache_humanize_closure2.prototype = { + call$1(tuple) { + return tuple.item2.$eq(0, this.canonicalUrl); + }, + $signature: 350 + }; + A.AsyncImportCache_humanize_closure3.prototype = { + call$1(tuple) { + return tuple.item3; + }, + $signature: 351 + }; + A.AsyncImportCache_humanize_closure4.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 91 + }; + A.AtRootQueryParser0.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure0(this)); + } + }; + A.AtRootQueryParser_parse_closure0.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$0(); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$0(); + t2.expectChar$1(58); + t1.whitespace$0(); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$0(); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery0(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 114 + }; + A.AtRootQuery0.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._at_root_query0$_all) + return !_this.include; + if (type$.CssStyleRule_2._is(node)) + return _this._at_root_query0$_rule !== _this.include; + if (type$.CssMediaRule_2._is(node)) + return _this.excludesName$1("media"); + if (type$.CssSupportsRule_2._is(node)) + return _this.excludesName$1("supports"); + if (type$.CssAtRule_2._is(node)) { + t1 = node.name; + return _this.excludesName$1(t1.get$value(t1).toLowerCase()); + } + return false; + }, + excludesName$1($name) { + var t1 = this._at_root_query0$_all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.AtRootRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + t1 = this.children; + return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssAtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$0(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild0(child); + }, + $isCssAtRule0: 1, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.AttributeSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector0 && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator0.prototype = { + toString$0(_) { + return this._attribute0$_text; + } + }; + A.BinaryOperationExpression0.prototype = { + get$span(_) { + var right, + left = this.left; + for (; left instanceof A.BinaryOperationExpression0;) + left = left.left; + right = this.right; + for (; right instanceof A.BinaryOperationExpression0;) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, right, rightNeedsParens, _this = this, + left = _this.left, + leftNeedsParens = left instanceof A.BinaryOperationExpression0 && left.operator.precedence < _this.operator.precedence, + t1 = leftNeedsParens ? "" + A.Primitives_stringFromCharCode(40) : ""; + t1 += left.toString$0(0); + if (leftNeedsParens) + t1 += A.Primitives_stringFromCharCode(41); + t2 = _this.operator; + t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); + right = _this.right; + rightNeedsParens = right instanceof A.BinaryOperationExpression0 && right.operator.precedence <= t2.precedence; + if (rightNeedsParens) + t1 += A.Primitives_stringFromCharCode(40); + t1 += right.toString$0(0); + if (rightNeedsParens) + t1 += A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isExpression0: 1, + $isAstNode0: 1 + }; + A.BinaryOperator0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.legacyBooleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Boolean", new A.legacyBooleanClass__closure())); + J.get$$prototype$x(jsClass).getValue = A.allowInteropCaptureThisNamed("getValue", new A.legacyBooleanClass__closure0()); + jsClass.TRUE = B.SassBoolean_true0; + jsClass.FALSE = B.SassBoolean_false0; + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.legacyBooleanClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Boolean() isn't allowed.\nUse sass.types.Boolean.TRUE or sass.types.Boolean.FALSE instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 195 + }; + A.legacyBooleanClass__closure0.prototype = { + call$1($self) { + return $self === B.SassBoolean_true0; + }, + $signature: 112 + }; + A.booleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassBoolean", new A.booleanClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.booleanClass__closure.prototype = { + call$2($self, _) { + A.jsThrow(new self.Error("new sass.SassBoolean() isn't allowed.\nUse sass.sassTrue or sass.sassFalse instead.")); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 353 + }; + A.SassBoolean0.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize0$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertBoolean$1($name) { + return this; + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false0 : B.SassBoolean_true0; + } + }; + A.BuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._built_in$_overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload.item1; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.$arguments.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable0($name, this._built_in$_overloads); + }, + $isAsyncCallable0: 1, + $isAsyncBuiltInCallable0: 1, + $isCallable0: 1, + get$name(receiver) { + return this.name; + } + }; + A.BuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull0; + }, + $signature: 3 + }; + A.BuiltInModule0.prototype = { + get$upstream() { + return B.List_empty18; + }, + get$variableNodes() { + return B.Map_empty7; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore0; + }, + get$css(_) { + return new A.CssStylesheet0(B.List_empty16, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$0("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + cloneCss$0() { + return this; + }, + $isModule0: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.CalculationExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitCalculationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name + "(" + B.JSArray_methods.join$1(this.$arguments, ", ") + ")"; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.CalculationExpression__verifyArguments_closure0.prototype = { + call$1(arg) { + A.CalculationExpression__verify0(arg); + return arg; + }, + $signature: 355 + }; + A.SassCalculation0.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + var t2, + t1 = visitor._serialize0$_buffer; + t1.write$1(0, this.name); + t1.writeCharCode$1(40); + t2 = visitor._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + visitor._serialize0$_writeBetween$3(this.$arguments, t2, visitor.get$_serialize0$_writeCalculationValue()); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString0) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation0 && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure0.prototype = { + call$1(arg) { + return arg instanceof A.SassString0 || arg instanceof A.CalculationInterpolation0; + }, + $signature: 112 + }; + A.CalculationOperation0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation0 && this.operator === other.operator && J.$eq$(this.left, other.left) && J.$eq$(this.right, other.right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this.operator) ^ J.get$hashCode$(this.left) ^ J.get$hashCode$(this.right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue0(new A.SassCalculation0("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.CalculationInterpolation0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationInterpolation0 && this.value === other.value; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.value); + }, + toString$0(_) { + return this.value; + } + }; + A.CallableDeclaration0.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.Chokidar0.prototype = {}; + A.ChokidarOptions0.prototype = {}; + A.ChokidarWatcher0.prototype = {}; + A.ClassSelector0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector0 && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector0(this.name + suffix); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A._CloneCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$0(node.name, node.span, t1, node.value); + return t1 ? rule : this._clone_css$_visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment0(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$0(node.name, node.value, node.span, node.parsedAsCustomProperty, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssMediaRule$0(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var newSelector = this._clone_css$_oldToNewSelectors.$index(0, node.selector); + if (newSelector == null) + throw A.wrapException(A.StateError$(string$.The_Ex)); + return this._clone_css$_visitChildren$2(A.ModifiableCssStyleRule$0(newSelector, node.span, node.originalSelector), node); + }, + visitCssStylesheet$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssSupportsRule$0(node.condition, node.span), node); + }, + _clone_css$_visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _clone_css$_visitChildren$2(newParent, oldParent) { + return this._clone_css$_visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode_2); + } + }; + A.ColorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(this.value, true, true); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.global_closure30.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure31.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure32.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure33.prototype = { + call$1($arguments) { + var parsed = A._parseChannels0("rgb", A._setArrayType(["$red", "$green", "$blue"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString0 ? parsed : A._rgb0("rgb", type$.List_Value_2._as(parsed)); + }, + $signature: 3 + }; + A.global_closure34.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure35.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure36.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure37.prototype = { + call$1($arguments) { + var parsed = A._parseChannels0("rgba", A._setArrayType(["$red", "$green", "$blue"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString0 ? parsed : A._rgb0("rgba", type$.List_Value_2._as(parsed)); + }, + $signature: 3 + }; + A.global_closure38.prototype = { + call$1($arguments) { + var color, t2, + t1 = J.getInterceptor$asx($arguments), + weight = t1.$index($arguments, 1).assertNumber$1("weight"); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + if (weight._number1$_value !== 100 || !weight.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString0("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + t1 = color.get$red(color); + t2 = color.get$green(color); + return A._mixColors0(color.changeRgb$3$blue$green$red(255 - color.get$blue(color), 255 - t2, 255 - t1), color, weight); + }, + $signature: 3 + }; + A.global_closure39.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure40.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure41.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString0("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 17 + }; + A.global_closure42.prototype = { + call$1($arguments) { + var parsed = A._parseChannels0("hsl", A._setArrayType(["$hue", "$saturation", "$lightness"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString0 ? parsed : A._hsl0("hsl", type$.List_Value_2._as(parsed)); + }, + $signature: 3 + }; + A.global_closure43.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure44.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure45.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString0("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 17 + }; + A.global_closure46.prototype = { + call$1($arguments) { + var parsed = A._parseChannels0("hsla", A._setArrayType(["$hue", "$saturation", "$lightness"], type$.JSArray_String), J.get$first$ax($arguments)); + return parsed instanceof A.SassString0 ? parsed : A._hsl0("hsla", type$.List_Value_2._as(parsed)); + }, + $signature: 3 + }; + A.global_closure47.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) + return A._functionString0("grayscale", $arguments); + return t1.$index($arguments, 0).assertColor$1("color").changeHsl$1$saturation(0); + }, + $signature: 3 + }; + A.global_closure48.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = t1.$index($arguments, 1).assertNumber$1("degrees"); + A._checkAngle0(degrees, "degrees"); + return color.changeHsl$1$hue(color.get$hue(color) + degrees._number1$_value); + }, + $signature: 24 + }; + A.global_closure49.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$lightness(B.JSNumber_methods.clamp$2(color.get$lightness(color) + amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 24 + }; + A.global_closure50.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$lightness(B.JSNumber_methods.clamp$2(color.get$lightness(color) - amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 24 + }; + A.global_closure51.prototype = { + call$1($arguments) { + return new A.SassString0("saturate(" + A.serializeValue0(J.$index$asx($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 17 + }; + A.global_closure52.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$saturation(B.JSNumber_methods.clamp$2(color.get$saturation(color) + amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 24 + }; + A.global_closure53.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + return color.changeHsl$1$saturation(B.JSNumber_methods.clamp$2(color.get$saturation(color) - amount.valueInRange$3(0, 100, "amount"), 0, 100)); + }, + $signature: 24 + }; + A.global_closure54.prototype = { + call$1($arguments) { + var argument = J.$index$asx($arguments, 0); + if (argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0())) + return A._functionString0("alpha", $arguments); + return A.SassNumber_SassNumber0(argument.assertColor$1("color")._color1$_alpha, null); + }, + $signature: 3 + }; + A.global_closure55.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure0())) + return A._functionString0("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 17 + }; + A.global__closure0.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 44 + }; + A.global_closure56.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) + return A._functionString0("opacity", $arguments); + return A.SassNumber_SassNumber0(t1.$index($arguments, 0).assertColor$1("color")._color1$_alpha, null); + }, + $signature: 3 + }; + A.module_closure8.prototype = { + call$1($arguments) { + var result, t2, color, + t1 = J.getInterceptor$asx($arguments), + weight = t1.$index($arguments, 1).assertNumber$1("weight"); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + if (weight._number1$_value !== 100 || !weight.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + result = A._functionString0("invert", t1.take$1($arguments, 1)); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x29x20to_ci + t2, true); + return result; + } + color = t1.$index($arguments, 0).assertColor$1("color"); + t1 = color.get$red(color); + t2 = color.get$green(color); + return A._mixColors0(color.changeRgb$3$blue$green$red(255 - color.get$blue(color), 255 - t2, 255 - t1), color, weight); + }, + $signature: 3 + }; + A.module_closure9.prototype = { + call$1($arguments) { + var result, t2, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("grayscale", t1.take$1($arguments, 1)); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x29x20to_cg + t2, true); + return result; + } + return t1.$index($arguments, 0).assertColor$1("color").changeHsl$1$saturation(0); + }, + $signature: 3 + }; + A.module_closure10.prototype = { + call$1($arguments) { + return A._hwb0($arguments); + }, + $signature: 3 + }; + A.module_closure11.prototype = { + call$1($arguments) { + var parsed = A._parseChannels0("hwb", A._setArrayType(["$hue", "$whiteness", "$blackness"], type$.JSArray_String), J.get$first$ax($arguments)); + if (parsed instanceof A.SassString0) + throw A.wrapException(A.SassScriptException$0('Expected numeric channels, got "' + parsed.toString$0(0) + '".', null)); + else + return A._hwb0(type$.List_Value_2._as(parsed)); + }, + $signature: 3 + }; + A.module_closure12.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$whiteness(t1), "%"); + }, + $signature: 11 + }; + A.module_closure13.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$blackness(t1), "%"); + }, + $signature: 11 + }; + A.module_closure14.prototype = { + call$1($arguments) { + var result, t1, + argument = J.$index$asx($arguments, 0); + if (argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0())) { + result = A._functionString0("alpha", $arguments); + t1 = result.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, string$.Using_c + t1, true); + return result; + } + return A.SassNumber_SassNumber0(argument.assertColor$1("color")._color1$_alpha, null); + }, + $signature: 3 + }; + A.module_closure15.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure0())) { + result = A._functionString0("alpha", $arguments); + t1 = result.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, string$.Using_c + t1, true); + return result; + } + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 17 + }; + A.module__closure0.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 44 + }; + A.module_closure16.prototype = { + call$1($arguments) { + var result, t2, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("opacity", $arguments); + t1 = A.S(t1.$index($arguments, 0)); + t2 = result.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, "Passing a number (" + t1 + string$.x20to_co + t2, true); + return result; + } + return A.SassNumber_SassNumber0(t1.$index($arguments, 0).assertColor$1("color")._color1$_alpha, null); + }, + $signature: 3 + }; + A._red_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$red(t1), null); + }, + $signature: 11 + }; + A._green_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$green(t1), null); + }, + $signature: 11 + }; + A._blue_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$blue(t1), null); + }, + $signature: 11 + }; + A._mix_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._mixColors0(t1.$index($arguments, 0).assertColor$1("color1"), t1.$index($arguments, 1).assertColor$1("color2"), t1.$index($arguments, 2).assertNumber$1("weight")); + }, + $signature: 24 + }; + A._hue_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$hue(t1), "deg"); + }, + $signature: 11 + }; + A._saturation_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$saturation(t1), "%"); + }, + $signature: 11 + }; + A._lightness_closure0.prototype = { + call$1($arguments) { + var t1 = J.get$first$ax($arguments).assertColor$1("color"); + return A.SassNumber_SassNumber0(t1.get$lightness(t1), "%"); + }, + $signature: 11 + }; + A._complement_closure0.prototype = { + call$1($arguments) { + var color = J.$index$asx($arguments, 0).assertColor$1("color"); + return color.changeHsl$1$hue(color.get$hue(color) + 180); + }, + $signature: 24 + }; + A._adjust_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, true, false, false); + }, + $signature: 24 + }; + A._scale_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, false, true); + }, + $signature: 24 + }; + A._change_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, true, false); + }, + $signature: 24 + }; + A._ieHexStr_closure0.prototype = { + call$1($arguments) { + var color = J.$index$asx($arguments, 0).assertColor$1("color"), + t1 = new A._ieHexStr_closure_hexString0(); + return new A.SassString0("#" + A.S(t1.call$1(A.fuzzyRound0(color._color1$_alpha * 255))) + A.S(t1.call$1(color.get$red(color))) + A.S(t1.call$1(color.get$green(color))) + A.S(t1.call$1(color.get$blue(color))), false); + }, + $signature: 17 + }; + A._ieHexStr_closure_hexString0.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(component, 16), 2, "0").toUpperCase(); + }, + $signature: 174 + }; + A._updateComponents_getParam0.prototype = { + call$4$assertPercent$checkPercent($name, max, assertPercent, checkPercent) { + var t2, _this = this, + t1 = _this.keywords.remove$1(0, $name), + number = t1 == null ? null : t1.assertNumber$1($name); + if (number == null) + return null; + t1 = _this.scale; + t2 = !t1; + if (t2 && checkPercent) + A._checkPercent0(number, $name); + if (!t2 || assertPercent) + number.assertUnit$2("%", $name); + if (t1) + max = 100; + if (!t2 || assertPercent) + t1 = number.valueInRange$3(_this.change ? 0 : -max, max, $name); + else { + t1 = _this.change ? 0 : -max; + t1 = number.valueInRangeWithUnit$4(t1, max, $name, checkPercent ? "%" : ""); + } + return t1; + }, + call$2($name, max) { + return this.call$4$assertPercent$checkPercent($name, max, false, false); + }, + call$3$checkPercent($name, max, checkPercent) { + return this.call$4$assertPercent$checkPercent($name, max, false, checkPercent); + }, + call$3$assertPercent($name, max, assertPercent) { + return this.call$4$assertPercent$checkPercent($name, max, assertPercent, false); + }, + $signature: 176 + }; + A._updateComponents_closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._updateComponents_updateValue0.prototype = { + call$3(current, param, max) { + var t1; + if (param == null) + return current; + if (this.change) + return param; + if (this.adjust) + return B.JSNumber_methods.clamp$2(current + param, 0, max); + t1 = param > 0 ? max - current : current; + return current + t1 * (param / 100); + }, + $signature: 181 + }; + A._updateComponents_updateRgb0.prototype = { + call$2(current, param) { + return A.fuzzyRound0(this.updateValue.call$3(current, param, 255)); + }, + $signature: 185 + }; + A._functionString_closure0.prototype = { + call$1(argument) { + return A.serializeValue0(argument, false, true); + }, + $signature: 201 + }; + A._removedColorFunction_closure0.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = A.S(t2.$index($arguments, 0)), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$0("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Morx3a + t1, null)); + }, + $signature: 361 + }; + A._rgb_closure0.prototype = { + call$1(alpha) { + return A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 123 + }; + A._hsl_closure0.prototype = { + call$1(alpha) { + return A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 123 + }; + A._removeUnits_closure1.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 5 + }; + A._removeUnits_closure2.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 5 + }; + A._hwb_closure0.prototype = { + call$1(alpha) { + return A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + }, + $signature: 123 + }; + A._parseChannels_closure0.prototype = { + call$1(value) { + return value.get$isVar(); + }, + $signature: 44 + }; + A._NodeSassColor.prototype = {}; + A.legacyColorClass_closure.prototype = { + call$6(thisArg, redOrArgb, green, blue, alpha, dartValue) { + var red, t1, t2, t3, t4; + if (dartValue != null) { + J.set$dartValue$x(thisArg, dartValue); + return; + } + if (green == null || blue == null) { + A._asInt(redOrArgb); + alpha = B.JSInt_methods._shrOtherPositive$1(redOrArgb, 24) / 255; + red = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 16), 256); + green = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 8), 256); + blue = B.JSInt_methods.$mod(redOrArgb, 256); + } else { + redOrArgb.toString; + red = redOrArgb; + } + t1 = A.fuzzyRound0(B.JSNumber_methods.clamp$2(red, 0, 255)); + t2 = A.fuzzyRound0(B.JSNumber_methods.clamp$2(green, 0, 255)); + t3 = A.fuzzyRound0(B.JSNumber_methods.clamp$2(blue, 0, 255)); + t4 = alpha == null ? null : B.JSNumber_methods.clamp$2(alpha, 0, 1); + J.set$dartValue$x(thisArg, A.SassColor$rgb0(t1, t2, t3, t4 == null ? 1 : t4)); + }, + call$2(thisArg, redOrArgb) { + return this.call$6(thisArg, redOrArgb, null, null, null, null); + }, + call$3(thisArg, redOrArgb, green) { + return this.call$6(thisArg, redOrArgb, green, null, null, null); + }, + call$4(thisArg, redOrArgb, green, blue) { + return this.call$6(thisArg, redOrArgb, green, blue, null, null); + }, + call$5(thisArg, redOrArgb, green, blue, alpha) { + return this.call$6(thisArg, redOrArgb, green, blue, alpha, null); + }, + "call*": "call$6", + $requiredArgCount: 2, + $defaultValues() { + return [null, null, null, null]; + }, + $signature: 363 + }; + A.legacyColorClass_closure0.prototype = { + call$1(thisArg) { + return J.get$red$x(J.get$dartValue$x(thisArg)); + }, + $signature: 124 + }; + A.legacyColorClass_closure1.prototype = { + call$1(thisArg) { + return J.get$green$x(J.get$dartValue$x(thisArg)); + }, + $signature: 124 + }; + A.legacyColorClass_closure2.prototype = { + call$1(thisArg) { + return J.get$blue$x(J.get$dartValue$x(thisArg)); + }, + $signature: 124 + }; + A.legacyColorClass_closure3.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._color1$_alpha; + }, + $signature: 365 + }; + A.legacyColorClass_closure4.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).changeRgb$1$red(A.fuzzyRound0(B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 83 + }; + A.legacyColorClass_closure5.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).changeRgb$1$green(A.fuzzyRound0(B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 83 + }; + A.legacyColorClass_closure6.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).changeRgb$1$blue(A.fuzzyRound0(B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 83 + }; + A.legacyColorClass_closure7.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).changeRgb$1$alpha(B.JSNumber_methods.clamp$2(value, 0, 1))); + }, + $signature: 83 + }; + A.colorClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassColor", new A.colorClass__closure())); + J.get$$prototype$x(jsClass).change = A.allowInteropCaptureThisNamed("change", new A.colorClass__closure0()); + A.LinkedHashMap_LinkedHashMap$_literal(["red", new A.colorClass__closure1(), "green", new A.colorClass__closure2(), "blue", new A.colorClass__closure3(), "hue", new A.colorClass__closure4(), "saturation", new A.colorClass__closure5(), "lightness", new A.colorClass__closure6(), "whiteness", new A.colorClass__closure7(), "blackness", new A.colorClass__closure8(), "alpha", new A.colorClass__closure9()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(A.SassColor$rgb0(0, 0, 0, null).constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.colorClass__closure.prototype = { + call$2($self, color) { + var t2, t3, t4, + t1 = J.getInterceptor$x(color); + if (t1.get$red(color) != null) { + t2 = t1.get$red(color); + t2.toString; + t2 = A.fuzzyRound0(t2); + t3 = t1.get$green(color); + t3.toString; + t3 = A.fuzzyRound0(t3); + t4 = t1.get$blue(color); + t4.toString; + return A.SassColor$rgb0(t2, t3, A.fuzzyRound0(t4), t1.get$alpha(color)); + } else if (t1.get$saturation(color) != null) { + t2 = t1.get$hue(color); + t2.toString; + t3 = t1.get$saturation(color); + t3.toString; + t4 = t1.get$lightness(color); + t4.toString; + return A.SassColor$hsl(t2, t3, t4, t1.get$alpha(color)); + } else { + t2 = t1.get$hue(color); + t2.toString; + t3 = t1.get$whiteness(color); + t3.toString; + t4 = t1.get$blackness(color); + t4.toString; + return A.SassColor_SassColor$hwb0(t2, t3, t4, t1.get$alpha(color)); + } + }, + $signature: 367 + }; + A.colorClass__closure0.prototype = { + call$2($self, options) { + var t2, t3, t4, + t1 = J.getInterceptor$x(options); + if (t1.get$whiteness(options) != null || t1.get$blackness(options) != null) { + t2 = t1.get$hue(options); + if (t2 == null) + t2 = $self.get$hue($self); + t3 = t1.get$whiteness(options); + if (t3 == null) + t3 = $self.get$whiteness($self); + t4 = t1.get$blackness(options); + if (t4 == null) + t4 = $self.get$blackness($self); + t1 = t1.get$alpha(options); + return $self.changeHwb$4$alpha$blackness$hue$whiteness(t1 == null ? $self._color1$_alpha : t1, t4, t2, t3); + } else if (t1.get$hue(options) != null || t1.get$saturation(options) != null || t1.get$lightness(options) != null) { + t2 = t1.get$hue(options); + if (t2 == null) + t2 = $self.get$hue($self); + t3 = t1.get$saturation(options); + if (t3 == null) + t3 = $self.get$saturation($self); + t4 = t1.get$lightness(options); + if (t4 == null) + t4 = $self.get$lightness($self); + t1 = t1.get$alpha(options); + return $self.changeHsl$4$alpha$hue$lightness$saturation(t1 == null ? $self._color1$_alpha : t1, t2, t4, t3); + } else if (t1.get$red(options) != null || t1.get$green(options) != null || t1.get$blue(options) != null) { + t2 = A.NullableExtension_andThen0(t1.get$red(options), A.number2__fuzzyRound$closure()); + if (t2 == null) + t2 = $self.get$red($self); + t3 = A.NullableExtension_andThen0(t1.get$green(options), A.number2__fuzzyRound$closure()); + if (t3 == null) + t3 = $self.get$green($self); + t4 = A.NullableExtension_andThen0(t1.get$blue(options), A.number2__fuzzyRound$closure()); + if (t4 == null) + t4 = $self.get$blue($self); + t1 = t1.get$alpha(options); + return $self.changeRgb$4$alpha$blue$green$red(t1 == null ? $self._color1$_alpha : t1, t4, t3, t2); + } else { + t1 = t1.get$alpha(options); + return $self.changeAlpha$1(t1 == null ? $self._color1$_alpha : t1); + } + }, + $signature: 368 + }; + A.colorClass__closure1.prototype = { + call$1($self) { + return $self.get$red($self); + }, + $signature: 140 + }; + A.colorClass__closure2.prototype = { + call$1($self) { + return $self.get$green($self); + }, + $signature: 140 + }; + A.colorClass__closure3.prototype = { + call$1($self) { + return $self.get$blue($self); + }, + $signature: 140 + }; + A.colorClass__closure4.prototype = { + call$1($self) { + return $self.get$hue($self); + }, + $signature: 55 + }; + A.colorClass__closure5.prototype = { + call$1($self) { + return $self.get$saturation($self); + }, + $signature: 55 + }; + A.colorClass__closure6.prototype = { + call$1($self) { + return $self.get$lightness($self); + }, + $signature: 55 + }; + A.colorClass__closure7.prototype = { + call$1($self) { + return $self.get$whiteness($self); + }, + $signature: 55 + }; + A.colorClass__closure8.prototype = { + call$1($self) { + return $self.get$blackness($self); + }, + $signature: 55 + }; + A.colorClass__closure9.prototype = { + call$1($self) { + return $self._color1$_alpha; + }, + $signature: 55 + }; + A._Channels.prototype = {}; + A.SassColor0.prototype = { + get$red(_) { + var t1; + if (this._color1$_red == null) + this._color1$_hslToRgb$0(); + t1 = this._color1$_red; + t1.toString; + return t1; + }, + get$green(_) { + var t1; + if (this._color1$_green == null) + this._color1$_hslToRgb$0(); + t1 = this._color1$_green; + t1.toString; + return t1; + }, + get$blue(_) { + var t1; + if (this._color1$_blue == null) + this._color1$_hslToRgb$0(); + t1 = this._color1$_blue; + t1.toString; + return t1; + }, + get$hue(_) { + var t1; + if (this._color1$_hue == null) + this._color1$_rgbToHsl$0(); + t1 = this._color1$_hue; + t1.toString; + return t1; + }, + get$saturation(_) { + var t1; + if (this._color1$_saturation == null) + this._color1$_rgbToHsl$0(); + t1 = this._color1$_saturation; + t1.toString; + return t1; + }, + get$lightness(_) { + var t1; + if (this._color1$_lightness == null) + this._color1$_rgbToHsl$0(); + t1 = this._color1$_lightness; + t1.toString; + return t1; + }, + get$whiteness(_) { + var _this = this; + return Math.min(Math.min(_this.get$red(_this), _this.get$green(_this)), _this.get$blue(_this)) / 255 * 100; + }, + get$blackness(_) { + var _this = this; + return 100 - Math.max(Math.max(_this.get$red(_this), _this.get$green(_this)), _this.get$blue(_this)) / 255 * 100; + }, + accept$1$1(visitor) { + var $name, hexLength, t1, format, t2, opaque, _this = this; + if (visitor._serialize0$_style === B.OutputStyle_10) + if (!A.fuzzyEquals0(_this._color1$_alpha, 1)) + visitor._serialize0$_writeRgb$1(_this); + else { + $name = $.$get$namesByColor0().$index(0, _this); + hexLength = visitor._serialize0$_canUseShortHex$1(_this) ? 4 : 7; + if ($name != null && $name.length <= hexLength) + visitor._serialize0$_buffer.write$1(0, $name); + else { + t1 = visitor._serialize0$_buffer; + if (visitor._serialize0$_canUseShortHex$1(_this)) { + t1.writeCharCode$1(35); + t1.writeCharCode$1(A.hexCharFor0(_this.get$red(_this) & 15)); + t1.writeCharCode$1(A.hexCharFor0(_this.get$green(_this) & 15)); + t1.writeCharCode$1(A.hexCharFor0(_this.get$blue(_this) & 15)); + } else { + t1.writeCharCode$1(35); + visitor._serialize0$_writeHexComponent$1(_this.get$red(_this)); + visitor._serialize0$_writeHexComponent$1(_this.get$green(_this)); + visitor._serialize0$_writeHexComponent$1(_this.get$blue(_this)); + } + } + } + else { + format = _this.format; + if (format != null) + if (format === B._ColorFormatEnum_rgbFunction0) + visitor._serialize0$_writeRgb$1(_this); + else { + t1 = visitor._serialize0$_buffer; + if (format === B._ColorFormatEnum_hslFunction0) { + t2 = _this._color1$_alpha; + opaque = A.fuzzyEquals0(t2, 1); + t1.write$1(0, opaque ? "hsl(" : "hsla("); + visitor._serialize0$_writeNumber$1(_this.get$hue(_this)); + t1.write$1(0, "deg"); + t1.write$1(0, ", "); + visitor._serialize0$_writeNumber$1(_this.get$saturation(_this)); + t1.writeCharCode$1(37); + t1.write$1(0, ", "); + visitor._serialize0$_writeNumber$1(_this.get$lightness(_this)); + t1.writeCharCode$1(37); + if (!opaque) { + t1.write$1(0, ", "); + visitor._serialize0$_writeNumber$1(t2); + } + t1.writeCharCode$1(41); + } else + t1.write$1(0, type$.SpanColorFormat_2._as(format)._color1$_span.get$text()); + } + else { + t1 = $.$get$namesByColor0(); + if (t1.containsKey$1(_this) && !A.fuzzyEquals0(_this._color1$_alpha, 0)) + visitor._serialize0$_buffer.write$1(0, t1.$index(0, _this)); + else if (A.fuzzyEquals0(_this._color1$_alpha, 1)) { + visitor._serialize0$_buffer.writeCharCode$1(35); + visitor._serialize0$_writeHexComponent$1(_this.get$red(_this)); + visitor._serialize0$_writeHexComponent$1(_this.get$green(_this)); + visitor._serialize0$_writeHexComponent$1(_this.get$blue(_this)); + } else + visitor._serialize0$_writeRgb$1(_this); + } + } + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + changeRgb$4$alpha$blue$green$red(alpha, blue, green, red) { + var _this = this, + t1 = red == null ? _this.get$red(_this) : red, + t2 = green == null ? _this.get$green(_this) : green, + t3 = blue == null ? _this.get$blue(_this) : blue; + return A.SassColor$rgb0(t1, t2, t3, alpha == null ? _this._color1$_alpha : alpha); + }, + changeRgb$3$blue$green$red(blue, green, red) { + return this.changeRgb$4$alpha$blue$green$red(null, blue, green, red); + }, + changeRgb$1$alpha(alpha) { + return this.changeRgb$4$alpha$blue$green$red(alpha, null, null, null); + }, + changeRgb$1$blue(blue) { + return this.changeRgb$4$alpha$blue$green$red(null, blue, null, null); + }, + changeRgb$1$green(green) { + return this.changeRgb$4$alpha$blue$green$red(null, null, green, null); + }, + changeRgb$1$red(red) { + return this.changeRgb$4$alpha$blue$green$red(null, null, null, red); + }, + changeHsl$4$alpha$hue$lightness$saturation(alpha, hue, lightness, saturation) { + var _this = this, + t1 = hue == null ? _this.get$hue(_this) : hue, + t2 = saturation == null ? _this.get$saturation(_this) : saturation, + t3 = lightness == null ? _this.get$lightness(_this) : lightness; + return A.SassColor$hsl(t1, t2, t3, alpha == null ? _this._color1$_alpha : alpha); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$4$alpha$hue$lightness$saturation(null, hue, null, null); + }, + changeHwb$4$alpha$blackness$hue$whiteness(alpha, blackness, hue, whiteness) { + var t1 = hue == null ? this.get$hue(this) : hue; + return A.SassColor_SassColor$hwb0(t1, whiteness, blackness, alpha); + }, + changeAlpha$1(alpha) { + var _this = this; + return new A.SassColor0(_this._color1$_red, _this._color1$_green, _this._color1$_blue, _this._color1$_hue, _this._color1$_saturation, _this._color1$_lightness, A.fuzzyAssertRange0(alpha, 0, 1, "alpha"), null); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$dividedBy0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.SassColor0 && other.get$red(other) === _this.get$red(_this) && other.get$green(other) === _this.get$green(_this) && other.get$blue(other) === _this.get$blue(_this) && other._color1$_alpha === _this._color1$_alpha; + }, + get$hashCode(_) { + var _this = this; + return B.JSInt_methods.get$hashCode(_this.get$red(_this)) ^ B.JSInt_methods.get$hashCode(_this.get$green(_this)) ^ B.JSInt_methods.get$hashCode(_this.get$blue(_this)) ^ B.JSNumber_methods.get$hashCode(_this._color1$_alpha); + }, + _color1$_rgbToHsl$0() { + var t2, lightness, _this = this, + scaledRed = _this.get$red(_this) / 255, + scaledGreen = _this.get$green(_this) / 255, + scaledBlue = _this.get$blue(_this) / 255, + max = Math.max(Math.max(scaledRed, scaledGreen), scaledBlue), + min = Math.min(Math.min(scaledRed, scaledGreen), scaledBlue), + delta = max - min, + t1 = max === min; + if (t1) + _this._color1$_hue = 0; + else if (max === scaledRed) + _this._color1$_hue = B.JSNumber_methods.$mod(60 * (scaledGreen - scaledBlue) / delta, 360); + else if (max === scaledGreen) + _this._color1$_hue = B.JSNumber_methods.$mod(120 + 60 * (scaledBlue - scaledRed) / delta, 360); + else if (max === scaledBlue) + _this._color1$_hue = B.JSNumber_methods.$mod(240 + 60 * (scaledRed - scaledGreen) / delta, 360); + t2 = max + min; + lightness = 50 * t2; + _this._color1$_lightness = lightness; + if (t1) + _this._color1$_saturation = 0; + else { + t1 = 100 * delta; + if (lightness < 50) + _this._color1$_saturation = t1 / t2; + else + _this._color1$_saturation = t1 / (2 - max - min); + } + }, + _color1$_hslToRgb$0() { + var _this = this, + scaledHue = _this.get$hue(_this) / 360, + scaledSaturation = _this.get$saturation(_this) / 100, + scaledLightness = _this.get$lightness(_this) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + _this._color1$_red = A.fuzzyRound0(A.SassColor__hueToRgb0(m1, m2, scaledHue + 0.3333333333333333) * 255); + _this._color1$_green = A.fuzzyRound0(A.SassColor__hueToRgb0(m1, m2, scaledHue) * 255); + _this._color1$_blue = A.fuzzyRound0(A.SassColor__hueToRgb0(m1, m2, scaledHue - 0.3333333333333333) * 255); + } + }; + A.SassColor_SassColor$hwb_toRgb0.prototype = { + call$1(hue) { + return A.fuzzyRound0((A.SassColor__hueToRgb0(0, 1, hue) * this.factor + this._box_0.scaledWhiteness) * 255); + }, + $signature: 178 + }; + A._ColorFormatEnum0.prototype = { + toString$0(_) { + return this._color1$_name; + } + }; + A.SpanColorFormat0.prototype = {}; + A.Combinator0.prototype = { + toString$0(_) { + return this._combinator0$_text; + } + }; + A.ModifiableCssComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment0: 1, + get$span(receiver) { + return this.span; + } + }; + A.compileAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t5, t6, t7, t8, t9, t10, t11, result, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = t2 ? null : J.get$loadPaths$x(t1); + t4 = t2 ? null : J.get$quietDeps$x(t1); + if (t4 == null) + t4 = false; + t5 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t6 = t2 ? null : J.get$verbose$x(t1); + if (t6 == null) + t6 = false; + t7 = t2 ? null : J.get$charset$x(t1); + if (t7 == null) + t7 = true; + t8 = t2 ? null : J.get$sourceMap$x(t1); + if (t8 == null) + t8 = false; + t9 = t2 ? null : J.get$logger$x(t1); + t9 = new A.NodeToDartLogger(t9, new A.StderrLogger0($async$self.color), $async$self.ascii); + if (t2) + t10 = null; + else { + t10 = J.get$importers$x(t1); + t10 = t10 == null ? null : J.map$1$1$ax(t10, new A.compileAsync__closure(), type$.AsyncImporter); + } + t11 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + $async$goto = 3; + return A._asyncAwait(A.compileAsync0($async$self.path, t7, t11, A.AsyncImportCache$(t10, t3, t9, null), null, null, t9, null, t4, t8, t5, null, true, t6), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 207 + }; + A.compileAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 208 + }; + A.compileStringAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t7, t8, t9, t10, t11, t12, t13, t14, result, t1, t2, t3, t4, t5, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = A.parseSyntax(t2 ? null : J.get$syntax$x(t1)); + t4 = t2 ? null : A.NullableExtension_andThen0(J.get$url$x(t1), A.utils1__jsToDartUrl$closure()); + t5 = t2 ? null : J.get$loadPaths$x(t1); + t6 = t2 ? null : J.get$quietDeps$x(t1); + if (t6 == null) + t6 = false; + t7 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t8 = t2 ? null : J.get$verbose$x(t1); + if (t8 == null) + t8 = false; + t9 = t2 ? null : J.get$charset$x(t1); + if (t9 == null) + t9 = true; + t10 = t2 ? null : J.get$sourceMap$x(t1); + if (t10 == null) + t10 = false; + t11 = t2 ? null : J.get$logger$x(t1); + t11 = new A.NodeToDartLogger(t11, new A.StderrLogger0($async$self.color), $async$self.ascii); + if (t2) + t12 = null; + else { + t12 = J.get$importers$x(t1); + t12 = t12 == null ? null : J.map$1$1$ax(t12, new A.compileStringAsync__closure(), type$.AsyncImporter); + } + t13 = t2 ? null : A.NullableExtension_andThen0(J.get$importer$x(t1), new A.compileStringAsync__closure0()); + if (t13 == null) + t13 = (t2 ? null : J.get$url$x(t1)) == null ? new A.NoOpImporter() : null; + t14 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + $async$goto = 3; + return A._asyncAwait(A.compileStringAsync0($async$self.text, t9, t14, A.AsyncImportCache$(t12, t5, t11, null), t13, null, null, t11, null, t6, t10, t7, t3, t4, true, t8), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 207 + }; + A.compileStringAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 208 + }; + A.compileStringAsync__closure0.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 373 + }; + A._wrapAsyncSassExceptions_closure.prototype = { + call$1(error) { + var t1; + if (error instanceof A.SassException0) + t1 = A.throwNodeException(error, this.ascii, this.color, null); + else + t1 = A.jsThrow(error == null ? type$.Object._as(error) : error); + return t1; + }, + $signature: 374 + }; + A._parseFunctions_closure0.prototype = { + call$2(signature, callback) { + var error, stackTrace, exception, t2, t3, t4, t1 = {}; + t1.tuple = null; + try { + t1.tuple = A.ScssParser$0(signature, null, null).parseSignature$0(); + } catch (exception) { + t2 = A.unwrapException(exception); + if (t2 instanceof A.SassFormatException0) { + error = t2; + stackTrace = A.getTraceFromException(exception); + t2 = error; + t3 = J.getInterceptor$z(t2); + A.throwWithTrace0(new A.SassFormatException0('Invalid signature "' + signature + '": ' + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t3, t2)), stackTrace); + } else + throw exception; + } + t2 = this.result; + t3 = t1.tuple; + t4 = t3.item1; + t3 = t3.item2; + if (!this.asynch) + t2.push(new A.BuiltInCallable0(t4, A._setArrayType([new A.Tuple2(t3, new A._parseFunctions__closure2(t1, callback), type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value))); + else + t2.push(new A.AsyncBuiltInCallable0(t4, t3, new A._parseFunctions__closure3(t1, callback))); + }, + $signature: 128 + }; + A._parseFunctions__closure2.prototype = { + call$1($arguments) { + var t1, t2, + _s42_ = string$.Invali, + result = type$.Function._as(this.callback).call$1(A.toJSArray($arguments)); + if (result instanceof A.Value0) + return result; + t1 = result != null && result instanceof self.Promise; + t2 = this._box_0.tuple; + if (t1) + throw A.wrapException(_s42_ + A.S(t2.item1) + '":\nPromises may only be returned for sass.compileAsync() and sass.compileStringAsync().'); + else + throw A.wrapException(_s42_ + A.S(t2.item1) + '": ' + A.S(result) + " is not a sass.Value."); + }, + $signature: 3 + }; + A._parseFunctions__closure3.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure0($arguments); + }, + $call$body$_parseFunctions__closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = type$.Function._as($async$self.callback).call$1(A.toJSArray($arguments)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.Object), $async$call$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result instanceof A.Value0) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException(string$.Invali + A.S($async$self._box_0.tuple.item1) + '": ' + A.S(result) + " is not a sass.Value."); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 96 + }; + A._compileStylesheet_closure1.prototype = { + call$1(url) { + return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + }, + $signature: 5 + }; + A.CompileOptions.prototype = {}; + A.CompileStringOptions.prototype = {}; + A.NodeCompileResult.prototype = {}; + A.CompileResult0.prototype = {}; + A.ComplexSassNumber0.prototype = { + get$numeratorUnits(_) { + return this._complex0$_numeratorUnits; + }, + get$denominatorUnits(_) { + return this._complex0$_denominatorUnits; + }, + get$hasUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, this._number1$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber_2)); + } + }; + A.ComplexSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._complex$__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure0()); + _this._complex$__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._complex$__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + if (this.leadingCombinators.length === 0) { + var t1 = this.components; + t1 = t1.length === 1 && B.JSArray_methods.get$first(t1).combinators.length === 0; + } else + t1 = false; + return t1 ? B.JSArray_methods.get$first(this.components).selector : null; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1, t2, t3, _this = this; + if (combinators.length === 0) + return _this; + else { + t1 = _this.components; + t2 = _this.leadingCombinators; + if (t1.length === 0) { + t1 = A.List_List$of(t2, true, type$.Combinator_2); + B.JSArray_methods.addAll$1(t1, combinators); + return A.ComplexSelector$0(t1, B.List_empty15, _this.lineBreak || false); + } else { + t3 = A.List_List$of(A.IterableExtension_get_exceptLast0(t1), true, type$.ComplexSelectorComponent_2); + t3.push(B.JSArray_methods.get$last(t1).withAdditionalCombinators$1(combinators)); + return A.ComplexSelector$0(t2, t3, _this.lineBreak || false); + } + } + }, + concatenate$2$forceLineBreak(child, forceLineBreak) { + var t2, t3, t4, t5, _this = this, + t1 = child.leadingCombinators; + if (t1.length === 0) { + t1 = A.List_List$of(_this.components, true, type$.ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(_this.leadingCombinators, t1, t2); + } else { + t2 = _this.components; + t3 = _this.leadingCombinators; + t4 = child.components; + if (t2.length === 0) { + t2 = A.List_List$of(t3, true, type$.Combinator_2); + B.JSArray_methods.addAll$1(t2, t1); + return A.ComplexSelector$0(t2, t4, _this.lineBreak || child.lineBreak || forceLineBreak); + } else { + t5 = A.List_List$of(A.IterableExtension_get_exceptLast0(t2), true, type$.ComplexSelectorComponent_2); + t5.push(B.JSArray_methods.get$last(t2).withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t5, t4); + return A.ComplexSelector$0(t3, t5, _this.lineBreak || child.lineBreak || forceLineBreak); + } + } + }, + concatenate$1(child) { + return this.concatenate$2$forceLineBreak(child, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector0 && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 376 + }; + A.ComplexSelectorComponent0.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2; + if (combinators.length === 0) + t1 = this; + else { + t1 = type$.Combinator_2; + t2 = A.List_List$of(this.combinators, true, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent0(this.selector, A.List_List$unmodifiable(t2, t1)); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent0) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector0(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure0.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 377 + }; + A.CompoundSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._compound$__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure0()); + _this._compound$__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._compound$__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 378 + }; + A.Configuration0.prototype = { + throughForward$1($forward) { + var prefix, shownVariables, hiddenVariables, t1, + newValues = this._configuration$_values; + if (newValues.get$isEmpty(newValues)) + return B.Configuration_Map_empty_null0; + prefix = $forward.prefix; + if (prefix != null) + newValues = new A.UnprefixedMapView0(newValues, prefix, type$.UnprefixedMapView_ConfiguredValue_2); + shownVariables = $forward.shownVariables; + hiddenVariables = $forward.hiddenVariables; + if (shownVariables != null) + newValues = new A.LimitedMapView0(newValues, shownVariables._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue_2); + else { + if (hiddenVariables != null) { + t1 = hiddenVariables._base; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = false; + if (t1) + newValues = A.LimitedMapView$blocklist0(newValues, hiddenVariables, type$.String, type$.ConfiguredValue_2); + } + return this._configuration$_withValues$1(newValues); + }, + _configuration$_withValues$1(values) { + var t1 = this._configuration$__originalConfiguration; + return new A.Configuration0(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t1 = this._configuration$_values; + return "(" + t1.get$entries(t1).map$1$1(0, new A.Configuration_toString_closure0(), type$.String).join$1(0, ", ") + ")"; + } + }; + A.Configuration_toString_closure0.prototype = { + call$1(entry) { + return "$" + A.S(entry.key) + ": " + A.S(entry.value); + }, + $signature: 379 + }; + A.ExplicitConfiguration0.prototype = { + _configuration$_withValues$1(values) { + var t1 = this._configuration$__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration0(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue0.prototype = { + toString$0(_) { + return A.serializeValue0(this.value, true, true); + } + }; + A.ConfiguredVariable0.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, + t1 = this.$arguments; + t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; + t2 = this.children; + return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + } + }; + A.ContentRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(t1) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A._disallowedFunctionNames_closure0.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 380 + }; + A.CssParser0.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + this.super$Parser$silentComment0(); + this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, urlStart, next, url, urlSpan, modifiers, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + switch ($name.get$asPlain()) { + case "at-root": + case "content": + case "debug": + case "each": + case "error": + case "extend": + case "for": + case "function": + case "if": + case "include": + case "mixin": + case "return": + case "warn": + case "while": + _this.almostAnyValue$0(); + _this.error$2(0, "This at-rule isn't allowed in plain CSS.", t1.spanFrom$1(start)); + break; + case "import": + urlStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + url = next === 117 || next === 85 ? _this.dynamicUrl$0() : new A.StringExpression0(_this.interpolatedString$0().asInterpolation$1$static(true), false); + urlSpan = t1.spanFrom$1(urlStart); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport0(A.Interpolation$0(A._setArrayType([url], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(urlStart))], type$.JSArray_Import_2); + t1 = t1.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(t2, type$.Import_2), t1); + case "media": + return _this.mediaRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "supports": + return _this.supportsRule$1(start); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + specialFunction = _this.trySpecialFunction$2(lower, start); + if (specialFunction != null) + return specialFunction; + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return new A.StringExpression0(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression_2); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$0(); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression0(A.Interpolation$0(A._setArrayType([""], type$.JSArray_Object), t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames0().contains$1(0, plain)) + _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); + t3 = A.Interpolation$0(A._setArrayType([new A.StringExpression0(identifier, false)], type$.JSArray_Object), identifier.span); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + t4 = type$.Expression_2; + return new A.InterpolatedFunctionExpression0(t3, new A.ArgumentInvocation0(A.List_List$unmodifiable($arguments, t4), A.ConstantMap_ConstantMap$from(B.Map_empty9, type$.String, t4), null, null, t2), t1.spanFrom$1(start)); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression0(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.DebugRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Declaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t3, children, + buffer = new A.StringBuffer(""), + t1 = this.name, + t2 = "" + t1.toString$0(0); + buffer._contents = t2; + t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); + t3 = this.value; + if (t3 != null) { + t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; + buffer._contents = t1 + t3.toString$0(0); + } + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration0.prototype = { + get$isCustomProperty() { + var $name = this.name; + return $name instanceof A.StringExpression0 && !$name.hasQuotes && B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.DynamicImport0.prototype = { + toString$0(_) { + return A.StringExpression_quoteText0(this.urlString); + }, + $isImport0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.EachRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables, + t2 = this.children; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure0.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 5 + }; + A.EmptyExtensionStore0.prototype = { + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet0; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty17; + }, + addSelector$3(selector, span, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addSel)); + }, + addExtension$4(extender, target, extend, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addExt_)); + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExts)); + }, + clone$0() { + return B.Tuple2_EmptyExtensionStore_Map_empty0; + }, + $isExtensionStore0: 1 + }; + A.Environment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._environment0$_forwardedModules, + t2 = _this._environment0$_nestedForwardedModules, + t3 = _this._environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_0(_this._environment0$_modules, _this._environment0$_namespaceNodes, _this._environment0$_globalModules, _this._environment0$_importedModules, t1, t2, _this._environment0$_allModules, t3, t4, t5, t6, _this._environment0$_content); + }, + addModule$3$namespace(module, nodeWithSpan, namespace) { + var t1, t2, span, _this = this; + if (namespace == null) { + _this._environment0$_globalModules.$indexSet(0, module, nodeWithSpan); + _this._environment0$_allModules.push(module); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.get$first(_this._environment0$_variables))); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (module.get$variables().containsKey$1(t2)) + throw A.wrapException(A.SassScriptException$0(string$.This_ma + t2 + '".', null)); + } + } else { + t1 = _this._environment0$_modules; + if (t1.containsKey$1(namespace)) { + t1 = _this._environment0$_namespaceNodes.$index(0, namespace); + span = t1 == null ? null : t1.span; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @use"); + throw A.wrapException(A.MultiSpanSassScriptException$0(string$.There_ + namespace + '".', "new @use", t1)); + } + t1.$indexSet(0, namespace, module); + _this._environment0$_namespaceNodes.$indexSet(0, namespace, nodeWithSpan); + _this._environment0$_allModules.push(module); + } + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.Callable_2); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules._modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, $name, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = J.get$iterator$ax(smaller.get$keys(smaller)), t2 = type === "variable"; t1.moveNext$0();) { + $name = t1.get$current(t1); + if (!larger.containsKey$1($name)) + continue; + if (t2 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(larger.$index(0, $name), smaller.$index(0, $name))) + continue; + if (t2) + $name = "$" + $name; + t1 = this._environment0$_forwardedModules; + if (t1 == null) + span = null; + else { + t1 = t1.$index(0, oldModule); + span = t1 == null ? null : J.get$span$z(t1); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t1.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t1)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, t5, forwardedVariableNames, forwardedFunctionNames, forwardedMixinNames, _i, entry, shadowed, t6, _length, _list, _this = this, + forwarded = module._environment0$_environment._environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + for (t2 = forwarded.get$entries(forwarded), t2 = t2.get$iterator(t2), t3 = _this._environment0$_globalModules; t2.moveNext$0();) { + t4 = t2.get$current(t2); + t5 = t4.key; + if (!forwardedModules.containsKey$1(t5) || !t3.containsKey$1(t5)) + t1.$indexSet(0, t5, t4.value); + } + forwarded = t1; + } else + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + t1 = A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"); + t2 = t1._eval$1("ExpandIterable"); + t3 = t2._eval$1("Iterable.E"); + forwardedVariableNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure2(), t2), t3); + forwardedFunctionNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure3(), t2), t3); + forwardedMixinNames = A.LinkedHashSet_LinkedHashSet$of(new A.ExpandIterable(new A.LinkedHashMapKeyIterable(forwarded, t1), new A.Environment_importForwards_closure4(), t2), t3); + t2 = _this._environment0$_variables; + t3 = t2.length; + if (t3 === 1) { + for (t1 = _this._environment0$_importedModules, t3 = t1.get$entries(t1).toList$0(0), t4 = t3.length, t5 = type$.Callable_2, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary0(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + t1.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view0$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + t1.$indexSet(0, shadowed, entry.value); + } + } + for (t3 = forwardedModules.get$entries(forwardedModules).toList$0(0), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + entry = t3[_i]; + module = entry.key; + shadowed = A.ShadowedModuleView_ifNecessary0(module, forwardedFunctionNames, forwardedMixinNames, forwardedVariableNames, t5); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t6 = shadowed.variables; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.functions; + if (t6.get$isEmpty(t6)) { + t6 = shadowed.mixins; + if (t6.get$isEmpty(t6)) { + t6 = shadowed._shadowed_view0$_inner; + t6 = t6.get$css(t6); + t6 = J.get$isEmpty$asx(t6.get$children(t6)); + } else + t6 = false; + } else + t6 = false; + } else + t6 = false; + if (!t6) + forwardedModules.$indexSet(0, shadowed, entry.value); + } + } + t1.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t4 = _this._environment0$_nestedForwardedModules; + if (t4 == null) { + _length = t3 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable_2); + for (t3 = type$.JSArray_Module_Callable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t3); + _this._environment0$_nestedForwardedModules = _list; + t3 = _list; + } else + t3 = t4; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t3), new A.LinkedHashMapKeyIterable(forwarded, t1)); + } + for (t1 = A._LinkedHashSetIterator$(forwardedVariableNames, forwardedVariableNames._collection$_modifications), t3 = _this._environment0$_variableIndices, t4 = _this._environment0$_variableNodes, t5 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t6 = t1._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t2), t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(forwardedFunctionNames, forwardedFunctionNames._collection$_modifications), t2 = _this._environment0$_functionIndices, t3 = _this._environment0$_functions, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + for (t1 = A._LinkedHashSetIterator$(forwardedMixinNames, forwardedMixinNames._collection$_modifications), t2 = _this._environment0$_mixinIndices, t3 = _this._environment0$_mixins, t4 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._environment0$_variables[t1], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + t1 = J.$index$asx(_this._environment0$_variables[index], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } + index = _this._environment0$_variableIndex$1($name); + if (index == null) + return _this._environment0$_getVariableFromGlobalModule$1($name); + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._environment0$_variables[index], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _environment0$_getVariableFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$1$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure0($name), type$.Value_2); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._environment0$_variableNodes[t1], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + index = t1.$index(0, $name); + if (index != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + t1 = J.$index$asx(_this._environment0$_variableNodes[index], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + index = _this._environment0$_variableIndex$1($name); + if (index == null) + return _this._environment0$_getVariableNodeFromGlobalModule$1($name); + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._environment0$_variableNodes[index], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + }, + _environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, value; + for (t1 = this._environment0$_importedModules, t2 = this._environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + value = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (value != null) + return value; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._environment0$_variables).containsKey$1($name)) + return true; + return this._environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._environment0$_variables.length === 1) { + _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure2(_this, $name)); + t1 = _this._environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._environment0$_fromOneModule$1$3($name, "variable", new A.Environment_setVariable_closure3($name), type$.Module_Callable_2); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._environment0$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._environment0$_variableIndices.containsKey$1($name) && _this._environment0$_variableIndex$1($name) == null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A.instanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure4(_this, $name)); + if (!_this._environment0$_inSemiGlobalScope && index === 0) { + index = _this._environment0$_variables.length - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + J.$indexSet$ax(_this._environment0$_variables[index], $name, value); + J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._environment0$_variables, + t2 = t1.length; + _this._environment0$_lastVariableName = $name; + index = _this._environment0$_lastVariableIndex = t2 - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) { + t1 = _this._environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._environment0$_functionIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._environment0$_functions[index], $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + } + index = _this._environment0$_functionIndex$1($name); + if (index == null) + return _this._environment0$_getFunctionFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._environment0$_functions[index], $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + }, + _environment0$_getFunctionFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$1$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure0($name), type$.Callable_2); + }, + _environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, index, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._environment0$_mixinIndices; + index = t1.$index(0, $name); + if (index != null) { + t1 = J.$index$asx(_this._environment0$_mixins[index], $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + } + index = _this._environment0$_mixinIndex$1($name); + if (index == null) + return _this._environment0$_getMixinFromGlobalModule$1($name); + t1.$indexSet(0, $name, index); + t1 = J.$index$asx(_this._environment0$_mixins[index], $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + }, + _environment0$_getMixinFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$1$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure0($name), type$.Callable_2); + }, + _environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = _this._environment0$_inSemiGlobalScope; + _this._environment0$_inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = _this._environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = _this._environment0$_functions; + t5 = type$.Callable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable_2)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + _this._environment0$_lastVariableIndex = _this._environment0$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + toImplicitConfiguration$0() { + var t1, t2, i, values, nodes, t3, t4, t5, t6, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + for (t1 = this._environment0$_variables, t2 = this._environment0$_variableNodes, i = 0; i < t1.length; ++i) { + values = t1[i]; + nodes = t2[i]; + for (t3 = values.get$entries(values), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.key; + t4 = t4.value; + t6 = nodes.$index(0, t5); + t6.toString; + configuration.$indexSet(0, t5, new A.ConfiguredValue0(t4, null, t6)); + } + } + return new A.Configuration0(configuration, null); + }, + toModule$2(css, extensionStore) { + return A._EnvironmentModule__EnvironmentModule1(this, css, extensionStore, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule1(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty16, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toDummyModule_closure0())); + }, + _environment0$_getModule$1(namespace) { + var module = this._environment0$_modules.$index(0, namespace); + if (module != null) + return module; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _environment0$_fromOneModule$1$3($name, type, callback, $T) { + var t1, t2, t3, t4, t5, value, identity, valueInModule, identityFromModule, spans, + nestedForwardedModules = this._environment0$_nestedForwardedModules; + if (nestedForwardedModules != null) + for (t1 = new A.ReversedListIterable(nestedForwardedModules, A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>")), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t2._as(t3) : t3), t3 = new A.ListIterator(t3, t3.get$length(t3)), t4 = A._instanceType(t3)._precomputed1; t3.moveNext$0();) { + t5 = t3.__internal$_current; + value = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (value != null) + return value; + } + } + for (t1 = this._environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1._modifications); t1.moveNext$0();) { + value = callback.call$1(t1.__js_helper$_current); + if (value != null) + return value; + } + for (t1 = this._environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1._modifications), t3 = type$.Callable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + spans = t1.get$entries(t1).map$1$1(0, new A.Environment__fromOneModule_closure0(callback, $T), type$.nullable_FileSpan); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t1 = spans.get$iterator(spans), t3 = "includes " + type; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t4 != null) + t2.$indexSet(0, t4, t3); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + } + }; + A.Environment_importForwards_closure2.prototype = { + call$1(module) { + var t1 = module.get$variables(); + return t1.get$keys(t1); + }, + $signature: 129 + }; + A.Environment_importForwards_closure3.prototype = { + call$1(module) { + var t1 = module.get$functions(module); + return t1.get$keys(t1); + }, + $signature: 129 + }; + A.Environment_importForwards_closure4.prototype = { + call$1(module) { + var t1 = module.get$mixins(); + return t1.get$keys(t1); + }, + $signature: 129 + }; + A.Environment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 383 + }; + A.Environment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._environment0$_lastVariableName = this.name; + return t1._environment0$_lastVariableIndex = 0; + }, + $signature: 12 + }; + A.Environment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 384 + }; + A.Environment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._environment0$_variableIndex$1(this.name); + return t2 == null ? t1._environment0$_variables.length - 1 : t2; + }, + $signature: 12 + }; + A.Environment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 212 + }; + A.Environment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 212 + }; + A.Environment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 213 + }; + A.Environment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 213 + }; + A.Environment__fromOneModule_closure0.prototype = { + call$1(entry) { + return A.NullableExtension_andThen0(this.callback.call$1(entry.key), new A.Environment__fromOneModule__closure0(entry, this.T)); + }, + $signature: 387 + }; + A.Environment__fromOneModule__closure0.prototype = { + call$1(_) { + return J.get$span$z(this.entry.value); + }, + $signature() { + return this.T._eval$1("FileSpan(0)"); + } + }; + A._EnvironmentModule1.prototype = { + get$url(_) { + var t1 = this.css; + return t1.get$span(t1).file.url; + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + module = this._environment0$_modulesByVariable.$index(0, $name); + if (module != null) { + module.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment0$_environment; + t2 = t1._environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._environment0$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var newCssAndExtensionStore, _this = this, + t1 = _this.css; + if (J.get$isEmpty$asx(t1.get$children(t1))) + return _this; + newCssAndExtensionStore = A.cloneCssStylesheet0(t1, _this.extensionStore); + return A._EnvironmentModule$_1(_this._environment0$_environment, newCssAndExtensionStore.item1, newCssAndExtensionStore.item2, _this._environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.transitivelyContainsCss, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css; + if (t1.get$span(t1).file.url == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = $.$get$context().prettyUri$1(t1.file.url); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure11.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 388 + }; + A._EnvironmentModule__EnvironmentModule_closure12.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 389 + }; + A._EnvironmentModule__EnvironmentModule_closure13.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 214 + }; + A._EnvironmentModule__EnvironmentModule_closure14.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 214 + }; + A._EnvironmentModule__EnvironmentModule_closure15.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 130 + }; + A._EnvironmentModule__EnvironmentModule_closure16.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 130 + }; + A.ErrorRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A._EvaluateVisitor1.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + t1 = type$.JSArray_BuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure19(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure20(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure21(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure22(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure23(_this), _s9_), A.BuiltInCallable$function0("module-variables", "$module", new A._EvaluateVisitor_closure24(_this), _s9_), A.BuiltInCallable$function0("module-functions", "$module", new A._EvaluateVisitor_closure25(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure26(_this), _s9_), A.BuiltInCallable$function0("call", "$function, $args...", new A._EvaluateVisitor_closure27(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure28(_this), _s9_)], t1); + t1 = type$.BuiltInCallable_2; + t2 = A.List_List$of($.$get$global6(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$local0()); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_BuiltInCallable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = A._setArrayType([], type$.JSArray_Callable_2); + B.JSArray_methods.addAll$1(t1, functions); + B.JSArray_methods.addAll$1(t1, $.$get$globalFunctions0()); + B.JSArray_methods.addAll$1(t1, metaFunctions); + for (t2 = t1.length, t3 = _this._evaluate0$_builtInFunctions, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + $function = t1[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_run_closure1(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext1(this, node)], t1, t1), type$.EvaluateResult_2); + }, + _evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _evaluate0$_assertInModule$2(value, $name) { + return this._evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t1, t2, _this = this, + builtInModule = _this._evaluate0$_builtInModules.$index(0, url); + if (builtInModule != null) { + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate0$_exception$2(t1, t2.get$span(t2))); + } + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure3(callback, builtInModule)); + return; + } + _this._evaluate0$_withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure4(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, extensionStore, module, _this = this, + url = stylesheet.span.file.url, + t1 = _this._evaluate0$_modules, + alreadyLoaded = t1.$index(0, url); + if (alreadyLoaded != null) { + t1 = configuration == null; + currentConfiguration = t1 ? _this._evaluate0$_configuration : configuration; + t2 = _this._evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { + message = namesInErrors ? $.$get$context().prettyUri$1(url) + string$.x20was_a : string$.This_mw; + t2 = _this._evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : J.get$span$z(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(t1) ? _this._evaluate0$_exception$1(message) : _this._evaluate0$_multiSpanException$3(message, "new load", t1)); + } + return alreadyLoaded; + } + environment = A.Environment$0(); + css = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + _this._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure1(_this, importer, stylesheet, extensionStore, configuration, css)); + module = environment.toModule$2(css._readLocal$0(), extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + _this._evaluate0$_moduleConfigurations.$indexSet(0, url, _this._evaluate0$_configuration); + if (nodeWithSpan != null) + _this._evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _evaluate0$_execute$2(importer, stylesheet) { + return this._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + outOfOrderImports = _this._evaluate0$_outOfOrderImports; + if (outOfOrderImports == null) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListMixin.E")), true, type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, outOfOrderImports); + t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListMixin.E"))); + return t1; + }, + _evaluate0$_combineCss$2$clone(root, clone) { + var selectors, unsatisfiedExtension, sortedModules, t1, imports, css, t2, t3, statements, index, _this = this; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure5())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + unsatisfiedExtension = A.firstOrNull0(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure6(selectors))); + if (unsatisfiedExtension != null) + _this._evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtension); + return root.get$css(root); + } + sortedModules = _this._evaluate0$_topologicalModules$1(root); + if (clone) { + t1 = sortedModules.$ti._eval$1("MappedListIterable>"); + sortedModules = A.List_List$of(new A.MappedListIterable(sortedModules, new A._EvaluateVisitor__combineCss_closure7(), t1), true, t1._eval$1("ListIterable.E")); + } + _this._evaluate0$_extendModules$1(sortedModules); + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + for (t1 = J.get$reversed$ax(sortedModules), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t3 = t3.get$css(t3); + statements = t3.get$children(t3); + index = _this._evaluate0$_indexAfterImports$1(statements); + t3 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(imports, t3.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(css, t3.getRange$2(statements, index, t3.get$length(statements))); + } + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _evaluate0$_combineCss$1(root) { + return this._evaluate0$_combineCss$2$clone(root, false); + }, + _evaluate0$_extendModules$1(sortedModules) { + var t1, t2, originalSelectors, $self, t3, t4, _i, upstream, url, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = J.get$iterator$ax(sortedModules); t1.moveNext$0();) { + t2 = t1.get$current(t1); + originalSelectors = t2.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t2.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure3(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t2.get$url(t2)); + t3 = t2.get$extensionStore().get$addExtensions(); + if ($self != null) + t3.call$1($self); + t3 = t2.get$extensionStore(); + if (t3.get$isEmpty(t3)) + continue; + for (t3 = t2.get$upstream(), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + upstream = t3[_i]; + url = upstream.get$url(upstream); + if (url == null) + continue; + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(url, new A._EvaluateVisitor__extendModules_closure4()), t2.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t2.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(unsatisfiedExtensions)); + }, + _evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span)); + }, + _evaluate0$_topologicalModules$1(root) { + var t1 = type$.Module_Callable_2, + sorted = A.QueueList$(null, t1); + new A._EvaluateVisitor__topologicalModules_visitModule1(A.LinkedHashSet_LinkedHashSet$_empty(t1), sorted).call$1(root); + return sorted; + }, + _evaluate0$_indexAfterImports$1(statements) { + var t1, t2, t3, lastImport, i, statement; + for (t1 = J.getInterceptor$asx(statements), t2 = type$.CssComment_2, t3 = type$.CssImport_2, lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + statement = t1.$index(statements, i); + if (t3._is(statement)) + lastImport = i; + else if (!t2._is(statement)) + break; + } + return lastImport + 1; + }, + visitStylesheet$1(node) { + var t1, t2, _i; + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + return null; + }, + visitAtRootRule$1(node) { + var t1, grandparent, root, innerCopy, t2, outerCopy, t3, copy, _this = this, + _s8_ = "__parent", + unparsedQuery = node.query, + query = unparsedQuery != null ? _this._evaluate0$_adjustParseError$2(unparsedQuery, new A._EvaluateVisitor_visitAtRootRule_closure5(_this, _this._evaluate0$_performInterpolation$2$warnForColor(unparsedQuery, true))) : B.AtRootQuery_UsS0, + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = grandparent) { + if (!query.excludes$1($parent)) + included.push($parent); + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._evaluate0$_trimIncluded$1(included); + if (root === _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure6(_this, node), node.hasDeclarations, type$.Null); + return null; + } + if (included.length !== 0) { + innerCopy = B.JSArray_methods.get$first(included).copyWithoutChildren$0(); + for (t1 = A.SubListIterable$(included, 1, null, type$.ModifiableCssParentNode_2), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1, outerCopy = innerCopy; t1.moveNext$0(); outerCopy = copy) { + t3 = t1.__internal$_current; + copy = (t3 == null ? t2._as(t3) : t3).copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure7(_this, node)); + return null; + }, + _evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, grandparent, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = grandparent) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = grandparent) { + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure11(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure12(_this, scope); + if (_this._evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure13(_this, scope); + if (_this._evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure14(_this, scope); + return _this._evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure15()) ? new A._EvaluateVisitor__scopeForAtRoot_closure16(_this, scope) : scope; + }, + visitContentBlock$1(node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(node) { + var $content = this._evaluate0$_environment._environment0$_content; + if ($content == null) + return null; + this._evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure1(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + this._evaluate0$_logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(node) { + var t1, $name, t2, cssValue, t3, t4, children, oldDeclarationName, _this = this, _null = null; + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null && !_this._evaluate0$_inUnknownAtRule && !_this._evaluate0$_inKeyframes) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarm, node.span)); + t1 = node.name; + $name = _this._evaluate0$_interpolationToValue$2$warnForColor(t1, true); + t2 = _this._evaluate0$_declarationName; + if (t2 != null) + $name = new A.CssValue0(t2 + "-" + A.S($name.value), $name.span, type$.CssValue_String_2); + t2 = node.value; + cssValue = A.NullableExtension_andThen0(t2, new A._EvaluateVisitor_visitDeclaration_closure3(_this)); + t3 = cssValue != null; + if (t3) + t4 = !cssValue.get$value(cssValue).get$isBlank() || cssValue.get$value(cssValue).get$asList().length === 0; + else + t4 = false; + if (t4) { + t3 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + if (_this._evaluate0$_sourceMap) { + t2 = A.NullableExtension_andThen0(t2, _this.get$_evaluate0$_expressionNode()); + t2 = t2 == null ? _null : J.get$span$z(t2); + } else + t2 = _null; + t3.addChild$1(A.ModifiableCssDeclaration$0($name, cssValue, node.span, t1, t2)); + } else if (J.startsWith$1$s($name.value, "--") && t3) + throw A.wrapException(_this._evaluate0$_exception$2("Custom property values may not be empty.", cssValue.get$span(cssValue))); + children = node.children; + if (children != null) { + oldDeclarationName = _this._evaluate0$_declarationName; + _this._evaluate0$_declarationName = $name.value; + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure4(_this, children), node.hasDeclarations, type$.Null); + _this._evaluate0$_declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(node) { + var _this = this, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._evaluate0$_expressionNode$1(t1), + setVariables = node.variables.length === 1 ? new A._EvaluateVisitor_visitEachRule_closure5(_this, node, nodeWithSpan) : new A._EvaluateVisitor_visitEachRule_closure6(_this, node, nodeWithSpan); + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure7(_this, list, setVariables, node), true, type$.nullable_Value_2); + }, + _evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], this._evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(node) { + throw A.wrapException(this._evaluate0$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); + }, + visitExtendRule$1(node) { + var t1, t2, t3, t4, t5, t6, t7, _i, complex, visitor, t8, t9, targetText, compound, _this = this, _null = null, + styleRule = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || _this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = styleRule.selector, t4 = t3.span, t5 = node.span, t6 = type$.SourceSpan, t7 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + t8 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t9 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + _this._evaluate0$_warn$3$deprecation('The selector "' + t8 + '" is invalid CSS and ' + t9 + string$.x20be_an, new A.MultiSpan0(t4, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t5, "@extend rule"], t6, t7), t6, t7)), true); + } + targetText = _this._evaluate0$_interpolationToValue$2$warnForColor(node.selector, true); + for (t1 = _this._evaluate0$_adjustParseError$2(targetText, new A._EvaluateVisitor_visitExtendRule_closure1(_this, targetText)).components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex.leadingCombinators.length === 0) { + t4 = complex.components; + t4 = t4.length === 1 && B.JSArray_methods.get$first(t4).combinators.length === 0; + } else + t4 = false; + compound = t4 ? B.JSArray_methods.get$first(complex.components).selector : _null; + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", targetText.span)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, targetText.span)); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3, t5, node, _this._evaluate0$_mediaQueries); + } + return _null; + }, + visitAtRule$1(node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + $name = _this._evaluate0$_interpolationToValue$1(node.name); + value = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure5(_this)); + children = node.children; + if (children == null) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.value) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure6(_this, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure7(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure9(_this, node)), + t3 = node.to, + toNumber = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure10(_this, node)), + from = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure11(fromNumber)), + to = t1.to = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure12(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure13(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value_2); + }, + visitForwardRule$1(node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._evaluate0$_configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node); + _this._evaluate0$_loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure3(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._evaluate0$_configuration = adjustedConfiguration; + _this._evaluate0$_loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure4(_this, node)); + _this._evaluate0$_configuration = oldConfiguration; + } + return null; + }, + _evaluate0$_addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, t5, variableNodeWithSpan, + t1 = configuration._configuration$_values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + t5 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t4); + if (t5 != null && !t5.value.$eq(0, B.C__SassNull0)) { + newValues.$indexSet(0, t4, t5); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._evaluate0$_expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue0(this._evaluate0$_withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration0(node, newValues, null); + else + return new A.Configuration0(newValues, null); + }, + _evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, entry; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = t1.get$entries(t1); + entry = t1.get$first(t1); + t1 = nameInError ? "$" + A.S(entry.key) + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate0$_exception$2(t1, entry.value.configurationSpan)); + }, + _evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_functions, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitIfRule$1(node) { + var t1, t2, _i, clauseToCheck, _box_0 = {}; + _box_0.clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + _box_0.clause = clauseToCheck; + break; + } + } + t1 = _box_0.clause; + if (t1 == null) + return null; + return this._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule_closure1(_box_0, this), true, t1.hasDeclarations, type$.nullable_Value_2); + }, + visitImportRule$1(node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, result, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String_2, t4 = _this.get$_evaluate0$_interpolationToValue(), t5 = type$.StaticImport_2, t6 = type$.JSArray_ModifiableCssImport_2, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport0) + _this._evaluate0$_visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + result = _this._evaluate0$_performInterpolation$2$warnForColor(t7, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport0(new A.CssValue0(result, t7.span, t3), t8, $import.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(node); + else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + t7 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + node._node0$_parent = t7; + t7 = t7._node0$_children; + node._node0$_indexInParent = t7.length; + t7.push(node); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t7 = _this._evaluate0$_outOfOrderImports; + (t7 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _evaluate0$_visitDynamicImport$1($import) { + return this._evaluate0$_withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure1(this, $import)); + }, + _evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var importCache, tuple, isDependency, stylesheet, result, error, stackTrace, error0, stackTrace0, message, t1, t2, t3, t4, exception, message0, _this = this, + _s11_ = "_stylesheet"; + baseUrl = baseUrl; + try { + _this._evaluate0$_importSpan = span; + importCache = _this._evaluate0$_importCache; + if (importCache != null) { + if (baseUrl == null) + baseUrl = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url; + tuple = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._evaluate0$_importer, baseUrl, forImport); + if (tuple != null) { + isDependency = _this._evaluate0$_inDependency || tuple.item1 !== _this._evaluate0$_importer; + t1 = tuple.item1; + t2 = tuple.item2; + t3 = tuple.item3; + t4 = _this._evaluate0$_quietDeps && isDependency; + stylesheet = importCache.importCanonical$4$originalUrl$quiet(t1, t2, t3, t4); + if (stylesheet != null) { + _this._evaluate0$_loadedUrls.add$1(0, tuple.item2); + t1 = tuple.item1; + return new A._LoadedStylesheet1(stylesheet, t1, isDependency); + } + } + } else { + t1 = baseUrl; + result = _this._evaluate0$_importLikeNode$3(url, t1 == null ? _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url : t1, forImport); + if (result != null) { + t1 = _this._evaluate0$_loadedUrls; + A.NullableExtension_andThen0(result.stylesheet.span.file.url, t1.get$add(t1)); + return result; + } + } + if (B.JSString_methods.startsWith$1(url, "package:") && true) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace0(_this._evaluate0$_exception$2(error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t2, t1)), stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + message = null; + try { + message = A._asString(J.get$message$x(error0)); + } catch (exception) { + message0 = J.toString$0$(error0); + message = message0; + } + A.throwWithTrace0(_this._evaluate0$_exception$1(message), stackTrace0); + } + } finally { + _this._evaluate0$_importSpan = null; + } + }, + _evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _evaluate0$_importLikeNode$3(originalUrl, previous, forImport) { + var isDependency, url, t2, _this = this, + t1 = _this._evaluate0$_nodeImporter, + result = t1.loadRelative$3(originalUrl, previous, forImport); + if (result != null) + isDependency = _this._evaluate0$_inDependency; + else { + result = t1.load$3(0, originalUrl, previous, forImport); + if (result == null) + return null; + isDependency = true; + } + url = result.item2; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; + t2 = _this._evaluate0$_quietDeps && isDependency ? $.$get$Logger_quiet0() : _this._evaluate0$_logger; + return new A._LoadedStylesheet1(A.Stylesheet_Stylesheet$parse0(result.item1, t1, t2, url), null, isDependency); + }, + visitIncludeRule$1(node) { + var nodeWithSpan, t1, _this = this, + _s37_ = "Mixin doesn't accept a content block.", + mixin = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure7(_this, node)); + if (mixin == null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined mixin.", node.span)); + nodeWithSpan = new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure8(node)); + if (mixin instanceof A.BuiltInCallable0) { + if (node.content != null) + throw A.wrapException(_this._evaluate0$_exception$2(_s37_, node.span)); + _this._evaluate0$_runBuiltInCallable$3(node.$arguments, mixin, nodeWithSpan); + } else if (type$.UserDefinedCallable_Environment_2._is(mixin)) { + t1 = node.content; + if (t1 != null && !type$.MixinRule_2._as(mixin.declaration).get$hasContent()) + throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, node.get$spanWithoutContent(), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(node.get$spanWithoutContent()))); + _this._evaluate0$_runUserDefinedCallable$1$4(node.$arguments, mixin, nodeWithSpan, new A._EvaluateVisitor_visitIncludeRule_closure9(_this, A.NullableExtension_andThen0(t1, new A._EvaluateVisitor_visitIncludeRule_closure10(_this)), mixin, nodeWithSpan), type$.Null); + } else + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + return null; + }, + visitMixinRule$1(node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_mixins, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitLoudComment$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_inFunction) + return null; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + t1 = node.text; + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(_this._evaluate0$_performInterpolation$1(t1), t1.span)); + return null; + }, + visitMediaRule$1(node) { + var queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + queries = _this._evaluate0$_visitMediaQueries$1(node.query); + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure5(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return null; + if (t1) + mergedSources = B.Set_empty4; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure6(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + return null; + }, + _evaluate0$_visitMediaQueries$1(interpolation) { + return this._evaluate0$_adjustParseError$2(interpolation, new A._EvaluateVisitor__visitMediaQueries_closure1(this, this._evaluate0$_performInterpolation$2$warnForColor(interpolation, true))); + }, + _evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2), t3 = type$.MediaQuerySuccessfulMergeResult_2; t1.moveNext$0();) { + t4 = t1.get$current(t1); + for (t5 = t2.get$iterator(queries2); t5.moveNext$0();) { + result = t4.merge$1(t5.get$current(t5)); + if (result === B._SingletonCssMediaQueryMergeResult_empty0) + continue; + if (result === B._SingletonCssMediaQueryMergeResult_unrepresentable0) + return null; + queries.push(t3._as(result).query); + } + } + return queries; + }, + visitReturnRule$1(node) { + var t1 = node.expression; + return this._evaluate0$_withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(node) { + return null; + }, + visitStyleRule$1(node) { + var t1, selectorText, rule, oldAtRootExcludingStyleRule, t2, t3, t4, t5, t6, _i, complex, visitor, t7, t8, t9, _this = this, _null = null, + _s8_ = "__parent", + _box_0 = {}; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_, node.span)); + t1 = node.selector; + selectorText = _this._evaluate0$_interpolationToValue$3$trim$warnForColor(t1, true, true); + if (_this._evaluate0$_inKeyframes) { + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(_this._evaluate0$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure15(_this, selectorText)), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure16(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure17(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + return _null; + } + _box_0.parsedSelector = _this._evaluate0$_adjustParseError$2(t1, new A._EvaluateVisitor_visitStyleRule_closure18(_this, selectorText)); + _box_0.parsedSelector = _this._evaluate0$_addExceptionSpan$2(t1, new A._EvaluateVisitor_visitStyleRule_closure19(_box_0, _this)); + t1 = t1.span; + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$3(_box_0.parsedSelector, t1, _this._evaluate0$_mediaQueries), node.span, _box_0.parsedSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + _this._evaluate0$_atRootExcludingStyleRule = false; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure20(_this, rule, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure21(), type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t2 = _box_0.parsedSelector.components, t3 = t2.length, t4 = type$.SourceSpan, t5 = type$.String, t6 = rule.children, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, t1, true); + } else if (complex.leadingCombinators.length !== 0) { + visitor = A._SerializeVisitor$0(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3$deprecation('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, t1, true); + } else { + visitor = A._SerializeVisitor$0(_null, true, _null, true, false, _null, true); + complex.accept$1(visitor); + t7 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t8 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + if (t6.get$length(t6) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t6.$index(0, 0)); + _this._evaluate0$_warn$3$deprecation('The selector "' + t7 + string$.x22x20is_o + t8 + string$.x0aThis_, new A.MultiSpan0(t1, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t6.every$1(t6, new A._EvaluateVisitor_visitStyleRule_closure22()) ? "\n(try converting to a //-style comment)" : "")], t4, t5), t4, t5)), true); + } + } + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + visitSupportsRule$1(node) { + var t1, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(new A.CssValue0(_this._evaluate0$_visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure3(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); + return null; + }, + _evaluate0$_visitSupportsCondition$1(condition) { + var t1, oldInSupportsDeclaration, t2, t3, _this = this; + if (condition instanceof A.SupportsOperation0) { + t1 = condition.operator; + return _this._evaluate0$_parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._evaluate0$_parenthesize$2(condition.right, t1); + } else if (condition instanceof A.SupportsNegation0) + return "not " + _this._evaluate0$_parenthesize$1(condition.condition); + else if (condition instanceof A.SupportsInterpolation0) { + t1 = condition.expression; + return _this._evaluate0$_serialize$3$quote(t1.accept$1(_this), t1, false); + } else if (condition instanceof A.SupportsDeclaration0) { + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = true; + t1 = condition.name; + t1 = _this._evaluate0$_serialize$3$quote(t1.accept$1(_this), t1, true); + t2 = condition.get$isCustomProperty() ? "" : " "; + t3 = condition.value; + t3 = _this._evaluate0$_serialize$3$quote(t3.accept$1(_this), t3, true); + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return "(" + t1 + ":" + t2 + t3 + ")"; + } else if (condition instanceof A.SupportsFunction0) + return _this._evaluate0$_performInterpolation$1(condition.name) + "(" + _this._evaluate0$_performInterpolation$1(condition.$arguments) + ")"; + else if (condition instanceof A.SupportsAnything0) + return "(" + _this._evaluate0$_performInterpolation$1(condition.contents) + ")"; + else + throw A.wrapException(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeType(condition).toString$0(0) + ".", null)); + }, + _evaluate0$_parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._evaluate0$_visitSupportsCondition$1(condition) + ")"; + else + return this._evaluate0$_visitSupportsCondition$1(condition); + }, + _evaluate0$_parenthesize$1(condition) { + return this._evaluate0$_parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(node) { + var t1, value, _this = this, _null = null; + if (node.isGuarded) { + if (node.namespace == null && _this._evaluate0$_environment._environment0$_variables.length === 1) { + t1 = _this._evaluate0$_configuration._configuration$_values; + t1 = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, node.name); + if (t1 != null && !t1.value.$eq(0, B.C__SassNull0)) { + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure5(_this, node, t1)); + return _null; + } + } + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure6(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) + return _null; + } + if (node.isGlobal && !_this._evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = _this._evaluate0$_environment._environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + _this._evaluate0$_warn$3$deprecation(t1, node.span, true); + } + t1 = node.expression; + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure7(_this, node, _this._evaluate0$_withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._evaluate0$_expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue0(_this._evaluate0$_withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration0(node, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + _this._evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure1(_this, node), configuration); + _this._evaluate0$_assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(node) { + var _this = this, + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure1(_this, node)), + t1 = value instanceof A.SassString0 ? value._string0$_text : _this._evaluate0$_serialize$2(value, node.expression); + _this._evaluate0$_logger.warn$2$trace(0, t1, _this._evaluate0$_stackTrace$1(node.span)); + return null; + }, + visitWhileRule$1(node) { + return this._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure1(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(node) { + return this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure1(this, node)); + }, + visitValueExpression$1(node) { + return node.value; + }, + visitVariableExpression$1(node) { + var result = this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure1(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate0$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(node) { + return this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure1(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(node) { + return node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + visitIfExpression$1(node) { + var condition, t2, ifTrue, ifFalse, result, _this = this, + pair = _this._evaluate0$_evaluateMacroArguments$1(node), + positional = pair.item1, + named = pair.item2, + t1 = J.getInterceptor$asx(positional); + _this._evaluate0$_verifyArguments$4(t1.get$length(positional), named, $.$get$IfExpression_declaration0(), node); + if (t1.get$length(positional) > 0) + condition = t1.$index(positional, 0); + else { + t2 = named.$index(0, "condition"); + t2.toString; + condition = t2; + } + if (t1.get$length(positional) > 1) + ifTrue = t1.$index(positional, 1); + else { + t2 = named.$index(0, "if-true"); + t2.toString; + ifTrue = t2; + } + if (t1.get$length(positional) > 2) + ifFalse = t1.$index(positional, 2); + else { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._evaluate0$_withoutSlash$2(result.accept$1(_this), _this._evaluate0$_expressionNode$1(result)); + }, + visitNullExpression$1(node) { + return B.C__SassNull0; + }, + visitNumberExpression$1(node) { + return A.SassNumber_SassNumber0(node.value, node.unit); + }, + visitParenthesizedExpression$1(node) { + return node.expression.accept$1(this); + }, + visitCalculationExpression$1(node) { + var $arguments, error, stackTrace, t2, t3, t4, t5, t6, _i, argument, exception, _this = this, + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.$arguments, t3 = t2.length, t4 = node.name, t5 = t4 !== "min", t6 = t4 === "max", _i = 0; _i < t3; ++_i) { + argument = t2[_i]; + t1.push(_this._evaluate0$_visitCalculationValue$2$inMinMax(argument, !t5 || t6)); + } + $arguments = t1; + if (_this._evaluate0$_inSupportsDeclaration) + return new A.SassCalculation0(t4, A.List_List$unmodifiable($arguments, type$.Object)); + try { + switch (t4) { + case "calc": + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + return t1; + case "min": + t1 = A.SassCalculation_min0($arguments); + return t1; + case "max": + t1 = A.SassCalculation_max0($arguments); + return t1; + case "clamp": + t1 = J.$index$asx($arguments, 0); + t3 = J.get$length$asx($arguments) > 1 ? J.$index$asx($arguments, 1) : null; + t1 = A.SassCalculation_clamp0(t1, t3, J.get$length$asx($arguments) > 2 ? J.$index$asx($arguments, 2) : null); + return t1; + default: + t1 = A.UnsupportedError$('Unknown calculation name "' + t4 + '".'); + throw A.wrapException(t1); + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + _this._evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0(_this._evaluate0$_exception$2(error.message, node.span), stackTrace); + } else + throw exception; + } + }, + _evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + arg = args[i]; + if (!(arg instanceof A.SassNumber0)) + continue; + if (arg.get$numeratorUnits(arg).length > 1 || arg.get$denominatorUnits(arg).length !== 0) + throw A.wrapException(this._evaluate0$_exception$2("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])))); + } + } + }, + _evaluate0$_visitCalculationValue$2$inMinMax(node, inMinMax) { + var inner, result, t1, _this = this; + if (node instanceof A.ParenthesizedExpression0) { + inner = node.expression; + result = _this._evaluate0$_visitCalculationValue$2$inMinMax(inner, inMinMax); + if (inner instanceof A.FunctionExpression0) + t1 = A.stringReplaceAllUnchecked(inner.originalName, "_", "-").toLowerCase() === "var" && result instanceof A.SassString0 && !result._string0$_hasQuotes; + else + t1 = false; + return t1 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + } else if (node instanceof A.StringExpression0) + return new A.CalculationInterpolation0(_this._evaluate0$_performInterpolation$1(node.text)); + else if (node instanceof A.BinaryOperationExpression0) + return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationValue_closure1(_this, node, inMinMax)); + else { + result = node.accept$1(_this); + if (result instanceof A.SassNumber0 || result instanceof A.SassCalculation0) + return result; + if (result instanceof A.SassString0 && !result._string0$_hasQuotes) + return result; + throw A.wrapException(_this._evaluate0$_exception$2("Value " + result.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + }, + _evaluate0$_binaryOperatorToCalculationOperator$1(operator) { + switch (operator) { + case B.BinaryOperator_qbf0: + return B.CalculationOperator_IyK0; + case B.BinaryOperator_KlB0: + return B.CalculationOperator_2bx0; + case B.BinaryOperator_6pl0: + return B.CalculationOperator_jFr0; + case B.BinaryOperator_qpm0: + return B.CalculationOperator_OvN0; + default: + throw A.wrapException(A.UnsupportedError$("Invalid calculation operator " + operator.toString$0(0) + ".")); + } + }, + visitColorExpression$1(node) { + return node.value; + }, + visitListExpression$1(node) { + var t1 = node.contents; + return A.SassList$0(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure1(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(node) { + var t2, t3, _i, pair, t4, keyValue, valueValue, oldValueSpan, + t1 = type$.Value_2, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + pair = t2[_i]; + t4 = pair.item1; + keyValue = t4.accept$1(this); + valueValue = pair.item2.accept$1(this); + if (map.$index(0, keyValue) != null) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = J.getInterceptor$z(t4); + t2 = t1.get$span(t4); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t3.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t2, "second key", t3, this._evaluate0$_stackTrace$1(t1.get$span(t4)))); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, t4); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(node) { + var oldInFunction, result, _this = this, t1 = {}, + $function = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure3(_this, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined function.", node.span)); + t1.$function = new A.PlainCssCallable0(node.originalName); + } + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure4(t1, _this, node)); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + visitInterpolatedFunctionExpression$1(node) { + var result, _this = this, + t1 = _this._evaluate0$_performInterpolation$1(node.name), + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(_this, node, new A.PlainCssCallable0(t1))); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + _evaluate0$_getFunction$2$namespace($name, namespace) { + var local = this._evaluate0$_environment.getFunction$2$namespace($name, namespace); + if (local != null || namespace != null) + return local; + return this._evaluate0$_builtInFunctions.$index(0, $name); + }, + _evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldCallable, result, _this = this, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = _this._evaluate0$_currentCallable; + _this._evaluate0$_currentCallable = callable; + result = _this._evaluate0$_withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure1(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._evaluate0$_currentCallable = oldCallable; + return result; + }, + _evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var t1, t2, t3, first, _i, argument, restArg, rest, _this = this; + if (callable instanceof A.BuiltInCallable0) + return _this._evaluate0$_withoutSlash$2(_this._evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment_2._is(callable)) + return _this._evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure1(_this, callable), type$.Value_2); + else if (callable instanceof A.PlainCssCallable0) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + t1 = callable.name + "("; + for (t2 = $arguments.positional, t3 = t2.length, first = true, _i = 0; _i < t3; ++_i) { + argument = t2[_i]; + if (first) + first = false; + else + t1 += ", "; + t1 += _this._evaluate0$_serialize$3$quote(argument.accept$1(_this), argument, true); + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + t1 += ", "; + t1 += _this._evaluate0$_serialize$2(rest, restArg); + } + t1 += A.Primitives_stringFromCharCode(41); + return new A.SassString0(t1.charCodeAt(0) == 0 ? t1 : t1, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$u(callable).toString$0(0) + ".", null)); + }, + _evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var callback, result, error, stackTrace, error0, stackTrace0, error1, stackTrace1, message, namedSet, tuple, overload, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, t4, t5, t6, message0, _this = this, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + oldCallableNode = _this._evaluate0$_callableNode; + _this._evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated.named, type$.MapKeySet_String); + tuple = callable.callbackFor$2(evaluated.positional.length, namedSet); + overload = tuple.item1; + callback = tuple.item2; + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure3(overload, evaluated, namedSet)); + declaredArguments = overload.$arguments; + for (i = evaluated.positional.length, t1 = declaredArguments.length; i < t1; ++i) { + argument = declaredArguments[i]; + t2 = evaluated.positional; + t3 = evaluated.named.remove$1(0, argument.name); + if (t3 == null) { + t3 = argument.defaultValue; + t3 = _this._evaluate0$_withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (overload.restArgument != null) { + if (evaluated.positional.length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated.positional, t1); + B.JSArray_methods.removeRange$2(evaluated.positional, t1, evaluated.positional.length); + } else + rest = B.List_empty19; + t1 = evaluated.named; + argumentList = A.SassArgumentList$0(rest, t1, evaluated.separator === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_rXA0 : evaluated.separator); + evaluated.positional.push(argumentList); + } else + argumentList = null; + result = null; + try { + result = callback.call$1(evaluated.positional); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) + throw exception; + else if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(_this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.MultiSpanSassException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0._span_exception$_message; + t2 = error0; + t3 = J.getInterceptor$z(t2); + t2 = A.SourceSpanException.prototype.get$span.call(t3, t2); + t3 = error0.primaryLabel; + t4 = error0.secondarySpans; + t5 = error0; + t6 = J.getInterceptor$z(t5); + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(_this._evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t6, t5)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace0); + } else { + error1 = t1; + stackTrace1 = A.getTraceFromException(exception); + message = null; + try { + message = A._asString(J.get$message$x(error1)); + } catch (exception) { + message0 = J.toString$0$(error1); + message = message0; + } + A.throwWithTrace0(_this._evaluate0$_exception$2(message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace1); + } + } + _this._evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated.named.__js_helper$_length === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + t1 = evaluated.named; + t1 = t1.get$keys(t1); + t1 = A.pluralize0("argument", t1.get$length(t1), null); + t2 = evaluated.named; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + t1 + " named " + A.S(A.toSentence0(t2.get$keys(t2).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure4(), type$.Object), "or")) + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)))); + }, + _evaluate0$_evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, t5, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value_2), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._evaluate0$_expressionNode$1(expression); + positional.push(_this._evaluate0$_withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = $arguments.named, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.value; + nodeForSpan = _this._evaluate0$_expressionNode$1(t5); + t4 = t4.key; + named.$indexSet(0, t4, _this._evaluate0$_withoutSlash$2(t5.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, t4, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._ArgumentResults1(positional, positionalNodes, named, namedNodes, B.ListSeparator_undecided_null_undecided0); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure7()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure8(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure9(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._ArgumentResults1(positional, positionalNodes, named, namedNodes, separator); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure10()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._ArgumentResults1(positional, positionalNodes, named, namedNodes, separator); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluate0$_evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A.Tuple2(t1.positional, t1.named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + _this._evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure7(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure8(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure9(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure10(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A.Tuple2(positional, named, type$.Tuple2_of_List_Expression_and_Map_String_Expression_2); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure1(this, values, convert, this._evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure1($arguments, positional, named)); + }, + visitSelectorExpression$1(node) { + var t1 = this._evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull0 : t1; + }, + visitStringExpression$1(node) { + var t1, _this = this, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + t1 = node.text.contents; + t1 = new A.MappedListIterable(t1, new A._EvaluateVisitor_visitStringExpression_closure1(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString0(t1, node.hasQuotes); + }, + visitSupportsExpression$1(expression) { + return new A.SassString0(this._evaluate0$_visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.get$value(t1)) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure4(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + var t1 = node.name; + this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(t1, node.value, node.span, J.startsWith$1$s(t1.get$value(t1), "--"), node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(modifiableNode); + else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).addChild$1(modifiableNode); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t1 = _this._evaluate0$_outOfOrderImports; + (t1 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure3(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure4(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure5(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty4; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure6(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, t2, t3, t4, t5, originalSelector, rule, oldAtRootExcludingStyleRule, _this = this, + _s8_ = "__parent"; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_, node.span)); + t1 = _this._evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? null : _this._evaluate0$_styleRuleIgnoringAtRoot; + t2 = node.selector; + t3 = t2.value; + t4 = styleRule == null; + t5 = t4 ? null : styleRule.originalSelector; + originalSelector = t3.resolveParentSelectors$2$implicitParent(t5, !t1); + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$3(originalSelector, t2.span, _this._evaluate0$_mediaQueries), node.span, originalSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + _this._evaluate0$_atRootExcludingStyleRule = false; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure3(_this, rule, node), false, new A._EvaluateVisitor_visitCssStyleRule_closure4(), type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + if (t4) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); + }, + _evaluate0$_handleReturn$1$2(list, callback) { + var t1, _i, result; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + result = callback.call$1(list[_i]); + if (result != null) + return result; + } + return null; + }, + _evaluate0$_handleReturn$2(list, callback) { + return this._evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _evaluate0$_withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._evaluate0$_environment; + this._evaluate0$_environment = environment; + result = callback.call$0(); + this._evaluate0$_environment = oldEnvironment; + return result; + }, + _evaluate0$_withEnvironment$2(environment, callback) { + return this._evaluate0$_withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii0(result, true) : result; + return new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + }, + _evaluate0$_interpolationToValue$1(interpolation) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + var t1, result, _this = this, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + t1 = interpolation.contents; + result = new A.MappedListIterable(t1, new A._EvaluateVisitor__performInterpolation_closure1(_this, warnForColor, interpolation), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return result; + }, + _evaluate0$_performInterpolation$1(interpolation) { + return this._evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure1(value, quote)); + }, + _evaluate0$_serialize$2(value, nodeWithSpan) { + return this._evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure1(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var t1, result, _this = this; + _this._evaluate0$_addChild$2$through(node, through); + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + _this._evaluate0$__parent = node; + result = _this._evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T); + _this._evaluate0$__parent = t1; + return result; + }, + _evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _evaluate0$_addChild$2$through(node, through) { + var grandparent, t1, + $parent = this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = grandparent) { + grandparent = $parent._node0$_parent; + if (grandparent == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + t1 = $parent._node0$_parent; + t1.toString; + $parent = $parent.copyWithoutChildren$0(); + t1.addChild$1($parent); + } + } + $parent.addChild$1(node); + }, + _evaluate0$_addChild$1(node) { + return this._evaluate0$_addChild$2$through(node, null); + }, + _evaluate0$_withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._evaluate0$_styleRuleIgnoringAtRoot; + this._evaluate0$_styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._evaluate0$_styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _evaluate0$_withStyleRule$2(rule, callback) { + return this._evaluate0$_withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _evaluate0$_withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._evaluate0$_mediaQueries, + oldSources = _this._evaluate0$_mediaQuerySources; + _this._evaluate0$_mediaQueries = queries; + _this._evaluate0$_mediaQuerySources = sources; + result = callback.call$0(); + _this._evaluate0$_mediaQueries = oldMediaQueries; + _this._evaluate0$_mediaQuerySources = oldSources; + return result; + }, + _evaluate0$_withMediaQueries$3(queries, sources, callback) { + return this._evaluate0$_withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._evaluate0$_stack; + t1.push(new A.Tuple2(_this._evaluate0$_member, nodeWithSpan, type$.Tuple2_String_AstNode_2)); + oldMember = _this._evaluate0$_member; + _this._evaluate0$_member = member; + result = callback.call$0(); + _this._evaluate0$_member = oldMember; + t1.pop(); + return result; + }, + _evaluate0$_withStackFrame$3(member, nodeWithSpan, callback) { + return this._evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_withoutSlash$2(value, nodeForSpan) { + if (value instanceof A.SassNumber0 && value.asSlash != null) + this._evaluate0$_warn$3$deprecation(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation1().call$1(value)) + string$.x0a_More, nodeForSpan.get$span(nodeForSpan), true); + return value.withoutSlash$0(); + }, + _evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure1(this))); + }, + _evaluate0$_stackTrace$1(span) { + var _this = this, + t1 = _this._evaluate0$_stack; + t1 = A.List_List$of(new A.MappedListIterable(t1, new A._EvaluateVisitor__stackTrace_closure1(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Frame>")), true, type$.Frame); + if (span != null) + t1.push(_this._evaluate0$_stackFrame$2(_this._evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>")), null); + }, + _evaluate0$_stackTrace$0() { + return this._evaluate0$_stackTrace$1(null); + }, + _evaluate0$_warn$3$deprecation(message, span, deprecation) { + var t1, _this = this; + if (_this._evaluate0$_quietDeps) + if (!_this._evaluate0$_inDependency) { + t1 = _this._evaluate0$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._evaluate0$_warningsEmitted.add$1(0, new A.Tuple2(message, span, type$.Tuple2_String_SourceSpan))) + return; + _this._evaluate0$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, _this._evaluate0$_stackTrace$1(span)); + }, + _evaluate0$_warn$2(message, span) { + return this._evaluate0$_warn$3$deprecation(message, span, false); + }, + _evaluate0$_exception$2(message, span) { + var t1 = span == null ? J.get$span$z(B.JSArray_methods.get$last(this._evaluate0$_stack).item2) : span; + return new A.SassRuntimeException0(this._evaluate0$_stackTrace$1(span), message, t1); + }, + _evaluate0$_exception$1(message) { + return this._evaluate0$_exception$2(message, null); + }, + _evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = J.get$span$z(B.JSArray_methods.get$last(this._evaluate0$_stack).item2); + return new A.MultiSpanSassRuntimeException0(this._evaluate0$_stackTrace$0(), primaryLabel, A.ConstantMap_ConstantMap$from(secondaryLabels, type$.FileSpan, type$.String), message, t1); + }, + _evaluate0$_adjustParseError$1$2(nodeWithSpan, callback) { + var error, stackTrace, errorText, span, syntheticFile, syntheticSpan, t1, exception, t2, t3, t4, t5, t6, _null = null; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + errorText = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, _null), 0, _null); + span = nodeWithSpan.get$span(nodeWithSpan); + syntheticFile = B.JSString_methods.replaceRange$3(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(J.get$file$x(span)._decodedChars, 0, _null), 0, _null), J.get$start$z(span).offset, J.get$end$z(span).offset, errorText); + t1 = A.SourceFile$fromString(syntheticFile, J.get$file$x(span).url); + t2 = J.get$start$z(span); + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t3 = t3.get$start(t3); + t4 = J.get$start$z(span); + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + syntheticSpan = t1.span$2(0, t2.offset + t3.offset, t4.offset + t5.get$end(t5).offset); + A.throwWithTrace0(this._evaluate0$_exception$2(error._span_exception$_message, syntheticSpan), stackTrace); + } else + throw exception; + } + }, + _evaluate0$_adjustParseError$2(nodeWithSpan, callback) { + return this._evaluate0$_adjustParseError$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, error0, stackTrace0, t1, exception, t2, t3, t4; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = error.primaryLabel; + t4 = error.secondarySpans; + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), t3, A.ConstantMap_ConstantMap$from(t4, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace0(this._evaluate0$_exception$2(error0.message, nodeWithSpan.get$span(nodeWithSpan)), stackTrace0); + } else + throw exception; + } + }, + _evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + A.throwWithTrace0(new A.SassRuntimeException0(this._evaluate0$_stackTrace$0(), t1, t2), stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addErrorSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + } + }; + A._EvaluateVisitor_closure19.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure20.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure21.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure22.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure23.prototype = { + call$1($arguments) { + var t1 = this.$this._evaluate0$_environment; + if (!t1._environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._EvaluateVisitor_closure24.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$variables(), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4.key, true), t4.value); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure25.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = module.get$functions(module), t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4.key, true), new A.SassFunction0(t4.value)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure26.prototype = { + call$1($arguments) { + var module, callable, t2, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css && module != null) + throw A.wrapException(string$.x24css_a); + if (css) + callable = new A.PlainCssCallable0($name._string0$_text); + else { + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure7(t1, $name, module)); + } + if (callable != null) + return new A.SassFunction0(callable); + throw A.wrapException("Function not found: " + $name.toString$0(0)); + }, + $signature: 164 + }; + A._EvaluateVisitor__closure7.prototype = { + call$0() { + var t1 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t2 = this.module; + t2 = t2 == null ? null : t2._string0$_text; + return this.$this._evaluate0$_getFunction$2$namespace(t1, t2); + }, + $signature: 131 + }; + A._EvaluateVisitor_closure27.prototype = { + call$1($arguments) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression_2); + t4 = type$.String; + t5 = type$.Expression_2; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._argument_list$_wereKeywordsAccessed = true; + t8 = args._argument_list$_keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value_2; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._argument_list$_wereKeywordsAccessed = true, t8 = t8.get$entries(t8), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString0(t11.key, false), t11.value); + } + t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); + if ($function instanceof A.SassString0) { + t2 = $function.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, string$.Passin + t2 + "))", true); + callableNode = t1._evaluate0$_callableNode; + return t1.visitFunctionExpression$1(new A.FunctionExpression0(null, $function._string0$_text, invocation, callableNode.get$span(callableNode))); + } + callable = $function.assertFunction$1("function").callable; + if (type$.Callable_2._is(callable)) { + t2 = t1._evaluate0$_callableNode; + t2.toString; + return t1._evaluate0$_runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$0("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 3 + }; + A._EvaluateVisitor_closure28.prototype = { + call$1($arguments) { + var withMap, t2, values, configuration, t3, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + withMap.forEach$1(0, new A._EvaluateVisitor__closure5(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + t1._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure6(t1), t3.get$sourceUrl(t3), configuration, true); + t1._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 394 + }; + A._EvaluateVisitor__closure5.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); + }, + $signature: 58 + }; + A._EvaluateVisitor__closure6.prototype = { + call$1(module) { + var t1 = this.$this; + return t1._evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 74 + }; + A._EvaluateVisitor_run_closure1.prototype = { + call$0() { + var t2, _this = this, + t1 = _this.node, + url = t1.span.file.url; + if (url != null) { + t2 = _this.$this; + t2._evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._evaluate0$_nodeImporter != null && url.toString$0(0) === "stdin")) + t2._evaluate0$_loadedUrls.add$1(0, url); + } + t2 = _this.$this; + return new A.EvaluateResult0(t2._evaluate0$_combineCss$1(t2._evaluate0$_execute$2(_this.importer, t1)), t2._evaluate0$_loadedUrls); + }, + $signature: 396 + }; + A._EvaluateVisitor__loadModule_closure3.prototype = { + call$0() { + return this.callback.call$1(this.builtInModule); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure4.prototype = { + call$0() { + var oldInDependency, module, error, stackTrace, error0, stackTrace0, error1, stackTrace1, error2, stackTrace2, message, exception, t3, t4, t5, t6, t7, _this = this, + t1 = _this.$this, + t2 = _this.nodeWithSpan, + result = t1._evaluate0$_loadStylesheet$3$baseUrl(_this.url.toString$0(0), t2.get$span(t2), _this.baseUrl), + stylesheet = result.stylesheet, + canonicalUrl = stylesheet.span.file.url; + if (canonicalUrl != null && t1._evaluate0$_activeModules.containsKey$1(canonicalUrl)) { + message = _this.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t2 = A.NullableExtension_andThen0(t1._evaluate0$_activeModules.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure1(t1, message)); + throw A.wrapException(t2 == null ? t1._evaluate0$_exception$1(message) : t2); + } + if (canonicalUrl != null) + t1._evaluate0$_activeModules.$indexSet(0, canonicalUrl, t2); + oldInDependency = t1._evaluate0$_inDependency; + t1._evaluate0$_inDependency = result.isDependency; + module = null; + try { + module = t1._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(result.importer, stylesheet, _this.configuration, _this.namesInErrors, t2); + } finally { + t1._evaluate0$_activeModules.remove$1(0, canonicalUrl); + t1._evaluate0$_inDependency = oldInDependency; + } + try { + _this.callback.call$1(module); + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t2)) + throw exception; + else if (t2 instanceof A.MultiSpanSassException0) { + error = t2; + stackTrace = A.getTraceFromException(exception); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + t4 = error.primaryLabel; + t5 = error.secondarySpans; + t6 = error; + t7 = J.getInterceptor$z(t6); + A.throwWithTrace0(new A.MultiSpanSassRuntimeException0(t1._evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t7, t6)), t4, A.ConstantMap_ConstantMap$from(t5, type$.FileSpan, type$.String), t2, t3), stackTrace); + } else if (t2 instanceof A.SassException0) { + error0 = t2; + stackTrace0 = A.getTraceFromException(exception); + t2 = error0; + t3 = J.getInterceptor$z(t2); + A.throwWithTrace0(t1._evaluate0$_exception$2(error0._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t3, t2)), stackTrace0); + } else if (t2 instanceof A.MultiSpanSassScriptException0) { + error1 = t2; + stackTrace1 = A.getTraceFromException(exception); + A.throwWithTrace0(t1._evaluate0$_multiSpanException$3(error1.message, error1.primaryLabel, error1.secondarySpans), stackTrace1); + } else if (t2 instanceof A.SassScriptException0) { + error2 = t2; + stackTrace2 = A.getTraceFromException(exception); + A.throwWithTrace0(t1._evaluate0$_exception$1(error2.message), stackTrace2); + } else + throw exception; + } + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure1.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__execute_closure1.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + oldStylesheet = t1._evaluate0$__stylesheet, + oldRoot = t1._evaluate0$__root, + oldParent = t1._evaluate0$__parent, + oldEndOfImports = t1._evaluate0$__endOfImports, + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldExtensionStore = t1._evaluate0$__extensionStore, + t2 = t1._evaluate0$_atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._evaluate0$_styleRuleIgnoringAtRoot, + oldMediaQueries = t1._evaluate0$_mediaQueries, + oldDeclarationName = t1._evaluate0$_declarationName, + oldInUnknownAtRule = t1._evaluate0$_inUnknownAtRule, + oldInKeyframes = t1._evaluate0$_inKeyframes, + oldConfiguration = t1._evaluate0$_configuration; + t1._evaluate0$_importer = _this.importer; + t3 = t1._evaluate0$__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1._evaluate0$__parent = t1._evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + t1._evaluate0$__extensionStore = _this.extensionStore; + t1._evaluate0$_declarationName = t1._evaluate0$_mediaQueries = t1._evaluate0$_styleRuleIgnoringAtRoot = null; + t1._evaluate0$_inKeyframes = t1._evaluate0$_atRootExcludingStyleRule = t1._evaluate0$_inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._evaluate0$_configuration = t6; + t1.visitStylesheet$1(t3); + t3 = t1._evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + _this.css._value = t3; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = oldStylesheet; + t1._evaluate0$__root = oldRoot; + t1._evaluate0$__parent = oldParent; + t1._evaluate0$__endOfImports = oldEndOfImports; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._evaluate0$__extensionStore = oldExtensionStore; + t1._evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._evaluate0$_mediaQueries = oldMediaQueries; + t1._evaluate0$_declarationName = oldDeclarationName; + t1._evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._evaluate0$_atRootExcludingStyleRule = t2; + t1._evaluate0$_inKeyframes = oldInKeyframes; + t1._evaluate0$_configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure5.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 130 + }; + A._EvaluateVisitor__combineCss_closure6.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__combineCss_closure7.prototype = { + call$1(module) { + return module.cloneCss$0(); + }, + $signature: 397 + }; + A._EvaluateVisitor__extendModules_closure3.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__extendModules_closure4.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 255 + }; + A._EvaluateVisitor__topologicalModules_visitModule1.prototype = { + call$1(module) { + var t1, t2, t3, _i, upstream; + for (t1 = module.get$upstream(), t2 = t1.length, t3 = this.seen, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss() && t3.add$1(0, upstream)) + this.call$1(upstream); + } + this.sorted.addFirst$1(module); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitAtRootRule_closure5.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.AtRootQueryParser0(t1, this.$this._evaluate0$_logger).parse$0(); + }, + $signature: 114 + }; + A._EvaluateVisitor_visitAtRootRule_closure6.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure7.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure11.prototype = { + call$1(callback) { + var t1 = this.$this, + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"); + t1._evaluate0$__parent = this.newParent; + t1._evaluate0$_environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1._evaluate0$__parent = t2; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure12.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._evaluate0$_atRootExcludingStyleRule; + t1._evaluate0$_atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure13.prototype = { + call$1(callback) { + return this.$this._evaluate0$_withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure1(this.innerScope, callback)); + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot__closure1.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure14.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._evaluate0$_inKeyframes; + t1._evaluate0$_inKeyframes = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inKeyframes = wasInKeyframes; + }, + $signature: 27 + }; + A._EvaluateVisitor__scopeForAtRoot_closure15.prototype = { + call$1($parent) { + return type$.CssAtRule_2._is($parent); + }, + $signature: 171 + }; + A._EvaluateVisitor__scopeForAtRoot_closure16.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._evaluate0$_inUnknownAtRule; + t1._evaluate0$_inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 27 + }; + A._EvaluateVisitor_visitContentRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure3.prototype = { + call$1(value) { + return new A.CssValue0(value.accept$1(this.$this), value.get$span(value), type$.CssValue_Value_2); + }, + $signature: 398 + }; + A._EvaluateVisitor_visitDeclaration_closure4.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure5.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._evaluate0$_environment.setLocalVariable$3(B.JSArray_methods.get$first(this.node.variables), t1._evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 56 + }; + A._EvaluateVisitor_visitEachRule_closure6.prototype = { + call$1(value) { + return this.$this._evaluate0$_setMultipleVariables$3(this.node.variables, value, this.nodeWithSpan); + }, + $signature: 56 + }; + A._EvaluateVisitor_visitEachRule_closure7.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure1(t1, _this.setVariables, _this.node)); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitEachRule__closure1.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure1(t1)); + }, + $signature: 218 + }; + A._EvaluateVisitor_visitEachRule___closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 77 + }; + A._EvaluateVisitor_visitExtendRule_closure1.prototype = { + call$0() { + return A.SelectorList_SelectorList$parse0(A.trimAscii0(this.targetText.value, true), false, true, this.$this._evaluate0$_logger); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitAtRule_closure5.prototype = { + call$1(value) { + return this.$this._evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 401 + }; + A._EvaluateVisitor_visitAtRule_closure6.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || t1._evaluate0$_inKeyframes) + for (t2 = this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure1(t1, this.children), false, type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure7.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure9.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 220 + }; + A._EvaluateVisitor_visitForRule_closure10.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 220 + }; + A._EvaluateVisitor_visitForRule_closure11.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure12.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 12 + }; + A._EvaluateVisitor_visitForRule_closure13.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, result, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._evaluate0$_expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + result = t1._evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure1(t1)); + if (result != null) + return result; + } + return null; + }, + $signature: 40 + }; + A._EvaluateVisitor_visitForRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 77 + }; + A._EvaluateVisitor_visitForwardRule_closure3.prototype = { + call$1(module) { + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitForwardRule_closure4.prototype = { + call$1(module) { + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitIfRule_closure1.prototype = { + call$0() { + var t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this._box_0.clause.children, new A._EvaluateVisitor_visitIfRule__closure1(t1)); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitIfRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 77 + }; + A._EvaluateVisitor__visitDynamicImport_closure1.prototype = { + call$0() { + var t3, t4, oldImporter, oldInDependency, loadsUserDefinedModules, children, t5, t6, t7, t8, t9, t10, environment, module, visitor, + t1 = this.$this, + t2 = this.$import, + result = t1._evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), + stylesheet = result.stylesheet, + url = stylesheet.span.file.url; + if (url != null) { + t3 = t1._evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure7(t1)); + throw A.wrapException(t2 == null ? t1._evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + t4 = new A.UnmodifiableListView(t2, t3); + if (t4.get$length(t4) === 0) { + t4 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + t4 = t4.get$length(t4) === 0; + } else + t4 = false; + if (t4) { + oldImporter = t1._evaluate0$_importer; + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._evaluate0$_inDependency; + t1._evaluate0$_importer = result.importer; + t1._evaluate0$__stylesheet = stylesheet; + t1._evaluate0$_inDependency = result.isDependency; + t1.visitStylesheet$1(stylesheet); + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = t2; + t1._evaluate0$_inDependency = oldInDependency; + t1._evaluate0$_activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure8())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure9()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_Callable_2; + t5 = type$.AstNode_2; + t6 = A._setArrayType([], type$.JSArray_Module_Callable_2); + t7 = t2._environment0$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._environment0$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._environment0$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._environment0$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.Environment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._environment0$_content); + t1._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure10(t1, result, stylesheet, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._evaluate0$_environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor1(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._evaluate0$_activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure7.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__visitDynamicImport__closure8.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 179 + }; + A._EvaluateVisitor__visitDynamicImport__closure9.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 180 + }; + A._EvaluateVisitor__visitDynamicImport__closure10.prototype = { + call$0() { + var t7, t8, t9, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"), + t3 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root"), + t4 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"), + t5 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldConfiguration = t1._evaluate0$_configuration, + oldInDependency = t1._evaluate0$_inDependency, + t6 = _this.result; + t1._evaluate0$_importer = t6.importer; + t7 = t1._evaluate0$__stylesheet = _this.stylesheet; + t8 = _this.loadsUserDefinedModules; + if (t8) { + t9 = A.ModifiableCssStylesheet$0(t7.span); + t1._evaluate0$__root = t9; + t1._evaluate0$__parent = t1._evaluate0$_assertInModule$2(t9, "_root"); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + } + t1._evaluate0$_inDependency = t6.isDependency; + t6 = new A.UnmodifiableListView(t7._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t6.get$isEmpty(t6)) + t1._evaluate0$_configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(t7); + t6 = t8 ? t1._evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + _this.children._value = t6; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = t2; + if (t8) { + t1._evaluate0$__root = t3; + t1._evaluate0$__parent = t4; + t1._evaluate0$__endOfImports = t5; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._evaluate0$_configuration = oldConfiguration; + t1._evaluate0$_inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitIncludeRule_closure7.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 131 + }; + A._EvaluateVisitor_visitIncludeRule_closure8.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 31 + }; + A._EvaluateVisitor_visitIncludeRule_closure10.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._evaluate0$_environment.closure$0(), t1._evaluate0$_inDependency, type$.UserDefinedCallable_Environment_2); + }, + $signature: 403 + }; + A._EvaluateVisitor_visitIncludeRule_closure9.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = t1._evaluate0$_environment, + oldContent = t2._environment0$_content; + t2._environment0$_content = _this.contentCallable; + new A._EvaluateVisitor_visitIncludeRule__closure1(t1, _this.mixin, _this.nodeWithSpan).call$0(); + t2._environment0$_content = oldContent; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitIncludeRule__closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._evaluate0$_environment, + oldInMixin = t2._environment0$_inMixin; + t2._environment0$_inMixin = true; + new A._EvaluateVisitor_visitIncludeRule___closure1(t1, this.mixin, this.nodeWithSpan).call$0(); + t2._environment0$_inMixin = oldInMixin; + }, + $signature: 0 + }; + A._EvaluateVisitor_visitIncludeRule___closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpan, _i = 0; _i < t2; ++_i) + t3._evaluate0$_addErrorSpan$2(t4, new A._EvaluateVisitor_visitIncludeRule____closure1(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitIncludeRule____closure1.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitMediaRule_closure5.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitMediaRule_closure6.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure1.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure7.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule_2._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitMediaQueries_closure1.prototype = { + call$0() { + var t1 = A.SpanScanner$(this.resolved, null); + return new A.MediaQueryParser0(t1, this.$this._evaluate0$_logger).parse$0(); + }, + $signature: 109 + }; + A._EvaluateVisitor_visitStyleRule_closure15.prototype = { + call$0() { + return A.KeyframeSelectorParser$0(this.selectorText.value, this.$this._evaluate0$_logger).parse$0(); + }, + $signature: 48 + }; + A._EvaluateVisitor_visitStyleRule_closure16.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure17.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure18.prototype = { + call$0() { + var _s11_ = "_stylesheet", + t1 = this.$this; + return A.SelectorList_SelectorList$parse0(this.selectorText.value, !t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, _s11_).plainCss, !t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, _s11_).plainCss, t1._evaluate0$_logger); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitStyleRule_closure19.prototype = { + call$0() { + var t1 = this._box_0.parsedSelector, + t2 = this.$this, + t3 = t2._evaluate0$_styleRuleIgnoringAtRoot; + t3 = t3 == null ? null : t3.originalSelector; + return t1.resolveParentSelectors$2$implicitParent(t3, !t2._evaluate0$_atRootExcludingStyleRule); + }, + $signature: 50 + }; + A._EvaluateVisitor_visitStyleRule_closure20.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure21.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure22.prototype = { + call$1(child) { + return type$.CssComment_2._is(child); + }, + $signature: 110 + }; + A._EvaluateVisitor_visitSupportsRule_closure3.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure5.prototype = { + call$0() { + var t1 = this.override; + this.$this._evaluate0$_environment.setVariable$4$global(this.node.name, t1.value, t1.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure6.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure7.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure1.prototype = { + call$1(module) { + var t1 = this.node; + this.$this._evaluate0$_environment.addModule$3$namespace(module, t1, t1.namespace); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitWarnRule_closure1.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 49 + }; + A._EvaluateVisitor_visitWhileRule_closure1.prototype = { + call$0() { + var t1, t2, t3, result; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + result = t3._evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure1(t3)); + if (result != null) + return result; + } + return null; + }, + $signature: 40 + }; + A._EvaluateVisitor_visitWhileRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 77 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure1.prototype = { + call$0() { + var right, result, + t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2), + t3 = t1.operator; + switch (t3) { + case B.BinaryOperator_axY0: + right = t1.right.accept$1(t2); + return new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(right, false, true), false); + case B.BinaryOperator_or_or_1_or0: + return left.get$isTruthy() ? left : t1.right.accept$1(t2); + case B.BinaryOperator_and_and_2_and0: + return left.get$isTruthy() ? t1.right.accept$1(t2) : left; + case B.BinaryOperator_nZh0: + return left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + case B.BinaryOperator_Vr90: + return !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + case B.BinaryOperator_cw10: + return left.greaterThan$1(t1.right.accept$1(t2)); + case B.BinaryOperator_Wma0: + return left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + case B.BinaryOperator_apg0: + return left.lessThan$1(t1.right.accept$1(t2)); + case B.BinaryOperator_oqF0: + return left.lessThanOrEquals$1(t1.right.accept$1(t2)); + case B.BinaryOperator_qbf0: + return left.plus$1(t1.right.accept$1(t2)); + case B.BinaryOperator_KlB0: + return left.minus$1(t1.right.accept$1(t2)); + case B.BinaryOperator_6pl0: + return left.times$1(t1.right.accept$1(t2)); + case B.BinaryOperator_qpm0: + right = t1.right.accept$1(t2); + result = left.dividedBy$1(right); + if (t1.allowsSlash && left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + return type$.SassNumber_2._as(result).withSlash$2(left, right); + else { + if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + t2._evaluate0$_warn$3$deprecation(string$.Using__o + A.S(new A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation1().call$1(t1)) + " or calc(" + t1.toString$0(0) + string$.x29x0a_Morx20, t1.get$span(t1), true); + return result; + } + case B.BinaryOperator_PHH0: + return left.modulo$1(t1.right.accept$1(t2)); + default: + throw A.wrapException(A.ArgumentError$("Unknown binary operator " + t3.toString$0(0) + ".", null)); + } + }, + $signature: 49 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation1.prototype = { + call$1(expression) { + if (expression instanceof A.BinaryOperationExpression0 && expression.operator === B.BinaryOperator_qpm0) + return "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + else if (expression instanceof A.ParenthesizedExpression0) + return expression.expression.toString$0(0); + else + return expression.toString$0(0); + }, + $signature: 113 + }; + A._EvaluateVisitor_visitVariableExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.node.operator; + switch (t1) { + case B.UnaryOperator_gg40: + return _this.operand.unaryPlus$0(); + case B.UnaryOperator_TLI0: + return _this.operand.unaryMinus$0(); + case B.UnaryOperator_Ix10: + return new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + case B.UnaryOperator_not_not_not0: + return _this.operand.unaryNot$0(); + default: + throw A.wrapException(A.StateError$("Unknown unary operator " + t1.toString$0(0) + ".")); + } + }, + $signature: 49 + }; + A._EvaluateVisitor__visitCalculationValue_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node, + t3 = this.inMinMax; + return A.SassCalculation_operateInternal0(t1._evaluate0$_binaryOperatorToCalculationOperator$1(t2.operator), t1._evaluate0$_visitCalculationValue$2$inMinMax(t2.left, t3), t1._evaluate0$_visitCalculationValue$2$inMinMax(t2.right, t3), t3, !t1._evaluate0$_inSupportsDeclaration); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitListExpression_closure1.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 404 + }; + A._EvaluateVisitor_visitFunctionExpression_closure3.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_getFunction$2$namespace(A.stringReplaceAllUnchecked(t1.originalName, "_", "-"), t1.namespace); + }, + $signature: 131 + }; + A._EvaluateVisitor_visitFunctionExpression_closure4.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 49 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 49 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._evaluate0$_withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure1(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure1(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure1.prototype = { + call$0() { + var declaredArguments, t7, minLength, t8, i, argument, t9, value, t10, t11, restArgument, rest, argumentList, result, _this = this, + t1 = _this.$this, + t2 = _this.evaluated, + t3 = t2.positional, + t4 = t2.named, + t5 = _this.callable.declaration.$arguments, + t6 = _this.nodeWithSpan; + t1._evaluate0$_verifyArguments$4(t3.length, t4, t5, t6); + declaredArguments = t5.$arguments; + t7 = declaredArguments.length; + minLength = Math.min(t3.length, t7); + for (t8 = t2.positionalNodes, i = 0; i < minLength; ++i) + t1._evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, t3[i], t8[i]); + for (i = t3.length, t8 = t2.namedNodes; i < t7; ++i) { + argument = declaredArguments[i]; + t9 = argument.name; + value = t4.remove$1(0, t9); + if (value == null) { + t10 = argument.defaultValue; + value = t1._evaluate0$_withoutSlash$2(t10.accept$1(t1), t1._evaluate0$_expressionNode$1(t10)); + } + t10 = t1._evaluate0$_environment; + t11 = t8.$index(0, t9); + if (t11 == null) { + t11 = argument.defaultValue; + t11.toString; + t11 = t1._evaluate0$_expressionNode$1(t11); + } + t10.setLocalVariable$3(t9, value, t11); + } + restArgument = t5.restArgument; + if (restArgument != null) { + rest = t3.length > t7 ? B.JSArray_methods.sublist$1(t3, t7) : B.List_empty19; + t2 = t2.separator; + argumentList = A.SassArgumentList$0(rest, t4, t2 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_rXA0 : t2); + t1._evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t6); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t2 = t4.__js_helper$_length; + if (t2 === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + t3 = A._instanceType(t4)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + A.pluralize0("argument", t2, null) + " named " + A.toSentence0(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t4, t3), new A._EvaluateVisitor__runUserDefinedCallable____closure1(), t3._eval$1("Iterable.E"), type$.Object), "or") + ".", t6.get$span(t6), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t5.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate0$_stackTrace$1(t6.get$span(t6)))); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure1.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__runFunctionCallable_closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value0) + return $returnValue; + } + throw A.wrapException(t4._evaluate0$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 49 + }; + A._EvaluateVisitor__runBuiltInCallable_closure3.prototype = { + call$0() { + return this.overload.verify$2(this.evaluated.positional.length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure4.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 5 + }; + A._EvaluateVisitor__evaluateArguments_closure7.prototype = { + call$1(value) { + return value; + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateArguments_closure8.prototype = { + call$1(value) { + return this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 95 + }; + A._EvaluateVisitor__evaluateArguments_closure10.prototype = { + call$1(value) { + return value; + }, + $signature: 39 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure7.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure8.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 95 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure10.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 59 + }; + A._EvaluateVisitor__addRestMap_closure1.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 58 + }; + A._EvaluateVisitor__verifyArguments_closure1.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitStringExpression_closure1.prototype = { + call$1(value) { + var t1, result; + if (typeof value == "string") + return value; + type$.Expression_2._as(value); + t1 = this.$this; + result = value.accept$1(t1); + return result instanceof A.SassString0 ? result._string0$_text : t1._evaluate0$_serialize$3$quote(result, value, false); + }, + $signature: 46 + }; + A._EvaluateVisitor_visitCssAtRule_closure3.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure3.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure5.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitCssMediaRule_closure6.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure1.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + else + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure7.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && type$.CssMediaRule_2._is(node) && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure3.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure3.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null) + for (t2 = this.node.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + else + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(styleRule.selector, styleRule.span, styleRule.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = this.$this, t3 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t2); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure4.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolation_closure1.prototype = { + call$1(value) { + var t1, result, t2, t3; + if (typeof value == "string") + return value; + type$.Expression_2._as(value); + t1 = this.$this; + result = value.accept$1(t1); + if (this.warnForColor && result instanceof A.SassColor0 && $.$get$namesByColor0().containsKey$1(result)) { + t2 = A.Interpolation$0(A._setArrayType([""], type$.JSArray_Object), this.interpolation.span); + t3 = $.$get$namesByColor0(); + t1._evaluate0$_warn$2(string$.You_pr + A.S(t3.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t3.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_qbf0, new A.StringExpression0(t2, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + return t1._evaluate0$_serialize$3$quote(result, value, false); + }, + $signature: 46 + }; + A._EvaluateVisitor__serialize_closure1.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 30 + }; + A._EvaluateVisitor__expressionNode_closure1.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 191 + }; + A._EvaluateVisitor__withoutSlash_recommendation1.prototype = { + call$1(number) { + var asSlash = number.asSlash; + if (asSlash != null) + return "math.div(" + A.S(this.call$1(asSlash.item1)) + ", " + A.S(this.call$1(asSlash.item2)) + ")"; + else + return A.serializeValue0(number, true, true); + }, + $signature: 192 + }; + A._EvaluateVisitor__stackFrame_closure1.prototype = { + call$1(url) { + var t1 = this.$this._evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 81 + }; + A._EvaluateVisitor__stackTrace_closure1.prototype = { + call$1(tuple) { + return this.$this._evaluate0$_stackFrame$2(tuple.item1, J.get$span$z(tuple.item2)); + }, + $signature: 193 + }; + A._ImportedCssVisitor1.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure1(); + this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._evaluate0$_visitor; + if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent") !== t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root")) + t1._evaluate0$_addChild$1(node); + else if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root").children._collection$_source)) { + t1._evaluate0$_addChild$1(node); + t1._evaluate0$__endOfImports = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._evaluate0$_outOfOrderImports; + (t2 == null ? t1._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._evaluate0$_visitor, + mediaQueries = t1._evaluate0$_mediaQueries; + t1._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure1(mediaQueries == null || t1._evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure1()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure1()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure1.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!type$.CssStyleRule_2._is(node)) + t1 = this.hasBeenMerged && type$.CssMediaRule_2._is(node); + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure1.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure1.prototype = { + call$1(node) { + return type$.CssStyleRule_2._is(node); + }, + $signature: 7 + }; + A._EvaluationContext1.prototype = { + get$currentCallableSpan() { + var callableNode = this._evaluate0$_visitor._evaluate0$_callableNode; + if (callableNode != null) + return callableNode.get$span(callableNode); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2$deprecation(_, message, deprecation) { + var t1 = this._evaluate0$_visitor, + t2 = t1._evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._evaluate0$_warn$3$deprecation(message, t2 == null ? this._evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext0: 1 + }; + A._ArgumentResults1.prototype = {}; + A._LoadedStylesheet1.prototype = {}; + A.EveryCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure0(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure0(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure0(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure0(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure0(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure0(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStylesheet_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A._NodeException.prototype = {}; + A.exceptionClass_closure.prototype = { + call$0() { + var jsClass = type$.JSClass._as(new self.Function("", " return class Exception extends Error {\n constructor(dartException, message) {\n super(message);\n\n // Define this as non-enumerable so that it doesn't show up when the\n // exception hits the top level.\n Object.defineProperty(this, '_dartException', {\n value: dartException,\n enumerable: false\n });\n }\n\n toString() {\n return this.message;\n }\n }\n ").call$0()); + A.defineGetter(jsClass, "name", null, "sass.Exception"); + A.LinkedHashMap_LinkedHashMap$_literal(["sassMessage", new A.exceptionClass__closure(), "sassStack", new A.exceptionClass__closure0(), "span", new A.exceptionClass__closure1()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + return jsClass; + }, + $signature: 25 + }; + A.exceptionClass__closure.prototype = { + call$1(exception) { + return J.get$_dartException$x(exception)._span_exception$_message; + }, + $signature: 221 + }; + A.exceptionClass__closure0.prototype = { + call$1(exception) { + return J.get$trace$z(J.get$_dartException$x(exception)).toString$0(0); + }, + $signature: 221 + }; + A.exceptionClass__closure1.prototype = { + call$1(exception) { + var t1 = J.get$_dartException$x(exception), + t2 = J.getInterceptor$z(t1); + return A.SourceSpanException.prototype.get$span.call(t2, t1); + }, + $signature: 406 + }; + A.SassException0.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan0(A.SourceSpanException.prototype.get$span.call(this, this), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, this); + }, + toString$1$color(_, color) { + var t2, _i, frame, t3, _this = this, + buffer = new A.StringBuffer(""), + t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, _this).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + t3 = buffer._contents += "\n"; + buffer._contents = t3 + (" " + A.S(frame)); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0($receiver) { + return this.toString$1$color($receiver, null); + } + }; + A.MultiSpanSassException0.prototype = { + toString$1$color(_, color) { + var t1, t2, _i, frame, _this = this, + useColor = color === true && true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen0(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, _this), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + buffer._contents += "\n"; + buffer._contents += " " + A.S(frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0($receiver) { + return this.toString$1$color($receiver, null); + } + }; + A.SassRuntimeException0.prototype = { + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException0.prototype = {$isSassRuntimeException0: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException0.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, this); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.SassScriptException0.prototype = { + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException0.prototype = {}; + A.Exports.prototype = {}; + A.LoggerNamespace.prototype = {}; + A.ExtendRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.Extension0.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender0.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension$_extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$0(string$.You_ma, extension.span)); + }, + toString$0(_) { + return A.serializeSelector0(this.selector, true); + } + }; + A.ExtensionStore0.prototype = { + get$isEmpty(_) { + return this._extension_store$_extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._extension_store$_selectors, type$.MapKeySet_SimpleSelector_2); + }, + extensionsWhereTarget$1($async$callback) { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3; + return function $async$extensionsWhereTarget$1($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._extension_store$_extensions, t1 = t1.get$entries(t1), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + if (!callback.call$1(t2.key)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = J.get$values$z(t2.value), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension0 ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return A._IterationMarker_yieldStar(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure0(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return t3; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.Extension_2); + }, + addSelector$3(selector, selectorSpan, mediaContext) { + var originalSelector, error, stackTrace, t1, t2, t3, _i, exception, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true0)) + for (t1 = originalSelector.components, t2 = t1.length, t3 = _this._extension_store$_originals, _i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i]); + t1 = _this._extension_store$_extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extension_store$_extendList$4(originalSelector, selectorSpan, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t3 = error; + t4 = J.getInterceptor$z(t3); + A.throwWithTrace0(new A.SassException0("From " + A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t4, t3)), stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableCssValue0(selector, selectorSpan, type$.ModifiableCssValue_SelectorList_2); + if (mediaContext != null) + _this._extension_store$_mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._extension_store$_registerSelector$2(selector, modifiableSelector); + return modifiableSelector; + }, + _extension_store$_registerSelector$2(list, selector) { + var t1, t2, t3, _i, t4, t5, _i0, t6, t7, _i1, simple, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._extension_store$_selectors, _i = 0; _i < t2; ++_i) + for (t4 = t1[_i].components, t5 = t4.length, _i0 = 0; _i0 < t5; ++_i0) + for (t6 = t4[_i0].selector.components, t7 = t6.length, _i1 = 0; _i1 < t7; ++_i1) { + simple = t6[_i1]; + J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure0()), selector); + if (!(simple instanceof A.PseudoSelector0)) + continue; + selectorInPseudo = simple.selector; + if (selectorInPseudo != null) + this._extension_store$_registerSelector$2(selectorInPseudo, selector); + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, _i, complex, t12, extension, existingExtension, t13, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._extension_store$_selectors.$index(0, target), + t1 = _this._extension_store$_extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extension_store$_extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure2()); + for (t2 = extender.value.components, t3 = t2.length, t4 = selectors == null, t5 = _this._extension_store$_sourceSpecificity, t6 = extender.span, t7 = extend.span, t8 = extend.isOptional, t9 = existingExtensions != null, t10 = type$.ComplexSelector_2, t11 = type$.Extension_2, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + complex.get$specificity(); + t12 = new A.Extender0(complex, false, t6); + extension = t12._extension$_extension = new A.Extension0(t12, target, mediaContext, t8, t7); + existingExtension = sources.$index(0, complex); + if (existingExtension != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge0(existingExtension, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t12 = new A._SyncStarIterator(_this._extension_store$_simpleSelectors$1(complex)._outerHelper()); t12.moveNext$0();) { + t13 = t12.get$current(t12); + J.add$1$ax(t1.putIfAbsent$2(t13, new A.ExtensionStore_addExtension_closure3()), extension); + t5.putIfAbsent$2(t13, new A.ExtensionStore_addExtension_closure4(complex)); + } + if (!t4 || t9) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t10, t11); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector_2; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension_2); + if (t9) { + additionalExtensions = _this._extension_store$_extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll20(newExtensionsByTarget, additionalExtensions, t1, t10, t11); + } + if (!t4) + _this._extension_store$_extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _extension_store$_simpleSelectors$1(complex) { + return this._simpleSelectors$body$ExtensionStore0(complex); + }, + _simpleSelectors$body$ExtensionStore0($async$complex) { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, _i, t3, t4, _i0, simple, selector, t5, t6, _i1; + return function $async$_extension_store$_simpleSelectors$1($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t3 = t1[_i].selector.components, t4 = t3.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t4)) { + // goto after for + $async$goto = 7; + break; + } + simple = t3[_i0]; + $async$goto = 8; + return simple; + case 8: + // after yield + if (!(simple instanceof A.PseudoSelector0)) { + // goto for update + $async$goto = 6; + break; + } + selector = simple.selector; + if (selector == null) { + // goto for update + $async$goto = 6; + break; + } + t5 = selector.components, t6 = t5.length, _i1 = 0; + case 9: + // for condition + if (!(_i1 < t6)) { + // goto after for + $async$goto = 11; + break; + } + $async$goto = 12; + return A._IterationMarker_yieldStar($async$self._extension_store$_simpleSelectors$1(t5[_i1])); + case 12: + // after yield + case 10: + // for update + ++_i1; + // goto for condition + $async$goto = 9; + break; + case 11: + // after for + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.SimpleSelector_2); + }, + _extension_store$_extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, containsExtension, first, _i0, complex, t10, t11, t12, t13, t14, withExtender, existingExtension, _i1, _i2; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extension_store$_extensionsByExtender, t4 = type$.SimpleSelector_2, t5 = type$.Map_ComplexSelector_Extension_2, t6 = this._extension_store$_extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extension_store$_extendComplex$4(extension.extender.selector, extension.extender.span, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException0) { + error = t8; + stackTrace = A.getTraceFromException(exception); + t8 = error; + t9 = J.getInterceptor$z(t8); + A.throwWithTrace0(new A.SassException0("From " + extension.extender.span.message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t9, t8)), stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + containsExtension = B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components); + for (t8 = selectors, t9 = t8.length, first = true, _i0 = 0; _i0 < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i0) { + complex = t8[_i0]; + if (containsExtension && first) { + first = false; + continue; + } + t10 = extension; + t11 = t10.extender; + t12 = t10.target; + t13 = t10.span; + t14 = t10.mediaContext; + t10 = t10.isOptional; + complex.get$specificity(); + t11 = new A.Extender0(complex, false, t11.span); + withExtender = t11._extension$_extension = new A.Extension0(t11, t12, t14, t10, t13); + existingExtension = t7.$index(0, complex); + if (existingExtension != null) + t7.$indexSet(0, complex, A.MergedExtension_merge0(existingExtension, withExtender)); + else { + t7.$indexSet(0, complex, withExtender); + for (t10 = complex.components, t11 = t10.length, _i1 = 0; _i1 < t11; ++_i1) + for (t12 = t10[_i1].selector.components, t13 = t12.length, _i2 = 0; _i2 < t13; ++_i2) + J.add$1$ax(t3.putIfAbsent$2(t12[_i2], new A.ExtensionStore__extendExistingExtensions_closure1()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure2()).$indexSet(0, complex, withExtender); + } + } + } + if (!containsExtension) + t7.remove$1(0, extension.extender); + } + return additionalExtensions; + }, + _extension_store$_extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4; + for (t1 = selectors.get$iterator(selectors), t2 = this._extension_store$_mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extension_store$_extendList$4(selector.value, selector.span, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException0) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = error; + t4 = J.getInterceptor$z(t3); + A.throwWithTrace0(new A.SassException0("From " + selector.span.message$1(0, "") + "\n" + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t4, t3)), stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._extension_store$_registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, _box_0 = {}; + _box_0.newExtensions = _box_0.selectorsToExtend = _box_0.extensionsToExtend = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = this._extension_store$_sourceSpecificity; t1.moveNext$0();) { + t3 = t1.get$current(t1); + if (t3.get$isEmpty(t3)) + continue; + t2.addAll$1(0, t3.get$_extension_store$_sourceSpecificity()); + t3.get$_extension_store$_extensions().forEach$1(0, new A.ExtensionStore_addExtensions_closure1(_box_0, this)); + } + A.NullableExtension_andThen0(_box_0.newExtensions, new A.ExtensionStore_addExtensions_closure2(_box_0, this)); + }, + _extension_store$_extendList$4(list, listSpan, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector_2, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extension_store$_extendComplex$4(complex, listSpan, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._extension_store$_originals; + return A.SelectorList$0(this._extension_store$_trim$2(extended, t1.get$contains(t1))); + }, + _extension_store$_extendList$3(list, listSpan, extensions) { + return this._extension_store$_extendList$4(list, listSpan, extensions, null); + }, + _extension_store$_extendComplex$4(complex, complexSpan, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, t11, extendedNotExpanded, i, component, extended, t12, result, t13, t14, t15, t16, _null = null, + _s56_ = string$.leadin, + _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return _null; + isOriginal = this._extension_store$_originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector_2, t6 = type$.Combinator_2, t7 = type$.ComplexSelectorComponent_2, t8 = complex.lineBreak, t9 = !t8, t10 = type$.JSArray_ComplexSelector_2, t2 = t2 === 0, t11 = type$.JSArray_ComplexSelectorComponent_2, extendedNotExpanded = _null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extension_store$_extendCompound$5$inOriginal(component, complexSpan, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) { + t12 = A._setArrayType([component], t11); + result = A.List_List$from(B.List_empty13, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + result = A.List_List$from(t12, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + if (t13.length === 0 && t12.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + extendedNotExpanded.push(A._setArrayType([new A.ComplexSelector0(t13, t12, t8)], t10)); + } + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t12 = A._arrayInstanceType(t3); + t13 = new A.SubListIterable(t3, 0, i, t12._eval$1("SubListIterable<1>")); + t13.SubListIterable$3(t3, 0, i, t12._precomputed1); + result = A.List_List$from(t1, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t12.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + extendedNotExpanded = A._setArrayType([A._setArrayType([new A.ComplexSelector0(t12, t13, t8)], t10), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t12 = A._setArrayType([], t10); + for (t13 = J.get$iterator$ax(extended); t13.moveNext$0();) { + t14 = t13.get$current(t13); + t15 = t14.leadingCombinators; + if (t15.length === 0 || B.C_ListEquality.equals$2(0, t1, t15)) { + t15 = t14.components; + t14 = !t9 || t14.lineBreak; + result = A.List_List$from(t1, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t16 = result; + result = A.List_List$from(t15, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t15 = result; + if (t16.length === 0 && t15.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + t12.push(new A.ComplexSelector0(t16, t15, t14)); + } + } + extendedNotExpanded = A._setArrayType([t12], t5); + } + } + if (extendedNotExpanded == null) + return _null; + _box_0.first = true; + t1 = type$.ComplexSelector_2; + t1 = J.expand$1$1$ax(A.paths0(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure0(_box_0, this, complex), t1); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + _extension_store$_extendCompound$5$inOriginal(component, componentSpan, extensions, mediaQueryContext, inOriginal) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, options, i, simple, extended, result, t13, t14, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + _s28_ = "components may not be empty.", + _s56_ = string$.leadin, + t1 = _this._extension_store$_mode, + targetsUsed = t1 === B.ExtendMode_normal_normal0 || extensions.get$length(extensions) < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2), + simples = component.selector.components; + for (t2 = simples.length, t3 = type$.JSArray_List_Extender_2, t4 = type$.JSArray_Extender_2, t5 = type$.Combinator_2, t6 = type$.JSArray_ComplexSelectorComponent_2, t7 = type$.ComplexSelectorComponent_2, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = type$.SimpleSelector_2, t11 = _this._extension_store$_sourceSpecificity, t12 = type$.JSArray_SimpleSelector_2, options = _null, i = 0; i < t2; ++i) { + simple = simples[i]; + extended = _this._extension_store$_extendSimple$5(simple, componentSpan, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) { + result = A.List_List$from(A._setArrayType([simple], t12), false, t10); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t13.length === 0) + A.throwExpression(A.ArgumentError$(_s28_, _null)); + result = A.List_List$from(B.List_empty13, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = A._setArrayType([new A.ComplexSelectorComponent0(new A.CompoundSelector0(t13), result)], t6); + result = A.List_List$from(B.List_empty13, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t14 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t14.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + t11.$index(0, simple); + options.push(A._setArrayType([new A.Extender0(new A.ComplexSelector0(t14, t13, false), true, componentSpan)], t4)); + } + } else { + if (options == null) { + options = A._setArrayType([], t3); + if (i !== 0) { + t13 = new A.SubListIterable(simples, 0, i, t8); + t13.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t13, false, t10); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + compound = new A.CompoundSelector0(t13); + if (t13.length === 0) + A.throwExpression(A.ArgumentError$(_s28_, _null)); + result = A.List_List$from(B.List_empty13, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = A._setArrayType([new A.ComplexSelectorComponent0(compound, result)], t6); + result = A.List_List$from(B.List_empty13, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t14 = result; + result = A.List_List$from(t13, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t13 = result; + if (t14.length === 0 && t13.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, _null)); + _this._extension_store$_sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender0(new A.ComplexSelector0(t14, t13, false), true, componentSpan)], t4)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.get$length(extensions)) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(B.JSArray_methods.get$first(options)), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector_2, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths0(options, type$.Extender_2); + t2 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + t1 = t1 === B.ExtendMode_replace_replace0; + t3 = !t1; + if (t3) + t2.push(A.ComplexSelector$0(B.List_empty13, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure2(), t10)), A.List_List$unmodifiable(component.combinators, t5))], t6), false)); + t4 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t4 = t4.get$iterator(t4); + t5 = component.combinators; + for (; t4.moveNext$0();) { + extended = _this._extension_store$_unifyExtenders$2(t4.get$current(t4), mediaQueryContext); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t5); + if (!withCombinators.accept$1(B.C__IsUselessVisitor0)) + t2.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure3(); + return _this._extension_store$_trim$2(t2, inOriginal && t3 ? new A.ExtensionStore__extendCompound_closure4(B.JSArray_methods.get$first(t2)) : isOriginal); + }, + _extension_store$_unifyExtenders$2(extenders, mediaQueryContext) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector_2); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector_2, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor0)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$0(B.List_empty13, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(originals), A.List_List$unmodifiable(B.List_empty13, type$.Combinator_2))], type$.JSArray_ComplexSelectorComponent_2), originalsLineBreak)); + complexes = A.unifyComplex0(toUnify); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extension_store$_extendSimple$5(simple, simpleSpan, extensions, mediaQueryContext, targetsUsed) { + var extended, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo0(this, extensions, targetsUsed, simpleSpan); + if (simple instanceof A.PseudoSelector0 && simple.selector != null) { + extended = this._extension_store$_extendPseudo$4(simple, simpleSpan, extensions, mediaQueryContext); + if (extended != null) + return new A.MappedListIterable(extended, new A.ExtensionStore__extendSimple_closure1(this, t1, simpleSpan), A._arrayInstanceType(extended)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen0(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure2()); + }, + _extension_store$_extenderForSimple$2(simple, span) { + var t1 = A.ComplexSelector$0(B.List_empty13, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([simple], type$.JSArray_SimpleSelector_2)), A.List_List$unmodifiable(B.List_empty13, type$.Combinator_2))], type$.JSArray_ComplexSelectorComponent_2), false); + this._extension_store$_sourceSpecificity.$index(0, simple); + return new A.Extender0(t1, true, span); + }, + _extension_store$_extendPseudo$4(pseudo, pseudoSpan, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extension_store$_extendList$4(selector, pseudoSpan, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure4()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure5())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure6(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure7(pseudo), type$.ComplexSelector_2); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure8(pseudo), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector_2); + result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([A.PseudoSelector$0(pseudo.name, pseudo.argument, !pseudo.isClass, A.SelectorList$0(complexes))], type$.JSArray_PseudoSelector_2); + }, + _extension_store$_trim$2(selectors, isOriginal) { + var result, i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity; + if (selectors.length > 100) + return selectors; + result = A.QueueList$(null, type$.ComplexSelector_2); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (J.$eq$(result.$index(0, j), complex1)) { + A.rotateSlice0(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._extension_store$_sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure1(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure2(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _extension_store$_sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._extension_store$_sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); + } + return specificity; + }, + clone$0() { + var t3, t4, _this = this, + t1 = type$.SimpleSelector_2, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableCssValue_SelectorList_2), + t2 = type$.ModifiableCssValue_SelectorList_2, + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.List_CssMediaQuery_2), + oldToNewSelectors = A.LinkedHashMap_LinkedHashMap$_empty(type$.CssValue_SelectorList_2, t2); + _this._extension_store$_selectors.forEach$1(0, new A.ExtensionStore_clone_closure0(_this, newSelectors, oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension_2; + t3 = A.copyMapOfMap0(_this._extension_store$_extensions, t1, type$.ComplexSelector_2, t2); + t2 = A.copyMapOfList0(_this._extension_store$_extensionsByExtender, t1, t2); + t1 = new A._LinkedIdentityHashMap(type$._LinkedIdentityHashMap_SimpleSelector_int_2); + t1.addAll$1(0, _this._extension_store$_sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2); + t4.addAll$1(0, _this._extension_store$_originals); + return new A.Tuple2(new A.ExtensionStore0(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal0), oldToNewSelectors, type$.Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList_2); + }, + get$_extension_store$_extensions() { + return this._extension_store$_extensions; + }, + get$_extension_store$_sourceSpecificity() { + return this._extension_store$_sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure0.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 407 + }; + A.ExtensionStore__registerSelector_closure0.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableCssValue_SelectorList_2); + }, + $signature: 408 + }; + A.ExtensionStore_addExtension_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 134 + }; + A.ExtensionStore_addExtension_closure3.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 223 + }; + A.ExtensionStore_addExtension_closure4.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 12 + }; + A.ExtensionStore__extendExistingExtensions_closure1.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 223 + }; + A.ExtensionStore__extendExistingExtensions_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 134 + }; + A.ExtensionStore_addExtensions_closure1.prototype = { + call$2(target, newSources) { + var first, t1, extensionsForTarget, t2, t3, t4, selectorsForTarget, t5, existingSources, _this = this; + if (target instanceof A.PlaceholderSelector0) { + first = B.JSString_methods._codeUnitAt$1(target.name, 0); + t1 = first === 45 || first === 95; + } else + t1 = false; + if (t1) + return; + t1 = _this.$this; + extensionsForTarget = t1._extension_store$_extensionsByExtender.$index(0, target); + t2 = extensionsForTarget == null; + if (!t2) { + t3 = _this._box_0; + t4 = t3.extensionsToExtend; + B.JSArray_methods.addAll$1(t4 == null ? t3.extensionsToExtend = A._setArrayType([], type$.JSArray_Extension_2) : t4, extensionsForTarget); + } + selectorsForTarget = t1._extension_store$_selectors.$index(0, target); + t3 = selectorsForTarget != null; + if (t3) { + t4 = _this._box_0; + t5 = t4.selectorsToExtend; + (t5 == null ? t4.selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableCssValue_SelectorList_2) : t5).addAll$1(0, selectorsForTarget); + } + t1 = t1._extension_store$_extensions; + existingSources = t1.$index(0, target); + if (existingSources == null) { + t4 = type$.ComplexSelector_2; + t5 = type$.Extension_2; + t1.$indexSet(0, target, A.LinkedHashMap_LinkedHashMap$of(newSources, t4, t5)); + if (!t2 || t3) { + t1 = _this._box_0; + t2 = t1.newExtensions; + t1 = t2 == null ? t1.newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(type$.SimpleSelector_2, type$.Map_ComplexSelector_Extension_2) : t2; + t1.$indexSet(0, target, A.LinkedHashMap_LinkedHashMap$of(newSources, t4, t5)); + } + } else + newSources.forEach$1(0, new A.ExtensionStore_addExtensions__closure4(_this._box_0, existingSources, extensionsForTarget, selectorsForTarget, target)); + }, + $signature: 411 + }; + A.ExtensionStore_addExtensions__closure4.prototype = { + call$2(extender, extension) { + var t2, _this = this, + t1 = _this.existingSources; + if (t1.containsKey$1(extender)) { + t2 = t1.$index(0, extender); + extension = A.MergedExtension_merge0(t2, extension); + t1.$indexSet(0, extender, extension); + } else + t1.$indexSet(0, extender, extension); + if (_this.extensionsForTarget != null || _this.selectorsForTarget != null) { + t1 = _this._box_0; + t2 = t1.newExtensions; + t1 = t2 == null ? t1.newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(type$.SimpleSelector_2, type$.Map_ComplexSelector_Extension_2) : t2; + J.$indexSet$ax(t1.putIfAbsent$2(_this.target, new A.ExtensionStore_addExtensions___closure0()), extender, extension); + } + }, + $signature: 412 + }; + A.ExtensionStore_addExtensions___closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 134 + }; + A.ExtensionStore_addExtensions_closure2.prototype = { + call$1(newExtensions) { + var t1 = this._box_0, + t2 = this.$this; + A.NullableExtension_andThen0(t1.extensionsToExtend, new A.ExtensionStore_addExtensions__closure2(t2, newExtensions)); + A.NullableExtension_andThen0(t1.selectorsToExtend, new A.ExtensionStore_addExtensions__closure3(t2, newExtensions)); + }, + $signature: 413 + }; + A.ExtensionStore_addExtensions__closure2.prototype = { + call$1(extensionsToExtend) { + return this.$this._extension_store$_extendExistingExtensions$2(extensionsToExtend, this.newExtensions); + }, + $signature: 414 + }; + A.ExtensionStore_addExtensions__closure3.prototype = { + call$1(selectorsToExtend) { + return this.$this._extension_store$_extendExistingSelectors$2(selectorsToExtend, this.newExtensions); + }, + $signature: 415 + }; + A.ExtensionStore__extendComplex_closure0.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave0(path, t1.lineBreak), new A.ExtensionStore__extendComplex__closure0(this._box_0, this.$this, t1), type$.ComplexSelector_2); + }, + $signature: 416 + }; + A.ExtensionStore__extendComplex__closure0.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._extension_store$_originals.contains$1(0, _this.complex)) + _this.$this._extension_store$_originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 69 + }; + A.ExtensionStore__extendCompound_closure2.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 418 + }; + A.ExtensionStore__extendCompound_closure3.prototype = { + call$1(_) { + return false; + }, + $signature: 15 + }; + A.ExtensionStore__extendCompound_closure4.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 15 + }; + A.ExtensionStore__extendSimple_withoutPseudo0.prototype = { + call$1(simple) { + var t1, t2, _this = this, + extensionsForSimple = _this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = _this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender_2); + t2 = _this.$this; + if (t2._extension_store$_mode !== B.ExtendMode_replace_replace0) + t1.push(t2._extension_store$_extenderForSimple$2(simple, _this.simpleSpan)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 419 + }; + A.ExtensionStore__extendSimple_closure1.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extension_store$_extenderForSimple$2(pseudo, this.simpleSpan)], type$.JSArray_Extender_2) : t1; + }, + $signature: 420 + }; + A.ExtensionStore__extendSimple_closure2.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender_2); + }, + $signature: 421 + }; + A.ExtensionStore__extendPseudo_closure4.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 15 + }; + A.ExtensionStore__extendPseudo_closure5.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 15 + }; + A.ExtensionStore__extendPseudo_closure6.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 15 + }; + A.ExtensionStore__extendPseudo_closure7.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector0)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_YEQji._map.containsKey$1(innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + } + }, + $signature: 422 + }; + A.ExtensionStore__extendPseudo_closure8.prototype = { + call$1(complex) { + var t1 = this.pseudo; + return A.PseudoSelector$0(t1.name, t1.argument, !t1.isClass, A.SelectorList$0(A._setArrayType([complex], type$.JSArray_ComplexSelector_2))); + }, + $signature: 423 + }; + A.ExtensionStore__trim_closure1.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 15 + }; + A.ExtensionStore__trim_closure2.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 15 + }; + A.ExtensionStore_clone_closure0.prototype = { + call$2(simple, selectors) { + var t2, t3, t4, t5, t6, newSelector, mediaContext, _this = this, + t1 = type$.ModifiableCssValue_SelectorList_2, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = _this.$this._extension_store$_mediaContexts, t5 = _this.newMediaContexts; t2.moveNext$0();) { + t6 = t2.get$current(t2); + newSelector = new A.ModifiableCssValue0(t6.value, t6.span, t1); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t6, newSelector); + mediaContext = t4.$index(0, t6); + if (mediaContext != null) + t5.$indexSet(0, newSelector, mediaContext); + } + }, + $signature: 424 + }; + A.FiberClass.prototype = {}; + A.Fiber.prototype = {}; + A.NodeToDartFileImporter.prototype = { + canonicalize$1(_, url) { + var result, t1, resultUrl; + if (url.get$scheme() === "file") + return $.$get$_filesystemImporter0().canonicalize$1(0, url); + result = this._file0$_findFileUrl.call$2(url.toString$0(0), {fromImport: A.fromImport0()}); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The findFileUrl() function can't return a Promise for synchron compile functions.")); + else { + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + } + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + return $.$get$_filesystemImporter0().canonicalize$1(0, resultUrl); + }, + load$1(_, url) { + return $.$get$_filesystemImporter0().load$1(0, url); + } + }; + A.FilesystemImporter0.prototype = { + canonicalize$1(_, url) { + if (url.get$scheme() !== "file" && url.get$scheme() !== "") + return null; + return A.NullableExtension_andThen0(A.resolveImportPath0(A.join(this._filesystem$_loadPath, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)), new A.FilesystemImporter_canonicalize_closure0()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + return A.ImporterResult$(A.readFile0(path), url, A.Syntax_forPath0(path)); + }, + toString$0(_) { + return this._filesystem$_loadPath; + } + }; + A.FilesystemImporter_canonicalize_closure0.prototype = { + call$1(resolved) { + var t1, t2, t0, _null = null; + if (J.$eq$(J.get$platform$x(self.process), "win32") || J.$eq$(J.get$platform$x(self.process), "darwin")) { + t1 = $.$get$context(); + t2 = A._realCasePath0(t1.absolute$7(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 219 + }; + A.ForRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through", + t3 = _this.children; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText0(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule0$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else { + if (hiddenMixinsAndFunctions != null) { + t2 = hiddenMixinsAndFunctions._base; + t2 = t2.get$isNotEmpty(t2); + } else + t2 = false; + if (t2) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule0$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule0$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); + for (t2 = variables._base, t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push("$" + t2.get$current(t2)); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ForwardedModuleView0.prototype = { + get$url(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$css(t1); + }, + get$transitivelyContainsCss() { + return this._forwarded_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var prefix, + _s19_ = "Undefined variable.", + t1 = this._forwarded_view0$_rule, + shownVariables = t1.shownVariables, + hiddenVariables = t1.hiddenVariables; + if (shownVariables != null && !shownVariables._base.contains$1(0, $name)) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + else if (hiddenVariables != null && hiddenVariables._base.contains$1(0, $name)) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + prefix = t1.prefix; + if (prefix != null) { + if (!B.JSString_methods.startsWith$1($name, prefix)) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + $name = B.JSString_methods.substring$1($name, prefix.length); + } + return this._forwarded_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var prefix = this._forwarded_view0$_rule.prefix; + if (prefix != null) + $name = B.JSString_methods.substring$1($name, prefix.length); + return this._forwarded_view0$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView0 && this._forwarded_view0$_inner.$eq(0, other._forwarded_view0$_inner) && this._forwarded_view0$_rule === other._forwarded_view0$_rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view0$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._forwarded_view0$_rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$0(this._forwarded_view0$_inner.cloneCss$0(), this._forwarded_view0$_rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view0$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.FunctionExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.JSFunction0.prototype = {}; + A.SupportsFunction0.prototype = { + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.functionClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassFunction", new A.functionClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassFunction0(A.BuiltInCallable$function0("f", "", new A.functionClass__closure0(), null)).constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.functionClass__closure.prototype = { + call$3($self, signature, callback) { + var paren = B.JSString_methods.indexOf$1(signature, "("); + if (paren === -1 || !B.JSString_methods.endsWith$1(signature, ")")) + A.jsThrow(new self.Error('Invalid signature for new sass.SassFunction(): "' + signature + '"')); + return new A.SassFunction0(A.BuiltInCallable$function0(B.JSString_methods.substring$2(signature, 0, paren), B.JSString_methods.substring$2(signature, paren + 1, signature.length - 1), callback, null)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 425 + }; + A.functionClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 3 + }; + A.SassFunction0.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._serialize0$_inspect) + A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize0$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction0 && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.FunctionRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + } + }; + A.unifyComplex_closure0.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 15 + }; + A._weaveParents_closure3.prototype = { + call$2(group1, group2) { + var unified, t1; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector0(group1, group2)) + return group2; + if (A._complexIsParentSuperselector0(group2, group1)) + return group1; + if (!A._mustUnify0(group1, group2)) + return null; + unified = A.unifyComplex0(A._setArrayType([A.ComplexSelector$0(B.List_empty13, group1, false), A.ComplexSelector$0(B.List_empty13, group2, false)], type$.JSArray_ComplexSelector_2)); + if (unified == null) + return null; + t1 = J.getInterceptor$asx(unified); + if (t1.get$length(unified) > 1) + return null; + return t1.get$first(unified).components; + }, + $signature: 426 + }; + A._weaveParents_closure4.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector0(sequence.get$first(sequence), this.group); + }, + $signature: 427 + }; + A._weaveParents_closure5.prototype = { + call$1(sequence) { + return sequence.get$length(sequence) === 0; + }, + $signature: 162 + }; + A._weaveParents_closure6.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 428 + }; + A._mustUnify_closure0.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure0(this.uniqueSelectors)); + }, + $signature: 51 + }; + A._mustUnify__closure0.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 13 + }; + A.paths_closure0.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure0(paths, t1), t1._eval$1("List<0>")); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure0.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure0(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure0.prototype = { + call$1(path) { + var t1 = A.List_List$of(path, true, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure0.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure0(complex1)); + }, + $signature: 15 + }; + A.listIsSuperselector__closure0.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 15 + }; + A.complexIsSuperselector_closure1.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 51 + }; + A.complexIsSuperselector_closure2.prototype = { + call$1(component) { + return A._isSupercombinator0(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 51 + }; + A._selectorPseudoIsSuperselector_closure6.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 66 + }; + A._selectorPseudoIsSuperselector_closure7.prototype = { + call$1(complex1) { + var t1, t2, t3; + if (complex1.leadingCombinators.length === 0) { + t1 = complex1.components; + t2 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + t3 = this.parents; + if (t3 != null) + B.JSArray_methods.addAll$1(t2, t3); + t2.push(new A.ComplexSelectorComponent0(this.compound2, A.List_List$unmodifiable(B.List_empty13, type$.Combinator_2))); + t1 = A.complexIsSuperselector0(t1, t2); + } else + t1 = false; + return t1; + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector_closure8.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 66 + }; + A._selectorPseudoIsSuperselector_closure9.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 66 + }; + A._selectorPseudoIsSuperselector_closure10.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true0)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure0(complex, this.pseudo1)); + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector__closure0.prototype = { + call$1(simple2) { + var selector2, _this = this; + if (simple2 instanceof A.TypeSelector0) + return B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure1(simple2)); + else if (simple2 instanceof A.IDSelector0) + return B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure2(simple2)); + else if (simple2 instanceof A.PseudoSelector0 && simple2.name === _this.pseudo1.name) { + selector2 = simple2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector0(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector_2)); + } else + return false; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector___closure1.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector0) { + t1 = this.simple2.name.$eq(0, simple1.name); + t1 = !t1; + } else + t1 = false; + return t1; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector___closure2.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector0) { + t1 = simple1.name; + t1 = this.simple2.name !== t1; + } else + t1 = false; + return t1; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector_closure11.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 66 + }; + A._selectorPseudoIsSuperselector_closure12.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector0)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 13 + }; + A._selectorPseudoArgs_closure1.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 430 + }; + A._selectorPseudoArgs_closure2.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 431 + }; + A.globalFunctions_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 3 + }; + A.IDSelector0.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector0.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector0(this.name + suffix); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure0(this))) + return null; + return this.super$SimpleSelector$unify0(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector0) { + t1 = simple.name; + t1 = this.$this.name !== t1; + } else + t1 = false; + return t1; + }, + $signature: 13 + }; + A.IfExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.IfRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure0(), type$.IfClause_2, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure0.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 432 + }; + A.IfRuleClause0.prototype = {}; + A.IfRuleClause$__closure0.prototype = { + call$1(child) { + var t1; + if (!(child instanceof A.VariableDeclaration0)) + if (!(child instanceof A.FunctionRule0)) + if (!(child instanceof A.MixinRule0)) + t1 = child instanceof A.ImportRule0 && B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure0()); + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + $signature: 226 + }; + A.IfRuleClause$___closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 227 + }; + A.IfClause0.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause0.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImmutableList.prototype = {}; + A.ImmutableMap.prototype = {}; + A.immutableMapToDartMap_closure.prototype = { + call$3(value, key, _) { + this.dartMap.$indexSet(0, key, value); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 435 + }; + A.NodeImporter.prototype = { + loadRelative$3(url, previous, forImport) { + var t1, t2, _null = null; + if ($.$get$url().style.rootLength$1(url) > 0) { + if (!B.JSString_methods.startsWith$1(url, "/") && !B.JSString_methods.startsWith$1(url, "file:")) + return _null; + return this._tryPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport); + } + if ((previous == null ? _null : previous.get$scheme()) !== "file") + return _null; + t1 = $.$get$context(); + t2 = t1.style; + return this._tryPath$2(A.join(t1.dirname$1(t2.pathFromUri$1(A._parseUri(previous))), t2.pathFromUri$1(A._parseUri(url)), _null), forImport); + }, + load$3(_, url, previous, forImport) { + var t1, t2, t3, t4, t5, _i, importer, context, value, _this = this, + previousString = _this._previousToString$1(previous); + for (t1 = _this._implementation$_importers, t2 = t1.length, t3 = _this._implementation$_options, t4 = type$.RenderContextOptions, t5 = type$.JSArray_Object, _i = 0; _i < t2; ++_i) { + importer = t1[_i]; + context = {options: t4._as(t3), fromImport: forImport}; + J.set$context$x(J.get$options$x(context), context); + value = J.apply$2$x(importer, context, A._setArrayType([url, previousString], t5)); + if (value != null) + return _this._handleImportResult$4(url, previous, value, forImport); + } + return _this._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + }, + loadAsync$3(url, previous, forImport) { + return this.loadAsync$body$NodeImporter(url, previous, forImport); + }, + loadAsync$body$NodeImporter(url, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Tuple2_String_String), + $async$returnValue, $async$self = this, t1, t2, _i, value, previousString; + var $async$loadAsync$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + previousString = $async$self._previousToString$1(previous); + t1 = $async$self._implementation$_importers, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait($async$self._callImporterAsync$4(t1[_i], url, previousString, forImport), $async$loadAsync$3); + case 6: + // returning from await. + value = $async$result; + if (value != null) { + $async$returnValue = $async$self._handleImportResult$4(url, previous, value, forImport); + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = $async$self._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$loadAsync$3, $async$completer); + }, + _previousToString$1(previous) { + if (previous == null) + return "stdin"; + if (previous.get$scheme() === "file") + return $.$get$context().style.pathFromUri$1(A._parseUri(previous)); + return previous.toString$0(0); + }, + _resolveLoadPathFromUrl$2(url, forImport) { + return url.get$scheme() === "" || url.get$scheme() === "file" ? this._resolveLoadPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport) : null; + }, + _resolveLoadPath$2(path, forImport) { + var t2, t3, t4, t5, _i, parts, result, _null = null, + t1 = $.$get$context(), + cwdResult = this._tryPath$2(t1.absolute$7(path, _null, _null, _null, _null, _null, _null), forImport); + if (cwdResult != null) + return cwdResult; + for (t2 = this._includePaths, t3 = t2.length, t4 = type$.JSArray_nullable_String, t5 = type$.WhereTypeIterable_String, _i = 0; _i < t3; ++_i) { + parts = A._setArrayType([t2[_i], path, null, null, null, null, null, null], t4); + A._validateArgList("join", parts); + result = this._tryPath$2(t1.absolute$7(t1.joinAll$1(new A.WhereTypeIterable(parts, t5)), _null, _null, _null, _null, _null, _null), forImport); + if (result != null) + return result; + } + return _null; + }, + _tryPath$2(path, forImport) { + var t1; + if (forImport) { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.NodeImporter__tryPath_closure(path), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__inImportRule, true], t1, t1), type$.nullable_String); + } else + t1 = A.resolveImportPath0(path); + return A.NullableExtension_andThen0(t1, new A.NodeImporter__tryPath_closure0()); + }, + _handleImportResult$4(url, previous, value, forImport) { + var t1, file, contents, resolved; + if (value instanceof self.Error) + throw A.wrapException(value); + if (!type$.NodeImporterResult_2._is(value)) + return null; + t1 = J.getInterceptor$x(value); + file = t1.get$file(value); + contents = t1.get$contents(value); + if (file == null) { + t1 = contents == null ? "" : contents; + return new A.Tuple2(t1, url, type$.Tuple2_String_String); + } else if (contents != null) + return new A.Tuple2(contents, $.$get$context().toUri$1(file).toString$0(0), type$.Tuple2_String_String); + else { + resolved = this.loadRelative$3($.$get$context().toUri$1(file).toString$0(0), previous, forImport); + if (resolved == null) + resolved = this._resolveLoadPath$2(file, forImport); + if (resolved != null) + return resolved; + throw A.wrapException("Can't find stylesheet to import."); + } + }, + _callImporterAsync$4(importer, url, previousString, forImport) { + return this._callImporterAsync$body$NodeImporter(importer, url, previousString, forImport); + }, + _callImporterAsync$body$NodeImporter(importer, url, previousString, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Object), + $async$returnValue, $async$self = this, t1, result; + var $async$_callImporterAsync$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_Object); + result = J.apply$2$x(importer, $async$self._renderContext$1(forImport), A._setArrayType([url, previousString, A.allowInterop(new A._AsyncCompleter(t1, type$._AsyncCompleter_Object).get$complete())], type$.JSArray_Object)); + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(t1, $async$_callImporterAsync$4); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_callImporterAsync$4, $async$completer); + }, + _renderContext$1(fromImport) { + var context = {options: type$.RenderContextOptions._as(this._implementation$_options), fromImport: fromImport}; + J.set$context$x(J.get$options$x(context), context); + return context; + } + }; + A.NodeImporter__tryPath_closure.prototype = { + call$0() { + return A.resolveImportPath0(this.path); + }, + $signature: 42 + }; + A.NodeImporter__tryPath_closure0.prototype = { + call$1(resolved) { + return new A.Tuple2(A.readFile0(resolved), $.$get$context().toUri$1(resolved).toString$0(0), type$.Tuple2_String_String); + }, + $signature: 436 + }; + A.ModifiableCssImport0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssImport0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var relativeResult, _this = this; + if (baseImporter != null) { + relativeResult = _this._import_cache$_relativeCanonicalizeCache.putIfAbsent$2(new A.Tuple4(url, forImport, baseImporter, baseUrl, type$.Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri_2), new A.ImportCache_canonicalize_closure1(_this, baseUrl, url, baseImporter, forImport)); + if (relativeResult != null) + return relativeResult; + } + return _this._import_cache$_canonicalizeCache.putIfAbsent$2(new A.Tuple2(url, forImport, type$.Tuple2_Uri_bool), new A.ImportCache_canonicalize_closure2(_this, url, forImport)); + }, + _import_cache$_canonicalize$3(importer, url, forImport) { + var t1, result; + if (forImport) { + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__inImportRule, true], t1, t1), type$.nullable_Uri); + } else + result = importer.canonicalize$1(0, url); + if ((result == null ? null : result.get$scheme()) === "") + this._import_cache$_logger.warn$2$deprecation(0, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + A.S(result) + string$.x2e_Rela, true); + return result; + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this._import_cache$_importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure0(this, importer, canonicalUrl, originalUrl, quiet)); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + humanize$1(canonicalUrl) { + var t2, url, + t1 = this._import_cache$_canonicalizeCache; + t1 = A.IterableNullableExtension_whereNotNull(t1.get$values(t1), type$.Tuple3_Importer_Uri_Uri_2); + t2 = t1.$ti; + url = A.minBy(new A.MappedIterable(new A.WhereIterable(t1, new A.ImportCache_humanize_closure2(canonicalUrl), t2._eval$1("WhereIterable")), new A.ImportCache_humanize_closure3(), t2._eval$1("MappedIterable")), new A.ImportCache_humanize_closure4()); + if (url == null) + return canonicalUrl; + t1 = $.$get$url(); + return url.resolve$1(A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t1.style).get$basename()); + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(t1); + return t1 == null ? canonicalUrl : t1; + } + }; + A.ImportCache_canonicalize_closure1.prototype = { + call$0() { + var canonicalUrl, _this = this, + t1 = _this.baseUrl, + resolvedUrl = t1 == null ? null : t1.resolveUri$1(_this.url); + if (resolvedUrl == null) + resolvedUrl = _this.url; + t1 = _this.baseImporter; + canonicalUrl = _this.$this._import_cache$_canonicalize$3(t1, resolvedUrl, _this.forImport); + if (canonicalUrl == null) + return null; + return new A.Tuple3(t1, canonicalUrl, resolvedUrl, type$.Tuple3_Importer_Uri_Uri_2); + }, + $signature: 228 + }; + A.ImportCache_canonicalize_closure2.prototype = { + call$0() { + var t1, t2, t3, t4, t5, _i, importer, canonicalUrl; + for (t1 = this.$this, t2 = t1._import_cache$_importers, t3 = t2.length, t4 = this.url, t5 = this.forImport, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + importer = t2[_i]; + canonicalUrl = t1._import_cache$_canonicalize$3(importer, t4, t5); + if (canonicalUrl != null) + return new A.Tuple3(importer, canonicalUrl, t4, type$.Tuple3_Importer_Uri_Uri_2); + } + return null; + }, + $signature: 228 + }; + A.ImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 216 + }; + A.ImportCache_importCanonical_closure0.prototype = { + call$0() { + var t2, t3, t4, _this = this, + t1 = _this.canonicalUrl, + result = _this.importer.load$1(0, t1); + if (result == null) + return null; + t2 = _this.$this; + t2._import_cache$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = _this.originalUrl.resolveUri$1(t1); + return A.Stylesheet_Stylesheet$parse0(t3, t4, _this.quiet ? $.$get$Logger_quiet0() : t2._import_cache$_logger, t1); + }, + $signature: 438 + }; + A.ImportCache_humanize_closure2.prototype = { + call$1(tuple) { + return tuple.item2.$eq(0, this.canonicalUrl); + }, + $signature: 439 + }; + A.ImportCache_humanize_closure3.prototype = { + call$1(tuple) { + return tuple.item3; + }, + $signature: 440 + }; + A.ImportCache_humanize_closure4.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 91 + }; + A.ImportRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.NodeImporter0.prototype = {}; + A.CanonicalizeOptions.prototype = {}; + A.NodeImporterResult0.prototype = {}; + A.Importer0.prototype = {}; + A.NodeImporterResult1.prototype = {}; + A.IncludeRule0.prototype = { + get$spanWithoutContent() { + var t2, t3, + t1 = this.span; + if (!(this.content == null)) { + t2 = t1.file; + t3 = this.$arguments.span; + t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); + t1 = t3; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(t2)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedFunctionExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation0.prototype = { + get$asPlain() { + var first, + t1 = this.contents, + t2 = t1.length; + if (t2 === 0) + return ""; + if (t2 > 1) + return null; + first = B.JSArray_methods.get$first(t1); + return typeof first == "string" ? first : null; + }, + get$initialPlain() { + var first = B.JSArray_methods.get$first(this.contents); + return typeof first == "string" ? first : ""; + }, + Interpolation$20(contents, span) { + var t1, t2, t3, i, t4, t5, + _s8_ = "contents"; + for (t1 = this.contents, t2 = t1.length, t3 = type$.Expression_2, i = 0; i < t2; ++i) { + t4 = t1[i]; + t5 = typeof t4 == "string"; + if (!t5 && !t3._is(t4)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, string$.May_on)); + if (i !== 0 && typeof t1[i - 1] == "string" && t5) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure0.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 46 + }; + A.SupportsInterpolation0.prototype = { + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.InterpolationBuffer0.prototype = { + writeCharCode$1(character) { + this._interpolation_buffer0$_text._contents += A.Primitives_stringFromCharCode(character); + return null; + }, + add$1(_, expression) { + this._interpolation_buffer0$_flushText$0(); + this._interpolation_buffer0$_contents.push(expression); + }, + addInterpolation$1(interpolation) { + var first, t1, _this = this, + toAdd = interpolation.contents; + if (toAdd.length === 0) + return; + first = B.JSArray_methods.get$first(toAdd); + if (typeof first == "string") { + _this._interpolation_buffer0$_text._contents += first; + toAdd = A.SubListIterable$(toAdd, 1, null, A._arrayInstanceType(toAdd)._precomputed1); + } + _this._interpolation_buffer0$_flushText$0(); + t1 = _this._interpolation_buffer0$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") + _this._interpolation_buffer0$_text._contents += A.S(t1.pop()); + }, + _interpolation_buffer0$_flushText$0() { + var t1 = this._interpolation_buffer0$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer0$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$of(this._interpolation_buffer0$_contents, true, type$.Object), + t2 = this._interpolation_buffer0$_text._contents; + if (t2.length !== 0) + t1.push(t2.charCodeAt(0) == 0 ? t2 : t2); + return A.Interpolation$0(t1, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer0$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer0$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._realCasePath_helper0.prototype = { + call$1(path) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache0.putIfAbsent$2(path, new A._realCasePath_helper_closure0(this, dirname, path)); + }, + $signature: 5 + }; + A._realCasePath_helper_closure0.prototype = { + call$0() { + var matches, t2, exception, + realDirname = this.helper.call$1(this.dirname), + t1 = this.path, + basename = A.ParsedPath_ParsedPath$parse(t1, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir0(realDirname), new A._realCasePath_helper__closure0(basename)).toList$0(0); + t2 = J.get$length$asx(matches) !== 1 ? A.join(realDirname, basename, null) : J.$index$asx(matches, 0); + return t2; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException0) + return t1; + else + throw exception; + } + }, + $signature: 30 + }; + A._realCasePath_helper__closure0.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase0(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 8 + }; + A.ModifiableCssKeyframeBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$0(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.KeyframeSelectorParser0.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure0(this)); + }, + _keyframe_selector$_percentage$0() { + var t3, next, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!A.isDigit0(second) && second !== 46) + t1.error$1(0, "Expected number."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + next = t1.peekChar$0(); + if (next === 43 || next === 45) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + if (!A.isDigit0(t1.peekChar$0())) + t1.error$1(0, "Expected digit."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure0.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._keyframe_selector$_percentage$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 48 + }; + A.render_closure.prototype = { + call$0() { + var error, exception; + try { + this.callback.call$2(null, A.renderSync(this.options)); + } catch (exception) { + error = A.unwrapException(exception); + this.callback.call$2(error, null); + } + return null; + }, + $signature: 1 + }; + A.render_closure0.prototype = { + call$1(result) { + this.callback.call$2(null, result); + }, + $signature: 441 + }; + A.render_closure1.prototype = { + call$2(error, stackTrace) { + var t2, t3, _null = null, + t1 = this.callback; + if (error instanceof A.SassException0) + t1.call$2(A._wrapException(error, stackTrace), _null); + else { + t2 = J.toString$0$(error); + t3 = A.getTrace0(error); + t1.call$2(A._newRenderError(t2, t3 == null ? stackTrace : t3, _null, _null, _null, 3), _null); + } + }, + $signature: 73 + }; + A._parseFunctions_closure.prototype = { + call$2(signature, callback) { + var error, stackTrace, exception, t1, t2, context, fiber, _this = this, tuple = null; + try { + tuple = A.ScssParser$0(signature, null, null).parseSignature$1$requireParens(false); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassFormatException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace0(new A.SassFormatException0('Invalid signature "' + signature + '": ' + error._span_exception$_message, A.SourceSpanException.prototype.get$span.call(t2, t1)), stackTrace); + } else + throw exception; + } + t1 = _this.options; + context = {options: A._contextOptions(t1, _this.start)}; + J.set$context$x(J.get$options$x(context), context); + fiber = J.get$fiber$x(t1); + if (fiber != null) + _this.result.push(new A.BuiltInCallable0(tuple.item1, A._setArrayType([new A.Tuple2(tuple.item2, new A._parseFunctions__closure(fiber, callback, context), type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value))); + else { + t1 = _this.result; + if (!_this.asynch) + t1.push(new A.BuiltInCallable0(tuple.item1, A._setArrayType([new A.Tuple2(tuple.item2, new A._parseFunctions__closure0(callback, context), type$.Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value)], type$.JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value))); + else + t1.push(new A.AsyncBuiltInCallable0(tuple.item1, tuple.item2, new A._parseFunctions__closure1(callback, context))); + } + }, + $signature: 128 + }; + A._parseFunctions__closure.prototype = { + call$1($arguments) { + var result, + t1 = this.fiber, + currentFiber = J.get$current$x(t1), + t2 = type$.Object; + t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); + t2.push(A.allowInterop(new A._parseFunctions___closure0(currentFiber))); + result = J.apply$2$x(type$.JSFunction._as(this.callback), this.context, t2); + return A.unwrapValue(A._asBool($.$get$_isUndefined().call$1(result)) ? A.runZoned(new A._parseFunctions___closure1(t1), null, type$.nullable_Object) : result); + }, + $signature: 3 + }; + A._parseFunctions___closure0.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseFunctions____closure(this.currentFiber, result)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 97 + }; + A._parseFunctions____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseFunctions___closure1.prototype = { + call$0() { + return J.yield$0$x(this.fiber); + }, + $signature: 85 + }; + A._parseFunctions__closure0.prototype = { + call$1($arguments) { + return A.unwrapValue(J.apply$2$x(type$.JSFunction._as(this.callback), this.context, J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), type$.Object).toList$0(0))); + }, + $signature: 3 + }; + A._parseFunctions__closure1.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure($arguments); + }, + $call$body$_parseFunctions__closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, t2, $async$temp1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_nullable_Object); + t2 = type$.Object; + t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); + t2.push(A.allowInterop(new A._parseFunctions___closure(new A._AsyncCompleter(t1, type$._AsyncCompleter_nullable_Object)))); + result = J.apply$2$x(type$.JSFunction._as($async$self.callback), $async$self.context, t2); + $async$temp1 = A; + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait(t1, $async$call$1); + case 6: + // returning from await. + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$result = result; + case 4: + // join + $async$returnValue = $async$temp1.unwrapValue($async$result); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 96 + }; + A._parseFunctions___closure.prototype = { + call$1(result) { + return this.completer.complete$1(result); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 173 + }; + A._parseImporter_closure.prototype = { + call$1(importer) { + return type$.JSFunction._as(A.allowInteropCaptureThis(new A._parseImporter__closure(this.fiber, importer))); + }, + $signature: 442 + }; + A._parseImporter__closure.prototype = { + call$4(thisArg, url, previous, _) { + var t1 = this.fiber, + result = J.apply$2$x(this.importer, thisArg, A._setArrayType([url, previous, A.allowInterop(new A._parseImporter___closure(J.get$current$x(t1)))], type$.JSArray_Object)); + if (A._asBool($.$get$_isUndefined().call$1(result))) + return A.runZoned(new A._parseImporter___closure0(t1), null, type$.Object); + return result; + }, + call$3(thisArg, url, previous) { + return this.call$4(thisArg, url, previous, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 443 + }; + A._parseImporter___closure.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseImporter____closure(this.currentFiber, result)); + }, + $signature: 444 + }; + A._parseImporter____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseImporter___closure0.prototype = { + call$0() { + return J.yield$0$x(this.fiber); + }, + $signature: 85 + }; + A.LimitedMapView0.prototype = { + get$keys(_) { + return this._limited_map_view0$_keys; + }, + get$length(_) { + return this._limited_map_view0$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view0$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view0$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view0$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.remove$1(0, key) : null; + } + }; + A.ListExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.hasBrackets, + t2 = t1 ? "" + A.Primitives_stringFromCharCode(91) : "", + t3 = _this.contents, + t4 = _this.separator === B.ListSeparator_rXA0 ? ", " : " "; + t4 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure0(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t4); + t1 = t1 ? t4 + A.Primitives_stringFromCharCode(93) : t4; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list3$_elementNeedsParens$1(expression) { + var t1; + if (expression instanceof A.ListExpression0) { + if (expression.contents.length < 2) + return false; + if (expression.hasBrackets) + return false; + t1 = expression.separator; + return this.separator === B.ListSeparator_rXA0 ? t1 === B.ListSeparator_rXA0 : t1 !== B.ListSeparator_undecided_null_undecided0; + } + if (this.separator !== B.ListSeparator_EVt0) + return false; + if (expression instanceof A.UnaryOperationExpression0) { + t1 = expression.operator; + return t1 === B.UnaryOperator_gg40 || t1 === B.UnaryOperator_TLI0; + } + return false; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure0.prototype = { + call$1(element) { + return this.$this._list3$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 113 + }; + A._length_closure2.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 11 + }; + A._nth_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 3 + }; + A._setNth_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2), + t2 = list.get$asList(), + newList = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return t1.$index($arguments, 0).withListContents$1(newList); + }, + $signature: 22 + }; + A._join_closure0.prototype = { + call$1($arguments) { + var separator, bracketed, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3); + t1 = separatorParam._string0$_text; + if (t1 === "auto") + if (list1.get$separator(list1) !== B.ListSeparator_undecided_null_undecided0) + separator = list1.get$separator(list1); + else + separator = list2.get$separator(list2) !== B.ListSeparator_undecided_null_undecided0 ? list2.get$separator(list2) : B.ListSeparator_EVt0; + else if (t1 === "space") + separator = B.ListSeparator_EVt0; + else if (t1 === "comma") + separator = B.ListSeparator_rXA0; + else { + if (t1 !== "slash") + throw A.wrapException(A.SassScriptException$0(string$.x24separ, null)); + separator = B.ListSeparator_zg90; + } + bracketed = bracketedParam instanceof A.SassString0 && bracketedParam._string0$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t1 = A.List_List$of(list1.get$asList(), true, type$.Value_2); + B.JSArray_methods.addAll$1(t1, list2.get$asList()); + return A.SassList$0(t1, separator, bracketed); + }, + $signature: 22 + }; + A._append_closure2.prototype = { + call$1($arguments) { + var separator, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1); + t1 = t1.$index($arguments, 2).assertString$1("separator")._string0$_text; + if (t1 === "auto") + separator = list.get$separator(list) === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_EVt0 : list.get$separator(list); + else if (t1 === "space") + separator = B.ListSeparator_EVt0; + else if (t1 === "comma") + separator = B.ListSeparator_rXA0; + else { + if (t1 !== "slash") + throw A.wrapException(A.SassScriptException$0(string$.x24separ, null)); + separator = B.ListSeparator_zg90; + } + t1 = A.List_List$of(list.get$asList(), true, type$.Value_2); + t1.push(value); + return list.withListContents$2$separator(t1, separator); + }, + $signature: 22 + }; + A._zip_closure0.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure2(), t2), true, t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_Sof0; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList_2); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value0>"), t2 = type$.Value_2; B.JSArray_methods.every$1(lists, new A._zip__closure3(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure4(_box_0), t1), false, t2); + result.fixed$length = Array; + result.immutable$list = Array; + results.push(new A.SassList0(result, B.ListSeparator_EVt0, false)); + ++_box_0.i; + } + return A.SassList$0(results, B.ListSeparator_rXA0, false); + }, + $signature: 22 + }; + A._zip__closure2.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 446 + }; + A._zip__closure3.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 447 + }; + A._zip__closure4.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 3 + }; + A._index_closure2.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull0 : A.SassNumber_SassNumber0(index + 1, null); + }, + $signature: 3 + }; + A._separator_closure0.prototype = { + call$1($arguments) { + switch (J.get$separator$x(J.$index$asx($arguments, 0))) { + case B.ListSeparator_rXA0: + return new A.SassString0("comma", false); + case B.ListSeparator_zg90: + return new A.SassString0("slash", false); + default: + return new A.SassString0("space", false); + } + }, + $signature: 17 + }; + A._isBracketed_closure0.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._slash_closure0.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$0("At least two elements are required.", null)); + return A.SassList$0(list, B.ListSeparator_zg90, false); + }, + $signature: 22 + }; + A.SelectorList0.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$0(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_rXA0, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, _i0, t7, + t1 = type$.JSArray_ComplexSelector_2, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (_i0 = 0; _i0 < t6; ++_i0) { + t7 = A.unifyComplex0(A._setArrayType([complex1, t5[_i0]], t1)); + if (t7 != null) + B.JSArray_methods.addAll$1(t2, t7); + } + } + return t2.length === 0 ? null : A.SelectorList$0(t2); + }, + resolveParentSelectors$2$implicitParent($parent, implicitParent) { + var t1, _this = this; + if ($parent == null) { + if (!B.JSArray_methods.any$1(_this.components, _this.get$_list2$_complexContainsParentSelector())) + return _this; + throw A.wrapException(A.SassScriptException$0(string$.Top_le, null)); + } + t1 = _this.components; + return A.SelectorList$0(A.flattenVertically0(new A.MappedListIterable(t1, new A.SelectorList_resolveParentSelectors_closure0(_this, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector_2)); + }, + resolveParentSelectors$1($parent) { + return this.resolveParentSelectors$2$implicitParent($parent, true); + }, + _list2$_complexContainsParentSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.SelectorList__complexContainsParentSelector_closure0()); + }, + _list2$_resolveParentSelectorsCompound$2(component, $parent) { + var resolvedSimples, parentSelector, t1, + simples = component.selector.components, + containsSelectorPseudo = B.JSArray_methods.any$1(simples, new A.SelectorList__resolveParentSelectorsCompound_closure2()); + if (!containsSelectorPseudo && !(B.JSArray_methods.get$first(simples) instanceof A.ParentSelector0)) + return null; + resolvedSimples = containsSelectorPseudo ? new A.MappedListIterable(simples, new A.SelectorList__resolveParentSelectorsCompound_closure3($parent), A._arrayInstanceType(simples)._eval$1("MappedListIterable<1,SimpleSelector0>")) : simples; + parentSelector = B.JSArray_methods.get$first(simples); + if (!(parentSelector instanceof A.ParentSelector0)) + return A._setArrayType([A.ComplexSelector$0(B.List_empty13, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(resolvedSimples), A.List_List$unmodifiable(component.combinators, type$.Combinator_2))], type$.JSArray_ComplexSelectorComponent_2), false)], type$.JSArray_ComplexSelector_2); + else if (simples.length === 1 && parentSelector.suffix == null) + return $parent.withAdditionalCombinators$1(component.combinators).components; + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__resolveParentSelectorsCompound_closure4(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$0(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure0(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>"))); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure0.prototype = { + call$1(complex) { + var t3, t4, _i, component, t5, visitor, t6, t7, _i0, + t1 = type$.JSArray_Value_2, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString0(t3[_i]._combinator0$_text, false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + t5 = component.selector; + visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + t5.accept$1(visitor); + t5 = A._setArrayType([new A.SassString0(visitor._serialize0$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString0(t6[_i0]._combinator0$_text, false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$0(t2, B.ListSeparator_EVt0, false); + }, + $signature: 448 + }; + A.SelectorList_resolveParentSelectors_closure0.prototype = { + call$1(complex) { + var t2, newComplexes, t3, t4, t5, t6, t7, t8, t9, _i, component, resolved, t10, result, t11, i, t12, _i0, newComplex, t13, _this = this, + _s56_ = string$.leadin, + t1 = _this.$this; + if (!t1._list2$_complexContainsParentSelector$1(complex)) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_resolveParentSelectors__closure0(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + } + t2 = type$.JSArray_ComplexSelector_2; + newComplexes = A._setArrayType([], t2); + for (t3 = complex.components, t4 = t3.length, t5 = _this.parent, t6 = type$.Combinator_2, t7 = type$.ComplexSelectorComponent_2, t8 = complex.leadingCombinators, t9 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + resolved = t1._list2$_resolveParentSelectorsCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) { + t10 = A._setArrayType([component], t9); + result = A.List_List$from(t8, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t11 = result; + result = A.List_List$from(t10, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t10 = result; + if (t11.length === 0 && t10.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, null)); + newComplexes.push(new A.ComplexSelector0(t11, t10, false)); + } else + for (i = 0; i < newComplexes.length; ++i) { + t10 = newComplexes[i]; + t11 = t10.leadingCombinators; + t12 = A.List_List$of(t10.components, true, t7); + t12.push(component); + t10 = t10.lineBreak || false; + result = A.List_List$from(t11, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t11 = result; + result = A.List_List$from(t12, false, t7); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + if (t11.length === 0 && t12.length === 0) + A.throwExpression(A.ArgumentError$(_s56_, null)); + newComplexes[i] = new A.ComplexSelector0(t11, t12, t10); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, resolved); + else { + t10 = A._setArrayType([], t2); + for (t11 = newComplexes.length, t12 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t11 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t13 = t12.get$iterator(resolved); t13.moveNext$0();) + t10.push(newComplex.concatenate$1(t13.get$current(t13))); + } + newComplexes = t10; + } + } + return newComplexes; + }, + $signature: 449 + }; + A.SelectorList_resolveParentSelectors__closure0.prototype = { + call$1(parentComplex) { + return parentComplex.concatenate$1(this.complex); + }, + $signature: 69 + }; + A.SelectorList__complexContainsParentSelector_closure0.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A.SelectorList__complexContainsParentSelector__closure0()); + }, + $signature: 51 + }; + A.SelectorList__complexContainsParentSelector__closure0.prototype = { + call$1(simple) { + var selector; + if (simple instanceof A.ParentSelector0) + return true; + if (!(simple instanceof A.PseudoSelector0)) + return false; + selector = simple.selector; + return selector != null && B.JSArray_methods.any$1(selector.components, selector.get$_list2$_complexContainsParentSelector()); + }, + $signature: 13 + }; + A.SelectorList__resolveParentSelectorsCompound_closure2.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector0)) + return false; + selector = simple.selector; + return selector != null && B.JSArray_methods.any$1(selector.components, selector.get$_list2$_complexContainsParentSelector()); + }, + $signature: 13 + }; + A.SelectorList__resolveParentSelectorsCompound_closure3.prototype = { + call$1(simple) { + var selector, t1, t2, t3; + if (!(simple instanceof A.PseudoSelector0)) + return simple; + selector = simple.selector; + if (selector == null) + return simple; + if (!B.JSArray_methods.any$1(selector.components, selector.get$_list2$_complexContainsParentSelector())) + return simple; + t1 = selector.resolveParentSelectors$2$implicitParent(this.parent, false); + t2 = simple.name; + t3 = simple.isClass; + return A.PseudoSelector$0(t2, simple.argument, !t3, t1); + }, + $signature: 450 + }; + A.SelectorList__resolveParentSelectorsCompound_closure4.prototype = { + call$1(complex) { + var suffix, lastSimples, t2, t3, t4, last, + t1 = complex.components, + lastComponent = B.JSArray_methods.get$last(t1); + if (lastComponent.combinators.length !== 0) + throw A.wrapException(A.SassScriptException$0('Parent "' + complex.toString$0(0) + '" is incompatible with this selector.', null)); + suffix = this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t2 = type$.SimpleSelector_2; + t3 = this.resolvedSimples; + t4 = J.getInterceptor$ax(t3); + if (suffix == null) { + t2 = A.List_List$of(lastSimples, true, t2); + B.JSArray_methods.addAll$1(t2, t4.skip$1(t3, 1)); + } else { + t2 = A.List_List$of(A.IterableExtension_get_exceptLast0(lastSimples), true, t2); + t2.push(B.JSArray_methods.get$last(lastSimples).addSuffix$1(suffix)); + B.JSArray_methods.addAll$1(t2, t4.skip$1(t3, 1)); + } + last = A.CompoundSelector$0(t2); + t2 = complex.leadingCombinators; + t1 = A.List_List$of(A.IterableExtension_get_exceptLast0(t1), true, type$.ComplexSelectorComponent_2); + t1.push(new A.ComplexSelectorComponent0(last, A.List_List$unmodifiable(this.component.combinators, type$.Combinator_2))); + return A.ComplexSelector$0(t2, t1, complex.lineBreak); + }, + $signature: 69 + }; + A.SelectorList_withAdditionalCombinators_closure0.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 69 + }; + A._NodeSassList.prototype = {}; + A.legacyListClass_closure.prototype = { + call$4(thisArg, $length, commaSeparator, dartValue) { + var t1; + if (dartValue == null) { + $length.toString; + t1 = A.Iterable_Iterable$generate($length, new A.legacyListClass__closure(), type$.Value_2); + t1 = A.SassList$0(t1, commaSeparator !== false ? B.ListSeparator_rXA0 : B.ListSeparator_EVt0, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$4(thisArg, $length, null, null); + }, + call$3(thisArg, $length, commaSeparator) { + return this.call$4(thisArg, $length, commaSeparator, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 451 + }; + A.legacyListClass__closure.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 230 + }; + A.legacyListClass_closure0.prototype = { + call$2(thisArg, index) { + return A.wrapValue(J.get$dartValue$x(thisArg)._list1$_contents[index]); + }, + $signature: 453 + }; + A.legacyListClass_closure1.prototype = { + call$3(thisArg, index, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + mutable = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + mutable[index] = A.unwrapValue(value); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).withListContents$1(mutable)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 454 + }; + A.legacyListClass_closure2.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_separator === B.ListSeparator_rXA0; + }, + $signature: 455 + }; + A.legacyListClass_closure3.prototype = { + call$2(thisArg, isComma) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + t3 = isComma ? B.ListSeparator_rXA0 : B.ListSeparator_EVt0; + t1.set$dartValue(thisArg, A.SassList$0(t2, t3, t1.get$dartValue(thisArg)._list1$_hasBrackets)); + }, + $signature: 456 + }; + A.legacyListClass_closure4.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_contents.length; + }, + $signature: 457 + }; + A.listClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassList", new A.listClass__closure())); + J.get$$prototype$x(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.listClass__closure0()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassList_nj9.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.listClass__closure.prototype = { + call$3($self, contentsOrOptions, options) { + var contents, t1, t2; + if (self.immutable.isList(contentsOrOptions)) + contents = J.cast$1$0$ax(J.toArray$0$x(type$.ImmutableList._as(contentsOrOptions)), type$.Value_2); + else if (type$.List_dynamic._is(contentsOrOptions)) + contents = J.cast$1$0$ax(contentsOrOptions, type$.Value_2); + else { + contents = A._setArrayType([], type$.JSArray_Value_2); + type$.nullable__ConstructorOptions._as(contentsOrOptions); + options = contentsOrOptions; + } + t1 = options == null; + if (!t1) { + t2 = J.get$separator$x(options); + t2 = A._asBool($.$get$_isUndefined().call$1(t2)); + } else + t2 = true; + t2 = t2 ? B.ListSeparator_rXA0 : A.jsToDartSeparator(J.get$separator$x(options)); + t1 = t1 ? null : J.get$brackets$x(options); + return A.SassList$0(contents, t2, t1 == null ? false : t1); + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, contentsOrOptions) { + return this.call$3($self, contentsOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 458 + }; + A.listClass__closure0.prototype = { + call$2($self, indexFloat) { + var index = B.JSNumber_methods.floor$0(indexFloat); + if (index < 0) + index = $self.get$asList().length + index; + if (index < 0 || index >= $self.get$asList().length) + return self.undefined; + return $self.get$asList()[index]; + }, + $signature: 231 + }; + A._ConstructorOptions.prototype = {}; + A.SassList0.prototype = { + get$separator(_) { + return this._list1$_separator; + }, + get$hasBrackets() { + return this._list1$_hasBrackets; + }, + get$isBlank() { + return !this._list1$_hasBrackets && B.JSArray_methods.every$1(this._list1$_contents, new A.SassList_isBlank_closure0()); + }, + get$asList() { + return this._list1$_contents; + }, + get$lengthAsList() { + return this._list1$_contents.length; + }, + SassList$3$brackets0(contents, _separator, brackets) { + if (this._list1$_separator === B.ListSeparator_undecided_null_undecided0 && this._list1$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : this.super$Value$assertMap0($name); + }, + tryMap$0() { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList0 && other._list1$_separator === _this._list1$_separator && other._list1$_hasBrackets === _this._list1$_hasBrackets && B.C_ListEquality.equals$2(0, other._list1$_contents, _this._list1$_contents))) + t1 = _this._list1$_contents.length === 0 && other instanceof A.SassMap0 && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list1$_contents); + } + }; + A.SassList_isBlank_closure0.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 44 + }; + A.ListSeparator0.prototype = { + toString$0(_) { + return this._list1$_name; + } + }; + A.NodeLogger.prototype = {}; + A.WarnOptions.prototype = {}; + A.DebugOptions.prototype = {}; + A._QuietLogger0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + } + }; + A.LoudComment0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + }, + $isAstNode0: 1, + $isStatement0: 1 + }; + A.MapExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.pairs; + return "(" + new A.MappedListIterable(t1, new A.MapExpression_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.MapExpression_toString_closure0.prototype = { + call$1(pair) { + return A.S(pair.item1) + ": " + A.S(pair.item2); + }, + $signature: 460 + }; + A._get_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.C__SassNull0; + } + t1 = map._map0$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull0 : t1; + }, + $signature: 3 + }; + A._set_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify0(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2), new A._set__closure2($arguments), true); + }, + $signature: 3 + }; + A._set__closure2.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 39 + }; + A._set_closure2.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + args = t1.$index($arguments, 1).get$asList(); + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", null)); + else if (t1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a value.", null)); + return A._modify0(map, B.JSArray_methods.sublist$2(args, 0, t1 - 1), new A._set__closure1(args), true); + }, + $signature: 3 + }; + A._set__closure1.prototype = { + call$1(_) { + return B.JSArray_methods.get$last(this.args); + }, + $signature: 39 + }; + A._merge_closure1.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map0$_contents, t1, t1); + t2.addAll$1(0, map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._merge_closure2.prototype = { + call$1($arguments) { + var map2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + args = t1.$index($arguments, 1).get$asList(); + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", null)); + else if (t1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a map.", null)); + map2 = B.JSArray_methods.get$last(args).assertMap$1("map2"); + return A._modify0(map1, A.IterableExtension_get_exceptLast0(args), new A._merge__closure0(map2), true); + }, + $signature: 3 + }; + A._merge__closure0.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.addAll$1(0, this.map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 461 + }; + A._deepMerge_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl0(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 34 + }; + A._deepRemove_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify0(map, A.IterableExtension_get_exceptLast0(t2), new A._deepRemove__closure0(t2), false); + }, + $signature: 3 + }; + A._deepRemove__closure0.prototype = { + call$1(value) { + var t1, t2, + nestedMap = value.tryMap$0(); + if (nestedMap != null && nestedMap._map0$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys))) { + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 39 + }; + A._remove_closure1.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 34 + }; + A._remove_closure2.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value_2; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 34 + }; + A._keys_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$keys(t1), B.ListSeparator_rXA0, false); + }, + $signature: 22 + }; + A._values_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$values(t1), B.ListSeparator_rXA0, false); + }, + $signature: 22 + }; + A._hasKey_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.SassBoolean_false0; + } + return map._map0$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._modify_modifyNestedMap0.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value_2, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull0; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty0 : nestedMap)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 462 + }; + A._deepMergeImpl_closure0.prototype = { + call$2(key, value) { + var valueMap, merged, + t1 = this.result, + t2 = t1.$index(0, key), + resultMap = t2 == null ? null : t2.tryMap$0(); + if (resultMap == null) + t1.$indexSet(0, key, value); + else { + valueMap = value.tryMap$0(); + if (valueMap != null) { + merged = A._deepMergeImpl0(resultMap, valueMap); + if (merged === resultMap) + return; + t1.$indexSet(0, key, merged); + } else + t1.$indexSet(0, key, value); + } + }, + $signature: 58 + }; + A._NodeSassMap.prototype = {}; + A.legacyMapClass_closure.prototype = { + call$3(thisArg, $length, dartValue) { + var t1, t2, t3, map; + if (dartValue == null) { + $length.toString; + t1 = type$.Value_2; + t2 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure(), t1); + t3 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure0(), t1); + map = A.LinkedHashMap_LinkedHashMap(null, null, null, t1, t1); + A.MapBase__fillMapWithIterables(map, t2, t3); + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$3(thisArg, $length, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 463 + }; + A.legacyMapClass__closure.prototype = { + call$1(i) { + return A.SassNumber_SassNumber0(i, null); + }, + $signature: 464 + }; + A.legacyMapClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 230 + }; + A.legacyMapClass_closure0.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return A.wrapValue(J.elementAt$1$ax(t1.get$keys(t1), index)); + }, + $signature: 232 + }; + A.legacyMapClass_closure1.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return A.wrapValue(t1.get$values(t1).elementAt$1(0, index)); + }, + $signature: 232 + }; + A.legacyMapClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return t1.get$length(t1); + }, + $signature: 466 + }; + A.legacyMapClass_closure3.prototype = { + call$3(thisArg, index, key) { + var newKey, t2, newMap, t3, i, t4, t5, + t1 = J.getInterceptor$x(thisArg); + A.RangeError_checkValidIndex(index, t1.get$dartValue(thisArg)._map0$_contents, "index"); + newKey = A.unwrapValue(key); + t2 = type$.Value_2; + newMap = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t3 = t1.get$dartValue(thisArg)._map0$_contents, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3), i = 0; t3.moveNext$0();) { + t4 = t3.get$current(t3); + if (i === index) + newMap.$indexSet(0, newKey, t4.value); + else { + t5 = t4.key; + if (newKey.$eq(0, t5)) + throw A.wrapException(A.ArgumentError$value(key, "key", "is already in the map")); + newMap.$indexSet(0, t5, t4.value); + } + ++i; + } + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(newMap, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 233 + }; + A.legacyMapClass_closure4.prototype = { + call$3(thisArg, index, value) { + var t3, + t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._map0$_contents, + key = J.elementAt$1$ax(t2.get$keys(t2), index); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$of(t1.get$dartValue(thisArg)._map0$_contents, t2, t2); + t3.$indexSet(0, key, A.unwrapValue(value)); + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 233 + }; + A.mapClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMap", new A.mapClass__closure())), + t2 = J.getInterceptor$x(jsClass); + A.defineGetter(t2.get$$prototype(jsClass), "contents", new A.mapClass__closure0(), null); + t2.get$$prototype(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.mapClass__closure1()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassMap_Map_empty0.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.mapClass__closure.prototype = { + call$2($self, contents) { + var t1; + if (contents == null) + t1 = B.SassMap_Map_empty0; + else { + t1 = type$.Value_2; + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(A.immutableMapToDartMap(contents).cast$2$0(0, t1, t1), t1, t1)); + } + return t1; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 468 + }; + A.mapClass__closure0.prototype = { + call$1($self) { + return A.dartMapToImmutableMap($self._map0$_contents); + }, + $signature: 469 + }; + A.mapClass__closure1.prototype = { + call$2($self, indexOrKey) { + var index, t1, entry; + if (typeof indexOrKey == "number") { + index = B.JSNumber_methods.floor$0(indexOrKey); + if (index < 0) { + t1 = $self._map0$_contents; + index = t1.get$length(t1) + index; + } + if (index >= 0) { + t1 = $self._map0$_contents; + t1 = index >= t1.get$length(t1); + } else + t1 = true; + if (t1) + return self.undefined; + t1 = $self._map0$_contents; + entry = t1.get$entries(t1).elementAt$1(0, index); + return A.SassList$0(A._setArrayType([entry.key, entry.value], type$.JSArray_Value_2), B.ListSeparator_EVt0, false); + } else { + t1 = $self._map0$_contents.$index(0, indexOrKey); + return t1 == null ? self.undefined : t1; + } + }, + $signature: 470 + }; + A.SassMap0.prototype = { + get$separator(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided0 : B.ListSeparator_rXA0; + }, + get$asList() { + var result = A._setArrayType([], type$.JSArray_Value_2); + this._map0$_contents.forEach$1(0, new A.SassMap_asList_closure0(result)); + return result; + }, + get$lengthAsList() { + var t1 = this._map0$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap0 && B.C_MapEquality.equals$2(0, other._map0$_contents, this._map0$_contents))) { + t1 = this._map0$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList0 && other._list1$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty19) : B.C_MapEquality.hash$1(t1); + } + }; + A.SassMap_asList_closure0.prototype = { + call$2(key, value) { + this.result.push(A.SassList$0(A._setArrayType([key, value], type$.JSArray_Value_2), B.ListSeparator_EVt0, false)); + }, + $signature: 58 + }; + A._ceil_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 29 + }; + A._clamp_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 11 + }; + A._floor_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 29 + }; + A._max_closure0.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 11 + }; + A._min_closure0.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 11 + }; + A._round_closure0.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 29 + }; + A._abs_closure0.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 29 + }; + A._hypot_closure0.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, t4, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber0>"), + numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure0(), t2), true, t2._eval$1("ListIterable.E")); + t1 = numbers.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < t1; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t3 = J.getInterceptor$x(t2); + t4 = t3.get$numeratorUnits(t2); + return A.SassNumber_SassNumber$withUnits0(t1, t3.get$denominatorUnits(t2), t4); + }, + $signature: 11 + }; + A._hypot__closure0.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 471 + }; + A._log_closure0.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)) + return A.SassNumber_SassNumber0(Math.log(number._number1$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), _null); + }, + $signature: 11 + }; + A._pow_closure0.prototype = { + call$1($arguments) { + var _s18_ = " to have no units.", + t1 = J.getInterceptor$asx($arguments), + base = t1.$index($arguments, 0).assertNumber$1("base"), + exponent = t1.$index($arguments, 1).assertNumber$1("exponent"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$base: Expected " + base.toString$0(0) + _s18_, null)); + else if (exponent.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$exponent: Expected " + exponent.toString$0(0) + _s18_, null)); + else + return A.SassNumber_SassNumber0(Math.pow(base._number1$_value, exponent._number1$_value), null); + }, + $signature: 11 + }; + A._sqrt_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber0(Math.sqrt(number._number1$_value), null); + }, + $signature: 11 + }; + A._acos_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits0(Math.acos(number._number1$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 11 + }; + A._asin_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits0(Math.asin(number._number1$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 11 + }; + A._atan_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + " to have no units.", null)); + else + return A.SassNumber_SassNumber$withUnits0(Math.atan(number._number1$_value) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 11 + }; + A._atan2_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 180 / 3.141592653589793, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 11 + }; + A._cos_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(Math.cos(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 11 + }; + A._sin_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(Math.sin(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 11 + }; + A._tan_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(Math.tan(J.$index$asx($arguments, 0).assertNumber$1("number").coerceValueToUnit$2("rad", "number")), null); + }, + $signature: 11 + }; + A._compatible_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._isUnitless_closure0.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._unit_closure0.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 17 + }; + A._percentage_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber0(number._number1$_value * 100, "%"); + }, + $signature: 11 + }; + A._randomFunction_closure0.prototype = { + call$1($arguments) { + var limit, t2, t3, t4, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull0)) + return A.SassNumber_SassNumber0($.$get$_random2().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) { + t1 = limit.toString$0(0); + t2 = limit.get$unitString(); + t3 = limit.get$unitString(); + t4 = limit.get$unitString(); + A.EvaluationContext_current0().warn$2$deprecation(0, string$.math_r + t1 + string$.x29x20in_a + t2 + ")) * 1" + t3 + string$.x0a_To_p + t4 + string$.x29x29__Mo, false); + } + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$0("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber0($.$get$_random2().nextInt$1(limitScalar) + 1, null); + }, + $signature: 11 + }; + A._div_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber0) || !(number2 instanceof A.SassNumber0)) + A.EvaluationContext_current0().warn$2$deprecation(0, string$.math_d, false); + return number1.dividedBy$1(number2); + }, + $signature: 3 + }; + A._numberFunction_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number1$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 11 + }; + A.CssMediaQuery0.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_unrepresentable0; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$condition0(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_empty0; + else + return B._SingletonCssMediaQueryMergeResult_unrepresentable0; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_) || t6 || A.equalsIgnoreCase0(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_unrepresentable0; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_unrepresentable0; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_unrepresentable0; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase0(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase0(t5, _s3_)) { + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_empty0; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$type0(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery0 && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? "" + (t1 + " ") : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult0.prototype = { + toString$0(_) { + return this._media_query0$_name; + } + }; + A.MediaQuerySuccessfulMergeResult0.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.MediaQueryParser0.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure0(this)); + }, + _media_query1$_mediaQuery$0() { + var conditions, conjunction, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._media_query1$_mediaInParens$0()], type$.JSArray_String); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query1$_mediaLogicSequence$1(_s3_)); + conjunction = true; + } else if (_this.scanIdentifier$1("or")) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query1$_mediaLogicSequence$1("or")); + conjunction = false; + } else + conjunction = true; + return A.CssMediaQuery$condition0(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition0(A._setArrayType(["(not " + _this._media_query1$_mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type0(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type0(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type0(type, A._setArrayType(["(not " + _this._media_query1$_mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type0(type, _this._media_query1$_mediaLogicSequence$1(_s3_), modifier); + }, + _media_query1$_mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner; true;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _media_query1$_mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure0.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + queries.push(t1._media_query1$_mediaQuery$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 109 + }; + A.ModifiableCssMediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$0(this.queries, this.span); + }, + $isCssMediaRule0: 1, + get$span(receiver) { + return this.span; + } + }; + A.MediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MergedExtension0.prototype = { + unmerge$0() { + var $async$self = this; + return A._makeSyncStarIterable(function() { + var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; + return function $async$unmerge$0($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension0 ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._IterationMarker_yieldStar(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return left; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension0 ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._IterationMarker_yieldStar(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return right; + case 11: + // after yield + case 8: + // join + // implicit return + return A._IterationMarker_endOfIteration(); + case 1: + // rethrow + return A._IterationMarker_uncaughtError($async$currentError); + } + }; + }, type$.Extension_2); + } + }; + A.MergedMapView0.prototype = { + get$keys(_) { + var t1 = this._merged_map_view$_mapsByKey; + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$length(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$10(maps, $K, $V) { + var t1, t2, t3, _i, map, t4, t5, t6; + for (t1 = maps.length, t2 = this._merged_map_view$_mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView0<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (t3._is(map)) + for (t4 = map._merged_map_view$_mapsByKey, t4 = t4.get$values(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f), t5 = A._instanceType(t4)._rest[1]; t4.moveNext$0();) { + t6 = t4.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + A.setAll0(t2, t6.get$keys(t6), t6); + } + else + A.setAll0(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._merged_map_view$_mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var child = this._merged_map_view$_mapsByKey.$index(0, key); + if (child == null) + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + child.$indexSet(0, key, value); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._merged_map_view$_mapsByKey.containsKey$1(key); + } + }; + A.global_closure57.prototype = { + call$1($arguments) { + return $._features0.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A.global_closure58.prototype = { + call$1($arguments) { + return new A.SassString0(A.serializeValue0(J.get$first$ax($arguments), true, true), false); + }, + $signature: 17 + }; + A.global_closure59.prototype = { + call$1($arguments) { + var value = J.$index$asx($arguments, 0); + if (value instanceof A.SassArgumentList0) + return new A.SassString0("arglist", false); + if (value instanceof A.SassBoolean0) + return new A.SassString0("bool", false); + if (value instanceof A.SassColor0) + return new A.SassString0("color", false); + if (value instanceof A.SassList0) + return new A.SassString0("list", false); + if (value instanceof A.SassMap0) + return new A.SassString0("map", false); + if (value.$eq(0, B.C__SassNull0)) + return new A.SassString0("null", false); + if (value instanceof A.SassNumber0) + return new A.SassString0("number", false); + if (value instanceof A.SassFunction0) + return new A.SassString0("function", false); + if (value instanceof A.SassCalculation0) + return new A.SassString0("calculation", false); + return new A.SassString0("string", false); + }, + $signature: 17 + }; + A.global_closure60.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, + argumentList = J.$index$asx($arguments, 0); + if (argumentList instanceof A.SassArgumentList0) { + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (argumentList._argument_list$_wereKeywordsAccessed = true, t3 = argumentList._argument_list$_keywords, t3 = t3.get$entries(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4.key, false), t4.value); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + argumentList.toString$0(0) + " is not an argument list."); + }, + $signature: 34 + }; + A.local_closure1.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 17 + }; + A.local_closure2.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$0(new A.MappedListIterable(t1, new A.local__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_rXA0, false); + }, + $signature: 22 + }; + A.local__closure0.prototype = { + call$1(argument) { + if (argument instanceof A.Value0) + return argument; + return new A.SassString0(J.toString$0$(argument), false); + }, + $signature: 472 + }; + A.MixinRule0.prototype = { + get$hasContent() { + var result, _this = this, + value = _this._mixin_rule$__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor0.visitChildren$1(_this.children), true); + _this._mixin_rule$__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._mixin_rule$__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.$arguments; + if (!(t2.$arguments.length === 0 && t2.restArgument == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = this.children; + t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._HasContentVisitor0.prototype = { + visitContentRule$1(_) { + return true; + } + }; + A.__HasContentVisitor_Object_StatementSearchVisitor0.prototype = {}; + A.ExtendMode0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.MultiSpan0.prototype = { + get$start(_) { + var t1 = this._multi_span0$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span0$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span0$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span0$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span0$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span0$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span0$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span0$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span0$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan0(this._multi_span0$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + var t1 = color === true || false; + return A.Highlighter$multiple(this._multi_span0$_primary, this.primaryLabel, this.secondarySpans, t1, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span0$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2); + }, + message$1($receiver, message) { + return this.message$2$color($receiver, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.SupportsNegation0.prototype = { + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation0 || t1 instanceof A.SupportsOperation0) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.NoOpImporter.prototype = { + canonicalize$1(_, url) { + return null; + }, + load$1(_, url) { + return null; + }, + toString$0(_) { + return "(unknown)"; + } + }; + A.NoSourceMapBuffer0.prototype = { + get$length(_) { + return this._no_source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + this._no_source_map_buffer0$_buffer._contents += A.S(object); + return null; + }, + writeCharCode$1(charCode) { + this._no_source_map_buffer0$_buffer._contents += A.Primitives_stringFromCharCode(charCode); + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A.AstNode0.prototype = {}; + A._FakeAstNode0.prototype = { + get$span(_) { + return this._node1$_callback.call$0(); + }, + $isAstNode0: 1 + }; + A.CssNode0.prototype = { + toString$0(_) { + return A.serialize0(this, true, null, true, null, false, null, true).css; + } + }; + A.CssParentNode0.prototype = {}; + A._IsInvisibleVisitor1.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && B.JSString_methods._codeUnitAt$1(comment.text, 2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule.selector.value; + return (this.includeBogus ? t1.accept$1(B._IsInvisibleVisitor_true0) : t1.accept$1(B._IsInvisibleVisitor_false0)) || this.super$EveryCssVisitor$visitCssStyleRule0(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor0.prototype = {}; + A.FileSystemException0.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.Stderr0.prototype = { + writeln$1(object) { + var t1 = object == null ? "" : object; + J.write$1$x(this._node$_stderr, t1 + "\n"); + }, + writeln$0() { + return this.writeln$1(null); + } + }; + A._readFile_closure0.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 92 + }; + A.fileExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 28 + }; + A.dirExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 28 + }; + A.listDir_closure0.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure1(t1), type$.String).where$1(0, new A.listDir__closure2()); + else + return new A.listDir_closure_list0().call$1(t1); + }, + $signature: 141 + }; + A.listDir__closure1.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 86 + }; + A.listDir__closure2.prototype = { + call$1(child) { + return !A.dirExists0(child); + }, + $signature: 8 + }; + A.listDir_closure_list0.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure0($parent, this), type$.String); + }, + $signature: 143 + }; + A.listDir__list_closure0.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists0(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 147 + }; + A.ModifiableCssNode0.prototype = { + get$hasFollowingSibling() { + var t2, + t1 = this._node0$_parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._node0$_indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListMixin.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure0()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure0.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false0); + }, + $signature: 110 + }; + A.ModifiableCssParentNode0.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._node0$_parent = this; + t1 = this._node0$_children; + child._node0$_indexInParent = t1.length; + t1.push(child); + }, + $isCssParentNode0: 1, + get$children(receiver) { + return this.children; + } + }; + A.main_closure0.prototype = { + call$2(_, __) { + }, + $signature: 473 + }; + A.main_closure1.prototype = { + call$2(_, __) { + }, + $signature: 474 + }; + A.NodeToDartLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var t1 = this._node, + warn = t1 == null ? null : J.get$warn$x(t1); + if (warn == null) + this._withAscii$1(new A.NodeToDartLogger_warn_closure(this, message, span, trace, deprecation)); + else { + t1 = span == null ? type$.nullable_SourceSpan._as(self.undefined) : span; + warn.call$2(message, {deprecation: deprecation, span: t1, stack: J.toString$0$(trace)}); + } + }, + warn$1($receiver, message) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, null); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + var t1 = this._node, + debug = t1 == null ? null : J.get$debug$x(t1); + if (debug == null) + this._withAscii$1(new A.NodeToDartLogger_debug_closure(this, message, span)); + else + debug.call$2(message, {span: span}); + }, + _withAscii$1$1(callback) { + var t1, + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = this._ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = callback.call$0(); + return t1; + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _withAscii$1(callback) { + return this._withAscii$1$1(callback, type$.dynamic); + } + }; + A.NodeToDartLogger_warn_closure.prototype = { + call$0() { + var _this = this; + _this.$this._fallback.warn$4$deprecation$span$trace(0, _this.message, _this.deprecation, _this.span, _this.trace); + }, + $signature: 1 + }; + A.NodeToDartLogger_debug_closure.prototype = { + call$0() { + return this.$this._fallback.debug$2(0, this.message, this.span); + }, + $signature: 0 + }; + A.NullExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.legacyNullClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Null", new A.legacyNullClass__closure())); + jsClass.NULL = B.C__SassNull0; + A.JSClassExtension_injectSuperclass(t1._as(B.C__SassNull0.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.legacyNullClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Null() isn't allowed. Use sass.types.Null.NULL instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 195 + }; + A._SassNull0.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._serialize0$_inspect) + visitor._serialize0$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true0; + } + }; + A.NumberExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(A.SassNumber_SassNumber0(this.value, this.unit), true, true); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A._NodeSassNumber.prototype = {}; + A.legacyNumberClass_closure.prototype = { + call$4(thisArg, value, unit, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = A._parseNumber(value, unit); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$4(thisArg, value, null, null); + }, + call$3(thisArg, value, unit) { + return this.call$4(thisArg, value, unit, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 475 + }; + A.legacyNumberClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._number1$_value; + }, + $signature: 476 + }; + A.legacyNumberClass_closure1.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = J.get$numeratorUnits$x(t1.get$dartValue(thisArg)); + t1.set$dartValue(thisArg, A.SassNumber_SassNumber$withUnits0(value, J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), t2)); + }, + $signature: 477 + }; + A.legacyNumberClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.getInterceptor$x(thisArg), + t2 = B.JSArray_methods.join$1(J.get$numeratorUnits$x(t1.get$dartValue(thisArg)), "*"), + t3 = J.get$denominatorUnits$x(t1.get$dartValue(thisArg)).length === 0 ? "" : "/"; + return t2 + t3 + B.JSArray_methods.join$1(J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), "*"); + }, + $signature: 478 + }; + A.legacyNumberClass_closure3.prototype = { + call$2(thisArg, unit) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, A._parseNumber(t1.get$dartValue(thisArg)._number1$_value, unit)); + }, + $signature: 479 + }; + A._parseNumber_closure.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 8 + }; + A._parseNumber_closure0.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 8 + }; + A.numberClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassNumber", new A.numberClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.numberClass__closure0(), "isInt", new A.numberClass__closure1(), "asInt", new A.numberClass__closure2(), "numeratorUnits", new A.numberClass__closure3(), "denominatorUnits", new A.numberClass__closure4(), "hasUnits", new A.numberClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["assertInt", new A.numberClass__closure6(), "assertInRange", new A.numberClass__closure7(), "assertNoUnits", new A.numberClass__closure8(), "assertUnit", new A.numberClass__closure9(), "hasUnit", new A.numberClass__closure10(), "compatibleWithUnit", new A.numberClass__closure11(), "convert", new A.numberClass__closure12(), "convertToMatch", new A.numberClass__closure13(), "convertValue", new A.numberClass__closure14(), "convertValueToMatch", new A.numberClass__closure15(), "coerce", new A.numberClass__closure16(), "coerceToMatch", new A.numberClass__closure17(), "coerceValue", new A.numberClass__closure18(), "coerceValueToMatch", new A.numberClass__closure19()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(A.SassNumber_SassNumber0(0, null).constructor))).constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.numberClass__closure.prototype = { + call$3($self, value, unitOrOptions) { + var t1, t2, _null = null; + if (typeof unitOrOptions == "string") + return A.SassNumber_SassNumber0(value, unitOrOptions); + type$.nullable__ConstructorOptions_2._as(unitOrOptions); + t1 = unitOrOptions == null; + if (t1) + t2 = _null; + else { + t2 = A.NullableExtension_andThen0(J.get$numeratorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t2 = t2 == null ? _null : J.cast$1$0$ax(t2, type$.String); + } + if (t1) + t1 = _null; + else { + t1 = A.NullableExtension_andThen0(J.get$denominatorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t1 = t1 == null ? _null : J.cast$1$0$ax(t1, type$.String); + } + return A.SassNumber_SassNumber$withUnits0(value, t1, t2); + }, + call$2($self, value) { + return this.call$3($self, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 480 + }; + A.numberClass__closure0.prototype = { + call$1($self) { + return $self._number1$_value; + }, + $signature: 481 + }; + A.numberClass__closure1.prototype = { + call$1($self) { + return A.fuzzyIsInt($self._number1$_value); + }, + $signature: 234 + }; + A.numberClass__closure2.prototype = { + call$1($self) { + return A.fuzzyAsInt0($self._number1$_value); + }, + $signature: 483 + }; + A.numberClass__closure3.prototype = { + call$1($self) { + return new self.immutable.List($self.get$numeratorUnits($self)); + }, + $signature: 235 + }; + A.numberClass__closure4.prototype = { + call$1($self) { + return new self.immutable.List($self.get$denominatorUnits($self)); + }, + $signature: 235 + }; + A.numberClass__closure5.prototype = { + call$1($self) { + return $self.get$hasUnits(); + }, + $signature: 234 + }; + A.numberClass__closure6.prototype = { + call$2($self, $name) { + return $self.assertInt$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 485 + }; + A.numberClass__closure7.prototype = { + call$4($self, min, max, $name) { + return $self.valueInRange$3(min, max, $name); + }, + call$3($self, min, max) { + return this.call$4($self, min, max, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 486 + }; + A.numberClass__closure8.prototype = { + call$2($self, $name) { + $self.assertNoUnits$1($name); + return $self; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 487 + }; + A.numberClass__closure9.prototype = { + call$3($self, unit, $name) { + $self.assertUnit$2(unit, $name); + return $self; + }, + call$2($self, unit) { + return this.call$3($self, unit, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 488 + }; + A.numberClass__closure10.prototype = { + call$2($self, unit) { + return $self.hasUnit$1(unit); + }, + $signature: 236 + }; + A.numberClass__closure11.prototype = { + call$2($self, unit) { + return $self.get$hasUnits() && $self.compatibleWithUnit$1(unit); + }, + $signature: 236 + }; + A.numberClass__closure12.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + t2 = J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2); + return A.SassNumber_SassNumber$withUnits0($self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, t2, false, $name), t2, t1); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 237 + }; + A.numberClass__closure13.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 152 + }; + A.numberClass__closure14.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), false, $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 238 + }; + A.numberClass__closure15.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 239 + }; + A.numberClass__closure16.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerce$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 237 + }; + A.numberClass__closure17.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 152 + }; + A.numberClass__closure18.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerceValue$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 238 + }; + A.numberClass__closure19.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 239 + }; + A._ConstructorOptions0.prototype = {}; + A.SassNumber0.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._number1$_unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number1$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var integer = A.fuzzyAsInt0(this._number1$_value); + if (integer != null) + return integer; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + result = A.fuzzyCheckRange0(_this._number1$_value, min, max); + if (result != null) + return result; + throw A.wrapException(A.SassScriptException$0("Expected " + _this.toString$0(0) + " to be within " + A.S(min) + _this.get$unitString() + " and " + A.S(max) + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var result = A.fuzzyCheckRange0(this._number1$_value, min, max); + if (result != null) + return result; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = this.convertValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = this.coerceValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var t1, otherHasUnits, t2, compatibilityException, oldNumerators, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number1$_value; + t1 = J.getInterceptor$asx(newNumerators); + otherHasUnits = t1.get$isNotEmpty(newNumerators) || J.get$isNotEmpty$asx(newDenominators); + if (coerceUnitless) + t2 = !_this.get$hasUnits() || !otherHasUnits; + else + t2 = false; + if (t2) + return _this._number1$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException0(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number1$_value; + t2 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + for (t1 = t1.get$iterator(newNumerators); t1.moveNext$0();) + A.removeFirstWhere0(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure3(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure4(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = J.get$iterator$ax(newDenominators); t1.moveNext$0();) + A.removeFirstWhere0(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure5(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure6(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return this.withValue$1(this._number1$_coerceUnits$2(other, A.number2__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_plus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_minus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value * other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value * other._number1$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value / other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value / other._number1$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy0(other); + }, + unaryPlus$0() { + return this; + }, + _number1$_coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number1$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _number1$_coerceUnits$2(other, operation) { + return this._number1$_coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var newNumerators, mutableOtherDenominators, t1, t2, _i, numerator, mutableDenominatorUnits, _this = this, _box_0 = {}; + _box_0.value = value; + if (_this.get$numeratorUnits(_this).length === 0) { + if (otherDenominators.length === 0 && !_this._number1$_areAnyConvertible$2(_this.get$denominatorUnits(_this), otherNumerators)) + return A.SassNumber_SassNumber$withUnits0(value, _this.get$denominatorUnits(_this), otherNumerators); + else if (_this.get$denominatorUnits(_this).length === 0) + return A.SassNumber_SassNumber$withUnits0(value, otherDenominators, otherNumerators); + } else if (otherNumerators.length === 0) + if (otherDenominators.length === 0) + return A.SassNumber_SassNumber$withUnits0(value, otherDenominators, _this.get$numeratorUnits(_this)); + else if (_this.get$denominatorUnits(_this).length === 0 && !_this._number1$_areAnyConvertible$2(_this.get$numeratorUnits(_this), otherDenominators)) + return A.SassNumber_SassNumber$withUnits0(value, otherDenominators, _this.get$numeratorUnits(_this)); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere0(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure3(_box_0, numerator), new A.SassNumber_multiplyUnits_closure4(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere0(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure5(_box_0, numerator), new A.SassNumber_multiplyUnits_closure6(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits0(t1, mutableDenominatorUnits, newNumerators); + }, + _number1$_areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure0(units2)); + }, + _number1$_unitString$2(numerators, denominators) { + var t2, + t1 = J.getInterceptor$asx(numerators); + if (t1.get$isEmpty(numerators)) { + t1 = J.getInterceptor$asx(denominators); + if (t1.get$isEmpty(denominators)) + return "no units"; + if (t1.get$length(denominators) === 1) + return J.$add$ansx(t1.get$single(denominators), "^-1"); + return "(" + t1.join$1(denominators, "*") + ")^-1"; + } + t2 = J.getInterceptor$asx(denominators); + if (t2.get$isEmpty(denominators)) + return t1.join$1(numerators, "*"); + return t1.join$1(numerators, "*") + "/" + t2.join$1(denominators, "*"); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (other instanceof A.SassNumber0) { + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals0(_this._number1$_value, other._number1$_value); + if (!B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number1$_value * _this._number1$_canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._number1$_canonicalMultiplier$1(other.get$denominatorUnits(other))); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _number1$_canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit0().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_U8AHF.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure0(), t1), true, t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _number1$_canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure0(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_K2BWj.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException0.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + t2 = J.getInterceptor$asx(t1); + if (t2.get$length(t1) === 1 && J.get$isEmpty$asx(_this.newDenominators)) { + type = $.$get$_typesByUnit0().$index(0, t2.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), B.JSString_methods._codeUnitAt$1(type, 0)) ? "an " + type : "a " + type; + t3 = B.Map_U8AHF.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t3 = _this.newDenominators; + unit = A.pluralize0("unit", t2.get$length(t1) + J.get$length$asx(t3), null); + t2 = _this.$this; + t3 = "Expected " + t2.toString$0(0) + " to have " + unit + " " + t2._number1$_unitString$2(t1, t3) + "."; + t1 = _this.name; + return new A.SassScriptException0(t1 == null ? t3 : "$" + t1 + ": " + t3); + } + }, + $signature: 494 + }; + A.SassNumber__coerceOrConvertValue_closure3.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor0(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber__coerceOrConvertValue_closure4.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure5.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor0(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber__coerceOrConvertValue_closure6.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure0.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 57 + }; + A.SassNumber_minus_closure0.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 57 + }; + A.SassNumber_multiplyUnits_closure3.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber_multiplyUnits_closure4.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure5.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 8 + }; + A.SassNumber_multiplyUnits_closure6.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure0.prototype = { + call$1(unit1) { + var innerMap = B.Map_K2BWj.$index(0, unit1); + if (innerMap == null) + return B.JSArray_methods.contains$1(this.units2, unit1); + return B.JSArray_methods.any$1(this.units2, innerMap.get$containsKey()); + }, + $signature: 8 + }; + A.SassNumber__canonicalizeUnitList_closure0.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit0().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_U8AHF.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 5 + }; + A.SassNumber__canonicalMultiplier_closure0.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 182 + }; + A.SupportsOperation0.prototype = { + toString$0(_) { + var _this = this; + return _this._operation0$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation0$_parenthesize$1(_this.right); + }, + _operation0$_parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + t1 = condition instanceof A.SupportsOperation0 && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParentSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.ParentStatement0.prototype = {$isAstNode0: 1, $isStatement0: 1}; + A.ParentStatement_closure0.prototype = { + call$1(child) { + var t1; + if (!(child instanceof A.VariableDeclaration0)) + if (!(child instanceof A.FunctionRule0)) + if (!(child instanceof A.MixinRule0)) + t1 = child instanceof A.ImportRule0 && B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure0()); + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + $signature: 226 + }; + A.ParentStatement__closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 227 + }; + A.ParenthesizedExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.Parser1.prototype = { + _parser0$_parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure0(this)); + }, + whitespace$0() { + do + this.whitespaceWithoutComments$0(); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var next, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + next = t1.peekChar$1(1); + if (next === 47) { + this.silentComment$0(); + return true; + } else if (next === 42) { + this.loudComment$0(); + return true; + } else + return false; + }, + expectWhitespace$0() { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$0(); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, first, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + A.Primitives_stringFromCharCode(45); + _this._parser0$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s20_); + else if (normalize && first === 95) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + } else if (first === 95 || A.isAlphabetic1(first) || first >= 128) + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (first === 92) + text._contents = t2 + A.S(_this.escape$1$identifierStart(true)); + else + t1.error$1(0, _s20_); + _this._parser0$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _parser0$_identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, next, second, t2; + for (t1 = this.scanner; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (unit && next === 45) { + second = t1.peekChar$1(1); + if (second != null) + if (second !== 46) + t2 = second >= 48 && second <= 57; + else + t2 = true; + else + t2 = false; + if (t2) + break; + text._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else if (normalize && next === 95) { + t1.readChar$0(); + text._contents += A.Primitives_stringFromCharCode(45); + } else { + if (next !== 95) { + if (!(next >= 97 && next <= 122)) + t2 = next >= 65 && next <= 90; + else + t2 = true; + t2 = t2 || next >= 128; + } else + t2 = true; + if (!t2) + t2 = next >= 48 && next <= 57 || next === 45; + else + t2 = true; + if (t2) + text._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 92) + text._contents += A.S(this.escape$0()); + else + break; + } + } + }, + _parser0$_identifierBody$1(text) { + return this._parser0$_identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, next, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (; true;) { + next = t1.peekChar$0(); + if (next === quote) { + t1.readChar$0(); + break; + } else if (next == null || next === 10 || next === 13 || next === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + else if (next === 92) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else + buffer._contents += A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + } else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, wroteNewline, next, start, end, t3, url, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + $label0$1: + for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + buffer._contents += A.S(_this.escape$1$identifierStart(true)); + wroteNewline = false; + break; + case 34: + case 39: + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = false; + break; + case 47: + if (t1.peekChar$1(1) === 42) { + t3 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 32: + case 9: + if (!wroteNewline) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) + buffer._contents += A.Primitives_stringFromCharCode(32); + t1.readChar$0(); + break; + case 10: + case 13: + case 12: + t3 = t1.peekChar$1(-1); + if (!(t3 === 10 || t3 === 13 || t3 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break; + case 40: + case 123: + case 91: + next.toString; + buffer._contents += A.Primitives_stringFromCharCode(next); + brackets.push(A.opposite0(t1.readChar$0())); + wroteNewline = false; + break; + case 41: + case 125: + case 93: + if (brackets.length === 0) + break $label0$1; + next.toString; + buffer._contents += A.Primitives_stringFromCharCode(next); + t1.expectChar$1(brackets.pop()); + wroteNewline = false; + break; + case 59: + if (brackets.length === 0) + break $label0$1; + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 117: + case 85: + url = _this.tryUrl$0(); + if (url != null) + buffer._contents += url; + else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + buffer._contents += _this.identifier$0(); + else + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, next, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$0(); + buffer = new A.StringBuffer(""); + buffer._contents = "" + "url("; + for (; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (next === 92) + buffer._contents += A.S(_this.escape$0()); + else { + if (next !== 37) + if (next !== 38) + if (next !== 35) + t2 = next >= 42 && next <= 126 || next >= 128; + else + t2 = true; + else + t2 = true; + else + t2 = true; + if (t2) + buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12) { + _this.whitespace$0(); + if (t1.peekChar$0() !== 41) + break; + } else if (next === 41) { + t2 = buffer._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + break; + } + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, first, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s25_); + else if (first === 10 || first === 13 || first === 12) + t1.error$1(0, _s25_); + else if (A.isHex0(first)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next == null || !A.isHex0(next)) + break; + value *= 16; + value += A.asHex0(t1.readChar$0()); + } + this.scanCharIf$1(A.character0__isWhitespace$closure()); + } else + value = t1.readChar$0(); + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.isAlphabetic1(t2) || t2 >= 128; + } else { + t2 = value; + t2 = t2 === 95 || A.isAlphabetic1(t2) || t2 >= 128 || A.isDigit0(t2) || t2 === 45; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + t1 = identifierStart && A.isDigit0(value); + else + t1 = true; + else + t1 = true; + if (t1) { + t1 = "" + A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor0(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor0(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches0(caseSensitive, char), + t2 = this.scanner, + next = t2.peekChar$0(); + if (next != null && t1.call$1(next)) { + t2.readChar$0(); + return true; + } else if (next === 92) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter0(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, first, second; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + first = t1.peekChar$1($forward); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic1(first) || first >= 128 || first === 92) + return true; + if (first !== 45) + return false; + second = t1.peekChar$1($forward + 1); + if (second == null) + return false; + return second === 95 || A.isAlphabetic1(second) || second >= 128 || second === 92 || second === 45; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) + t1 = next === 95 || A.isAlphabetic1(next) || next >= 128 || A.isDigit0(next) || next === 45 || next === 92; + else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._parser0$_consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + matchesIdentifier$1(text) { + var t1, t2, result, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + result = _this._parser0$_consumeIdentifier$2(text, false) && !_this.lookingAtIdentifierBody$0(); + t1.set$state(new A._SpanScannerState(t1, t2)); + return result; + }, + _parser0$_consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t1 = new A.ListIterator(t1, t1.get$length(t1)), t2 = A._instanceType(t1)._precomputed1; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = "Expected " + $name, t4 = t3 + ".", t5 = A._instanceType(t2)._precomputed1; t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t5._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t4, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t3, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace0(exception, trace); + }, + error$2($receiver, message, span) { + return this.error$3($receiver, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$z(error); + A.throwWithTrace0(new A.SourceSpanFormatException(error.get$source(), message, t1), stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, span, startPosition, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + span = J.get$span$z(error); + if (A.startsWithIgnoreCase0(error._span_exception$_message, "expected") && J.get$length$asx(span) === 0) { + startPosition = this._parser0$_firstNewlineBefore$1(J.get$start$z(span).offset); + if (!J.$eq$(startPosition, J.get$start$z(span).offset)) + span = J.get$file$x(span).span$2(0, startPosition, startPosition); + } + A.throwWithTrace0(new A.SassFormatException0(error._span_exception$_message, span), stackTrace); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _parser0$_firstNewlineBefore$1(position) { + var t1, lastNewline, codeUnit, + index = position - 1; + for (t1 = this.scanner.string, lastNewline = null; index >= 0;) { + codeUnit = B.JSString_methods.codeUnitAt$1(t1, index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + return lastNewline == null ? position : lastNewline; + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return position; + } + }; + A.Parser__parseIdentifier_closure0.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 30 + }; + A.Parser_scanIdentChar_matches0.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase0(t1, actual); + }, + $signature: 54 + }; + A.PlaceholderSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector0(this.name + suffix); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PlainCssCallable0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable0 && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isAsyncCallable0: 1, + $isCallable0: 1, + get$name(receiver) { + return this.name; + } + }; + A.PrefixedMapView0.prototype = { + get$keys(_) { + return new A._PrefixedKeys0(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) ? this._prefixed_map_view0$_map.$index(0, J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) && this._prefixed_map_view0$_map.containsKey$1(J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)); + } + }; + A._PrefixedKeys0.prototype = { + get$length(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._prefixed_map_view0$_view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return this.$this._prefixed_map_view0$_view._prefixed_map_view0$_prefix + key; + }, + $signature: 5 + }; + A.PseudoSelector0.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this._pseudo$__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure0(_this).call$0(); + _this._pseudo$__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._pseudo$__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix0(suffix); + return A.PseudoSelector$0(_this.name + suffix, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure0())) + return null; + } else if (compound.length === 1) { + other = B.JSArray_methods.get$first(compound); + if (!(other instanceof A.UniversalSelector0)) + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + else + t1 = false; + else + t1 = true; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, _this = this; + if (_this.super$SimpleSelector$isSuperselector0(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector0 && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen0(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector_2; + return A.compoundIsSuperselector0(A.CompoundSelector$0(A._setArrayType([_this], t1)), A.CompoundSelector$0(A._setArrayType([other], t1)), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector0 && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return (t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector)) >>> 0; + } + }; + A.PseudoSelector_specificity_closure0.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector0.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector0.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector0.prototype.get$specificity.call(t1); + } + }, + $signature: 12 + }; + A.PseudoSelector_specificity__closure1.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 240 + }; + A.PseudoSelector_specificity__closure2.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 240 + }; + A.PseudoSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector0) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 13 + }; + A.PublicMemberMapView0.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view0$_inner; + return J.where$1$ax(t1.get$keys(t1), A.utils0__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic0(key) && this._public_member_map_view0$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic0(key)) + return this._public_member_map_view0$_inner.$index(0, key); + return null; + } + }; + A.QualifiedName0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName0 && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.JSClass0.prototype = {}; + A.JSClassExtension_setCustomInspect_closure.prototype = { + call$4($self, _, __, ___) { + return this.inspect.call$1($self); + }, + call$3($self, _, __) { + return this.call$4($self, _, __, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 496 + }; + A.JSClassExtension_get_defineMethod_closure.prototype = { + call$2($name, body) { + J.get$$prototype$x(this._this)[$name] = A.allowInteropCaptureThisNamed($name, body); + return null; + }, + $signature: 241 + }; + A.JSClassExtension_get_defineGetter_closure.prototype = { + call$2($name, body) { + A.defineGetter(J.get$$prototype$x(this._this), $name, body, null); + return null; + }, + $signature: 241 + }; + A.RenderContext0.prototype = {}; + A.RenderContextOptions0.prototype = {}; + A.RenderContextResult0.prototype = {}; + A.RenderContextResultStats0.prototype = {}; + A.RenderOptions.prototype = {}; + A.RenderResult.prototype = {}; + A.RenderResultStats.prototype = {}; + A.ImporterResult0.prototype = { + get$sourceMapUrl(_) { + var t1 = this._result$_sourceMapUrl; + return t1 == null ? A.Uri_Uri$dataFromString(this.contents, B.C_Utf8Codec, null) : t1; + } + }; + A.ReturnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.main_printError.prototype = { + call$2(error, stackTrace) { + var t1 = this._box_0; + if (t1.printedError) + $.$get$stderr().writeln$0(); + t1.printedError = true; + t1 = $.$get$stderr(); + t1.writeln$1(error); + if (stackTrace != null) { + t1.writeln$0(); + t1.writeln$1(B.JSString_methods.trimRight$0(A.Trace_Trace$from(stackTrace).get$terse().toString$0(0))); + } + }, + $signature: 498 + }; + A.main_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = this.destination; + if (t1 != null && !this._box_0.options.get$emitErrorCss()) + A.deleteFile(t1); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + $signature: 1 + }; + A.SassParser0.prototype = { + get$currentIndentation() { + return this._sass0$_currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + do { + buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); + t4 = t3._contents += A.Primitives_stringFromCharCode(10); + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(A.character0__isNewline$closure())); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this; + if (!_this.atEndOfStatement$0()) + _this._sass0$_expectNewline$0(); + if (_this._sass0$_peekIndentation$0() <= _this._sass0$_currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._sass0$_nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 10 || next === 13 || next === 12; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._sass0$_peekIndentation$0() > this._sass0$_currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, start, next, t2, exception, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 117: + case 85: + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument0(); + } else + t1.set$state(start); + break; + case 39: + case 34: + return _this.super$StylesheetParser$importArgument0(); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + while (true) { + if (next != null) + if (next !== 44) + if (next !== 59) + t2 = !(next === 10 || next === 13 || next === 12); + else + t2 = false; + else + t2 = false; + else + t2 = false; + if (!t2) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, start.position); + span = t1.spanFrom$1(start); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([A.serializeValue0(new A.SassString0(url, true), true, true)], type$.JSArray_Object), span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._sass0$_peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._sass0$_currentIndentation; + startNextIndentation = _this._sass0$_nextIndentation; + startNextIndentationEnd = _this._sass0$_nextIndentationEnd; + _this._sass0$_readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._sass0$_currentIndentation = startIndentation; + _this._sass0$_nextIndentation = startNextIndentation; + _this._sass0$_nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement_2); + this._sass0$_whileIndentedLower$1(new A.SassParser_children_closure0(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, child, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first === 9 || first === 32) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement_2); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + child = this._sass0$_child$1(statement); + if (child != null) + statements.push(child); + this._sass0$_readIndentation$0(); + } + return statements; + }, + _sass0$_child$1(child) { + var _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 13: + case 10: + case 12: + return null; + case 36: + return _this.variableDeclarationWithoutNamespace$0(); + case 47: + switch (t1.peekChar$1(1)) { + case 47: + return _this._sass0$_silentComment$0(); + case 42: + return _this._sass0$_loudComment$0(); + default: + return child.call$0(); + } + default: + return child.call$0(); + } + }, + _sass0$_silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._sass0$_currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length; true;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._sass0$_currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + while (true) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._sass0$_peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._sass0$_peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._sass0$_readIndentation$0(); + break; + } + _this._sass0$_readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment0(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _sass0$_loudComment$0() { + var t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + "/*"; + parentIndentation = _this._sass0$_currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._sass0$_readIndentation$0(); + t7 = t3._contents += A.Primitives_stringFromCharCode(32); + } else { + end = t1._string_scanner$_position; + t7 = t3._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else { + t7 = t3._contents += "\n"; + t7 += " * "; + t3._contents = t7; + } + for (i = 3; i < _this._sass0$_currentIndentation - parentIndentation; ++i) { + t7 += A.Primitives_stringFromCharCode(32); + t3._contents = t7; + } + $label0$1: + for (; t1._string_scanner$_position !== t6;) + switch (t1.peekChar$0()) { + case 10: + case 13: + case 12: + break $label0$1; + case 35: + if (t1.peekChar$1(1) === 123) { + t7 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t7); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + default: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + if (_this._sass0$_peekIndentation$0() <= parentIndentation) + break; + for (; _this._sass0$_lookingAtDoubleNewline$0();) { + _this._sass0$_expectNewline$0(); + t7 = t3._contents += "\n"; + t3._contents = t7 + " *"; + } + _this._sass0$_readIndentation$0(); + } + t4 = t3._contents; + if (!B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), "*/")) + t3._contents += " */"; + return new A.LoudComment0(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); + }, + whitespaceWithoutComments$0() { + var t1, t2, next; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (next !== 9 && next !== 32) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + next = t1.readChar$0(); + if (next === 10 || next === 13 || next === 12) + t1.error$1(0, "expected */."); + if (next !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + _sass0$_expectNewline$0() { + var t1 = this.scanner; + switch (t1.peekChar$0()) { + case 59: + t1.error$1(0, string$.semico); + break; + case 13: + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + case 10: + case 12: + t1.readChar$0(); + return; + default: + t1.error$1(0, "expected newline."); + } + }, + _sass0$_lookingAtDoubleNewline$0() { + var nextChar, + t1 = this.scanner; + switch (t1.peekChar$0()) { + case 13: + nextChar = t1.peekChar$1(1); + if (nextChar === 10) { + t1 = t1.peekChar$1(2); + return t1 === 10 || t1 === 13 || t1 === 12; + } + return nextChar === 13 || nextChar === 12; + case 10: + case 12: + t1 = t1.peekChar$1(1); + return t1 === 10 || t1 === 13 || t1 === 12; + default: + return false; + } + }, + _sass0$_whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._sass0$_currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._sass0$_peekIndentation$0() > parentIndentation;) { + indentation = _this._sass0$_readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _sass0$_readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._sass0$_nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._sass0$_nextIndentation = _this._sass0$_peekIndentation$0(); + _this._sass0$_currentIndentation = currentIndentation; + t1 = _this._sass0$_nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._sass0$_nextIndentationEnd = _this._sass0$_nextIndentation = null; + return currentIndentation; + }, + _sass0$_peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, next, t4, _this = this, + cached = _this._sass0$_nextIndentation; + if (cached != null) + return cached; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(A.character0__isNewline$closure())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + t2 = nextIndentation.__late_helper$_name; + do { + containsSpace._value = containsTab._value = false; + nextIndentation._value = 0; + for (; true;) { + next = t1.peekChar$0(); + if (next === 32) + containsSpace._value = true; + else if (next === 9) + containsTab._value = true; + else + break; + t4 = nextIndentation._value; + if (t4 === nextIndentation) + A.throwExpression(A.LateError$localNI(t2)); + nextIndentation._value = t4 + 1; + t1.readChar$0(); + } + t4 = t1._string_scanner$_position; + if (t4 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t4); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(A.character0__isNewline$closure())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._sass0$_spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._sass0$_spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._sass0$_nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._sass0$_spaces == null) + _this._sass0$_spaces = containsSpace._readLocal$0(); + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + } + }; + A.SassParser_children_closure0.prototype = { + call$0() { + var parsedChild = this.$this._sass0$_child$1(this.child); + if (parsedChild != null) + this.children.push(parsedChild); + }, + $signature: 0 + }; + A._Exports.prototype = {}; + A._wrapMain_closure.prototype = { + call$1(_) { + return A._translateReturnValue(this.main.call$0()); + }, + $signature: 94 + }; + A._wrapMain_closure0.prototype = { + call$1(args) { + return A._translateReturnValue(this.main.call$1(A.List_List$from(type$.List_dynamic._as(args), true, type$.String))); + }, + $signature: 94 + }; + A.ScssParser0.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, next; + this.whitespaceWithoutComments$0(); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + next = t1.peekChar$0(); + if (next === 59 || next === 125) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + _this.logger.warn$3$deprecation$span(0, string$.x40elsei, true, t1.spanFrom$1(new A._SpanScannerState(t1, t3))); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$0(); + children = A._setArrayType([], type$.JSArray_Statement_2); + for (; true;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + children.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + children.push(child.call$0()); + break; + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + break; + } + }, + statements$1(statement) { + var t1, t2, child, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement_2); + _this.whitespaceWithoutComments$0(); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + statements.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + child = statement.call$0(); + if (child != null) + statements.push(child); + break; + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + default: + child = statement.call$0(); + if (child != null) + statements.push(child); + break; + } + return statements; + }, + _scss0$_silentComment$0() { + var t2, t3, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("//"); + t2 = t1.string.length; + do { + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.readChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + } + if (t1._string_scanner$_position === t2) + break; + _this.whitespaceWithoutComments$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment0(t1.substring$1(0, start.position), t1.spanFrom$1(start)); + }, + _scss0$_loudComment$0() { + var t3, t4, buffer, t5, endPosition, t6, result, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + "/*"; + for (; true;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 42: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + if (t1.peekChar$0() !== 47) + break; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._SpanScannerState(t1, t2).position; + t1 = new A._FileSpan(t5, t6, endPosition); + t1._FileSpan$3(t5, t6, endPosition); + t6 = type$.Object; + t5 = A.List_List$of(t4, true, t6); + t2 = t3._contents; + if (t2.length !== 0) + t5.push(t2.charCodeAt(0) == 0 ? t2 : t2); + result = A.List_List$from(t5, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation0(result, t1); + t2.Interpolation$20(t5, t1); + return new A.LoudComment0(t2); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) + t3._contents += A.Primitives_stringFromCharCode(10); + break; + case 12: + t1.readChar$0(); + t3._contents += A.Primitives_stringFromCharCode(10); + break; + default: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + } + }; + A.Selector0.prototype = { + assertNotBogus$1$name($name) { + var t1; + if (!this.accept$1(B._IsBogusVisitor_true0)) + return; + t1 = this.toString$0(0); + A.EvaluationContext_current0().warn$2$deprecation(0, "$" + $name + ": " + (t1 + string$.x20is_nov), true); + }, + toString$0(_) { + var visitor = A._SerializeVisitor$0(null, true, null, true, false, null, true); + this.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + } + }; + A._IsInvisibleVisitor2.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector0(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false0); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(placeholder) { + return true; + }, + visitPseudoSelector$1(pseudo) { + var t1, + selector = pseudo.selector; + if (selector == null) + return false; + if (pseudo.name === "not") + t1 = this.includeBogus && selector.accept$1(B._IsBogusVisitor_true0); + else + t1 = this.visitSelectorList$1(selector); + return t1; + } + }; + A._IsBogusVisitor0.prototype = { + visitComplexSelector$1(complex) { + var t2, t3, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = complex.leadingCombinators; + t3 = this.includeLeadingCombinator ? 0 : 1; + return t2.length > t3 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure0(this)); + } + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false0) : selector.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 51 + }; + A._IsUselessVisitor0.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure0(this)); + }, + visitPseudoSelector$1(pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 51 + }; + A.__IsBogusVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.SelectorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A._nest_closure0.prototype = { + call$1($arguments) { + var t1 = {}, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); + t1.first = true; + return new A.MappedListIterable(selectors, new A._nest__closure1(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._nest__closure2()).get$asSassList(); + }, + $signature: 22 + }; + A._nest__closure1.prototype = { + call$1(selector) { + var t1 = this._box_0, + result = A.SassApiValue_assertSelector0(selector, !t1.first, null); + t1.first = false; + return result; + }, + $signature: 242 + }; + A._nest__closure2.prototype = { + call$2($parent, child) { + return child.resolveParentSelectors$1($parent); + }, + $signature: 243 + }; + A._append_closure1.prototype = { + call$1($arguments) { + var selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); + return new A.MappedListIterable(selectors, new A._append__closure1(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._append__closure2()).get$asSassList(); + }, + $signature: 22 + }; + A._append__closure1.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector0(selector, false, null); + }, + $signature: 242 + }; + A._append__closure2.prototype = { + call$2($parent, child) { + var t1 = child.components; + return A.SelectorList$0(new A.MappedListIterable(t1, new A._append___closure0($parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>"))).resolveParentSelectors$1($parent); + }, + $signature: 243 + }; + A._append___closure0.prototype = { + call$1(complex) { + var t1, component, newCompound, t2; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", null)); + t1 = complex.components; + component = B.JSArray_methods.get$first(t1); + newCompound = A._prependParent0(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", null)); + t2 = A._setArrayType([new A.ComplexSelectorComponent0(newCompound, A.List_List$unmodifiable(component.combinators, type$.Combinator_2))], type$.JSArray_ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t2, A.SubListIterable$(t1, 1, null, A._arrayInstanceType(t1)._precomputed1)); + return A.ComplexSelector$0(B.List_empty13, t2, false); + }, + $signature: 69 + }; + A._extend_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_allTargets_allTargets0, A.EvaluationContext_current0().get$currentCallableSpan()).get$asSassList(); + }, + $signature: 22 + }; + A._replace_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_replace_replace0, A.EvaluationContext_current0().get$currentCallableSpan()).get$asSassList(); + }, + $signature: 22 + }; + A._unify_closure0.prototype = { + call$1($arguments) { + var selector2, result, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + result = selector1.unify$1(selector2); + return result == null ? B.C__SassNull0 : result.get$asSassList(); + }, + $signature: 3 + }; + A._isSuperselector_closure0.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector0(selector1.components, selector2.components) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 19 + }; + A._simpleSelectors_closure0.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector0(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$0(new A.MappedListIterable(t1, new A._simpleSelectors__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_rXA0, false); + }, + $signature: 22 + }; + A._simpleSelectors__closure0.prototype = { + call$1(simple) { + return new A.SassString0(A.serializeSelector0(simple, true), false); + }, + $signature: 501 + }; + A._parse_closure0.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector0(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 22 + }; + A.SelectorParser0.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure0(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure0(this)); + }, + _selector$_selectorList$0() { + var t3, t4, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._sourceFile, + previousLine = t2.getLine$1(t1._string_scanner$_position), + components = A._setArrayType([_this._selector$_complexSelector$0()], type$.JSArray_ComplexSelector_2); + _this.whitespace$0(); + for (t3 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (t1.peekChar$0() === 44) + continue; + t4 = t1._string_scanner$_position; + if (t4 === t3) + break; + lineBreak = t2.getLine$1(t4) !== previousLine; + if (lineBreak) + previousLine = t2.getLine$1(t1._string_scanner$_position); + components.push(_this._selector$_complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$0(components); + }, + _selector$_complexSelector$1$lineBreak(lineBreak) { + var t2, t3, t4, lastCompound, initialCombinators, next, t5, result, _this = this, + t1 = type$.JSArray_Combinator_2, + combinators = A._setArrayType([], t1), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + $label0$1: + for (t2 = _this.scanner, t3 = B.Set_2Vk2._map, t4 = type$.Combinator_2, lastCompound = null, initialCombinators = null; true;) { + _this.whitespace$0(); + next = t2.peekChar$0(); + switch (next) { + case 43: + t2.readChar$0(); + combinators.push(B.Combinator_4QF0); + break; + case 62: + t2.readChar$0(); + combinators.push(B.Combinator_Cht0); + break; + case 126: + t2.readChar$0(); + combinators.push(B.Combinator_Htt0); + break; + default: + if (next != null) + t5 = !t3.containsKey$1(next) && !_this.lookingAtIdentifier$0(); + else + t5 = true; + if (t5) + break $label0$1; + if (lastCompound != null) { + result = A.List_List$from(combinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + components.push(new A.ComplexSelectorComponent0(lastCompound, result)); + } else if (combinators.length !== 0) + initialCombinators = combinators; + lastCompound = _this._selector$_compoundSelector$0(); + combinators = A._setArrayType([], t1); + if (t2.peekChar$0() === 38) + t2.error$1(0, string$.x22x26__ma); + break; + } + } + if (lastCompound != null) + components.push(new A.ComplexSelectorComponent0(lastCompound, A.List_List$unmodifiable(combinators, t4))); + else if (combinators.length !== 0) + initialCombinators = combinators; + else + t2.error$1(0, "expected selector."); + return A.ComplexSelector$0(initialCombinators == null ? B.List_empty13 : initialCombinators, components, lineBreak); + }, + _selector$_complexSelector$0() { + return this._selector$_complexSelector$1$lineBreak(false); + }, + _selector$_compoundSelector$0() { + var t2, + components = A._setArrayType([this._selector$_simpleSelector$0()], type$.JSArray_SimpleSelector_2), + t1 = this.scanner; + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 === 42 || t2 === 91 || t2 === 46 || t2 === 35 || t2 === 37 || t2 === 58)) + break; + components.push(this._selector$_simpleSelector$1$allowParent(false)); + } + return A.CompoundSelector$0(components); + }, + _selector$_simpleSelector$1$allowParent(allowParent) { + var $name, text, t2, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._selector$_allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._selector$_attributeSelector$0(); + case 46: + t1.expectChar$1(46); + return new A.ClassSelector0(_this.identifier$0()); + case 35: + t1.expectChar$1(35); + return new A.IDSelector0(_this.identifier$0()); + case 37: + t1.expectChar$1(37); + $name = _this.identifier$0(); + if (!_this._selector$_allowPlaceholder) + _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); + return new A.PlaceholderSelector0($name); + case 58: + return _this._selector$_pseudoSelector$0(); + case 38: + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._parser0$_identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t2 = text._contents; + suffix = t2.charCodeAt(0) == 0 ? t2 : t2; + } else + suffix = null; + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); + return new A.ParentSelector0(suffix); + default: + return _this._selector$_typeOrUniversalSelector$0(); + } + }, + _selector$_simpleSelector$0() { + return this._selector$_simpleSelector$1$allowParent(null); + }, + _selector$_attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner; + t1.expectChar$1(91); + _this.whitespace$0(); + $name = _this._selector$_attributeName$0(); + _this.whitespace$0(); + if (t1.scanChar$1(93)) + return new A.AttributeSelector0($name, _null, _null, _null); + operator = _this._selector$_attributeOperator$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + modifier = next != null && A.isAlphabetic1(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector0($name, operator, value, modifier); + }, + _selector$_attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName0(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName0(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName0(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName0(_this.identifier$0(), nameOrNamespace); + }, + _selector$_attributeOperator$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_ES60; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_r600; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_ivT0; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_eot0; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_BGd0; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_8aB0; + default: + t1.error$2$position(0, 'Expected "]".', t2); + } + }, + _selector$_pseudoSelector$0() { + var element, $name, unvendored, selector, argument, t2, _this = this, _null = null, + t1 = _this.scanner; + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$0($name, _null, element, _null); + _this.whitespace$0(); + unvendored = A.unvendor0($name); + if (element) + if ($._selectorPseudoElements0.contains$1(0, unvendored)) { + selector = _this._selector$_selectorList$0(); + argument = _null; + } else { + argument = _this.declarationValue$1$allowEmpty(true); + selector = _null; + } + else if ($._selectorPseudoClasses0.contains$1(0, unvendored)) { + selector = _this._selector$_selectorList$0(); + argument = _null; + } else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._selector$_aNPlusB$0(); + _this.whitespace$0(); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$0(); + selector = _this._selector$_selectorList$0(); + } else + selector = _null; + } else { + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + selector = _null; + } + t1.expectChar$1(41); + return A.PseudoSelector$0($name, argument, element, selector); + }, + _selector$_aNPlusB$0() { + var t2, first, t3, next, last, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 101: + case 69: + _this.expectIdentifier$1("even"); + return "even"; + case 111: + case 79: + _this.expectIdentifier$1("odd"); + return "odd"; + case 43: + case 45: + t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + default: + t2 = ""; + } + first = t1.peekChar$0(); + if (first != null && A.isDigit0(first)) { + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + _this.whitespace$0(); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$0(); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$0(); + last = t1.peekChar$0(); + if (last == null || !A.isDigit0(last)) + t1.error$1(0, "Expected a number."); + while (true) { + t3 = t1.peekChar$0(); + if (!(t3 != null && t3 >= 48 && t3 <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _selector$_typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + first = t1.peekChar$0(); + if (first === 42) { + t1.readChar$0(); + if (!t1.scanChar$1(124)) + return new A.UniversalSelector0(null); + if (t1.scanChar$1(42)) + return new A.UniversalSelector0("*"); + else + return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), "*")); + } else if (first === 124) { + t1.readChar$0(); + if (t1.scanChar$1(42)) + return new A.UniversalSelector0(""); + else + return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), "")); + } + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector0(new A.QualifiedName0(nameOrNamespace, null)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector0(nameOrNamespace); + else + return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), nameOrNamespace)); + } + }; + A.SelectorParser_parse_closure0.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selector$_selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 50 + }; + A.SelectorParser_parseCompoundSelector_closure0.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._selector$_compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 502 + }; + A.serialize_closure0.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 54 + }; + A._SerializeVisitor0.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, t7, t8, previous, previous0, t9, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._serialize0$_inspect, t3 = _this._serialize0$_style === B.OutputStyle_10, t4 = !t3, t5 = type$.CssComment_2, t6 = type$.CssParentNode_2, t7 = _this._serialize0$_buffer, t8 = _this._lineFeed.text, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t9 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t9 = false; + if (t9) + continue; + if (previous != null) { + if (t6._is(previous) ? previous.get$isChildless() : !t5._is(previous)) + t7.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, previous)) { + if (t4) + t7.writeCharCode$1(32); + } else { + if (t4) + t7.write$1(0, t8); + if (previous.get$isGroupEnd()) + if (t4) + t7.write$1(0, t8); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t6._is(previous) ? previous.get$isChildless() : !t5._is(previous)) && t4; + else + t1 = false; + if (t1) + t7.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure0(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure0(_this, node)); + if (!node.isChildless) { + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._serialize0$_writeIndentation$0(); + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure0(this, node)); + }, + _serialize0$_writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._serialize0$_style !== B.OutputStyle_10 || B.JSString_methods._codeUnitAt$1(url, 0) !== 117) { + _this._serialize0$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = B.JSString_methods._codeUnitAt$1(urlContents, 0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize0$_buffer.write$1(0, urlContents); + else + _this._serialize0$_visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + _serialize0$_visitMediaQuery$1(query) { + var t2, condition, operator, t3, _this = this, + t1 = query.modifier; + if (t1 != null) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(32); + } + t1 = query.type; + if (t1 != null) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, t1); + if (query.conditions.length !== 0) + t2.write$1(0, " and "); + } + t1 = query.conditions; + if (t1.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t1), "(not ")) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, "not "); + condition = B.JSArray_methods.get$first(t1); + t2.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t2 = _this._serialize0$_style === B.OutputStyle_10 ? operator + " " : " " + operator + " "; + t3 = _this._serialize0$_buffer; + _this._serialize0$_writeBetween$3(t1, t2, t3.get$write(t3)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssStyleRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = node.name; + _this._serialize0$_write$1(t1); + t2 = _this._serialize0$_buffer; + t2.writeCharCode$1(58); + if (J.startsWith$1$s(t1.get$value(t1), "--") && node.parsedAsCustomProperty) { + t1 = node.value; + t2.forSpan$2(t1.get$span(t1), new A._SerializeVisitor_visitCssDeclaration_closure1(_this, node)); + } else { + if (_this._serialize0$_style !== B.OutputStyle_10) + t2.writeCharCode$1(32); + try { + t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure2(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.message; + t2 = node.value; + t2 = t2.get$span(t2); + A.throwWithTrace0(new A.MultiSpanSassException0(error.primaryLabel, A.ConstantMap_ConstantMap$from(error.secondarySpans, type$.FileSpan, type$.String), t1, t2), stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = node.value; + A.throwWithTrace0(new A.SassException0(error0.message, t1.get$span(t1)), stackTrace0); + } else + throw exception; + } + } + }, + _serialize0$_writeFoldedValue$1(node) { + var t2, next, t3, + t1 = node.value, + scanner = A.StringScanner$(type$.SassString_2._as(t1.get$value(t1))._string0$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize0$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + while (true) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _serialize0$_writeReindentedValue$1(node) { + var _this = this, + t1 = node.value, + value = type$.SassString_2._as(t1.get$value(t1))._string0$_text, + minimumIndentation = _this._serialize0$_minimumIndentation$1(value); + if (minimumIndentation == null) { + _this._serialize0$_buffer.write$1(0, value); + return; + } else if (minimumIndentation === -1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, A.trimAsciiRight0(value, true)); + t1.writeCharCode$1(32); + return; + } + t1 = node.name; + t1 = t1.get$span(t1); + t1 = t1.get$start(t1); + _this._serialize0$_writeWithIndent$2(value, Math.min(minimumIndentation, t1.file.getColumn$1(t1.offset))); + }, + _serialize0$_minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + for (; scanner._string_scanner$_position !== t1;) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _serialize0$_writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize0$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (; true;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1; true;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 32 || character === 9) + continue; + if (character !== 10) + break; + lineStart = scanner._string_scanner$_position; + ++newlines; + } + this._serialize0$_writeTimes$2(10, newlines); + this._serialize0$_writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (; true;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + _serialize0$_writeCalculationValue$1(value) { + var left, parenthesizeLeft, operatorWhitespace, t1, t2, right, parenthesizeRight, _this = this; + if (value instanceof A.Value0) + value.accept$1(_this); + else if (value instanceof A.CalculationInterpolation0) + _this._serialize0$_buffer.write$1(0, value.value); + else if (value instanceof A.CalculationOperation0) { + left = value.left; + if (!(left instanceof A.CalculationInterpolation0)) + parenthesizeLeft = left instanceof A.CalculationOperation0 && left.operator.precedence < value.operator.precedence; + else + parenthesizeLeft = true; + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._serialize0$_style !== B.OutputStyle_10 || value.operator.precedence === 1; + if (operatorWhitespace) + _this._serialize0$_buffer.writeCharCode$1(32); + t1 = _this._serialize0$_buffer; + t2 = value.operator; + t1.write$1(0, t2.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + right = value.right; + if (!(right instanceof A.CalculationInterpolation0)) + parenthesizeRight = right instanceof A.CalculationOperation0 && _this._serialize0$_parenthesizeCalculationRhs$2(t2, right.operator); + else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + }, + _serialize0$_parenthesizeCalculationRhs$2(outer, right) { + if (outer === B.CalculationOperator_OvN0) + return true; + if (outer === B.CalculationOperator_IyK0) + return false; + return right === B.CalculationOperator_IyK0 || right === B.CalculationOperator_2bx0; + }, + _serialize0$_writeRgb$1(value) { + var t3, + t1 = value._color1$_alpha, + opaque = A.fuzzyEquals0(t1, 1), + t2 = this._serialize0$_buffer; + t2.write$1(0, opaque ? "rgb(" : "rgba("); + t2.write$1(0, value.get$red(value)); + t3 = this._serialize0$_style === B.OutputStyle_10; + t2.write$1(0, t3 ? "," : ", "); + t2.write$1(0, value.get$green(value)); + t2.write$1(0, t3 ? "," : ", "); + t2.write$1(0, value.get$blue(value)); + if (!opaque) { + t2.write$1(0, t3 ? "," : ", "); + this._serialize0$_writeNumber$1(t1); + } + t2.writeCharCode$1(41); + }, + _serialize0$_canUseShortHex$1(color) { + var t1 = color.get$red(color); + if ((t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4)) { + t1 = color.get$green(color); + if ((t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4)) { + t1 = color.get$blue(color); + t1 = (t1 & 15) === B.JSInt_methods._shrOtherPositive$1(t1, 4); + } else + t1 = false; + } else + t1 = false; + return t1; + }, + _serialize0$_writeHexComponent$1(color) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(A.hexCharFor0(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor0(color & 15)); + }, + visitList$1(value) { + var t2, t3, singleton, t4, t5, _this = this, + t1 = value._list1$_hasBrackets; + if (t1) + _this._serialize0$_buffer.writeCharCode$1(91); + else if (value._list1$_contents.length === 0) { + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0("() isn't a valid CSS value.", null)); + _this._serialize0$_buffer.write$1(0, "()"); + return; + } + t2 = _this._serialize0$_inspect; + if (t2) + if (value._list1$_contents.length === 1) { + t3 = value._list1$_separator; + t3 = t3 === B.ListSeparator_rXA0 || t3 === B.ListSeparator_zg90; + singleton = t3; + } else + singleton = false; + else + singleton = false; + if (singleton && !t1) + _this._serialize0$_buffer.writeCharCode$1(40); + t3 = value._list1$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure2(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._list1$_separator; + t5 = _this._serialize0$_separatorString$1(t4); + _this._serialize0$_writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure3(_this, value) : new A._SerializeVisitor_visitList_closure4(_this)); + if (singleton) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize0$_buffer.writeCharCode$1(93); + }, + _serialize0$_separatorString$1(separator) { + switch (separator) { + case B.ListSeparator_rXA0: + return this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + case B.ListSeparator_zg90: + return this._serialize0$_style === B.OutputStyle_10 ? "/" : " / "; + case B.ListSeparator_EVt0: + return " "; + default: + return ""; + } + }, + _serialize0$_elementNeedsParens$2(separator, value) { + var t1; + if (value instanceof A.SassList0) { + if (value._list1$_contents.length < 2) + return false; + if (value._list1$_hasBrackets) + return false; + switch (separator) { + case B.ListSeparator_rXA0: + return value._list1$_separator === B.ListSeparator_rXA0; + case B.ListSeparator_zg90: + t1 = value._list1$_separator; + return t1 === B.ListSeparator_rXA0 || t1 === B.ListSeparator_zg90; + default: + return value._list1$_separator !== B.ListSeparator_undecided_null_undecided0; + } + } + return false; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(40); + t2 = map._map0$_contents; + _this._serialize0$_writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure0(_this)); + t1.writeCharCode$1(41); + }, + _serialize0$_writeMapElement$1(value) { + var needsParens = value instanceof A.SassList0 && value._list1$_separator === B.ListSeparator_rXA0 && !value._list1$_hasBrackets; + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var _this = this, + asSlash = value.asSlash; + if (asSlash != null) { + _this.visitNumber$1(asSlash.item1); + _this._serialize0$_buffer.writeCharCode$1(47); + _this.visitNumber$1(asSlash.item2); + return; + } + _this._serialize0$_writeNumber$1(value._number1$_value); + if (!_this._serialize0$_inspect) { + if (value.get$numeratorUnits(value).length > 1 || value.get$denominatorUnits(value).length !== 0) + throw A.wrapException(A.SassScriptException$0(value.toString$0(0) + " isn't a valid CSS value.", null)); + if (value.get$numeratorUnits(value).length !== 0) + _this._serialize0$_buffer.write$1(0, B.JSArray_methods.get$first(value.get$numeratorUnits(value))); + } else + _this._serialize0$_buffer.write$1(0, value.get$unitString()); + }, + _serialize0$_writeNumber$1(number) { + var text, _this = this, + integer = A.fuzzyAsInt0(number); + if (integer != null) { + _this._serialize0$_buffer.write$1(0, _this._serialize0$_removeExponent$1(B.JSInt_methods.toString$0(integer))); + return; + } + text = _this._serialize0$_removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (text.length < 12) { + if (_this._serialize0$_style === B.OutputStyle_10 && B.JSString_methods._codeUnitAt$1(text, 0) === 48) + text = B.JSString_methods.substring$1(text, 1); + _this._serialize0$_buffer.write$1(0, text); + return; + } + _this._serialize0$_writeRounded$1(text); + }, + _serialize0$_removeExponent$1(text) { + var buffer, t3, additionalZeroes, + t1 = B.JSString_methods._codeUnitAt$1(text, 0), + negative = t1 === 45, + exponent = A._Cell$(), + t2 = text.length, + i = 0; + while (true) { + if (!(i < t2)) { + buffer = null; + break; + } + c$0: { + if (B.JSString_methods._codeUnitAt$1(text, i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t1 = buffer._contents = "" + A.Primitives_stringFromCharCode(t1); + if (negative) { + t1 += A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(text, 1)); + buffer._contents = t1; + if (i > 3) + buffer._contents = t1 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t1 + B.JSString_methods.substring$2(text, 2, i); + exponent._value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t2), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 += A.Primitives_stringFromCharCode(48); + buffer._contents = t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; + t2 = exponent.__late_helper$_name; + i = -1; + while (true) { + t3 = exponent._value; + if (t3 === exponent) + A.throwExpression(A.LateError$localNI(t2)); + if (!(i > t3)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _serialize0$_writeRounded$1(text) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex, t2, _this = this; + if (B.JSString_methods.endsWith$1(text, ".0")) { + _this._serialize0$_buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = B.JSString_methods._codeUnitAt$1(text, 0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + _this._serialize0$_buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = B.JSString_methods._codeUnitAt$1(text, textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + _this._serialize0$_buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = B.JSString_methods._codeUnitAt$1(text, textIndex) - 48; + } + if (B.JSString_methods._codeUnitAt$1(text, textIndex) - 48 >= 5) + for (; true; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + while (true) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + _this._serialize0$_buffer.writeCharCode$1(48); + return; + } + if (negative) + _this._serialize0$_buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = _this._serialize0$_style === B.OutputStyle_10 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (t2 = _this._serialize0$_buffer; writtenIndex < digitsIndex; ++writtenIndex) + t2.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + t2.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + t2.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _serialize0$_visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, newIndex, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize0$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(string, i); + switch (char) { + case 39: + if (forceDoubleQuote) + buffer.writeCharCode$1(39); + else { + if (includesDoubleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } else + buffer.writeCharCode$1(39); + includesSingleQuote = true; + } + break; + case 34: + if (forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + } else { + if (includesSingleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } else + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + } + break; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + _this._serialize0$_writeEscape$4(buffer, char, string, i); + break; + case 92: + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + break; + default: + newIndex = _this._serialize0$_tryPrivateUseCharacter$4(buffer, char, string, i); + if (newIndex != null) { + i = newIndex; + break; + } + buffer.writeCharCode$1(char); + break; + } + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _serialize0$_visitQuotedString$1(string) { + return this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, false); + }, + _serialize0$_visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, char, newIndex; + for (t1 = string.length, t2 = this._serialize0$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + char = B.JSString_methods._codeUnitAt$1(string, i); + switch (char) { + case 10: + t2.writeCharCode$1(32); + afterNewline = true; + break; + case 32: + if (!afterNewline) + t2.writeCharCode$1(32); + break; + default: + newIndex = this._serialize0$_tryPrivateUseCharacter$4(t2, char, string, i); + if (newIndex != null) { + i = newIndex; + afterNewline = false; + break; + } + t2.writeCharCode$1(char); + afterNewline = false; + break; + } + } + }, + _serialize0$_tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._serialize0$_style === B.OutputStyle_10) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._serialize0$_writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._serialize0$_writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (B.JSString_methods._codeUnitAt$1(string, t1) & 1023), string, t1); + return t1; + } + return null; + }, + _serialize0$_writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = B.JSString_methods._codeUnitAt$1(string, t1); + if (A.isHex0(next) || next === 32 || next === 9) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(attribute) { + var value, t2, + t1 = this._serialize0$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + value = attribute.value; + if (value != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier0(value) && !B.JSString_methods.startsWith$1(value, "--")) { + t1.write$1(0, value); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._serialize0$_visitQuotedString$1(value); + t2 = attribute.modifier; + if (t2 != null) + if (this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + } + if (t2 != null) + t1.write$1(0, t2); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(klass) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._serialize0$_writeCombinators$1(t1); + if (t1.length !== 0 && complex.components.length !== 0) + if (_this._serialize0$_style !== B.OutputStyle_10) + _this._serialize0$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize0$_buffer, t5 = _this._serialize0$_style === B.OutputStyle_10, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._serialize0$_writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _serialize0$_writeCombinators$1(combinators) { + var t1 = this._serialize0$_style === B.OutputStyle_10 ? "" : " ", + t2 = this._serialize0$_buffer; + return this._serialize0$_writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize0$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(id) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, t4, first, t5, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._serialize0$_inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure0(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._serialize0$_style !== B.OutputStyle_10, t3 = _this._serialize0$_buffer, t4 = _this._lineFeed.text, first = true; t1.moveNext$0();) { + t5 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t5.lineBreak) { + if (t2) + t3.write$1(0, t4); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t5); + } + }, + visitParentSelector$1($parent) { + var t2, + t1 = this._serialize0$_buffer; + t1.writeCharCode$1(38); + t2 = $parent.suffix; + if (t2 != null) + t1.write$1(0, t2); + }, + visitPlaceholderSelector$1(placeholder) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(pseudo) { + var t3, t4, t5, + innerSelector = pseudo.selector, + t1 = innerSelector == null, + t2 = !t1; + if (t2 && pseudo.name === "not" && innerSelector.accept$1(B._IsInvisibleVisitor_true0)) + return; + t3 = this._serialize0$_buffer; + t3.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t3.writeCharCode$1(58); + t3.write$1(0, pseudo.name); + t4 = pseudo.argument; + t5 = t4 == null; + if (t5 && t1) + return; + t3.writeCharCode$1(40); + if (!t5) { + t3.write$1(0, t4); + if (t2) + t3.writeCharCode$1(32); + } + if (t2) + this.visitSelectorList$1(innerSelector); + t3.writeCharCode$1(41); + }, + visitTypeSelector$1(type) { + this._serialize0$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize0$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize0$_buffer.writeCharCode$1(42); + }, + _serialize0$_write$1(value) { + return this._serialize0$_buffer.forSpan$2(value.get$span(value), new A._SerializeVisitor__write_closure0(this, value)); + }, + _serialize0$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, t8, t9, prePrevious, previous, t10, previous0, t11, savedIndentation, _this = this, + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t2 = new A.ListIterator(t2, t2.get$length(t2)), t3 = _this._serialize0$_style === B.OutputStyle_10, t4 = !t3, t5 = !_this._serialize0$_inspect, t6 = A._instanceType(t2)._precomputed1, t7 = type$.CssComment_2, t8 = type$.CssParentNode_2, t9 = _this._lineFeed.text, prePrevious = null, previous = null; t2.moveNext$0();) { + t10 = t2.__internal$_current; + previous0 = t10 == null ? t6._as(t10) : t10; + if (t5) + t10 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t10 = false; + if (t10) + continue; + t10 = previous == null; + if (!t10) + t11 = t8._is(previous) ? previous.get$isChildless() : !t7._is(previous); + else + t11 = false; + if (t11) + t1.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, t10 ? $parent : previous)) { + if (t4) + t1.writeCharCode$1(32); + savedIndentation = _this._serialize0$_indentation; + _this._serialize0$_indentation = 0; + new A._SerializeVisitor__visitChildren_closure1(_this, previous0).call$0(); + _this._serialize0$_indentation = savedIndentation; + } else { + if (t4) + t1.write$1(0, t9); + ++_this._serialize0$_indentation; + new A._SerializeVisitor__visitChildren_closure2(_this, previous0).call$0(); + --_this._serialize0$_indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((t8._is(previous) ? previous.get$isChildless() : !t7._is(previous)) && t4) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._serialize0$_isTrailingComment$2(previous, $parent)) { + if (t4) + t1.writeCharCode$1(32); + } else { + _this._serialize0$_writeLineFeed$0(); + _this._serialize0$_writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _serialize0$_isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._serialize0$_style === B.OutputStyle_10) + return false; + if (!type$.CssComment_2._is(node)) + return false; + t1 = previous.get$span(previous); + t2 = node.span; + if (!(J.$eq$(t1.get$file(t1).url, t2.get$file(t2).url) && t1.get$start(t1).offset <= t2.get$start(t2).offset && t1.get$end(t1).offset >= t2.get$end(t2).offset)) { + t1 = t2.get$start(t2); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t1 = t2.get$start(t2); + t3 = previous.get$span(previous); + searchFrom = t1.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t1 = previous.get$span(previous); + t1 = t1.get$file(t1); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t1.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t2 = t2.get$start(t2); + t2 = t2.file.getLine$1(t2.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t2 === t4.file.getLine$1(t4.offset); + }, + _serialize0$_writeLineFeed$0() { + if (this._serialize0$_style !== B.OutputStyle_10) + this._serialize0$_buffer.write$1(0, this._lineFeed.text); + }, + _serialize0$_writeIndentation$0() { + var _this = this; + if (_this._serialize0$_style === B.OutputStyle_10) + return; + _this._serialize0$_writeTimes$2(_this._serialize0$_indentCharacter, _this._serialize0$_indentation * _this._serialize0$_indentWidth); + }, + _serialize0$_writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize0$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _serialize0$_writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize0$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _serialize0$_writeBetween$3(iterable, text, callback) { + return this._serialize0$_writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure0.prototype = { + call$0() { + var t2, t3, minimumIndentation, + t1 = this.$this; + if (t1._serialize0$_style === B.OutputStyle_10 && B.JSString_methods._codeUnitAt$1(this.node.text, 2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + minimumIndentation = t1._serialize0$_minimumIndentation$1(t3); + if (minimumIndentation == null) { + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_buffer.write$1(0, t3); + return; + } + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(minimumIndentation, t2.file.getColumn$1(t2.offset)); + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_writeWithIndent$2(t3, minimumIndentation); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure0.prototype = { + call$0() { + var t3, value, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize0$_write$1(t3.name); + value = t3.value; + if (value != null) { + t2.writeCharCode$1(32); + t1._serialize0$_write$1(value); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure0.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._serialize0$_style === B.OutputStyle_10; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); + } else + t5 = true; + else + t5 = true; + else + t5 = true; + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._serialize0$_writeBetween$3(t3, t2, t1.get$_serialize0$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure0.prototype = { + call$0() { + var t3, t4, t5, modifiers, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@import"); + t3 = t1._serialize0$_style !== B.OutputStyle_10; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t5 = t4.url; + t2.forSpan$2(t5.get$span(t5), new A._SerializeVisitor_visitCssImport__closure0(t1, t4)); + modifiers = t4.modifiers; + if (modifiers != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, modifiers); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure0.prototype = { + call$0() { + var t1 = this.node.url; + return this.$this._serialize0$_writeImportUrl$1(t1.get$value(t1)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_style === B.OutputStyle_10 ? "," : ", ", + t3 = t1._serialize0$_buffer; + return t1._serialize0$_writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure0.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node.selector.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._serialize0$_style === B.OutputStyle_10 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) + t2.writeCharCode$1(32); + t1._serialize0$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._serialize0$_style === B.OutputStyle_10) + t1._serialize0$_writeFoldedValue$1(t2); + else + t1._serialize0$_writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure2.prototype = { + call$0() { + var t1 = this.node.value; + return t1.get$value(t1).accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure2.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 44 + }; + A._SerializeVisitor_visitList_closure3.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._serialize0$_elementNeedsParens$2(this.value._list1$_separator, element); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(41); + }, + $signature: 56 + }; + A._SerializeVisitor_visitList_closure4.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 56 + }; + A._SerializeVisitor_visitMap_closure0.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._serialize0$_writeMapElement$1(entry.key); + t1._serialize0$_buffer.write$1(0, ": "); + t1._serialize0$_writeMapElement$1(entry.value); + }, + $signature: 504 + }; + A._SerializeVisitor_visitSelectorList_closure0.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true0); + }, + $signature: 15 + }; + A._SerializeVisitor__write_closure0.prototype = { + call$0() { + var t1 = this.value; + return this.$this._serialize0$_buffer.write$1(0, t1.get$value(t1)); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure1.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure2.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle0.prototype = { + toString$0(_) { + return "OutputStyle." + this._name; + } + }; + A.LineFeed0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.SerializeResult0.prototype = {}; + A.ShadowedModuleView0.prototype = { + get$url(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$css(t1); + }, + get$transitivelyContainsCss() { + return this._shadowed_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + else + return this._shadowed_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view0$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (other instanceof A.ShadowedModuleView0) + if (_this._shadowed_view0$_inner.$eq(0, other._shadowed_view0$_inner)) { + t1 = _this.variables; + t1 = t1.get$keys(t1); + t2 = other.variables; + if (B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2))) { + t1 = _this.functions; + t1 = t1.get$keys(t1); + t2 = other.functions; + if (B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + else + t1 = false; + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView0(_this._shadowed_view0$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view0$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.SilentComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.SimpleSelector0.prototype = { + get$specificity() { + return 1000; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.SassScriptException$0('Invalid parent selector "' + this.toString$0(0) + '"', null)); + }, + unify$1(compound) { + var other, t1, result, addedThis, _i, simple, _this = this; + if (compound.length === 1) { + other = B.JSArray_methods.get$first(compound); + if (!(other instanceof A.UniversalSelector0)) + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + else + t1 = false; + else + t1 = true; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector0) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector0 && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos0.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure0(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure0.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure0(this.$this)); + }, + $signature: 15 + }; + A.SimpleSelector_isSuperselector__closure0.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 13 + }; + A.SingleUnitSassNumber0.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._single_unit$_unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, this._number1$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber_2)); + }, + hasUnit$1(unit) { + return unit === this._single_unit$_unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber0 && A.conversionFactor0(this._single_unit$_unit, other._single_unit$_unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber0)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit0(); + knownCompatibilities = t1.$index(0, this._single_unit$_unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._single_unit$_unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor0(this._single_unit$_unit, unit) != null; + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceToMatch(other, $name, otherName) : t1; + }, + coerceValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch0(other, $name, otherName) : t1; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertToMatch(other, $name, otherName) : t1; + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : t1; + }, + coerce$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerce0(newNumerators, newDenominators, $name) : t1; + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceValueToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerceValue0(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._single_unit$_coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit0(unit, $name) : t1; + }, + _single_unit$_coerceToUnit$1(unit) { + var t1 = this._single_unit$_unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen0(A.conversionFactor0(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure0(this, unit)); + }, + _single_unit$_coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen0(A.conversionFactor0(unit, this._single_unit$_unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure0(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere0(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure1(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure2(t1, this)); + return A.SassNumber_SassNumber$withUnits0(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, -this._number1$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber0) { + factor = A.conversionFactor0(other._single_unit$_unit, this._single_unit$_unit); + return factor != null && A.fuzzyEquals0(this._number1$_value * factor, other._number1$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this.canonicalMultiplierForUnit$1(_this._single_unit$_unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure0.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber0(this.unit, this.$this._number1$_value * factor, null); + }, + $signature: 505 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure0.prototype = { + call$1(factor) { + return this.$this._number1$_value * factor; + }, + $signature: 29 + }; + A.SingleUnitSassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(denominator, this.$this._single_unit$_unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 8 + }; + A.SingleUnitSassNumber_multiplyUnits_closure2.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._single_unit$_unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.SourceMapBuffer0.prototype = { + get$_source_map_buffer0$_targetLocation() { + var t1 = this._source_map_buffer0$_buffer._contents, + t2 = this._source_map_buffer0$_line; + return A.SourceLocation$(t1.length, this._source_map_buffer0$_column, t2, null); + }, + get$length(_) { + return this._source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._source_map_buffer0$_inSpan; + _this._source_map_buffer0$_inSpan = true; + _this._source_map_buffer0$_addEntry$2(span.get$start(span), _this.get$_source_map_buffer0$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._source_map_buffer0$_inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _source_map_buffer0$_addEntry$2(source, target) { + var entry, t2, + t1 = this._source_map_buffer0$_entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer0$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1(string, i) === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + writeCharCode$1(charCode) { + this._source_map_buffer0$_buffer._contents += A.Primitives_stringFromCharCode(charCode); + if (charCode === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + _source_map_buffer0$_writeLine$0() { + var _this = this, + t1 = _this._source_map_buffer0$_entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._source_map_buffer0$_line && B.JSArray_methods.get$last(t1).target.column === _this._source_map_buffer0$_column) + t1.pop(); + ++_this._source_map_buffer0$_line; + _this._source_map_buffer0$_column = 0; + if (_this._source_map_buffer0$_inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_source_map_buffer0$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._source_map_buffer0$_entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (B.JSString_methods._codeUnitAt$1(prefix, i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._source_map_buffer0$_entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure0(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure0.prototype = { + call$1(entry) { + var t1 = entry.source, + t2 = entry.target, + t3 = t2.line, + t4 = this._box_0, + t5 = t4.prefixLines; + t4 = t3 === 0 ? t4.prefixColumn : 0; + return new A.Entry(t1, A.SourceLocation$(t2.offset + this.prefixLength, t2.column + t4, t3 + t5, null), entry.identifierName); + }, + $signature: 175 + }; + A.updateSourceSpanPrototype_closure.prototype = { + call$1(span) { + return span.get$start(span); + }, + $signature: 244 + }; + A.updateSourceSpanPrototype_closure0.prototype = { + call$1(span) { + return span.get$end(span); + }, + $signature: 244 + }; + A.updateSourceSpanPrototype_closure1.prototype = { + call$1(span) { + return A.NullableExtension_andThen0(span.get$sourceUrl(span), A.utils1__dartToJSUrl$closure()); + }, + $signature: 507 + }; + A.updateSourceSpanPrototype_closure2.prototype = { + call$1(span) { + return span.get$text(); + }, + $signature: 245 + }; + A.updateSourceSpanPrototype_closure3.prototype = { + call$1(span) { + return span.get$context(span); + }, + $signature: 245 + }; + A.updateSourceSpanPrototype_closure4.prototype = { + call$1($location) { + return $location.get$line(); + }, + $signature: 246 + }; + A.updateSourceSpanPrototype_closure5.prototype = { + call$1($location) { + return $location.get$column(); + }, + $signature: 246 + }; + A.StatementSearchVisitor0.prototype = { + visitAtRootRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(node) { + return this.visitChildren$1(node.children); + }, + visitDebugRule$1(node) { + return null; + }, + visitDeclaration$1(node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitEachRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(node) { + return null; + }, + visitExtendRule$1(node) { + return null; + }, + visitForRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(node) { + return null; + }, + visitFunctionRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(node) { + var t1 = A._IterableExtension__search0(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure1(this)); + return t1 == null ? A.NullableExtension_andThen0(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure2(this)) : t1; + }, + visitImportRule$1(node) { + return null; + }, + visitIncludeRule$1(node) { + return A.NullableExtension_andThen0(node.content, this.get$visitContentBlock()); + }, + visitLoudComment$1(node) { + return null; + }, + visitMediaRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(node) { + return null; + }, + visitSilentComment$1(node) { + return null; + }, + visitStyleRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(node) { + return null; + }, + visitVariableDeclaration$1(node) { + return null; + }, + visitWarnRule$1(node) { + return null; + }, + visitWhileRule$1(node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A._IterableExtension__search0(children, new A.StatementSearchVisitor_visitChildren_closure0(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure1.prototype = { + call$1(clause) { + return A._IterableExtension__search0(clause.children, new A.StatementSearchVisitor_visitIfRule__closure2(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(IfClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure2.prototype = { + call$1(lastClause) { + return A._IterableExtension__search0(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure1(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(ElseClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StaticImport0.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isImport0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StderrLogger0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var t2, t3, t4, + t1 = this.color; + if (t1) { + t2 = $.$get$stderr0(); + t3 = t2._node$_stderr; + t4 = J.getInterceptor$x(t3); + t4.write$1(t3, "\x1b[33m\x1b[1m"); + if (deprecation) + t4.write$1(t3, "Deprecation "); + t4.write$1(t3, "Warning\x1b[0m"); + } else { + if (deprecation) + J.write$1$x($.$get$stderr0()._node$_stderr, "DEPRECATION "); + t2 = $.$get$stderr0(); + J.write$1$x(t2._node$_stderr, "WARNING"); + } + if (span == null) + t2.writeln$1(": " + message); + else if (trace != null) + t2.writeln$1(": " + message + "\n\n" + span.highlight$1$color(t1)); + else + t2.writeln$1(" on " + span.message$2$color(0, "\n" + message, t1)); + if (trace != null) + t2.writeln$1(A.indent0(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4)); + t2.writeln$0(); + }, + warn$1($receiver, message) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, null); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + var url, t3, t4, + t1 = span.file, + t2 = span._file$_start; + if (A.FileLocation$_(t1, t2).file.url == null) + url = "-"; + else { + t3 = A.FileLocation$_(t1, t2); + url = $.$get$context().prettyUri$1(t3.file.url); + } + t3 = $.$get$stderr0(); + t2 = A.FileLocation$_(t1, t2); + t2 = t2.file.getLine$1(t2.offset); + t1 = t3._node$_stderr; + t4 = J.getInterceptor$x(t1); + t4.write$1(t1, url + ":" + (t2 + 1) + " "); + t4.write$1(t1, this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"); + t3.writeln$1(": " + message); + } + }; + A.StringExpression0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, buffer, t5, t6, _i, value; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote0(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + A.Primitives_stringFromCharCode(quote); + for (t5 = t2.length, t6 = type$.Expression_2, _i = 0; _i < t5; ++_i) { + value = t2[_i]; + if (t6._is(value)) { + buffer._interpolation_buffer0$_flushText$0(); + t4.push(value); + } else if (typeof value == "string") + A.StringExpression__quoteInnerText0(value, quote, buffer, $static); + } + t3._contents += A.Primitives_stringFromCharCode(quote); + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + }, + $isExpression0: 1, + $isAstNode0: 1 + }; + A._unquote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, false); + }, + $signature: 17 + }; + A._quote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, true); + }, + $signature: 17 + }; + A._length_closure1.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).assertString$1("string").get$_string0$_sassLength(), null); + }, + $signature: 11 + }; + A._insert_closure0.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_string0$_sassLength() + indexInt + 2, 0); + t1 = string._string0$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex0(t1, A._codepointForIndex0(indexInt, string.get$_string0$_sassLength(), false)); + return new A.SassString0(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string0$_text), string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._index_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string0$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string0$_text); + if (codeUnitIndex === -1) + return B.C__SassNull0; + return A.SassNumber_SassNumber0(A.codeUnitIndexToCodepointIndex0(t2, codeUnitIndex) + 1, null); + }, + $signature: 3 + }; + A._slice_closure0.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_string0$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + startCodepoint = A._codepointForIndex0(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex0(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + t1 = string._string0$_text; + return new A.SassString0(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex0(t1, startCodepoint), A.codepointIndexToCodeUnitIndex0(t1, endCodepoint + 1)), string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._toUpperCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = B.JSString_methods._codeUnitAt$1(t1, i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._toLowerCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = B.JSString_methods._codeUnitAt$1(t1, i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._uniqueId_closure0.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId0() + ($.$get$_random1().nextInt$1(36) + 1); + $._previousUniqueId0 = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId0 = B.JSInt_methods.$mod($.$get$_previousUniqueId0(), A._asInt(Math.pow(36, 6))); + return new A.SassString0("u" + B.JSString_methods.padLeft$2(J.toRadixString$1$n($.$get$_previousUniqueId0(), 36), 6, "0"), false); + }, + $signature: 17 + }; + A._NodeSassString.prototype = {}; + A.legacyStringClass_closure.prototype = { + call$3(thisArg, value, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = new A.SassString0(value, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$3(thisArg, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 510 + }; + A.legacyStringClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._string0$_text; + }, + $signature: 511 + }; + A.legacyStringClass_closure1.prototype = { + call$2(thisArg, value) { + J.set$dartValue$x(thisArg, new A.SassString0(value, false)); + }, + $signature: 512 + }; + A.stringClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassString", new A.stringClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["text", new A.stringClass__closure0(), "hasQuotes", new A.stringClass__closure1(), "sassLength", new A.stringClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + J.get$$prototype$x(jsClass).sassIndexToStringIndex = A.allowInteropCaptureThisNamed("sassIndexToStringIndex", new A.stringClass__closure3()); + t2 = $.$get$_emptyQuoted0(); + A.JSClassExtension_injectSuperclass(t1._as(t2.constructor), jsClass); + return jsClass; + }, + $signature: 25 + }; + A.stringClass__closure.prototype = { + call$3($self, textOrOptions, options) { + var t1; + if (typeof textOrOptions == "string") { + t1 = options == null ? null : J.get$quotes$x(options); + t1 = new A.SassString0(textOrOptions, t1 == null ? true : t1); + } else { + type$.nullable__ConstructorOptions_3._as(textOrOptions); + t1 = textOrOptions == null ? null : J.get$quotes$x(textOrOptions); + t1 = (t1 == null ? true : t1) ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + } + return t1; + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, textOrOptions) { + return this.call$3($self, textOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 513 + }; + A.stringClass__closure0.prototype = { + call$1($self) { + return $self._string0$_text; + }, + $signature: 514 + }; + A.stringClass__closure1.prototype = { + call$1($self) { + return $self._string0$_hasQuotes; + }, + $signature: 515 + }; + A.stringClass__closure2.prototype = { + call$1($self) { + return $self.get$_string0$_sassLength(); + }, + $signature: 516 + }; + A.stringClass__closure3.prototype = { + call$3($self, sassIndex, $name) { + var t1 = $self._string0$_text, + index = sassIndex.assertNumber$1($name).assertInt$1($name); + if (index === 0) + A.throwExpression(A.SassScriptException$0("String index may not be 0.", $name)); + else if (Math.abs(index) > $self.get$_string0$_sassLength()) + A.throwExpression(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a string with " + $self.get$_string0$_sassLength() + " characters.", $name)); + return A.codepointIndexToCodeUnitIndex0(t1, index < 0 ? $self.get$_string0$_sassLength() + index : index - 1); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 517 + }; + A._ConstructorOptions1.prototype = {}; + A.SassString0.prototype = { + get$_string0$_sassLength() { + var t1, result, _this = this, + value = _this._string0$__SassString__sassLength_FI; + if (value === $) { + t1 = new A.Runes(_this._string0$_text); + result = t1.get$length(t1); + _this._string0$__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._string0$__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, t2; + if (this._string0$_hasQuotes) + return false; + t1 = this._string0$_text; + if (t1.length < 6) + return false; + t2 = B.JSString_methods._codeUnitAt$1(t1, 0) | 32; + if (t2 === 99) { + t2 = B.JSString_methods._codeUnitAt$1(t1, 1) | 32; + if (t2 === 108) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 97) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 3) | 32) !== 109) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 4) | 32) !== 112) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 5) === 40; + } else if (t2 === 97) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 108) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 3) | 32) !== 99) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 4) === 40; + } else + return false; + } else if (t2 === 118) { + if ((B.JSString_methods._codeUnitAt$1(t1, 1) | 32) !== 97) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 114) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 101) { + if ((B.JSString_methods._codeUnitAt$1(t1, 1) | 32) !== 110) + return false; + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 118) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 109) { + t2 = B.JSString_methods._codeUnitAt$1(t1, 1) | 32; + if (t2 === 97) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 120) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else if (t2 === 105) { + if ((B.JSString_methods._codeUnitAt$1(t1, 2) | 32) !== 110) + return false; + return B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + } else + return false; + } else + return false; + }, + get$isVar() { + if (this._string0$_hasQuotes) + return false; + var t1 = this._string0$_text; + if (t1.length < 8) + return false; + return (B.JSString_methods._codeUnitAt$1(t1, 0) | 32) === 118 && (B.JSString_methods._codeUnitAt$1(t1, 1) | 32) === 97 && (B.JSString_methods._codeUnitAt$1(t1, 2) | 32) === 114 && B.JSString_methods._codeUnitAt$1(t1, 3) === 40; + }, + get$isBlank() { + return !this._string0$_hasQuotes && this._string0$_text.length === 0; + }, + accept$1$1(visitor) { + var t1 = visitor._serialize0$_quote && this._string0$_hasQuotes, + t2 = this._string0$_text; + if (t1) + visitor._serialize0$_visitQuotedString$1(t2); + else + visitor._serialize0$_visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string0$_text, + t2 = this._string0$_hasQuotes; + if (other instanceof A.SassString0) + return new A.SassString0(t1 + other._string0$_text, t2); + else + return new A.SassString0(t1 + A.serializeValue0(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString0 && this._string0$_text === other._string0$_text; + }, + get$hashCode(_) { + var t1 = this._string0$_hashCache; + return t1 == null ? this._string0$_hashCache = B.JSString_methods.get$hashCode(this._string0$_text) : t1; + } + }; + A.ModifiableCssStyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$0(this.selector, this.span, this.originalSelector); + }, + $isCssStyleRule0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssStylesheet0.prototype = { + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$0(this.span); + }, + $isCssStylesheet0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StylesheetParser0.prototype = { + parse$0() { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure0(this)); + }, + parseArgumentDeclaration$0() { + return this._stylesheet0$_parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure0(this), type$.ArgumentDeclaration_2); + }, + _stylesheet0$_parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure0(this, production, $T)); + }, + parseSignature$1$requireParens(requireParens) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parseSignature_closure(this, requireParens)); + }, + parseSignature$0() { + return this.parseSignature$1$requireParens(true); + }, + _stylesheet0$_statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner; + switch (t1.peekChar$0()) { + case 64: + return _this.atRule$2$root(new A.StylesheetParser__statement_closure0(_this), root); + case 43: + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._stylesheet0$_includeRule$1(new A._SpanScannerState(t1, t2)); + case 61: + if (!_this.get$indented()) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$0(); + return _this._stylesheet0$_mixinRule$1(new A._SpanScannerState(t1, t2)); + case 125: + t1.error$2$length(0, 'unmatched "}".', 1); + break; + default: + return _this._stylesheet0$_inStyleRule || _this._stylesheet0$_inUnknownAtRule || _this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock ? _this._stylesheet0$_declarationOrStyleRule$0() : _this._stylesheet0$_variableDeclarationOrStyleRule$0(); + } + }, + _stylesheet0$_statement$0() { + return this._stylesheet0$_statement$1$root(false); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, flag, endPosition, t4, t5, t6, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure1(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$0(); + value = _this._stylesheet0$_expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = t2.string, guarded = false, global = false; t2.scanChar$1(33);) { + flag = _this.identifier$0(); + if (flag === "default") + guarded = true; + else if (flag === "global") { + if (t1) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.throwExpression(new A.StringScannerException(t3, string$.x21globa, t6)); + } + global = true; + } else { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.throwExpression(new A.StringScannerException(t3, "Invalid flag name.", t6)); + } + _this.whitespace$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$0($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._stylesheet0$_globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure2(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _stylesheet0$_variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._stylesheet0$_styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t3.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + return _this._stylesheet0$_styleRule$2(t3, new A._SpanScannerState(t1, t2)); + } + }, + _stylesheet0$_declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$plainCss() && _this._stylesheet0$_inStyleRule && !_this._stylesheet0$_inUnknownAtRule) + return _this._stylesheet0$_propertyOrVariableDeclaration$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._stylesheet0$_declarationOrBuffer$0(); + return type$.Statement_2._is(declarationOrBuffer) ? declarationOrBuffer : _this._stylesheet0$_styleRule$2(type$.InterpolationBuffer_2._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _stylesheet0$_declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, additional, t3, startsWithPunctuation, variableOrInterpolation, t4, $name, postColonWhitespace, exception, _this = this, t1 = {}, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)), + first = t2.peekChar$0(); + if (first !== 58) + if (first !== 42) + if (first !== 46) + t3 = first === 35 && t2.peekChar$1(1) !== 123; + else + t3 = true; + else + t3 = true; + else + t3 = true; + if (t3) { + t3 = t2.readChar$0(); + nameBuffer._interpolation_buffer0$_text._contents += A.Primitives_stringFromCharCode(t3); + t3 = _this.rawText$1(_this.get$whitespace()); + nameBuffer._interpolation_buffer0$_text._contents += t3; + startsWithPunctuation = true; + } else + startsWithPunctuation = false; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + _this._stylesheet0$_isUseAllowed = false; + if (t2.matches$1("/*")) { + t3 = _this.rawText$1(_this.get$loudComment()); + nameBuffer._interpolation_buffer0$_text._contents += t3; + } + midBuffer = new A.StringBuffer(""); + t3 = _this.get$whitespace(); + midBuffer._contents += _this.rawText$1(t3); + t4 = t2._string_scanner$_position; + if (!t2.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) + nameBuffer._interpolation_buffer0$_text._contents += A.Primitives_stringFromCharCode(32); + return nameBuffer; + } + midBuffer._contents += A.Primitives_stringFromCharCode(58); + $name = nameBuffer.interpolation$1(t2.spanFrom$2(start, new A._SpanScannerState(t2, t4))); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { + t1 = _this._stylesheet0$_interpolatedDeclarationValue$0(); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$0($name, new A.StringExpression0(t1, false), t2.spanFrom$1(start)); + } + if (t2.scanChar$1(58)) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer0$_text; + t3 = t2._contents += A.S(midBuffer); + t2._contents = t3 + A.Primitives_stringFromCharCode(58); + return t1; + } else if (_this.get$indented() && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t1._interpolation_buffer0$_text._contents += A.S(midBuffer); + return t1; + } + postColonWhitespace = _this.rawText$1(t3); + if (_this.lookingAtChildren$0()) + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__declarationOrBuffer_closure1($name)); + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t2, t2._string_scanner$_position); + t3 = t1.value = null; + try { + t3 = t1.value = _this._stylesheet0$_expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t2.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t2.peekChar$0() === 59) + throw exception; + nameBuffer._interpolation_buffer0$_text._contents += A.S(midBuffer); + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + if (_this.lookingAtChildren$0()) + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__declarationOrBuffer_closure2(t1, $name)); + else { + _this.expectStatementSeparator$0(); + return A.Declaration$0($name, t3, t2.spanFrom$1(start)); + } + }, + _stylesheet0$_variableDeclarationOrInterpolation$0() { + var t1, start, identifier, t2, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + identifier; + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + }, + _stylesheet0$_styleRule$2(buffer, start_) { + var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; + _this._stylesheet0$_isUseAllowed = false; + if (start_ == null) { + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + } else + start = start_; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + wasInStyleRule = _this._stylesheet0$_inStyleRule; + _this._stylesheet0$_inStyleRule = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__styleRule_closure0(t1, _this, wasInStyleRule, start)); + }, + _stylesheet0$_styleRule$0() { + return this._stylesheet0$_styleRule$2(null, null); + }, + _stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { + var first, t3, nameBuffer, variableOrInterpolation, $name, value, _this = this, + _s48_ = string$.Nested, + t1 = {}, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + t1.name = null; + first = t2.peekChar$0(); + if (first !== 58) + if (first !== 42) + if (first !== 46) + t3 = first === 35 && t2.peekChar$1(1) !== 123; + else + t3 = true; + else + t3 = true; + else + t3 = true; + if (t3) { + t3 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + t3._contents += A.Primitives_stringFromCharCode(t2.readChar$0()); + t3._contents += _this.rawText$1(_this.get$whitespace()); + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + t3 = t1.name = nameBuffer.interpolation$1(t2.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else { + type$.Interpolation_2._as(variableOrInterpolation); + t1.name = variableOrInterpolation; + } + t3 = variableOrInterpolation; + } else { + $name = _this.interpolatedIdentifier$0(); + t1.name = $name; + t3 = $name; + } + _this.whitespace$0(); + t2.expectChar$1(58); + if (parseCustomProperties && B.JSString_methods.startsWith$1(t3.get$initialPlain(), "--")) { + t1 = _this._stylesheet0$_interpolatedDeclarationValue$0(); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$0(t3, new A.StringExpression0(t1, false), t2.spanFrom$1(start)); + } + _this.whitespace$0(); + if (_this.lookingAtChildren$0()) { + if (_this.get$plainCss()) + t2.error$1(0, _s48_); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__propertyOrVariableDeclaration_closure1(t1)); + } + value = _this._stylesheet0$_expression$0(); + if (_this.lookingAtChildren$0()) { + if (_this.get$plainCss()) + t2.error$1(0, _s48_); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__propertyOrVariableDeclaration_closure2(t1, value)); + } else { + _this.expectStatementSeparator$0(); + return A.Declaration$0(t3, value, t2.spanFrom$1(start)); + } + }, + _stylesheet0$_propertyOrVariableDeclaration$0() { + return this._stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(true); + }, + _stylesheet0$_declarationChild$0() { + if (this.scanner.peekChar$0() === 64) + return this._stylesheet0$_declarationAtRule$0(); + return this._stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(false); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, url, namespace, configuration, span, _this = this, + _s9_ = "@use rule", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + wasUseAllowed = _this._stylesheet0$_isUseAllowed; + _this._stylesheet0$_isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._stylesheet0$_atRootRule$1(start); + case "content": + return _this._stylesheet0$_contentRule$1(start); + case "debug": + return _this._stylesheet0$_debugRule$1(start); + case "each": + return _this._stylesheet0$_eachRule$2(start, child); + case "else": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "error": + return _this._stylesheet0$_errorRule$1(start); + case "extend": + if (!_this._stylesheet0$_inStyleRule && !_this._stylesheet0$_inMixin && !_this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) + _this.expectIdentifier$1("optional"); + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule0(value, optional, t1.spanFrom$1(start)); + case "for": + return _this._stylesheet0$_forRule$2(start, child); + case "forward": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + return _this._stylesheet0$_forwardRule$1(start); + case "function": + return _this._stylesheet0$_functionRule$1(start); + case "if": + return _this._stylesheet0$_ifRule$2(start, child); + case "import": + return _this._stylesheet0$_importRule$1(start); + case "include": + return _this._stylesheet0$_includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._stylesheet0$_mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$0(); + namespace = _this._stylesheet0$_useNamespace$2(url, start); + _this.whitespace$0(); + configuration = _this._stylesheet0$_configuration$0(); + _this.expectStatementSeparator$1(_s9_); + span = t1.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1(_s9_); + t1 = new A.UseRule0(url, namespace, configuration == null ? B.List_empty20 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + t1.UseRule$4$configuration0(url, namespace, span, configuration); + return t1; + case "warn": + return _this._stylesheet0$_warnRule$1(start); + case "while": + return _this._stylesheet0$_whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _stylesheet0$_declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + switch (_this._stylesheet0$_plainAtRuleName$0()) { + case "content": + return _this._stylesheet0$_contentRule$1(start); + case "debug": + return _this._stylesheet0$_debugRule$1(start); + case "each": + return _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_declarationChild()); + case "else": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "error": + return _this._stylesheet0$_errorRule$1(start); + case "for": + return _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_declarationChild()); + case "if": + return _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_declarationChild()); + case "include": + return _this._stylesheet0$_includeRule$1(start); + case "warn": + return _this._stylesheet0$_warnRule$1(start); + case "while": + return _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_declarationChild()); + default: + return _this._stylesheet0$_disallowedAtRule$1(start); + } + }, + _stylesheet0$_functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, namespace, exception, t3, start, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + t2 = t1._string_scanner$_position; + state = new A._SpanScannerState(t1, t2); + try { + namespace = _this.identifier$0(); + t1.expectChar$1(46); + t2 = _this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._stylesheet0$_declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule0 ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + switch (_this._stylesheet0$_plainAtRuleName$0()) { + case "debug": + return _this._stylesheet0$_debugRule$1(start); + case "each": + return _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_functionChild()); + case "else": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "error": + return _this._stylesheet0$_errorRule$1(start); + case "for": + return _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_functionChild()); + case "if": + return _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_functionChild()); + case "return": + value = _this._stylesheet0$_expression$0(); + _this.expectStatementSeparator$1("@return rule"); + return new A.ReturnRule0(value, t1.spanFrom$1(start)); + case "warn": + return _this._stylesheet0$_warnRule$1(start); + case "while": + return _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_functionChild()); + default: + return _this._stylesheet0$_disallowedAtRule$1(start); + } + }, + _stylesheet0$_plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + var $name = this.identifier$0(); + this.whitespace$0(); + return $name; + }, + _stylesheet0$_atRootRule$1(start) { + var query, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + query = _this._stylesheet0$_atRootQuery$0(); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure1(query)); + } else if (_this.lookingAtChildren$0()) + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure2()); + else + return A.AtRootRule$0(A._setArrayType([_this._stylesheet0$_styleRule$0()], type$.JSArray_Statement_2), t1.spanFrom$1(start), null); + }, + _stylesheet0$_atRootQuery$0() { + var interpolation, t2, t3, t4, buffer, t5, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 35) { + interpolation = _this.singleInterpolation$0(); + return A.Interpolation$0(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation)); + } + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t1.expectChar$1(40); + t3._contents += A.Primitives_stringFromCharCode(40); + _this.whitespace$0(); + t5 = _this._stylesheet0$_expression$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t5 = t3._contents += A.Primitives_stringFromCharCode(58); + t3._contents = t5 + A.Primitives_stringFromCharCode(32); + t5 = _this._stylesheet0$_expression$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + } + t1.expectChar$1(41); + _this.whitespace$0(); + t3._contents += A.Primitives_stringFromCharCode(41); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_contentRule$1(start) { + var t1, $arguments, t2, t3, _this = this; + if (!_this._stylesheet0$_inMixin) + _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(t2.file, t3, t3)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule0($arguments, t1.spanFrom$1(start)); + }, + _stylesheet0$_debugRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_eachRule$2(start, child) { + var variables, t1, _this = this, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$0(); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$0(); + } + _this.expectIdentifier$1("in"); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__eachRule_closure0(_this, wasInControlDirective, variables, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_errorRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_functionRule$1(start) { + var $name, $arguments, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + $arguments = _this._stylesheet0$_argumentDeclaration$0(); + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscf, _this.scanner.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Functi, _this.scanner.spanFrom$1(start)); + switch (A.unvendor0($name)) { + case "calc": + case "element": + case "expression": + case "url": + case "and": + case "or": + case "not": + case "clamp": + _this.error$2(0, "Invalid function name.", _this.scanner.spanFrom$1(start)); + break; + } + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_functionChild(), start, new A.StylesheetParser__functionRule_closure0($name, $arguments, precedingComment)); + }, + _stylesheet0$_forRule$2(start, child) { + var variable, from, _this = this, t1 = {}, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$0(); + _this.expectIdentifier$1("from"); + _this.whitespace$0(); + t1.exclusive = null; + from = _this._stylesheet0$_expression$1$until(new A.StylesheetParser__forRule_closure1(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__forRule_closure2(t1, _this, wasInControlDirective, variable, from, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_forwardRule$1(start) { + var prefix, members, shownMixinsAndFunctions, shownVariables, hiddenVariables, hiddenMixinsAndFunctions, configuration, span, t1, t2, t3, t4, _this = this, _null = null, + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$0(); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$0(); + } else + prefix = _null; + if (_this.scanIdentifier$1("show")) { + members = _this._stylesheet0$_memberList$0(); + shownMixinsAndFunctions = members.item1; + shownVariables = members.item2; + hiddenVariables = _null; + hiddenMixinsAndFunctions = hiddenVariables; + } else { + if (_this.scanIdentifier$1("hide")) { + members = _this._stylesheet0$_memberList$0(); + hiddenMixinsAndFunctions = members.item1; + hiddenVariables = members.item2; + } else { + hiddenVariables = _null; + hiddenMixinsAndFunctions = hiddenVariables; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet0$_configuration$1$allowGuarded(true); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.scanner.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty20 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, new A.UnmodifiableSetView(t2, t3), new A.UnmodifiableSetView(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty20 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, _null, _null, new A.UnmodifiableSetView(t2, t3), new A.UnmodifiableSetView(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule0(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty20 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + }, + _stylesheet0$_memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$0(); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure0(_this, variables, identifiers)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + return new A.Tuple2(identifiers, variables, type$.Tuple2_of_Set_String_and_Set_String); + }, + _stylesheet0$_ifRule$2(start, child) { + var condition, children, clauses, lastClause, span, _this = this, + ifIndentation = _this.get$currentIndentation(), + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + condition = _this._stylesheet0$_expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$0(); + clauses = A._setArrayType([A.IfClause$0(condition, children)], type$.JSArray_IfClause_2); + while (true) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$0(); + clauses.push(A.IfClause$0(_this._stylesheet0$_expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$0(_this.children$1(0, child)); + break; + } + } + _this._stylesheet0$_inControlDirective = wasInControlDirective; + span = _this.scanner.spanFrom$1(start); + _this.whitespaceWithoutComments$0(); + return new A.IfRule0(A.List_List$unmodifiable(clauses, type$.IfClause_2), lastClause, span); + }, + _stylesheet0$_importRule$1(start) { + var argument, _this = this, + imports = A._setArrayType([], type$.JSArray_Import_2), + t1 = _this.scanner; + do { + _this.whitespace$0(); + argument = _this.importArgument$0(); + if ((_this._stylesheet0$_inControlDirective || _this._stylesheet0$_inMixin) && argument instanceof A.DynamicImport0) + _this._stylesheet0$_disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = t1.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(imports, type$.Import_2), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + next = t1.peekChar$0(); + if (next === 117 || next === 85) { + url = _this.dynamicUrl$0(); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([url], type$.JSArray_Object), t1.spanFrom$1(start)), modifiers, t1.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = t1.spanFrom$1(start); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) { + t2 = urlSpan; + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(start)); + } else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var first; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + first = B.JSString_methods._codeUnitAt$1(url, 0); + if (first === 47) + return B.JSString_methods._codeUnitAt$1(url, 1) === 47; + if (first !== 104) + return false; + return B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + }, + tryImportModifiers$0() { + var t1, start, t2, t3, buffer, identifier, t4, $name, query, endPosition, t5, result, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t2, t3); + for (; true;) + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) + t2._contents += A.Primitives_stringFromCharCode(32); + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t4 = identifier.get$asPlain(); + $name = t4 == null ? null : t4.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._stylesheet0$_importSupportsQuery$0(); + t4 = !(query instanceof A.SupportsDeclaration0); + if (t4) + t2._contents += A.Primitives_stringFromCharCode(40); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(new A.SupportsExpression0(query)); + if (t4) + t2._contents += A.Primitives_stringFromCharCode(41); + } else { + t2._contents += A.Primitives_stringFromCharCode(40); + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); + t2._contents += A.Primitives_stringFromCharCode(41); + } + t1.expectChar$1(41); + _this.whitespace$0(); + } else { + _this.whitespace$0(); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t4, t5, endPosition); + t1._FileSpan$3(t4, t5, endPosition); + t5 = type$.Object; + t4 = A.List_List$of(t3, true, t5); + t3 = t2._contents; + if (t3.length !== 0) + t4.push(t3.charCodeAt(0) == 0 ? t3 : t3); + result = A.List_List$from(t4, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation0(result, t1); + t2.Interpolation$20(t4, t1); + return t2; + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) + t2._contents += A.Primitives_stringFromCharCode(32); + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation0(result, t5); + t1.Interpolation$20(t3, t5); + return t1; + } else { + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation0(result, t5); + t1.Interpolation$20(t3, t5); + return t1; + } + }, + _stylesheet0$_importSupportsQuery$0() { + var t1, t2, $function, $name, _this = this; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._stylesheet0$_supportsCondition$0(); + else { + $function = _this._stylesheet0$_tryImportSupportsFunction$0(); + if ($function != null) + return $function; + t2 = t1._string_scanner$_position; + $name = _this._stylesheet0$_expression$0(); + t1.expectChar$1(58); + return _this._stylesheet0$_supportsDeclarationValue$2($name, new A._SpanScannerState(t1, t2)); + } + } + }, + _stylesheet0$_tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0($name, value, t1.spanFrom$1(start)); + }, + _stylesheet0$_includeRule$1(start) { + var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, _this = this, _null = null, + $name = _this.identifier$0(), + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._stylesheet0$_publicIdentifier$0(); + namespace = $name; + $name = name0; + } else { + $name = A.stringReplaceAllUnchecked($name, "_", "-"); + namespace = _null; + } + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$0(); + contentArguments = _this._stylesheet0$_argumentDeclaration$0(); + _this.whitespace$0(); + } else + contentArguments = _null; + t2 = contentArguments == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + contentArguments_ = new A.ArgumentDeclaration0(B.List_empty22, _null, A._FileSpan$(t2.file, t3, t3)); + } else + contentArguments_ = contentArguments; + wasInContentBlock = _this._stylesheet0$_inContentBlock; + _this._stylesheet0$_inContentBlock = true; + $content = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__includeRule_closure0(contentArguments_)); + _this._stylesheet0$_inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = t1.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + return new A.IncludeRule0(namespace, $name, $arguments, $content, t1.expand$1(0, t2.get$span(t2))); + }, + mediaRule$1(start) { + return this._stylesheet0$_withChildren$3(this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mediaRule_closure0(this._stylesheet0$_mediaQueryList$0())); + }, + _stylesheet0$_mixinRule$1(start) { + var $name, t1, $arguments, t2, t3, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentDeclaration$0(); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration0(B.List_empty22, null, A._FileSpan$(t2.file, t3, t3)); + } + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); + _this.whitespace$0(); + _this._stylesheet0$_inMixin = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__mixinRule_closure0(_this, $name, $arguments, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t5, t6, t7, identifier, contents, argument, trailing, endPosition, t8, t9, start0, end, _this = this, _box_0 = {}, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer0(t3, t4); + _box_0.needsDeprecationWarning = false; + for (t5 = _this.get$whitespace(), t6 = t1.string; true;) { + if (t1.peekChar$0() === 35) { + t7 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t7); + _box_0.needsDeprecationWarning = true; + } else { + t7 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + switch (identifier) { + case "url": + case "url-prefix": + case "domain": + contents = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); + if (contents != null) + buffer.addInterpolation$1(contents); + else { + t1.expectChar$1(40); + _this.whitespace$0(); + argument = _this.interpolatedString$0(); + t1.expectChar$1(41); + t7 = t3._contents += identifier; + t3._contents = t7 + A.Primitives_stringFromCharCode(40); + buffer.addInterpolation$1(argument.asInterpolation$0()); + t3._contents += A.Primitives_stringFromCharCode(41); + } + t7 = t3._contents; + trailing = t7.charCodeAt(0) == 0 ? t7 : t7; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break; + case "regexp": + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + t1.expectChar$1(41); + t3._contents += A.Primitives_stringFromCharCode(41); + _box_0.needsDeprecationWarning = true; + break; + default: + endPosition = t1._string_scanner$_position; + t8 = t1._sourceFile; + t9 = new A._FileSpan(t8, t7, endPosition); + t9._FileSpan$3(t8, t7, endPosition); + A.throwExpression(new A.StringScannerException(t6, "Invalid function name.", t9)); + } + } + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t3._contents += A.Primitives_stringFromCharCode(44); + start0 = t1._string_scanner$_position; + t5.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t6, start0, end); + } + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure0(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var _this = this, + condition = _this._stylesheet0$_supportsCondition$0(); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_supportsRule_closure0(condition)); + }, + _stylesheet0$_useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = A.SpanScanner$(namespace, null); + t1 = new A.Parser1(t1, _this.logger)._parser0$_parseIdentifier$0(); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassFormatException0) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet0$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, t3, $name, expression, t4, guarded, endPosition, t5, t6, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable_2); + _this.whitespace$0(); + t1 = _this.scanner; + t1.expectChar$1(40); + for (t2 = t1.string; true;) { + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + expression = _this.expressionUntilComma$0(); + t4 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) + if (_this.identifier$0() === "default") { + _this.whitespace$0(); + guarded = true; + } else { + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t4, endPosition); + t6._FileSpan$3(t5, t4, endPosition); + A.throwExpression(new A.StringScannerException(t2, "Invalid flag name.", t6)); + guarded = false; + } + else + guarded = false; + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + span = new A._FileSpan(t4, t3, endPosition); + span._FileSpan$3(t4, t3, endPosition); + if (variableNames.contains$1(0, $name)) + A.throwExpression(new A.StringScannerException(t2, string$.The_sa, span)); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable0($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet0$_configuration$0() { + return this._stylesheet0$_configuration$1$allowGuarded(false); + }, + _stylesheet0$_warnRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_whileRule$2(start, child) { + var _this = this, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__whileRule_closure0(_this, wasInControlDirective, _this._stylesheet0$_expression$0())); + }, + unknownAtRule$2(start, $name) { + var t2, t3, rule, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet0$_inUnknownAtRule; + _this._stylesheet0$_inUnknownAtRule = true; + t1.value = null; + t2 = _this.scanner; + t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this.almostAnyValue$0() : null; + if (_this.lookingAtChildren$0()) + rule = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_unknownAtRule_closure0(t1, $name)); + else { + _this.expectStatementSeparator$0(); + rule = A.AtRule$0($name, t2.spanFrom$1(start), null, t3); + } + _this._stylesheet0$_inUnknownAtRule = wasInUnknownAtRule; + return rule; + }, + _stylesheet0$_disallowedAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_argumentDeclaration$0() { + var $arguments, named, restArgument, t3, t4, $name, defaultValue, endPosition, t5, t6, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + $arguments = A._setArrayType([], type$.JSArray_Argument_2); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + t3 = t1.string; + while (true) { + if (!(t1.peekChar$0() === 36)) { + restArgument = null; + break; + } + t4 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$0(); + restArgument = $name; + break; + } + defaultValue = null; + } + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t4, endPosition); + t6._FileSpan$3(t5, t4, endPosition); + $arguments.push(new A.Argument0($name, defaultValue, t6)); + if (!named.add$1(0, $name)) + A.throwExpression(new A.StringScannerException(t3, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span)); + if (!t1.scanChar$1(44)) { + restArgument = null; + break; + } + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentDeclaration0(A.List_List$unmodifiable($arguments, type$.Argument_2), restArgument, t1); + }, + _stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, t4, named, keywordRest, t5, t6, rest, expression, t7, result, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + positional = A._setArrayType([], type$.JSArray_Expression_2); + t3 = type$.String; + t4 = type$.Expression_2; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + t5 = !mixin; + t6 = t1.string; + rest = _null; + while (true) { + if (!_this._stylesheet0$_lookingAtExpression$0()) { + keywordRest = _null; + break; + } + expression = _this.expressionUntilComma$1$singleEquals(t5); + _this.whitespace$0(); + if (expression instanceof A.VariableExpression0 && t1.scanChar$1(58)) { + _this.whitespace$0(); + t7 = expression.name; + if (named.containsKey$1(t7)) + A.throwExpression(new A.StringScannerException(t6, "Duplicate argument.", expression.span)); + named.$indexSet(0, t7, _this.expressionUntilComma$1$singleEquals(t5)); + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$0(); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + A.throwExpression(new A.StringScannerException(t6, string$.Positi, expression.get$span(expression))); + else + positional.push(expression); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) { + keywordRest = _null; + break; + } + _this.whitespace$0(); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t5 = t1._sourceFile; + t6 = t1._string_scanner$_position; + new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); + t7 = new A._FileSpan(t5, t6, t6); + t7._FileSpan$3(t5, t6, t6); + t6 = A._setArrayType([""], type$.JSArray_Object); + result = A.List_List$from(t6, false, type$.Object); + result.fixed$length = Array; + result.immutable$list = Array; + t5 = new A.Interpolation0(result, t7); + t5.Interpolation$20(t6, t7); + positional.push(new A.StringExpression0(t5, false)); + keywordRest = _null; + break; + } + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentInvocation0(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); + }, + _stylesheet0$_argumentInvocation$0() { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _stylesheet0$_argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _stylesheet0$_argumentInvocation$1$mixin(mixin) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { + var t2, beforeBracket, start, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, first, next, t4, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$0(); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression_2); + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(t1, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInParentheses = _this._stylesheet0$_inParentheses; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._stylesheet0$_singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState0(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation0(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations0(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression0(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator0(_box_0, _this, resolveOneOperation); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions0(_box_0, _this, resolveOperations); + $label0$0: + for (t3 = type$.JSArray_Expression_2; true;) { + _this.whitespace$0(); + if (t1 && until.call$0()) + break $label0$0; + first = t2.peekChar$0(); + switch (first) { + case 40: + addSingleExpression.call$1(_this._stylesheet0$_parentheses$0()); + break; + case 91: + addSingleExpression.call$1(_this._stylesheet0$_expression$1$bracketList(true)); + break; + case 36: + addSingleExpression.call$1(_this._stylesheet0$_variable$0()); + break; + case 38: + addSingleExpression.call$1(_this._stylesheet0$_selector$0()); + break; + case 39: + case 34: + addSingleExpression.call$1(_this.interpolatedString$0()); + break; + case 35: + addSingleExpression.call$1(_this._stylesheet0$_hashExpression$0()); + break; + case 61: + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_axY0); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_nZh0); + } + break; + case 33: + next = t2.peekChar$1(1); + if (next === 61) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_Vr90); + } else { + if (next != null) + if ((next | 32) >>> 0 !== 105) + t4 = next === 32 || next === 9 || next === 10 || next === 13 || next === 12; + else + t4 = true; + else + t4 = true; + if (t4) + addSingleExpression.call$1(_this._stylesheet0$_importantExpression$0()); + else + break $label0$0; + } + break; + case 60: + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oqF0 : B.BinaryOperator_apg0); + break; + case 62: + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_Wma0 : B.BinaryOperator_cw10); + break; + case 42: + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_6pl0); + break; + case 43: + if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_qbf0); + } + break; + case 45: + next = t2.peekChar$1(1); + if (next != null && next >= 48 && next <= 57 || next === 46) + if (_box_0.singleExpression_ != null) { + t4 = t2.peekChar$1(-1); + t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; + } else + t4 = true; + else + t4 = false; + if (t4) + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + else if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_KlB0); + } + break; + case 47: + if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_qpm0); + } + break; + case 37: + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_PHH0); + break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + break; + case 46: + if (t2.peekChar$1(1) === 46) + break $label0$0; + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + break; + case 97: + if (!_this.get$plainCss() && _this.scanIdentifier$1("and")) + addOperator.call$1(B.BinaryOperator_and_and_2_and0); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 111: + if (!_this.get$plainCss() && _this.scanIdentifier$1("or")) + addOperator.call$1(B.BinaryOperator_or_or_1_or0); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 117: + case 85: + if (t2.peekChar$1(1) === 43) + addSingleExpression.call$1(_this._stylesheet0$_unicodeRange$0()); + else + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 112: + case 113: + case 114: + case 115: + case 116: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 92: + addSingleExpression.call$1(_this.identifierLike$0()); + break; + case 44: + if (_this._stylesheet0$_inParentheses) { + _this._stylesheet0$_inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + break; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t4 = _box_0.singleExpression_; + t4.toString; + commaExpressions.push(t4); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + break; + default: + if (first != null && first >= 128) { + addSingleExpression.call$1(_this.identifierLike$0()); + break; + } else + break $label0$0; + } + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._stylesheet0$_inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(commaExpressions, type$.Expression_2), B.ListSeparator_rXA0, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_EVt0, true, t2); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t3 = A._setArrayType([t1], t3); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(t3, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); + } + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _stylesheet0$_expression$2$singleEquals$until(singleEquals, until) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, singleEquals, until); + }, + _stylesheet0$_expression$1$bracketList(bracketList) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, false, null); + }, + _stylesheet0$_expression$0() { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, null); + }, + _stylesheet0$_expression$1$until(until) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._stylesheet0$_expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure0(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _stylesheet0$_isSlashOperand$1(expression) { + var t1; + if (!(expression instanceof A.NumberExpression0)) + if (!(expression instanceof A.CalculationExpression0)) + t1 = expression instanceof A.BinaryOperationExpression0 && expression.allowsSlash; + else + t1 = true; + else + t1 = true; + return t1; + }, + _stylesheet0$_singleExpression$0() { + var next, _this = this, + t1 = _this.scanner, + first = t1.peekChar$0(); + switch (first) { + case 40: + return _this._stylesheet0$_parentheses$0(); + case 47: + return _this._stylesheet0$_unaryOperation$0(); + case 46: + return _this._stylesheet0$_number$0(); + case 91: + return _this._stylesheet0$_expression$1$bracketList(true); + case 36: + return _this._stylesheet0$_variable$0(); + case 38: + return _this._stylesheet0$_selector$0(); + case 39: + case 34: + return _this.interpolatedString$0(); + case 35: + return _this._stylesheet0$_hashExpression$0(); + case 43: + next = t1.peekChar$1(1); + return A.isDigit0(next) || next === 46 ? _this._stylesheet0$_number$0() : _this._stylesheet0$_unaryOperation$0(); + case 45: + return _this._stylesheet0$_minusExpression$0(); + case 33: + return _this._stylesheet0$_importantExpression$0(); + case 117: + case 85: + if (t1.peekChar$1(1) === 43) + return _this._stylesheet0$_unicodeRange$0(); + else + return _this.identifierLike$0(); + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return _this._stylesheet0$_number$0(); + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 92: + return _this.identifierLike$0(); + default: + if (first != null && first >= 128) + return _this.identifierLike$0(); + t1.error$1(0, "Expected expression."); + } + }, + _stylesheet0$_parentheses$0() { + var wasInParentheses, start, first, expressions, t1, t2, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, "Parentheses aren't allowed in plain CSS.", 1); + wasInParentheses = _this._stylesheet0$_inParentheses; + _this._stylesheet0$_inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) { + t1.expectChar$1(41); + t2 = A._setArrayType([], type$.JSArray_Expression_2); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(t2, type$.Expression_2); + return new A.ListExpression0(t2, B.ListSeparator_undecided_null_undecided0, false, t1); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t1 = _this._stylesheet0$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.ParenthesizedExpression0(first, t1); + } + _this.whitespace$0(); + expressions = A._setArrayType([first], type$.JSArray_Expression_2); + for (; true;) { + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(expressions, type$.Expression_2); + return new A.ListExpression0(t2, B.ListSeparator_rXA0, false, t1); + } finally { + _this._stylesheet0$_inParentheses = wasInParentheses; + } + }, + _stylesheet0$_map$2(first, start) { + var t2, key, _this = this, + t1 = type$.Tuple2_Expression_Expression_2, + pairs = A._setArrayType([new A.Tuple2(first, _this.expressionUntilComma$0(), t1)], type$.JSArray_Tuple2_Expression_Expression_2); + for (t2 = _this.scanner; t2.scanChar$1(44);) { + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t2.expectChar$1(58); + _this.whitespace$0(); + pairs.push(new A.Tuple2(key, _this.expressionUntilComma$0(), t1)); + } + t2.expectChar$1(41); + t2 = t2.spanFrom$1(start); + return new A.MapExpression0(A.List_List$unmodifiable(pairs, t1), t2); + }, + _stylesheet0$_hashExpression$0() { + var start, first, t2, identifier, buffer, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + first = t1.peekChar$0(); + if (first != null && A.isDigit0(first)) + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._stylesheet0$_isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + A.Primitives_stringFromCharCode(35); + buffer.addInterpolation$1(identifier); + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _stylesheet0$_hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, _this = this, + digit1 = _this._stylesheet0$_hexDigit$0(), + digit2 = _this._stylesheet0$_hexDigit$0(), + digit3 = _this._stylesheet0$_hexDigit$0(), + t1 = _this.scanner; + if (!A.isHex0(t1.peekChar$0())) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._stylesheet0$_hexDigit$0(); + t2 = digit1 << 4 >>> 0; + t3 = digit3 << 4 >>> 0; + if (!A.isHex0(t1.peekChar$0())) { + red = t2 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t3 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t2 + digit2; + green = t3 + digit4; + blue = (_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0(); + alpha = A.isHex0(t1.peekChar$0()) ? ((_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0()) / 255 : null; + } + } + return A.SassColor$rgbInternal0(red, green, blue, alpha, alpha == null ? new A.SpanColorFormat0(t1.spanFrom$1(start)) : null); + }, + _stylesheet0$_isHexColor$1(interpolation) { + var t1, + plain = interpolation.get$asPlain(); + if (plain == null) + return false; + t1 = plain.length; + if (t1 !== 3 && t1 !== 4 && t1 !== 6 && t1 !== 8) + return false; + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, A.character0__isHex$closure()); + }, + _stylesheet0$_hexDigit$0() { + var t1 = this.scanner, + char = t1.peekChar$0(); + if (char == null || !A.isHex0(char)) + t1.error$1(0, "Expected hex digit."); + return A.asHex0(t1.readChar$0()); + }, + _stylesheet0$_minusExpression$0() { + var _this = this, + next = _this.scanner.peekChar$1(1); + if (A.isDigit0(next) || next === 46) + return _this._stylesheet0$_number$0(); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._stylesheet0$_unaryOperation$0(); + }, + _stylesheet0$_importantExpression$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + this.whitespace$0(); + this.expectIdentifier$1("important"); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType(["!important"], type$.JSArray_Object), t2), false); + }, + _stylesheet0$_unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._stylesheet0$_unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_Ix10) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$0(); + return new A.UnaryOperationExpression0(operator, _this._stylesheet0$_singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_unaryOperatorFor$1(character) { + switch (character) { + case 43: + return B.UnaryOperator_gg40; + case 45: + return B.UnaryOperator_TLI0; + case 47: + return B.UnaryOperator_Ix10; + default: + return null; + } + }, + _stylesheet0$_number$0() { + var number, unit, t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(); + if (first === 43 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._stylesheet0$_consumeNaturalNumber$0(); + _this._stylesheet0$_tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2); + _this._stylesheet0$_tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression0(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_consumeNaturalNumber$0() { + var t2, + t1 = this.scanner; + if (!A.isDigit0(t1.readChar$0())) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var t2, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + if (!A.isDigit0(t1.peekChar$1(1))) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryExponent$0() { + var next, t2, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!A.isDigit0(next) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (next === 43 || next === 45) + t1.readChar$0(); + if (!A.isDigit0(t1.peekChar$0())) + t1.error$1(0, "Expected digit."); + while (true) { + t2 = t1.peekChar$0(); + if (!(t2 != null && t2 >= 48 && t2 <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure1());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(start)); + else if (hasQuestionMark) { + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType([t2], type$.JSArray_Object), t1), false); + } + if (t1.scanChar$1(45)) { + t2 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure2());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType([t2], type$.JSArray_Object), t1), false); + }, + _stylesheet0$_variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, t1.spanFrom$1(start)); + return new A.VariableExpression0(null, $name, t1.spanFrom$1(start)); + }, + _stylesheet0$_selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.logger.warn$2$span(0, string$.In_Sas, t1.spanFrom$1(start)); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression0(t1.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, buffer, next, second, t5, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + for (; true;) { + next = t1.peekChar$0(); + if (next === quote) { + t1.readChar$0(); + break; + } else if (next == null || next === 10 || next === 13 || next === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + else if (next === 92) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else + t3._contents += A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + } else if (next === 35) + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + identifierLike$0() { + var invocation, expression, color, specialFunction, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t2 = plain == null, + t3 = !t2; + if (t3) { + if (plain === "if" && t1.peekChar$0() === 40) { + invocation = _this._stylesheet0$_argumentInvocation$0(); + return new A.IfExpression0(invocation, identifier.span.expand$1(0, invocation.span)); + } else if (plain === "not") { + _this.whitespace$0(); + expression = _this._stylesheet0$_singleExpression$0(); + return new A.UnaryOperationExpression0(B.UnaryOperator_not_not_not0, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower._value = plain.toLowerCase(); + if (t1.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression0(false, identifier.span); + case "null": + return new A.NullExpression0(identifier.span); + case "true": + return new A.BooleanExpression0(true, identifier.span); + } + color = $.$get$colorsByName0().$index(0, lower._readLocal$0()); + if (color != null) { + t1 = identifier.span; + return new A.ColorExpression0(A.SassColor$rgbInternal0(color.get$red(color), color.get$green(color), color.get$blue(color), color._color1$_alpha, new A.SpanColorFormat0(t1)), t1); + } + } + specialFunction = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (specialFunction != null) + return specialFunction; + } + switch (t1.peekChar$0()) { + case 46: + if (t1.peekChar$1(1) === 46) + return new A.StringExpression0(identifier, false); + t1.readChar$0(); + if (t3) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + break; + case 40: + if (t2) + return new A.InterpolatedFunctionExpression0(identifier, _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + else + return new A.FunctionExpression0(null, plain, _this._stylesheet0$_argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")), t1.spanFrom$1(start)); + default: + return new A.StringExpression0(identifier, false); + } + }, + namespacedExpression$2(namespace, start) { + var $name, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure0(_this, start)); + return new A.VariableExpression0(namespace, $name, t1.spanFrom$1(start)); + } + return new A.FunctionExpression0(namespace, _this._stylesheet0$_publicIdentifier$0(), _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + }, + trySpecialFunction$2($name, start) { + var t2, buffer, t3, next, _this = this, _null = null, + t1 = _this.scanner, + calculation = t1.peekChar$0() === 40 ? _this._stylesheet0$_tryCalculation$2($name, start) : _null; + if (calculation != null) + return calculation; + switch (A.unvendor0($name)) { + case "calc": + case "element": + case "expression": + if (!t1.scanChar$1(40)) + return _null; + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = "" + $name; + t2._contents = t3; + t2._contents = t3 + A.Primitives_stringFromCharCode(40); + break; + case "progid": + if (!t1.scanChar$1(58)) + return _null; + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = "" + $name; + t2._contents = t3; + t2._contents = t3 + A.Primitives_stringFromCharCode(58); + next = t1.peekChar$0(); + while (true) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + next = t1.peekChar$0(); + } + t1.expectChar$1(40); + t2._contents += A.Primitives_stringFromCharCode(40); + break; + case "url": + return A.NullableExtension_andThen0(_this._stylesheet0$_tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure0()); + default: + return _null; + } + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + buffer._interpolation_buffer0$_text._contents += A.Primitives_stringFromCharCode(41); + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _stylesheet0$_tryCalculation$2($name, start) { + var beforeArguments, $arguments, t1, exception, t2, _this = this; + switch ($name) { + case "calc": + $arguments = _this._stylesheet0$_calculationArguments$1(1); + t1 = _this.scanner.spanFrom$1(start); + return new A.CalculationExpression0($name, A.CalculationExpression__verifyArguments0($arguments), t1); + case "min": + case "max": + t1 = _this.scanner; + beforeArguments = new A._SpanScannerState(t1, t1._string_scanner$_position); + $arguments = null; + try { + $arguments = _this._stylesheet0$_calculationArguments$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(beforeArguments); + return null; + } else + throw exception; + } + t2 = $arguments; + t1 = t1.spanFrom$1(start); + return new A.CalculationExpression0($name, A.CalculationExpression__verifyArguments0(t2), t1); + case "clamp": + $arguments = _this._stylesheet0$_calculationArguments$1(3); + t1 = _this.scanner.spanFrom$1(start); + return new A.CalculationExpression0($name, A.CalculationExpression__verifyArguments0($arguments), t1); + default: + return null; + } + }, + _stylesheet0$_calculationArguments$1(maxArgs) { + var interpolation, $arguments, t2, _this = this, + t1 = _this.scanner; + t1.expectChar$1(40); + interpolation = _this._stylesheet0$_containsCalculationInterpolation$0() ? new A.StringExpression0(_this._stylesheet0$_interpolatedDeclarationValue$0(), false) : null; + if (interpolation != null) { + t1.expectChar$1(41); + return A._setArrayType([interpolation], type$.JSArray_Expression_2); + } + _this.whitespace$0(); + $arguments = A._setArrayType([_this._stylesheet0$_calculationSum$0()], type$.JSArray_Expression_2); + t2 = maxArgs != null; + while (true) { + if (!((!t2 || $arguments.length < maxArgs) && t1.scanChar$1(44))) + break; + _this.whitespace$0(); + $arguments.push(_this._stylesheet0$_calculationSum$0()); + } + t1.expectChar$2$name(41, $arguments.length === maxArgs ? '"+", "-", "*", "/", or ")"' : '"+", "-", "*", "/", ",", or ")"'); + return $arguments; + }, + _stylesheet0$_calculationArguments$0() { + return this._stylesheet0$_calculationArguments$1(null); + }, + _stylesheet0$_calculationSum$0() { + var t1, next, t2, t3, _this = this, + sum = _this._stylesheet0$_calculationProduct$0(); + for (t1 = _this.scanner; true;) { + next = t1.peekChar$0(); + t2 = next === 43; + if (t2 || next === 45) { + t3 = t1.peekChar$1(-1); + if (t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) + t1.error$1(0, string$.x22x2b__an); + t1.readChar$0(); + _this.whitespace$0(); + t2 = t2 ? B.BinaryOperator_qbf0 : B.BinaryOperator_KlB0; + sum = new A.BinaryOperationExpression0(t2, sum, _this._stylesheet0$_calculationProduct$0(), false); + } else + return sum; + } + }, + _stylesheet0$_calculationProduct$0() { + var t1, next, t2, _this = this, + product = _this._stylesheet0$_calculationValue$0(); + for (t1 = _this.scanner; true;) { + _this.whitespace$0(); + next = t1.peekChar$0(); + t2 = next === 42; + if (t2 || next === 47) { + t1.readChar$0(); + _this.whitespace$0(); + t2 = t2 ? B.BinaryOperator_6pl0 : B.BinaryOperator_qpm0; + product = new A.BinaryOperationExpression0(t2, product, _this._stylesheet0$_calculationValue$0(), false); + } else + return product; + } + }, + _stylesheet0$_calculationValue$0() { + var t2, value, start, ident, lowerCase, calculation, _this = this, + t1 = _this.scanner, + next = t1.peekChar$0(); + if (next === 43 || next === 45 || next === 46 || A.isDigit0(next)) + return _this._stylesheet0$_number$0(); + else if (next === 36) + return _this._stylesheet0$_variable$0(); + else if (next === 40) { + t2 = t1._string_scanner$_position; + t1.readChar$0(); + value = _this._stylesheet0$_containsCalculationInterpolation$0() ? new A.StringExpression0(_this._stylesheet0$_interpolatedDeclarationValue$0(), false) : null; + if (value == null) { + _this.whitespace$0(); + value = _this._stylesheet0$_calculationSum$0(); + } + _this.whitespace$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression0(value, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else if (!_this.lookingAtIdentifier$0()) + t1.error$1(0, string$.Expectn); + else { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + ident = _this.identifier$0(); + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(ident, start); + if (t1.peekChar$0() !== 40) + t1.error$1(0, 'Expected "(" or ".".'); + lowerCase = ident.toLowerCase(); + calculation = _this._stylesheet0$_tryCalculation$2(lowerCase, start); + if (calculation != null) + return calculation; + else if (lowerCase === "if") + return new A.IfExpression0(_this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + else + return new A.FunctionExpression0(null, ident, _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + } + }, + _stylesheet0$_containsCalculationInterpolation$0() { + var t2, parens, next, target, t3, _null = null, + _s64_ = string$.The_gi, + _s17_ = "Invalid position ", + brackets = A._setArrayType([], type$.JSArray_int), + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + for (t2 = t1.string.length, parens = 0; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + target = 1; + break; + case 47: + target = 2; + break; + case 39: + case 34: + target = 3; + break; + case 35: + target = 4; + break; + case 40: + target = 5; + break; + case 123: + case 91: + target = 6; + break; + case 41: + target = 7; + break; + case 125: + case 93: + target = 8; + break; + default: + target = 9; + break; + } + c$0: + for (; true;) + switch (target) { + case 1: + t1.readChar$0(); + t1.readChar$0(); + break c$0; + case 2: + if (!this.scanComment$0()) + t1.readChar$0(); + break c$0; + case 3: + this.interpolatedString$0(); + break c$0; + case 4: + if (parens === 0 && t1.peekChar$1(1) === 123) { + if (start._scanner !== t1) + A.throwExpression(A.ArgumentError$(_s64_, _null)); + t3 = start.position; + if ((t3 === 0 ? 1 / t3 < 0 : t3 < 0) || t3 > t2) + A.throwExpression(A.ArgumentError$(_s17_ + t3, _null)); + t1._string_scanner$_position = t3; + t1._lastMatch = null; + return true; + } + t1.readChar$0(); + break c$0; + case 5: + ++parens; + target = 6; + continue c$0; + case 6: + next.toString; + brackets.push(A.opposite0(next)); + t1.readChar$0(); + break c$0; + case 7: + --parens; + target = 8; + continue c$0; + case 8: + if (brackets.length === 0 || brackets.pop() !== next) { + if (start._scanner !== t1) + A.throwExpression(A.ArgumentError$(_s64_, _null)); + t3 = start.position; + if ((t3 === 0 ? 1 / t3 < 0 : t3 < 0) || t3 > t2) + A.throwExpression(A.ArgumentError$(_s17_ + t3, _null)); + t1._string_scanner$_position = t3; + t1._lastMatch = null; + return false; + } + t1.readChar$0(); + break c$0; + case 9: + t1.readChar$0(); + break c$0; + } + } + t1.set$state(start); + return false; + }, + _stylesheet0$_tryUrlContents$2$name(start, $name) { + var t3, t4, buffer, t5, next, endPosition, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + _this.whitespaceWithoutComments$0(); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t5 = "" + ($name == null ? "url" : $name); + t3._contents = t5; + t3._contents = t5 + A.Primitives_stringFromCharCode(40); + for (; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + else if (next === 92) + t3._contents += A.S(_this.escape$0()); + else { + if (next !== 33) + if (next !== 37) + if (next !== 38) + t5 = next >= 42 && next <= 126 || next >= 128; + else + t5 = true; + else + t5 = true; + else + t5 = true; + if (t5) + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 35) + if (t1.peekChar$1(1) === 123) { + t5 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (next === 32 || next === 9 || next === 10 || next === 13 || next === 12) { + _this.whitespaceWithoutComments$0(); + if (t1.peekChar$0() !== 41) + break; + } else if (next === 41) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + endPosition = t1._string_scanner$_position; + t2 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t2, t5, endPosition); + t1._FileSpan$3(t2, t5, endPosition); + t5 = type$.Object; + t2 = A.List_List$of(t4, true, t5); + t4 = t3._contents; + if (t4.length !== 0) + t2.push(t4.charCodeAt(0) == 0 ? t4 : t4); + result = A.List_List$from(t2, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t3 = new A.Interpolation0(result, t1); + t3.Interpolation$20(t2, t1); + return t3; + } else + break; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _stylesheet0$_tryUrlContents$1(start) { + return this._stylesheet0$_tryUrlContents$2$name(start, null); + }, + dynamicUrl$0() { + var contents, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + contents = _this._stylesheet0$_tryUrlContents$1(start); + if (contents != null) + return new A.StringExpression0(contents, false); + return new A.InterpolatedFunctionExpression0(A.Interpolation$0(A._setArrayType(["url"], type$.JSArray_Object), t1.spanFrom$1(start)), _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, next, commentStart, end, t7, contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + $label0$1: + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 34: + case 39: + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + break; + case 47: + commentStart = t1._string_scanner$_position; + if (_this.scanComment$0()) { + if (t6) { + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, commentStart, end); + } + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 35: + if (t1.peekChar$1(1) === 123) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 13: + case 10: + case 12: + if (_this.get$indented()) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + case 33: + case 59: + case 123: + case 125: + break $label0$1; + case 117: + case 85: + t7 = t1._string_scanner$_position; + if (!_this.scanIdentifier$1("url")) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + contents = _this._stylesheet0$_tryUrlContents$1(new A._SpanScannerState(t1, t7)); + if (contents == null) { + if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); + t1._string_scanner$_position = t7; + t1._lastMatch = null; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else + buffer.addInterpolation$1(contents); + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + t3._contents += _this.identifier$0(); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + break; + } + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { + var t4, t5, t6, t7, wroteNewline, next, t8, start, end, contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)), + brackets = A._setArrayType([], type$.JSArray_int); + $label0$1: + for (t4 = t1.string, t5 = t4.length, t6 = !allowColon, t7 = !allowSemicolon, wroteNewline = false; true;) { + next = t1.peekChar$0(); + switch (next) { + case 92: + t3._contents += A.S(_this.escape$1$identifierStart(true)); + wroteNewline = false; + break; + case 34: + case 39: + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + wroteNewline = false; + break; + case 47: + if (t1.peekChar$1(1) === 42) { + t8 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t8.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + } else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 35: + if (t1.peekChar$1(1) === 123) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 32: + case 9: + if (!wroteNewline) { + t8 = t1.peekChar$1(1); + t8 = !(t8 === 32 || t8 === 9 || t8 === 10 || t8 === 13 || t8 === 12); + } else + t8 = true; + if (t8) + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else + t1.readChar$0(); + break; + case 10: + case 13: + case 12: + if (_this.get$indented()) + break $label0$1; + t8 = t1.peekChar$1(-1); + if (!(t8 === 10 || t8 === 13 || t8 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break; + case 40: + case 123: + case 91: + next.toString; + t3._contents += A.Primitives_stringFromCharCode(next); + brackets.push(A.opposite0(t1.readChar$0())); + wroteNewline = false; + break; + case 41: + case 125: + case 93: + if (brackets.length === 0) + break $label0$1; + next.toString; + t3._contents += A.Primitives_stringFromCharCode(next); + t1.expectChar$1(brackets.pop()); + wroteNewline = false; + break; + case 59: + if (t7 && brackets.length === 0) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 58: + if (t6 && brackets.length === 0) + break $label0$1; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + case 117: + case 85: + t8 = t1._string_scanner$_position; + if (!_this.scanIdentifier$1("url")) { + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + contents = _this._stylesheet0$_tryUrlContents$1(new A._SpanScannerState(t1, t8)); + if (contents == null) { + if ((t8 === 0 ? 1 / t8 < 0 : t8 < 0) || t8 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t8, null)); + t1._string_scanner$_position = t8; + t1._lastMatch = null; + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + } else + buffer.addInterpolation$1(contents); + wroteNewline = false; + break; + default: + if (next == null) + break $label0$1; + if (_this.lookingAtIdentifier$0()) + t3._contents += _this.identifier$0(); + else + t3._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + wroteNewline = false; + break; + } + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._interpolation_buffer0$_contents.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, allowEmpty, false); + }, + _stylesheet0$_interpolatedDeclarationValue$0() { + return this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, false, false); + }, + _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { + return this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(true, allowEmpty, allowSemicolon); + }, + interpolatedIdentifier$0() { + var first, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + t3 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer0(t2, t3); + if (t1.scanChar$1(45)) { + t2._contents += A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + t2._contents += A.Primitives_stringFromCharCode(45); + _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + } + first = t1.peekChar$0(); + if (first == null) + t1.error$1(0, _s20_); + else if (first === 95 || A.isAlphabetic1(first) || first >= 128) + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + else if (first === 92) + t2._contents += A.S(_this.escape$1$identifierStart(true)); + else if (first === 35 && t1.peekChar$1(1) === 123) { + t2 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(t2); + } else + t1.error$1(0, _s20_); + _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + }, + _stylesheet0$_interpolatedIdentifierBody$1(buffer) { + var t1, t2, t3, next, t4; + for (t1 = buffer._interpolation_buffer0$_contents, t2 = this.scanner, t3 = buffer._interpolation_buffer0$_text; true;) { + next = t2.peekChar$0(); + if (next == null) + break; + else { + if (next !== 95) + if (next !== 45) { + if (!(next >= 97 && next <= 122)) + t4 = next >= 65 && next <= 90; + else + t4 = true; + if (!t4) + t4 = next >= 48 && next <= 57; + else + t4 = true; + t4 = t4 || next >= 128; + } else + t4 = true; + else + t4 = true; + if (t4) + t3._contents += A.Primitives_stringFromCharCode(t2.readChar$0()); + else if (next === 92) + t3._contents += A.S(this.escape$0()); + else if (next === 35 && t2.peekChar$1(1) === 123) { + t4 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t1.push(t4); + } else + break; + } + } + }, + singleInterpolation$0() { + var contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$0(); + contents = _this._stylesheet0$_expression$0(); + t1.expectChar$1(125); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + return contents; + }, + _stylesheet0$_mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + for (; true;) { + _this.whitespace$0(); + _this._stylesheet0$_mediaQuery$1(buffer); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t4 = t3._contents += A.Primitives_stringFromCharCode(44); + t3._contents = t4 + A.Primitives_stringFromCharCode(32); + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_mediaQuery$1(buffer) { + var identifier1, t1, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet0$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer0$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer0$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer0$_text._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$0(); + buffer.addInterpolation$1(identifier1); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer0$_text; + t1._contents += A.Primitives_stringFromCharCode(32); + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$0(); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet0$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, _this = this; + for (t1 = buffer._interpolation_buffer0$_text; true;) { + _this._stylesheet0$_mediaOrInterp$1(buffer); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$0(); + t2 = t1._contents += A.Primitives_stringFromCharCode(32); + t2 += operator; + t1._contents = t2; + t1._contents = t2 + A.Primitives_stringFromCharCode(32); + } + }, + _stylesheet0$_mediaOrInterp$1(buffer) { + var interpolation; + if (this.scanner.peekChar$0() === 35) { + interpolation = this.singleInterpolation$0(); + buffer.addInterpolation$1(A.Interpolation$0(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation))); + } else + this._stylesheet0$_mediaInParens$1(buffer); + }, + _stylesheet0$_mediaInParens$1(buffer) { + var t2, needsParenDeprecation, needsNotDeprecation, expression, t3, t4, next, t5, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer0$_text; + t2._contents += A.Primitives_stringFromCharCode(40); + _this.whitespace$0(); + needsParenDeprecation = t1.peekChar$0() === 40; + needsNotDeprecation = _this.matchesIdentifier$1("not"); + expression = _this._stylesheet0$_expressionUntilComparison$0(); + if (needsParenDeprecation || needsNotDeprecation) { + t3 = needsParenDeprecation ? "(" : "not"; + _this.logger.warn$3$deprecation$span(0, 'Starting a @media query with "' + t3 + string$.x22x20is_d + expression.toString$0(0) + '}\nTo migrate to new behavior: #{"' + expression.toString$0(0) + string$.x22x7d__Fo, true, expression.get$span(expression)); + } + buffer._interpolation_buffer0$_flushText$0(); + t3 = buffer._interpolation_buffer0$_contents; + t3.push(expression); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t4 = t2._contents += A.Primitives_stringFromCharCode(58); + t2._contents = t4 + A.Primitives_stringFromCharCode(32); + t4 = _this._stylesheet0$_expression$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(t4); + } else { + next = t1.peekChar$0(); + t4 = next !== 60; + if (!t4 || next === 62 || next === 61) { + t2._contents += A.Primitives_stringFromCharCode(32); + t2._contents += A.Primitives_stringFromCharCode(t1.readChar$0()); + if ((!t4 || next === 62) && t1.scanChar$1(61)) + t2._contents += A.Primitives_stringFromCharCode(61); + t2._contents += A.Primitives_stringFromCharCode(32); + _this.whitespace$0(); + t5 = _this._stylesheet0$_expressionUntilComparison$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(t5); + if (!t4 || next === 62) { + next.toString; + t4 = t1.scanChar$1(next); + } else + t4 = false; + if (t4) { + t4 = t2._contents += A.Primitives_stringFromCharCode(32); + t2._contents = t4 + A.Primitives_stringFromCharCode(next); + if (t1.scanChar$1(61)) + t2._contents += A.Primitives_stringFromCharCode(61); + t2._contents += A.Primitives_stringFromCharCode(32); + _this.whitespace$0(); + t4 = _this._stylesheet0$_expressionUntilComparison$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(t4); + } + } + } + t1.expectChar$1(41); + _this.whitespace$0(); + t2._contents += A.Primitives_stringFromCharCode(41); + }, + _stylesheet0$_expressionUntilComparison$0() { + return this._stylesheet0$_expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure0(this)); + }, + _stylesheet0$_supportsCondition$0() { + var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + condition = _this._stylesheet0$_supportsConditionInParens$0(); + _this.whitespace$0(); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("or")) + operator = "or"; + else { + _this.expectIdentifier$1("and"); + operator = "and"; + } + _this.whitespace$0(); + right = _this._stylesheet0$_supportsConditionInParens$0(); + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = new A._FileSpan(t3, t2, endPosition); + t4._FileSpan$3(t3, t2, endPosition); + condition = new A.SupportsOperation0(condition, right, operator, t4); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return condition; + }, + _stylesheet0$_supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, operation, contents, identifier0, t2, $arguments, condition, exception, declaration, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0(identifier0, $arguments, t1.spanFrom$1(start)); + } else { + t2 = identifier0.contents; + if (t2.length !== 1 || !type$.Expression_2._is(B.JSArray_methods.get$first(t2))) + _this.error$2(0, "Expected @supports condition.", identifier0.span); + else + return new A.SupportsInterpolation0(type$.Expression_2._as(B.JSArray_methods.get$first(t2)), t1.spanFrom$1(start)); + } + } + t1.expectChar$1(40); + _this.whitespace$0(); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + condition = _this._stylesheet0$_supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation0(condition, t1.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._stylesheet0$_supportsCondition$0(); + t1.expectChar$1(41); + return condition; + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._stylesheet0$_inParentheses; + try { + $name = _this._stylesheet0$_expression$0(); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._stylesheet0$_inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + operation = _this._stylesheet0$_trySupportsOperation$2(identifier, nameStart); + if (operation != null) { + t1.expectChar$1(41); + return operation; + } + t2 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); + contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything0(contents, t1.spanFrom$1(start)); + } else + throw exception; + } + declaration = _this._stylesheet0$_supportsDeclarationValue$2($name, start); + t1.expectChar$1(41); + return declaration; + }, + _stylesheet0$_supportsDeclarationValue$2($name, start) { + var value, _this = this; + if ($name instanceof A.StringExpression0 && !$name.hasQuotes && B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--")) + value = new A.StringExpression0(_this._stylesheet0$_interpolatedDeclarationValue$0(), false); + else { + _this.whitespace$0(); + value = _this._stylesheet0$_expression$0(); + } + return new A.SupportsDeclaration0($name, value, _this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_trySupportsOperation$2(interpolation, start) { + var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!type$.Expression_2._is(expression)) + return _null; + t1 = _this.scanner; + beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.whitespace$0(); + for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("and")) + operator = "and"; + else { + if (!_this.scanIdentifier$1("or")) { + if (beforeWhitespace._scanner !== t1) + A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); + t2 = beforeWhitespace.position; + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = "or"; + } + _this.whitespace$0(); + right = _this._stylesheet0$_supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation0(expression, t3) : operation; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t2, endPosition); + t6._FileSpan$3(t5, t2, endPosition); + operation = new A.SupportsOperation0(t4, right, operator, t6); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return operation; + }, + _stylesheet0$_lookingAtInterpolatedIdentifier$0() { + var second, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic1(first) || first >= 128 || first === 92) + return true; + if (first === 35) + return t1.peekChar$1(1) === 123; + if (first !== 45) + return false; + second = t1.peekChar$1(1); + if (second == null) + return false; + if (second === 35) + return t1.peekChar$1(2) === 123; + return second === 95 || A.isAlphabetic1(second) || second >= 128 || second === 92 || second === 45; + }, + _stylesheet0$_lookingAtInterpolatedIdentifierBody$0() { + var t1 = this.scanner, + first = t1.peekChar$0(); + if (first == null) + return false; + if (first === 95 || A.isAlphabetic1(first) || first >= 128 || A.isDigit0(first) || first === 45 || first === 92) + return true; + return first === 35 && t1.peekChar$1(1) === 123; + }, + _stylesheet0$_lookingAtExpression$0() { + var next, + t1 = this.scanner, + character = t1.peekChar$0(); + if (character == null) + return false; + if (character === 46) + return t1.peekChar$1(1) !== 46; + if (character === 33) { + next = t1.peekChar$1(1); + if (next != null) + if ((next | 32) >>> 0 !== 105) + t1 = next === 32 || next === 9 || next === 10 || next === 13 || next === 12; + else + t1 = true; + else + t1 = true; + return t1; + } + if (character !== 40) + if (character !== 47) + if (character !== 91) + if (character !== 39) + if (character !== 34) + if (character !== 35) + if (character !== 43) + if (character !== 45) + if (character !== 92) + if (character !== 36) + if (character !== 38) + t1 = character === 95 || A.isAlphabetic1(character) || character >= 128 || A.isDigit0(character); + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + _stylesheet0$_withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); + this.whitespaceWithoutComments$0(); + return result; + }, + _stylesheet0$_withChildren$3(child, start, create) { + return this._stylesheet0$_withChildren$1$3(child, start, create, type$.dynamic); + }, + _stylesheet0$_urlString$0() { + var innerError, stackTrace, t2, exception, + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = this.string$0(); + try { + t2 = A.Uri_parse(url); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.FormatException._is(t2)) { + innerError = t2; + stackTrace = A.getTraceFromException(exception); + this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _stylesheet0$_publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$1$normalize(true); + _this._stylesheet0$_assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure0(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _stylesheet0$_assertPublic$2(identifier, span) { + var first = B.JSString_methods._codeUnitAt$1(identifier, 0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure0.prototype = { + call$0() { + var statements, t4, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure1(t1)); + t2.expectDone$0(); + t4 = t1._stylesheet0$_globalVariables; + t4 = t4.get$values(t4); + B.JSArray_methods.addAll$1(statements, A.MappedIterable_MappedIterable(t4, new A.StylesheetParser_parse__closure2(), A._instanceType(t4)._eval$1("Iterable.E"), type$.Statement_2)); + return A.Stylesheet$internal0(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.get$plainCss()); + }, + $signature: 520 + }; + A.StylesheetParser_parse__closure1.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$0(); + t1.string$0(); + return null; + } + return t1._stylesheet0$_statement$1$root(true); + }, + $signature: 521 + }; + A.StylesheetParser_parse__closure2.prototype = { + call$1(declaration) { + var t1 = declaration.name, + t2 = declaration.expression; + return A.VariableDeclaration$0(t1, new A.NullExpression0(t2.get$span(t2)), declaration.span, null, false, true, null); + }, + $signature: 522 + }; + A.StylesheetParser_parseArgumentDeclaration_closure0.prototype = { + call$0() { + var $arguments, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$0(); + t1.identifier$0(); + $arguments = t1._stylesheet0$_argumentDeclaration$0(); + t1.whitespace$0(); + t2.expectChar$1(123); + return $arguments; + }, + $signature: 523 + }; + A.StylesheetParser__parseSingleProduction_closure0.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser_parseSignature_closure.prototype = { + call$0() { + var $arguments, t2, t3, + t1 = this.$this, + $name = t1.identifier$0(); + t1.whitespace$0(); + if (this.requireParens || t1.scanner.peekChar$0() === 40) + $arguments = t1._stylesheet0$_argumentDeclaration$0(); + else { + t2 = t1.scanner; + t2 = A.FileLocation$_(t2._sourceFile, t2._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration0(B.List_empty22, null, A._FileSpan$(t2.file, t3, t3)); + } + t1.scanner.expectDone$0(); + return new A.Tuple2($name, $arguments, type$.Tuple2_String_ArgumentDeclaration); + }, + $signature: 524 + }; + A.StylesheetParser__statement_closure0.prototype = { + call$0() { + return this.$this._stylesheet0$_statement$0(); + }, + $signature: 138 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure1.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure2.prototype = { + call$0() { + return this.declaration; + }, + $signature: 525 + }; + A.StylesheetParser__declarationOrBuffer_closure1.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this.name, children, span, null); + }, + $signature: 88 + }; + A.StylesheetParser__declarationOrBuffer_closure2.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this.name, children, span, this._box_0.value); + }, + $signature: 88 + }; + A.StylesheetParser__styleRule_closure0.prototype = { + call$2(children, span) { + var _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) + t1.logger.warn$2$span(0, string$.This_s, _this._box_0.interpolation.span); + t1._stylesheet0$_inStyleRule = _this.wasInStyleRule; + return A.StyleRule$0(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); + }, + $signature: 527 + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure1.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this._box_0.name, children, span, null); + }, + $signature: 88 + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure2.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this._box_0.name, children, span, this.value); + }, + $signature: 88 + }; + A.StylesheetParser__atRootRule_closure1.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, this.query); + }, + $signature: 249 + }; + A.StylesheetParser__atRootRule_closure2.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, null); + }, + $signature: 249 + }; + A.StylesheetParser__eachRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + return A.EachRule$0(_this.variables, _this.list, children, span); + }, + $signature: 529 + }; + A.StylesheetParser__functionRule_closure0.prototype = { + call$2(children, span) { + return A.FunctionRule$0(this.name, this.$arguments, children, span, this.precedingComment); + }, + $signature: 530 + }; + A.StylesheetParser__forRule_closure1.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 28 + }; + A.StylesheetParser__forRule_closure2.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$0(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 531 + }; + A.StylesheetParser__memberList_closure0.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure0.prototype = { + call$2(children, span) { + return A.ContentBlock$0(this.contentArguments_, children, span); + }, + $signature: 532 + }; + A.StylesheetParser_mediaRule_closure0.prototype = { + call$2(children, span) { + return A.MediaRule$0(this.query, children, span); + }, + $signature: 533 + }; + A.StylesheetParser__mixinRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inMixin = false; + return A.MixinRule$0(_this.name, _this.$arguments, children, span, _this.precedingComment); + }, + $signature: 534 + }; + A.StylesheetParser_mozDocumentRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + _this.$this.logger.warn$3$deprecation$span(0, string$.x40_moz_, true, span); + return A.AtRule$0(_this.name, span, children, _this.value); + }, + $signature: 250 + }; + A.StylesheetParser_supportsRule_closure0.prototype = { + call$2(children, span) { + return A.SupportsRule$0(this.condition, children, span); + }, + $signature: 536 + }; + A.StylesheetParser__whileRule_closure0.prototype = { + call$2(children, span) { + this.$this._stylesheet0$_inControlDirective = this.wasInControlDirective; + return A.WhileRule$0(this.condition, children, span); + }, + $signature: 537 + }; + A.StylesheetParser_unknownAtRule_closure0.prototype = { + call$2(children, span) { + return A.AtRule$0(this.name, span, children, this._box_0.value); + }, + $signature: 250 + }; + A.StylesheetParser__expression_resetState0.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._stylesheet0$_singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation0.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._stylesheet0$_inParentheses && operator === B.BinaryOperator_qpm0 && t2._stylesheet0$_isSlashOperand$1(left) && t2._stylesheet0$_isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression0(B.BinaryOperator_qpm0, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression0(operator, left, right, false); + t2 = t1.allowSlash = false; + if (operator === B.BinaryOperator_qbf0 || operator === B.BinaryOperator_KlB0) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = B.JSString_methods.codeUnitAt$1(t4, t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + t3.logger.warn$3$deprecation$span(0, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, true, t1.get$span(t1)); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations0.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression0.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._stylesheet0$_inParentheses) { + t2._stylesheet0$_inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression_2); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 538 + }; + A.StylesheetParser__expression_addOperator0.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, + t1 = this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_qpm0 && operator !== B.BinaryOperator_axY0) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_qpm0; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator_2); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression_2); + t3 = this.resolveOneOperation; + t4 = operator.precedence; + while (true) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + operators.push(operator); + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operands.push(singleExpression); + t1.whitespace$0(); + t2.singleExpression_ = t1._stylesheet0$_singleExpression$0(); + }, + $signature: 539 + }; + A.StylesheetParser__expression_resolveSpaceExpressions0.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions != null) { + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_EVt0, false, t2); + t1.spaceExpressions_ = null; + } + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure0.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 28 + }; + A.StylesheetParser__unicodeRange_closure1.prototype = { + call$1(char) { + return char != null && A.isHex0(char); + }, + $signature: 32 + }; + A.StylesheetParser__unicodeRange_closure2.prototype = { + call$1(char) { + return char != null && A.isHex0(char); + }, + $signature: 32 + }; + A.StylesheetParser_namespacedExpression_closure0.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.StylesheetParser_trySpecialFunction_closure0.prototype = { + call$1(contents) { + return new A.StringExpression0(contents, false); + }, + $signature: 540 + }; + A.StylesheetParser__expressionUntilComparison_closure0.prototype = { + call$0() { + var t1 = this.$this.scanner, + next = t1.peekChar$0(); + if (next === 61) + return t1.peekChar$1(1) !== 61; + return next === 60 || next === 62; + }, + $signature: 28 + }; + A.StylesheetParser__publicIdentifier_closure0.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 31 + }; + A.Stylesheet0.prototype = { + Stylesheet$internal$3$plainCss0(children, span, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._stylesheet1$_forwards, t4 = this._stylesheet1$_uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule0) + t4.push(child); + else if (child instanceof A.ForwardRule0) + t3.push(child); + else if (!(child instanceof A.SilentComment0) && !(child instanceof A.LoudComment0) && !(child instanceof A.VariableDeclaration0)) + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return (t1 && B.JSArray_methods).join$1(t1, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsExpression0.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + }, + $isExpression0: 1, + $isAstNode0: 1 + }; + A.ModifiableCssSupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$0(this.condition, this.span); + }, + $isCssSupportsRule0: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.NodeToDartImporter.prototype = { + canonicalize$1(_, url) { + var t1, + result = this._sync$_canonicalize.call$2(url.toString$0(0), {fromImport: A.fromImport0()}); + if (result == null) + return null; + t1 = self.URL; + if (result instanceof t1) + return A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The canonicalize() function can't return a Promise for synchronous compile functions.")); + else + A.jsThrow(new self.Error(string$.The_ca)); + }, + load$1(_, url) { + var t1, contents, syntax, t2, + result = this._sync$_load.call$1(new self.URL(url.toString$0(0))); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The load() function can't return a Promise for synchronous compile functions.")); + type$.NodeImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + return A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils1__jsToDartUrl$closure()), t2); + } + }; + A.Syntax0.prototype = { + toString$0(_) { + return this._syntax0$_name; + } + }; + A.TerseLogger0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var firstParagraph, t1, t2, count; + if (deprecation) { + firstParagraph = B.JSArray_methods.get$first(message.split("\n\n")); + t1 = this._terse$_warningCounts; + t2 = t1.$index(0, firstParagraph); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, firstParagraph, count); + if (count > 5) + return; + } + this._terse$_inner.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); + }, + warn$2$deprecation($receiver, message, deprecation) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, null, null); + }, + warn$2$span($receiver, message, span) { + return this.warn$4$deprecation$span$trace($receiver, message, false, span, null); + }, + warn$3$deprecation$span($receiver, message, deprecation, span) { + return this.warn$4$deprecation$span$trace($receiver, message, deprecation, span, null); + }, + warn$2$trace($receiver, message, trace) { + return this.warn$4$deprecation$span$trace($receiver, message, false, null, trace); + }, + debug$2(_, message, span) { + return this._terse$_inner.debug$2(0, message, span); + }, + summarize$1$node(node) { + var t2, total, + t1 = this._terse$_warningCounts; + t1 = t1.get$values(t1); + t2 = A._instanceType(t1); + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.TerseLogger_summarize_closure1(), t2._eval$1("WhereIterable")), new A.TerseLogger_summarize_closure2(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = node ? "" : string$.x0aRun_i; + this._terse$_inner.warn$1(0, "" + total + string$.x20repet + t1); + } + } + }; + A.TerseLogger_summarize_closure1.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 54 + }; + A.TerseLogger_summarize_closure2.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 154 + }; + A.TypeSelector0.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector0(new A.QualifiedName0(t1.name + suffix, t1.namespace)); + }, + unify$1(compound) { + var unified, t1; + if (B.JSArray_methods.get$first(compound) instanceof A.UniversalSelector0 || B.JSArray_methods.get$first(compound) instanceof A.TypeSelector0) { + unified = A.unifyUniversalAndElement0(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2; + if (!this.super$SimpleSelector$isSuperselector0(other)) + if (other instanceof A.TypeSelector0) { + t1 = this.name; + t2 = other.name; + if (t1.name === t2.name) { + t1 = t1.namespace; + t1 = t1 === "*" || t1 == t2.namespace; + } else + t1 = false; + } else + t1 = false; + else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector0 && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.Types.prototype = {}; + A.UnaryOperationExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_not0 ? t2 + A.Primitives_stringFromCharCode(32) : t2; + t1 += this.operand.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.UnitlessSassNumber0.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber0(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber0(this._number1$_value, new A.Tuple2(numerator, denominator, type$.Tuple2_SassNumber_SassNumber_2)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceToMatch$3(other, $name, otherName) { + return other.withValue$1(this._number1$_value); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_value; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertToMatch(other, $name, otherName) : this; + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : this._number1$_value; + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this._number1$_value, newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number1$_value; + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThan0(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThanOrEquals0(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThan0(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThanOrEquals0(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(A.moduloLikeSass0(this._number1$_value, other._number1$_value)); + return this.super$SassNumber$modulo0(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value + other._number1$_value); + return this.super$SassNumber$plus0(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value - other._number1$_value); + return this.super$SassNumber$minus0(other); + }, + times$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value * other._number1$_value); + return this.super$SassNumber$times0(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value / other._number1$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits0(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber0(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy0(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber0(-this._number1$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber0 && A.fuzzyEquals0(this._number1$_value, other._number1$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode0(this._number1$_value) : t1; + } + }; + A.UniversalSelector0.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var unified, t1, _this = this, + first = B.JSArray_methods.get$first(compound); + if (first instanceof A.UniversalSelector0 || first instanceof A.TypeSelector0) { + unified = A.unifyUniversalAndElement0(_this, first); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + if (compound.length === 1) + if (first instanceof A.PseudoSelector0) + t1 = first.isClass && first.name === "host" || first.get$isHostContext(); + else + t1 = false; + else + t1 = false; + if (t1) + return null; + } + t1 = _this.namespace; + if (t1 != null && t1 !== "*") { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + if (compound.length !== 0) + return compound; + return A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector0) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector0) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector0(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector0 && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A.UnprefixedMapView0.prototype = { + get$keys(_) { + return new A._UnprefixedKeys0(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.$index(0, this._unprefixed_map_view0$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view0$_map.containsKey$1(this._unprefixed_map_view0$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.remove$1(0, this._unprefixed_map_view0$_prefix + key) : null; + } + }; + A._UnprefixedKeys0.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view0$_view._unprefixed_map_view0$_map; + t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure1(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure2(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view0$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure1.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix); + }, + $signature: 8 + }; + A._UnprefixedKeys_iterator_closure2.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix.length); + }, + $signature: 5 + }; + A.JSUrl0.prototype = {}; + A.UseRule0.prototype = { + UseRule$4$configuration0(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText0(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.UserDefinedCallable0.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isAsyncCallable0: 1, + $isCallable0: 1 + }; + A.resolveImportPath_closure1.prototype = { + call$0() { + return A._exactlyOne0(A._tryPath0($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 42 + }; + A.resolveImportPath_closure2.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(this.path + ".import")); + }, + $signature: 42 + }; + A._tryPathAsDirectory_closure0.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(A.join(this.path, "index.import", null))); + }, + $signature: 42 + }; + A._exactlyOne_closure0.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 5 + }; + A._PropertyDescriptor0.prototype = {}; + A.futureToPromise_closure0.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure0(resolve), new A.futureToPromise__closure1(reject), type$.void); + }, + $signature: 541 + }; + A.futureToPromise__closure0.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature: 26 + }; + A.futureToPromise__closure1.prototype = { + call$2(error, stackTrace) { + A.attachTrace0(error, stackTrace); + this.reject.call$1(error); + }, + $signature: 73 + }; + A.objectToMap_closure.prototype = { + call$2(key, value) { + this.map.$indexSet(0, key, value); + return value; + }, + $signature: 128 + }; + A.indent_closure0.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 5 + }; + A.flattenVertically_closure1.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure2.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(queue) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack0.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure0.prototype = { + call$2(key, inner) { + var t1 = this.destination, + innerDestination = t1.$index(0, key); + if (innerDestination != null) + innerDestination.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.CssValue0.prototype = { + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode0: 1, + get$value(receiver) { + return this.value; + }, + get$span(receiver) { + return this.span; + } + }; + A.ValueExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(this.value, true, true); + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssValue0.prototype = { + toString$0(_) { + return A.serializeSelector0(this.value, true); + }, + $isAstNode0: 1, + $isCssValue0: 1, + get$value(receiver) { + return this.value; + }, + get$span(receiver) { + return this.span; + } + }; + A.valueClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(B.C__SassNull0.constructor))).constructor); + A.JSClassExtension_setCustomInspect(jsClass, new A.valueClass__closure()); + t1 = type$.String; + t2 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["asList", new A.valueClass__closure0(), "hasBrackets", new A.valueClass__closure1(), "isTruthy", new A.valueClass__closure2(), "realNull", new A.valueClass__closure3(), "separator", new A.valueClass__closure4()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["sassIndexToListIndex", new A.valueClass__closure5(), "get", new A.valueClass__closure6(), "assertBoolean", new A.valueClass__closure7(), "assertColor", new A.valueClass__closure8(), "assertFunction", new A.valueClass__closure9(), "assertMap", new A.valueClass__closure10(), "assertNumber", new A.valueClass__closure11(), "assertString", new A.valueClass__closure12(), "tryMap", new A.valueClass__closure13(), "equals", new A.valueClass__closure14(), "hashCode", new A.valueClass__closure15(), "toString", new A.valueClass__closure16()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + return jsClass; + }, + $signature: 25 + }; + A.valueClass__closure.prototype = { + call$1($self) { + return J.toString$0$($self); + }, + $signature: 46 + }; + A.valueClass__closure0.prototype = { + call$1($self) { + return new self.immutable.List($self.get$asList()); + }, + $signature: 542 + }; + A.valueClass__closure1.prototype = { + call$1($self) { + return $self.get$hasBrackets(); + }, + $signature: 44 + }; + A.valueClass__closure2.prototype = { + call$1($self) { + return $self.get$isTruthy(); + }, + $signature: 44 + }; + A.valueClass__closure3.prototype = { + call$1($self) { + return $self.get$realNull(); + }, + $signature: 218 + }; + A.valueClass__closure4.prototype = { + call$1($self) { + return $self.get$separator($self).separator; + }, + $signature: 543 + }; + A.valueClass__closure5.prototype = { + call$3($self, sassIndex, $name) { + return $self.sassIndexToListIndex$2(sassIndex, $name); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 544 + }; + A.valueClass__closure6.prototype = { + call$2($self, index) { + return index < 1 && index >= -1 ? $self : self.undefined; + }, + $signature: 231 + }; + A.valueClass__closure7.prototype = { + call$2($self, $name) { + return $self.assertBoolean$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 545 + }; + A.valueClass__closure8.prototype = { + call$2($self, $name) { + return $self.assertColor$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 546 + }; + A.valueClass__closure9.prototype = { + call$2($self, $name) { + return $self.assertFunction$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 547 + }; + A.valueClass__closure10.prototype = { + call$2($self, $name) { + return $self.assertMap$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 548 + }; + A.valueClass__closure11.prototype = { + call$2($self, $name) { + return $self.assertNumber$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 549 + }; + A.valueClass__closure12.prototype = { + call$2($self, $name) { + return $self.assertString$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 550 + }; + A.valueClass__closure13.prototype = { + call$1($self) { + return $self.tryMap$0(); + }, + $signature: 551 + }; + A.valueClass__closure14.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 552 + }; + A.valueClass__closure15.prototype = { + call$2($self, _) { + return $self.get$hashCode($self); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 553 + }; + A.valueClass__closure16.prototype = { + call$1($self) { + return A.serializeValue0($self, true, true); + }, + $signature: 201 + }; + A.Value0.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_undecided0; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value_2); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isVar() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var index = sassIndex.assertNumber$1($name).assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$0("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertBoolean$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a boolean.", $name)); + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a string.", $name)); + }, + _value$_selectorString$1($name) { + var string = this._value$_selectorStringOrNull$0(); + if (string != null) + return string; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + string$.x20is_noa, $name)); + }, + _value$_selectorStringOrNull$0() { + var t1, t2, result, t3, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString0) + return _this._string0$_text; + if (!(_this instanceof A.SassList0)) + return _null; + t1 = _this._list1$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + t3 = _this._list1$_separator; + switch (t3) { + case B.ListSeparator_rXA0: + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString0) + result.push(complex._string0$_text); + else if (complex instanceof A.SassList0 && complex._list1$_separator === B.ListSeparator_EVt0) { + string = complex._value$_selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + } else + return _null; + } + break; + case B.ListSeparator_zg90: + return _null; + default: + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (compound instanceof A.SassString0) + result.push(compound._string0$_text); + else + return _null; + } + break; + } + return B.JSArray_methods.join$1(result, t3 === B.ListSeparator_rXA0 ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$0(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + if (other instanceof A.SassString0) + return new A.SassString0(A.serializeValue0(this, false, true) + other._string0$_text, other._string0$_hasQuotes); + else if (other instanceof A.SassCalculation0) + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + else + return new A.SassString0(A.serializeValue0(this, false, true) + A.serializeValue0(other, false, true), false); + }, + minus$1(other) { + if (other instanceof A.SassCalculation0) + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + else + return new A.SassString0(A.serializeValue0(this, false, true) + "-" + A.serializeValue0(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString0(A.serializeValue0(this, false, true) + "/" + A.serializeValue0(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString0("+" + A.serializeValue0(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString0("-" + A.serializeValue0(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false0; + }, + withoutSlash$0() { + return this; + }, + toString$0(_) { + return A.serializeValue0(this, true, true); + } + }; + A.VariableExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? "$" + t2 : t1 + ".$" + t2; + }, + $isExpression0: 1, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + $isAstNode0: 1, + $isStatement0: 1, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + (function aliases() { + var _ = J.LegacyJavaScriptObject.prototype; + _.super$LegacyJavaScriptObject$toString = _.toString$0; + _ = A.JsLinkedHashMap.prototype; + _.super$JsLinkedHashMap$internalContainsKey = _.internalContainsKey$1; + _.super$JsLinkedHashMap$internalGet = _.internalGet$1; + _.super$JsLinkedHashMap$internalSet = _.internalSet$2; + _.super$JsLinkedHashMap$internalRemove = _.internalRemove$1; + _ = A._BufferingStreamSubscription.prototype; + _.super$_BufferingStreamSubscription$_add = _._async$_add$1; + _.super$_BufferingStreamSubscription$_addError = _._addError$2; + _ = A.ListMixin.prototype; + _.super$ListMixin$setRange = _.setRange$4; + _ = A.Iterable.prototype; + _.super$Iterable$where = _.where$1; + _.super$Iterable$skipWhile = _.skipWhile$1; + _ = A.ModifiableCssParentNode.prototype; + _.super$ModifiableCssParentNode$addChild = _.addChild$1; + _ = A.SimpleSelector.prototype; + _.super$SimpleSelector$addSuffix = _.addSuffix$1; + _.super$SimpleSelector$unify = _.unify$1; + _.super$SimpleSelector$isSuperselector = _.isSuperselector$1; + _ = A.Parser.prototype; + _.super$Parser$silentComment = _.silentComment$0; + _ = A.StylesheetParser.prototype; + _.super$StylesheetParser$importArgument = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression = _.namespacedExpression$2; + _ = A.Value.prototype; + _.super$Value$assertMap = _.assertMap$1; + _.super$Value$plus = _.plus$1; + _.super$Value$minus = _.minus$1; + _.super$Value$dividedBy = _.dividedBy$1; + _ = A.SassNumber.prototype; + _.super$SassNumber$convertValueToMatch = _.convertValueToMatch$3; + _.super$SassNumber$coerce = _.coerce$3; + _.super$SassNumber$coerceValue = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit = _.coerceValueToUnit$2; + _.super$SassNumber$coerceValueToMatch = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals = _.lessThanOrEquals$1; + _.super$SassNumber$modulo = _.modulo$1; + _.super$SassNumber$plus = _.plus$1; + _.super$SassNumber$minus = _.minus$1; + _.super$SassNumber$times = _.times$1; + _.super$SassNumber$dividedBy = _.dividedBy$1; + _ = A.AnySelectorVisitor.prototype; + _.super$AnySelectorVisitor$visitComplexSelector = _.visitComplexSelector$1; + _ = A.EveryCssVisitor.prototype; + _.super$EveryCssVisitor$visitCssStyleRule = _.visitCssStyleRule$1; + _ = A.SourceSpanMixin.prototype; + _.super$SourceSpanMixin$compareTo = _.compareTo$1; + _.super$SourceSpanMixin$$eq = _.$eq; + _ = A.StringScanner.prototype; + _.super$StringScanner$readChar = _.readChar$0; + _.super$StringScanner$scanChar = _.scanChar$1; + _.super$StringScanner$scan = _.scan$1; + _.super$StringScanner$matches = _.matches$1; + _ = A.AnySelectorVisitor0.prototype; + _.super$AnySelectorVisitor$visitComplexSelector0 = _.visitComplexSelector$1; + _ = A.EveryCssVisitor0.prototype; + _.super$EveryCssVisitor$visitCssStyleRule0 = _.visitCssStyleRule$1; + _ = A.ModifiableCssParentNode0.prototype; + _.super$ModifiableCssParentNode$addChild0 = _.addChild$1; + _ = A.SassNumber0.prototype; + _.super$SassNumber$convertToMatch = _.convertToMatch$3; + _.super$SassNumber$convertValueToMatch0 = _.convertValueToMatch$3; + _.super$SassNumber$coerce0 = _.coerce$3; + _.super$SassNumber$coerceValue0 = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit0 = _.coerceValueToUnit$2; + _.super$SassNumber$coerceToMatch = _.coerceToMatch$3; + _.super$SassNumber$coerceValueToMatch0 = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan0 = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals0 = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan0 = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals0 = _.lessThanOrEquals$1; + _.super$SassNumber$modulo0 = _.modulo$1; + _.super$SassNumber$plus0 = _.plus$1; + _.super$SassNumber$minus0 = _.minus$1; + _.super$SassNumber$times0 = _.times$1; + _.super$SassNumber$dividedBy0 = _.dividedBy$1; + _ = A.Parser1.prototype; + _.super$Parser$silentComment0 = _.silentComment$0; + _ = A.SimpleSelector0.prototype; + _.super$SimpleSelector$addSuffix0 = _.addSuffix$1; + _.super$SimpleSelector$unify0 = _.unify$1; + _.super$SimpleSelector$isSuperselector0 = _.isSuperselector$1; + _ = A.StylesheetParser0.prototype; + _.super$StylesheetParser$importArgument0 = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression0 = _.namespacedExpression$2; + _ = A.Value0.prototype; + _.super$Value$assertMap0 = _.assertMap$1; + _.super$Value$plus0 = _.plus$1; + _.super$Value$minus0 = _.minus$1; + _.super$Value$dividedBy0 = _.dividedBy$1; + })(); + (function installTearOffs() { + var _static_2 = hunkHelpers._static_2, + _instance_1_i = hunkHelpers._instance_1i, + _instance_1_u = hunkHelpers._instance_1u, + _static_1 = hunkHelpers._static_1, + _static_0 = hunkHelpers._static_0, + _static = hunkHelpers.installStaticTearOff, + _instance = hunkHelpers.installInstanceTearOff, + _instance_2_u = hunkHelpers._instance_2u, + _instance_0_i = hunkHelpers._instance_0i, + _instance_0_u = hunkHelpers._instance_0u; + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 251); + _instance_1_i(J.JSArray.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._CastIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A.CastMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "_js_helper_GeneralConstantMap__constantMapHashCode$closure", "GeneralConstantMap__constantMapHashCode", 104); + _instance_1_u(A.ConstantStringMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.GeneralConstantMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.JsLinkedHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 120); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 120); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 120); + _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 139); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 64); + _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 557, 0); + _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { + return A._rootRun($self, $parent, zone, f, type$.dynamic); + }], 558, 1); + _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { + return A._rootRunUnary($self, $parent, zone, f, arg, type$.dynamic, type$.dynamic); + }], 559, 1); + _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { + return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, type$.dynamic, type$.dynamic, type$.dynamic); + }], 560, 1); + _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { + return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); + }], 561, 0); + _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { + return A._rootRegisterUnaryCallback($self, $parent, zone, f, type$.dynamic, type$.dynamic); + }], 562, 0); + _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { + return A._rootRegisterBinaryCallback($self, $parent, zone, f, type$.dynamic, type$.dynamic, type$.dynamic); + }], 563, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 564, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 565, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 566, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 567, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 568, 0); + _static_1(A, "async___printToZone$closure", "_printToZone", 119); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 569, 0); + _instance(A._AsyncCompleter.prototype, "get$complete", 0, 0, function() { + return [null]; + }, ["call$1", "call$0"], ["complete$1", "complete$0"], 173, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 64); + var _; + _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 26); + _instance(_, "get$addError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 196, 0, 0); + _instance_0_i(_, "get$close", "close$0", 489); + _instance_1_u(_, "get$_async$_add", "_async$_add$1", 26); + _instance_2_u(_, "get$_addError", "_addError$2", 64); + _instance_0_u(_, "get$_close", "_close$0", 0); + _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance(_ = A._BufferingStreamSubscription.prototype, "get$pause", 1, 0, null, ["call$1", "call$0"], ["pause$1", "pause$0"], 497, 0, 0); + _instance_0_i(_, "get$resume", "resume$0", 0); + _instance_0_u(_, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_ = A._StreamIterator.prototype, "get$_onData", "_onData$1", 26); + _instance_2_u(_, "get$_onError", "_onError$2", 64); + _instance_0_u(_, "get$_onDone", "_onDone$0", 0); + _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_, "get$_handleData", "_handleData$1", 26); + _instance_2_u(_, "get$_handleError", "_handleError$2", 509); + _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); + _static_2(A, "collection___defaultEquals$closure", "_defaultEquals", 254); + _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 104); + _static_2(A, "collection_ListMixin__compareAny$closure", "ListMixin__compareAny", 251); + _instance_1_u(A._HashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A._LinkedCustomHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance(_ = A._LinkedHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 142, 0, 0); + _instance_1_i(_, "get$contains", "contains$1", 9); + _instance_1_i(_, "get$add", "add$1", 9); + _instance(A._LinkedIdentityHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 142, 0, 0); + _instance_1_u(A.MapMixin.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A._UnmodifiableSet.prototype, "get$contains", "contains$1", 9); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 94); + _static_1(A, "core__identityHashCode$closure", "identityHashCode", 104); + _static_2(A, "core__identical$closure", "identical", 254); + _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 5); + _instance_1_i(A.Iterable.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.StringBuffer.prototype, "get$write", "write$1", 26); + _static(A, "math0__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { + return A.max(a, b, type$.num); + }], 571, 1); + _instance_1_u(_ = A.StreamCompleter.prototype, "get$setSourceStream", "setSourceStream$1", 26); + _instance(_, "get$setError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["setError$2", "setError$1"], 196, 0, 0); + _instance_0_u(_ = A.StreamGroup.prototype, "get$_onListen", "_onListen$0", 0); + _instance_0_u(_, "get$_onPause", "_onPause$0", 0); + _instance_0_u(_, "get$_onResume", "_onResume$0", 0); + _instance_0_u(_, "get$_onCancel", "_onCancel$0", 156); + _instance_0_i(A.ReplAdapter.prototype, "get$exit", "exit$0", 0); + _instance_1_i(A.EmptyUnmodifiableSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._DelegatingIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.MapKeySet.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A._IsInvisibleVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 16); + _instance_1_u(A._IsBogusVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 16); + _instance_1_u(A._IsUselessVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 16); + _instance_1_u(_ = A.SelectorList.prototype, "get$_complexContainsParentSelector", "_complexContainsParentSelector$1", 16); + _instance_1_u(_, "get$isSuperselector", "isSuperselector$1", 67); + _instance_1_u(A.PseudoSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.SimpleSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.TypeSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.UniversalSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.EmptyExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 155); + _instance_1_u(A.ExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 155); + _static_1(A, "functions___isUnique$closure", "_isUnique", 14); + _static_1(A, "color0___opacify$closure", "_opacify", 23); + _static_1(A, "color0___transparentize$closure", "_transparentize", 23); + _instance_0_u(_ = A.Parser.prototype, "get$whitespace", "whitespace$0", 0); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 30); + _instance_0_u(A.SassParser.prototype, "get$loudComment", "loudComment$0", 0); + _instance(_ = A.StylesheetParser.prototype, "get$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_statement$1$root", "_statement$0"], 326, 0, 0); + _instance_0_u(_, "get$_declarationChild", "_declarationChild$0", 115); + _instance_0_u(_, "get$_functionChild", "_functionChild$0", 115); + _instance(_, "get$_expression", 0, 0, null, ["call$3$bracketList$singleEquals$until", "call$0", "call$2$singleEquals$until", "call$1$bracketList", "call$1$until"], ["_expression$3$bracketList$singleEquals$until", "_expression$0", "_expression$2$singleEquals$until", "_expression$1$bracketList", "_expression$1$until"], 329, 0, 0); + _instance_1_u(A.LimitedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MergedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 101, 0, 0); + _instance_1_i(A.NoSourceMapBuffer.prototype, "get$write", "write$1", 26); + _instance_1_u(A.PrefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PublicMemberMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.SourceMapBuffer.prototype, "get$write", "write$1", 26); + _instance_1_u(A.UnprefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils__isPublic$closure", "isPublic", 8); + _static_1(A, "calculation_SassCalculation__simplify$closure", "SassCalculation__simplify", 169); + _instance_1_u(A.AnySelectorVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 16); + _instance(_ = A._EvaluateVisitor0.prototype, "get$_async_evaluate$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate$_interpolationToValue$3$trim$warnForColor", "_async_evaluate$_interpolationToValue$1", "_async_evaluate$_interpolationToValue$2$warnForColor"], 382, 0, 0); + _instance_1_u(_, "get$_async_evaluate$_expressionNode", "_async_evaluate$_expressionNode$1", 183); + _instance(_ = A._EvaluateVisitor.prototype, "get$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_interpolationToValue$3$trim$warnForColor", "_interpolationToValue$1", "_interpolationToValue$2$warnForColor"], 526, 0, 0); + _instance_1_u(_, "get$_expressionNode", "_expressionNode$1", 183); + _instance_1_u(_ = A.RecursiveStatementVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", 262); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", 263); + _instance_1_u(_ = A._SerializeVisitor.prototype, "get$_visitMediaQuery", "_visitMediaQuery$1", 264); + _instance_1_u(_, "get$_writeCalculationValue", "_writeCalculationValue$1", 118); + _instance_1_u(_ = A.StatementSearchVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor.T?(ContentBlock)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor.T?(List)"); + _instance(A.SourceSpanMixin.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 101, 0, 0); + _static(A, "from_handlers__TransformByHandlers__defaultHandleError$closure", 3, null, ["call$1$3", "call$3"], ["TransformByHandlers__defaultHandleError", function(error, stackTrace, sink) { + return A.TransformByHandlers__defaultHandleError(error, stackTrace, sink, type$.dynamic); + }], 573, 0); + _static(A, "rate_limit___collect$closure", 2, null, ["call$1$2", "call$2"], ["_collect", function($event, soFar) { + return A._collect($event, soFar, type$.dynamic); + }], 574, 0); + _instance_1_u(A.AnySelectorVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 15); + _instance(_ = A._EvaluateVisitor2.prototype, "get$_async_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate0$_interpolationToValue$3$trim$warnForColor", "_async_evaluate0$_interpolationToValue$1", "_async_evaluate0$_interpolationToValue$2$warnForColor"], 306, 0, 0); + _instance_1_u(_, "get$_async_evaluate0$_expressionNode", "_async_evaluate0$_expressionNode$1", 161); + _static_1(A, "calculation0_SassCalculation__simplify$closure", "SassCalculation__simplify0", 169); + _static_1(A, "color2___opacify$closure", "_opacify0", 24); + _static_1(A, "color2___transparentize$closure", "_transparentize0", 24); + _static(A, "compile__compile$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compile0", function(path) { + return A.compile0(path, null); + }], 575, 0); + _static(A, "compile__compileString$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileString0", function(text) { + return A.compileString0(text, null); + }], 576, 0); + _static(A, "compile__compileAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileAsync1", function(path) { + return A.compileAsync1(path, null); + }], 577, 0); + _static(A, "compile__compileStringAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileStringAsync1", function(text) { + return A.compileStringAsync1(text, null); + }], 578, 0); + _static_1(A, "compile___parseImporter$closure", "_parseImporter0", 579); + _instance_1_u(A.EmptyExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 210); + _instance(_ = A._EvaluateVisitor1.prototype, "get$_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_evaluate0$_interpolationToValue$3$trim$warnForColor", "_evaluate0$_interpolationToValue$1", "_evaluate0$_interpolationToValue$2$warnForColor"], 491, 0, 0); + _instance_1_u(_, "get$_evaluate0$_expressionNode", "_evaluate0$_expressionNode$1", 161); + _instance_1_u(A.ExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 210); + _static_1(A, "functions0___isUnique$closure", "_isUnique0", 13); + _static_1(A, "immutable__jsToDartList$closure", "jsToDartList", 580); + _static_2(A, "legacy__render$closure", "render", 581); + _static_1(A, "legacy__renderSync$closure", "renderSync", 582); + _instance_1_u(A.LimitedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(_ = A.SelectorList0.prototype, "get$_list2$_complexContainsParentSelector", "_list2$_complexContainsParentSelector$1", 15); + _instance_1_u(_, "get$isSuperselector", "isSuperselector$1", 66); + _instance_1_u(A.MergedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan0.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 101, 0, 0); + _instance_1_i(A.NoSourceMapBuffer0.prototype, "get$write", "write$1", 26); + _instance_0_u(_ = A.Parser1.prototype, "get$whitespace", "whitespace$0", 0); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 30); + _instance_1_u(A.PrefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PseudoSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.PublicMemberMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "sass__main$closure", "main0", 583); + _instance_0_u(A.SassParser0.prototype, "get$loudComment", "loudComment$0", 0); + _instance_1_u(A._IsInvisibleVisitor2.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 15); + _instance_1_u(A._IsBogusVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 15); + _instance_1_u(A._IsUselessVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 15); + _instance_1_u(_ = A._SerializeVisitor0.prototype, "get$_serialize0$_visitMediaQuery", "_serialize0$_visitMediaQuery$1", 503); + _instance_1_u(_, "get$_serialize0$_writeCalculationValue", "_serialize0$_writeCalculationValue$1", 118); + _instance_1_u(A.SimpleSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_i(A.SourceMapBuffer0.prototype, "get$write", "write$1", 26); + _instance_1_u(_ = A.StatementSearchVisitor0.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor0.T?(ContentBlock0)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor0.T?(List)"); + _instance(_ = A.StylesheetParser0.prototype, "get$_stylesheet0$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_stylesheet0$_statement$1$root", "_stylesheet0$_statement$0"], 518, 0, 0); + _instance_0_u(_, "get$_stylesheet0$_declarationChild", "_stylesheet0$_declarationChild$0", 138); + _instance_0_u(_, "get$_stylesheet0$_functionChild", "_stylesheet0$_functionChild$0", 138); + _instance_1_u(A.TypeSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.UniversalSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.UnprefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils1__jsToDartUrl$closure", "jsToDartUrl", 584); + _static_1(A, "utils1__dartToJSUrl$closure", "dartToJSUrl", 585); + _static_1(A, "utils0__isPublic$closure", "isPublic0", 8); + _static(A, "path__absolute$closure", 1, function() { + return [null, null, null, null, null, null]; + }, ["call$7", "call$1", "call$2", "call$3", "call$4", "call$6", "call$5"], ["absolute", function(part1) { + return A.absolute(part1, null, null, null, null, null, null); + }, function(part1, part2) { + return A.absolute(part1, part2, null, null, null, null, null); + }, function(part1, part2, part3) { + return A.absolute(part1, part2, part3, null, null, null, null); + }, function(part1, part2, part3, part4) { + return A.absolute(part1, part2, part3, part4, null, null, null); + }, function(part1, part2, part3, part4, part5, part6) { + return A.absolute(part1, part2, part3, part4, part5, part6, null); + }, function(part1, part2, part3, part4, part5) { + return A.absolute(part1, part2, part3, part4, part5, null, null); + }], 586, 0); + _static_1(A, "path__prettyUri$closure", "prettyUri", 86); + _static_1(A, "character__isWhitespace$closure", "isWhitespace", 32); + _static_1(A, "character__isNewline$closure", "isNewline", 32); + _static_1(A, "character__isHex$closure", "isHex", 32); + _static_2(A, "number0__fuzzyLessThan$closure", "fuzzyLessThan", 43); + _static_2(A, "number0__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals", 43); + _static_2(A, "number0__fuzzyGreaterThan$closure", "fuzzyGreaterThan", 43); + _static_2(A, "number0__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals", 43); + _static_2(A, "number0__moduloLikeSass$closure", "moduloLikeSass", 57); + _static_1(A, "character0__isWhitespace$closure", "isWhitespace0", 32); + _static_1(A, "character0__isNewline$closure", "isNewline0", 32); + _static_1(A, "character0__isHex$closure", "isHex0", 32); + _static_2(A, "number2__fuzzyLessThan$closure", "fuzzyLessThan0", 43); + _static_2(A, "number2__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals0", 43); + _static_2(A, "number2__fuzzyGreaterThan$closure", "fuzzyGreaterThan0", 43); + _static_2(A, "number2__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals0", 43); + _static_1(A, "number2__fuzzyRound$closure", "fuzzyRound0", 588); + _static_2(A, "number2__moduloLikeSass$closure", "moduloLikeSass0", 57); + _static_1(A, "value0__wrapValue$closure", "wrapValue", 392); + })(); + (function inheritance() { + var _mixin = hunkHelpers.mixin, + _inherit = hunkHelpers.inherit, + _inheritMany = hunkHelpers.inheritMany; + _inherit(A.Object, null); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapMixin, A.Error, A._ListBase_Object_ListMixin, A.SentinelValue, A.ListIterator, A.Iterator, A.ExpandIterator, A.EmptyIterator, A.FollowedByIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.Symbol, A.MapView, A.ConstantMap, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._IterationMarker, A._SyncStarIterator, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A.StreamTransformerBase, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.__SetBase_Object_SetMixin, A._LinkedHashSetCell, A._LinkedHashSetIterator, A.ListMixin, A._MapBaseValueIterator, A._UnmodifiableMapMixin, A._ListQueueIterator, A.SetMixin, A._UnmodifiableSetMixin, A.Codec, A._Base64Encoder, A.ChunkedConversionSink, A._JsonStringifier, A.StringConversionSinkMixin, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.RuneIterator, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.Expando, A._JSRandom, A.ArgParser, A.ArgResults, A.Option, A.OptionType, A.Parser0, A._Usage, A.ErrorResult, A.ValueResult, A.StreamCompleter, A.StreamGroup, A._StreamGroupState, A.StreamQueue, A._NextRequest, A.Repl, A.ReplAdapter, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._MapEntry, A.MapEquality, A._QueueList_Object_ListMixin, A._DelegatingIterableBase, A.UnmodifiableSetMixin, A.Context, A._PathDirection, A._PathRelation, A.Style, A.ParsedPath, A.PathException, A.CssMediaQuery, A._SingletonCssMediaQueryMergeResult, A.MediaQuerySuccessfulMergeResult, A.AstNode, A.ModifiableCssValue, A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.CssValue, A._FakeAstNode, A.Argument, A.ArgumentDeclaration, A.ArgumentInvocation, A.AtRootQuery, A.ConfiguredVariable, A.BinaryOperationExpression, A.BooleanExpression, A.CalculationExpression, A.ColorExpression, A.FunctionExpression, A.IfExpression, A.InterpolatedFunctionExpression, A.ListExpression, A.MapExpression, A.NullExpression, A.NumberExpression, A.ParenthesizedExpression, A.SelectorExpression, A.StringExpression, A.SupportsExpression, A.UnaryOperationExpression, A.ValueExpression, A.VariableExpression, A.DynamicImport, A.StaticImport, A.Interpolation, A.ParentStatement, A.ContentRule, A.DebugRule, A.ErrorRule, A.ExtendRule, A.ForwardRule, A.IfRule, A.IfRuleClause, A.ImportRule, A.IncludeRule, A.LoudComment, A.__HasContentVisitor_Object_StatementSearchVisitor, A.ReturnRule, A.SilentComment, A.UseRule, A.VariableDeclaration, A.WarnRule, A.SupportsAnything, A.SupportsDeclaration, A.SupportsFunction, A.SupportsInterpolation, A.SupportsNegation, A.SupportsOperation, A.Selector, A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor, A.ComplexSelectorComponent, A.QualifiedName, A.AsyncEnvironment, A._EnvironmentModule0, A.AsyncImportCache, A.AsyncBuiltInCallable, A.BuiltInCallable, A.PlainCssCallable, A.UserDefinedCallable, A.CompileResult, A.Configuration, A.ConfiguredValue, A.Environment, A._EnvironmentModule, A.SourceSpanException, A.SassScriptException, A.ExecutableOptions, A.UsageException, A._Watcher, A.EmptyExtensionStore, A.Extension, A.Extender, A.ExtensionStore, A.ImportCache, A.AsyncImporter, A.ImporterResult, A.InterpolationBuffer, A.FileSystemException, A.Stderr, A._QuietLogger, A.StderrLogger, A.TerseLogger, A.TrackingLogger, A.BuiltInModule, A.ForwardedModuleView, A.ShadowedModuleView, A.Parser, A.StylesheetGraph, A.StylesheetNode, A.MultiDirWatcher, A.MultiSpan, A.NoSourceMapBuffer, A.SourceMapBuffer, A.Value, A.CalculationOperation, A.CalculationInterpolation, A._ColorFormatEnum, A.SpanColorFormat, A.AnySelectorVisitor, A._EvaluateVisitor0, A._ImportedCssVisitor0, A.EvaluateResult, A._EvaluationContext0, A._ArgumentResults0, A._LoadedStylesheet0, A._CloneCssVisitor, A.Evaluator, A._EvaluateVisitor, A._ImportedCssVisitor, A._EvaluationContext, A._ArgumentResults, A._LoadedStylesheet, A.EveryCssVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.RecursiveStatementVisitor, A._SerializeVisitor, A.SerializeResult, A.StatementSearchVisitor, A.Entry, A.Mapping, A.TargetLineEntry, A.TargetEntry, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.Chain, A.Frame, A.LazyTrace, A.Trace, A.UnparsedFrame, A.StringScanner, A._SpanScannerState, A.AsciiGlyphSet, A.UnicodeGlyphSet, A.Tuple2, A.Tuple3, A.Tuple4, A.WatchEvent, A.ChangeType, A.AnySelectorVisitor0, A.SupportsAnything0, A.Argument0, A.ArgumentDeclaration0, A.ArgumentInvocation0, A.Value0, A.AsyncImporter0, A.AsyncBuiltInCallable0, A.AsyncEnvironment0, A._EnvironmentModule2, A._EvaluateVisitor2, A._ImportedCssVisitor2, A.EvaluateResult0, A._EvaluationContext2, A._ArgumentResults2, A._LoadedStylesheet2, A.AsyncImportCache0, A.Parser1, A.AtRootQuery0, A.ParentStatement0, A.AstNode0, A.Selector0, A.BinaryOperationExpression0, A.BooleanExpression0, A.BuiltInCallable0, A.BuiltInModule0, A.CalculationExpression0, A.CalculationOperation0, A.CalculationInterpolation0, A._CloneCssVisitor0, A.ColorExpression0, A._ColorFormatEnum0, A.SpanColorFormat0, A.CompileResult0, A.ComplexSelectorComponent0, A.Configuration0, A.ConfiguredValue0, A.ConfiguredVariable0, A.ContentRule0, A.DebugRule0, A.SupportsDeclaration0, A.DynamicImport0, A.EmptyExtensionStore0, A.Environment0, A._EnvironmentModule1, A.ErrorRule0, A._EvaluateVisitor1, A._ImportedCssVisitor1, A._EvaluationContext1, A._ArgumentResults1, A._LoadedStylesheet1, A.EveryCssVisitor0, A.SassScriptException0, A.ExtendRule0, A.Extension0, A.Extender0, A.ExtensionStore0, A.ForwardRule0, A.ForwardedModuleView0, A.FunctionExpression0, A.SupportsFunction0, A.IfExpression0, A.IfRule0, A.IfRuleClause0, A.NodeImporter, A.ImportCache0, A.ImportRule0, A.IncludeRule0, A.InterpolatedFunctionExpression0, A.Interpolation0, A.SupportsInterpolation0, A.InterpolationBuffer0, A.ListExpression0, A._QuietLogger0, A.LoudComment0, A.MapExpression0, A.CssMediaQuery0, A._SingletonCssMediaQueryMergeResult0, A.MediaQuerySuccessfulMergeResult0, A.__HasContentVisitor_Object_StatementSearchVisitor0, A.MultiSpan0, A.SupportsNegation0, A.NoSourceMapBuffer0, A._FakeAstNode0, A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.FileSystemException0, A.Stderr0, A.NodeToDartLogger, A.NullExpression0, A.NumberExpression0, A.SupportsOperation0, A.ParenthesizedExpression0, A.PlainCssCallable0, A.QualifiedName0, A.ImporterResult0, A.ReturnRule0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.SelectorExpression0, A._SerializeVisitor0, A.SerializeResult0, A.ShadowedModuleView0, A.SilentComment0, A.SourceMapBuffer0, A.StatementSearchVisitor0, A.StaticImport0, A.StderrLogger0, A.StringExpression0, A.SupportsExpression0, A.TerseLogger0, A.UnaryOperationExpression0, A.UseRule0, A.UserDefinedCallable0, A.CssValue0, A.ValueExpression0, A.ModifiableCssValue0, A.VariableExpression0, A.VariableDeclaration0, A.WarnRule0]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, A.NativeTypedData]); + _inherit(J.LegacyJavaScriptObject, J.JavaScriptObject); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A.Stdin, A.Stdout, A.ReadlineModule, A.ReadlineOptions, A.ReadlineInterface, A.BufferModule, A.BufferConstants, A.Buffer, A.ConsoleModule, A.Console, A.EventEmitter, A.FS, A.FSConstants, A.FSWatcher, A.ReadStream, A.ReadStreamOptions, A.WriteStream, A.WriteStreamOptions, A.FileOptions, A.StatOptions, A.MkdirOptions, A.RmdirOptions, A.WatchOptions, A.WatchFileOptions, A.Stats, A.Promise, A.Date, A.JsError, A.Atomics, A.Modules, A.Module1, A.Net, A.Socket, A.NetAddress, A.NetServer, A.NodeJsError, A.Process, A.CPUUsage, A.Release, A.StreamModule, A.Readable, A.Writable, A.Duplex, A.Transform, A.WritableOptions, A.ReadableOptions, A.Immediate, A.Timeout, A.TTY, A.Util, A.JSArray0, A.Chokidar, A.ChokidarOptions, A.ChokidarWatcher, A.JSFunction, A.NodeImporterResult, A.RenderContext, A.RenderContextOptions, A.RenderContextResult, A.RenderContextResultStats, A.JSClass, A.JSUrl, A._PropertyDescriptor, A.JSArray1, A.Chokidar0, A.ChokidarOptions0, A.ChokidarWatcher0, A._NodeSassColor, A._Channels, A.CompileOptions, A.NodeCompileResult, A.Exports, A.LoggerNamespace, A.FiberClass, A.Fiber, A.JSFunction0, A.ImmutableList, A.ImmutableMap, A.NodeImporter0, A.CanonicalizeOptions, A.NodeImporterResult0, A.NodeImporterResult1, A._NodeSassList, A._ConstructorOptions, A.NodeLogger, A.WarnOptions, A.DebugOptions, A._NodeSassMap, A._NodeSassNumber, A._ConstructorOptions0, A.JSClass0, A.RenderContext0, A.RenderContextOptions0, A.RenderContextResult0, A.RenderContextResultStats0, A.RenderOptions, A.RenderResult, A.RenderResultStats, A._Exports, A._NodeSassString, A._ConstructorOptions1, A.Types, A.JSUrl0, A._PropertyDescriptor0]); + _inherit(J.JSUnmodifiableArray, J.JSArray); + _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); + _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.SkipWhileIterable, A.FollowedByIterable, A.WhereTypeIterable, A._ConstantMapKeyIterable, A.IterableBase, A._StringAllMatchesIterable, A.Runes]); + _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin, A.CastSet]); + _inherit(A._EfficientLengthCastIterable, A.CastIterable); + _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); + _inheritMany(A.Closure, [A.Closure2Args, A.CastMap_entries_closure, A.Closure0Args, A.ConstantStringMap_values_closure, A.GeneralConstantMap__typeTest_closure, A.Instantiation, A.TearOffClosure, A.JsLinkedHashMap_values_closure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A.Future_wait_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_Stream$fromFuture_closure, A.Stream_length_closure, A._CustomZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallback_closure, A._HashMap_values_closure, A._LinkedCustomHashMap_closure, A.MapMixin_entries_closure, A._Uri__makePath_closure, A._createTables_setChars, A._createTables_setRange, A._convertDataTree__convert, A.ArgParser__addOption_closure, A._Usage__writeOption_closure, A._Usage__buildAllowedList_closure, A.StreamGroup__onListen_closure, A.StreamGroup__onCancel_closure, A.StreamQueue__ensureListening_closure, A.alwaysValid_closure, A.ReplAdapter_runAsync__closure, A.MapKeySet_difference_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.futureToPromise__closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.ParsedPath__splitExtension_closure, A.PathMap__create_closure0, A.PathMap__create_closure1, A.WindowsStyle_absolutePathToUri_closure, A.ModifiableCssNode_hasFollowingSibling_closure, A.ArgumentDeclaration_verify_closure, A.ArgumentDeclaration_verify_closure0, A.CalculationExpression__verifyArguments_closure, A.ListExpression_toString_closure, A.MapExpression_toString_closure, A.Interpolation_toString_closure, A.EachRule_toString_closure, A.IfRuleClause$__closure, A.IfRuleClause$___closure, A.ParentStatement_closure, A.ParentStatement__closure, A._IsBogusVisitor_visitComplexSelector_closure, A._IsUselessVisitor_visitComplexSelector_closure, A.ComplexSelectorComponent_toString_closure, A.IDSelector_unify_closure, A.SelectorList_asSassList_closure, A.SelectorList_resolveParentSelectors_closure, A.SelectorList_resolveParentSelectors__closure, A.SelectorList__complexContainsParentSelector_closure, A.SelectorList__complexContainsParentSelector__closure, A.SelectorList__resolveParentSelectorsCompound_closure, A.SelectorList__resolveParentSelectorsCompound_closure0, A.SelectorList__resolveParentSelectorsCompound_closure1, A.SelectorList_withAdditionalCombinators_closure, A.PseudoSelector_specificity__closure, A.PseudoSelector_specificity__closure0, A.PseudoSelector_unify_closure, A.SimpleSelector_isSuperselector_closure, A.SimpleSelector_isSuperselector__closure, A._compileStylesheet_closure0, A.AsyncEnvironment_importForwards_closure, A.AsyncEnvironment_importForwards_closure0, A.AsyncEnvironment_importForwards_closure1, A.AsyncEnvironment__getVariableFromGlobalModule_closure, A.AsyncEnvironment_setVariable_closure0, A.AsyncEnvironment__getFunctionFromGlobalModule_closure, A.AsyncEnvironment__getMixinFromGlobalModule_closure, A.AsyncEnvironment_toModule_closure, A.AsyncEnvironment_toDummyModule_closure, A.AsyncEnvironment__fromOneModule_closure, A.AsyncEnvironment__fromOneModule__closure, A._EnvironmentModule__EnvironmentModule_closure5, A._EnvironmentModule__EnvironmentModule_closure6, A._EnvironmentModule__EnvironmentModule_closure7, A._EnvironmentModule__EnvironmentModule_closure8, A._EnvironmentModule__EnvironmentModule_closure9, A._EnvironmentModule__EnvironmentModule_closure10, A.AsyncImportCache_humanize_closure, A.AsyncImportCache_humanize_closure0, A.AsyncImportCache_humanize_closure1, A.AsyncBuiltInCallable$mixin_closure, A.BuiltInCallable$mixin_closure, A._compileStylesheet_closure, A.Configuration_toString_closure, A.Environment_importForwards_closure, A.Environment_importForwards_closure0, A.Environment_importForwards_closure1, A.Environment__getVariableFromGlobalModule_closure, A.Environment_setVariable_closure0, A.Environment__getFunctionFromGlobalModule_closure, A.Environment__getMixinFromGlobalModule_closure, A.Environment_toModule_closure, A.Environment_toDummyModule_closure, A.Environment__fromOneModule_closure, A.Environment__fromOneModule__closure, A._EnvironmentModule__EnvironmentModule_closure, A._EnvironmentModule__EnvironmentModule_closure0, A._EnvironmentModule__EnvironmentModule_closure1, A._EnvironmentModule__EnvironmentModule_closure2, A._EnvironmentModule__EnvironmentModule_closure3, A._EnvironmentModule__EnvironmentModule_closure4, A._writeSourceMap_closure, A.ExecutableOptions_emitErrorCss_closure, A.watch_closure, A._Watcher__debounceEvents_closure, A.ExtensionStore_extensionsWhereTarget_closure, A.ExtensionStore_addExtensions_closure0, A.ExtensionStore_addExtensions__closure, A.ExtensionStore_addExtensions__closure0, A.ExtensionStore__extendComplex_closure, A.ExtensionStore__extendComplex__closure, A.ExtensionStore__extendCompound_closure, A.ExtensionStore__extendCompound_closure0, A.ExtensionStore__extendCompound_closure1, A.ExtensionStore__extendSimple_withoutPseudo, A.ExtensionStore__extendSimple_closure, A.ExtensionStore__extendSimple_closure0, A.ExtensionStore__extendPseudo_closure, A.ExtensionStore__extendPseudo_closure0, A.ExtensionStore__extendPseudo_closure1, A.ExtensionStore__extendPseudo_closure2, A.ExtensionStore__extendPseudo_closure3, A.ExtensionStore__trim_closure, A.ExtensionStore__trim_closure0, A.unifyComplex_closure, A._weaveParents_closure0, A._weaveParents_closure1, A._weaveParents_closure2, A._mustUnify_closure, A._mustUnify__closure, A.paths__closure, A.paths___closure, A.listIsSuperselector_closure, A.listIsSuperselector__closure, A.complexIsSuperselector_closure, A.complexIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure1, A._selectorPseudoIsSuperselector_closure2, A._selectorPseudoIsSuperselector_closure3, A._selectorPseudoIsSuperselector__closure, A._selectorPseudoIsSuperselector___closure, A._selectorPseudoIsSuperselector___closure0, A._selectorPseudoIsSuperselector_closure4, A._selectorPseudoIsSuperselector_closure5, A._selectorPseudoArgs_closure, A._selectorPseudoArgs_closure0, A.globalFunctions_closure, A.global_closure, A.global_closure0, A.global_closure1, A.global_closure2, A.global_closure3, A.global_closure4, A.global_closure5, A.global_closure6, A.global_closure7, A.global_closure8, A.global_closure9, A.global_closure10, A.global_closure11, A.global_closure12, A.global_closure13, A.global_closure14, A.global_closure15, A.global_closure16, A.global_closure17, A.global_closure18, A.global_closure19, A.global_closure20, A.global_closure21, A.global_closure22, A.global_closure23, A.global_closure24, A.global__closure, A.global_closure25, A.module_closure, A.module_closure0, A.module_closure1, A.module_closure2, A.module_closure3, A.module_closure4, A.module_closure5, A.module_closure6, A.module__closure, A.module_closure7, A._red_closure, A._green_closure, A._blue_closure, A._mix_closure, A._hue_closure, A._saturation_closure, A._lightness_closure, A._complement_closure, A._adjust_closure, A._scale_closure, A._change_closure, A._ieHexStr_closure, A._ieHexStr_closure_hexString, A._updateComponents_getParam, A._updateComponents_closure, A._updateComponents_updateValue, A._functionString_closure, A._removedColorFunction_closure, A._rgb_closure, A._hsl_closure, A._removeUnits_closure, A._removeUnits_closure0, A._hwb_closure, A._parseChannels_closure, A._length_closure0, A._nth_closure, A._setNth_closure, A._join_closure, A._append_closure0, A._zip_closure, A._zip__closure, A._zip__closure0, A._zip__closure1, A._index_closure0, A._separator_closure, A._isBracketed_closure, A._slash_closure, A._get_closure, A._set_closure, A._set__closure0, A._set_closure0, A._set__closure, A._merge_closure, A._merge_closure0, A._merge__closure, A._deepMerge_closure, A._deepRemove_closure, A._deepRemove__closure, A._remove_closure, A._remove_closure0, A._keys_closure, A._values_closure, A._hasKey_closure, A._modify_modifyNestedMap, A._ceil_closure, A._clamp_closure, A._floor_closure, A._max_closure, A._min_closure, A._round_closure, A._abs_closure, A._hypot_closure, A._hypot__closure, A._log_closure, A._pow_closure, A._sqrt_closure, A._acos_closure, A._asin_closure, A._atan_closure, A._atan2_closure, A._cos_closure, A._sin_closure, A._tan_closure, A._compatible_closure, A._isUnitless_closure, A._unit_closure, A._percentage_closure, A._randomFunction_closure, A._div_closure, A._numberFunction_closure, A.global_closure26, A.global_closure27, A.global_closure28, A.global_closure29, A.local_closure, A.local_closure0, A.local__closure, A._nest_closure, A._nest__closure, A._append_closure, A._append__closure, A._append___closure, A._extend_closure, A._replace_closure, A._unify_closure, A._isSuperselector_closure, A._simpleSelectors_closure, A._simpleSelectors__closure, A._parse_closure, A._unquote_closure, A._quote_closure, A._length_closure, A._insert_closure, A._index_closure, A._slice_closure, A._toUpperCase_closure, A._toLowerCase_closure, A._uniqueId_closure, A.ImportCache_humanize_closure, A.ImportCache_humanize_closure0, A.ImportCache_humanize_closure1, A.FilesystemImporter_canonicalize_closure, A._exactlyOne_closure, A._realCasePath_helper, A._realCasePath_helper__closure, A.readStdin_closure, A.readStdin_closure0, A.readStdin_closure1, A.readStdin_closure2, A.listDir__closure, A.listDir__closure0, A.listDir_closure_list, A.listDir__list_closure, A.watchDir_closure, A.watchDir_closure0, A.watchDir_closure1, A.watchDir_closure2, A.TerseLogger_summarize_closure, A.TerseLogger_summarize_closure0, A._disallowedFunctionNames_closure, A.Parser_scanIdentChar_matches, A.StylesheetParser_parse__closure0, A.StylesheetParser__expression_addSingleExpression, A.StylesheetParser__expression_addOperator, A.StylesheetParser__unicodeRange_closure, A.StylesheetParser__unicodeRange_closure0, A.StylesheetParser_trySpecialFunction_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime, A._PrefixedKeys_iterator_closure, A.SourceMapBuffer_buildSourceMap_closure, A._UnprefixedKeys_iterator_closure, A._UnprefixedKeys_iterator_closure0, A.indent_closure, A.flattenVertically_closure, A.flattenVertically_closure0, A.SassCalculation__verifyLength_closure, A.SassColor_SassColor$hwb_toRgb, A.SassList_isBlank_closure, A.SassNumber__coerceOrConvertValue_closure, A.SassNumber__coerceOrConvertValue_closure1, A.SassNumber_multiplyUnits_closure, A.SassNumber_multiplyUnits_closure1, A.SassNumber__areAnyConvertible_closure, A.SassNumber__canonicalizeUnitList_closure, A.SingleUnitSassNumber__coerceToUnit_closure, A.SingleUnitSassNumber__coerceValueToUnit_closure, A.SingleUnitSassNumber_multiplyUnits_closure, A.AnySelectorVisitor_visitComplexSelector_closure, A.AnySelectorVisitor_visitCompoundSelector_closure, A._EvaluateVisitor_closure9, A._EvaluateVisitor_closure10, A._EvaluateVisitor_closure11, A._EvaluateVisitor_closure12, A._EvaluateVisitor_closure13, A._EvaluateVisitor_closure14, A._EvaluateVisitor_closure15, A._EvaluateVisitor_closure16, A._EvaluateVisitor_closure17, A._EvaluateVisitor_closure18, A._EvaluateVisitor__closure3, A._EvaluateVisitor__loadModule__closure0, A._EvaluateVisitor__combineCss_closure2, A._EvaluateVisitor__combineCss_closure3, A._EvaluateVisitor__combineCss_closure4, A._EvaluateVisitor__extendModules_closure1, A._EvaluateVisitor__topologicalModules_visitModule0, A._EvaluateVisitor__scopeForAtRoot_closure5, A._EvaluateVisitor__scopeForAtRoot_closure6, A._EvaluateVisitor__scopeForAtRoot_closure7, A._EvaluateVisitor__scopeForAtRoot_closure8, A._EvaluateVisitor__scopeForAtRoot_closure9, A._EvaluateVisitor__scopeForAtRoot_closure10, A._EvaluateVisitor_visitDeclaration_closure1, A._EvaluateVisitor_visitEachRule_closure2, A._EvaluateVisitor_visitEachRule_closure3, A._EvaluateVisitor_visitEachRule__closure0, A._EvaluateVisitor_visitEachRule___closure0, A._EvaluateVisitor_visitAtRule_closure2, A._EvaluateVisitor_visitAtRule_closure4, A._EvaluateVisitor_visitForRule__closure0, A._EvaluateVisitor_visitForwardRule_closure1, A._EvaluateVisitor_visitForwardRule_closure2, A._EvaluateVisitor_visitIfRule__closure0, A._EvaluateVisitor__visitDynamicImport__closure3, A._EvaluateVisitor__visitDynamicImport__closure4, A._EvaluateVisitor__visitDynamicImport__closure5, A._EvaluateVisitor_visitIncludeRule_closure6, A._EvaluateVisitor_visitMediaRule_closure2, A._EvaluateVisitor_visitMediaRule_closure4, A._EvaluateVisitor_visitStyleRule_closure9, A._EvaluateVisitor_visitStyleRule_closure13, A._EvaluateVisitor_visitStyleRule_closure14, A._EvaluateVisitor_visitSupportsRule_closure2, A._EvaluateVisitor_visitUseRule_closure0, A._EvaluateVisitor_visitWhileRule__closure0, A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation0, A._EvaluateVisitor_visitListExpression_closure0, A._EvaluateVisitor__runUserDefinedCallable____closure0, A._EvaluateVisitor__runBuiltInCallable_closure2, A._EvaluateVisitor__evaluateArguments_closure3, A._EvaluateVisitor__evaluateArguments_closure4, A._EvaluateVisitor__evaluateArguments_closure6, A._EvaluateVisitor__evaluateMacroArguments_closure3, A._EvaluateVisitor__evaluateMacroArguments_closure4, A._EvaluateVisitor__evaluateMacroArguments_closure6, A._EvaluateVisitor_visitStringExpression_closure0, A._EvaluateVisitor_visitCssAtRule_closure2, A._EvaluateVisitor_visitCssKeyframeBlock_closure2, A._EvaluateVisitor_visitCssMediaRule_closure2, A._EvaluateVisitor_visitCssMediaRule_closure4, A._EvaluateVisitor_visitCssStyleRule_closure2, A._EvaluateVisitor_visitCssSupportsRule_closure2, A._EvaluateVisitor__performInterpolation_closure0, A._EvaluateVisitor__withoutSlash_recommendation0, A._EvaluateVisitor__stackFrame_closure0, A._EvaluateVisitor__stackTrace_closure0, A._ImportedCssVisitor_visitCssAtRule_closure0, A._ImportedCssVisitor_visitCssMediaRule_closure0, A._ImportedCssVisitor_visitCssStyleRule_closure0, A._ImportedCssVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor_closure, A._EvaluateVisitor_closure0, A._EvaluateVisitor_closure1, A._EvaluateVisitor_closure2, A._EvaluateVisitor_closure3, A._EvaluateVisitor_closure4, A._EvaluateVisitor_closure5, A._EvaluateVisitor_closure6, A._EvaluateVisitor_closure7, A._EvaluateVisitor_closure8, A._EvaluateVisitor__closure0, A._EvaluateVisitor__loadModule__closure, A._EvaluateVisitor__combineCss_closure, A._EvaluateVisitor__combineCss_closure0, A._EvaluateVisitor__combineCss_closure1, A._EvaluateVisitor__extendModules_closure, A._EvaluateVisitor__topologicalModules_visitModule, A._EvaluateVisitor__scopeForAtRoot_closure, A._EvaluateVisitor__scopeForAtRoot_closure0, A._EvaluateVisitor__scopeForAtRoot_closure1, A._EvaluateVisitor__scopeForAtRoot_closure2, A._EvaluateVisitor__scopeForAtRoot_closure3, A._EvaluateVisitor__scopeForAtRoot_closure4, A._EvaluateVisitor_visitDeclaration_closure, A._EvaluateVisitor_visitEachRule_closure, A._EvaluateVisitor_visitEachRule_closure0, A._EvaluateVisitor_visitEachRule__closure, A._EvaluateVisitor_visitEachRule___closure, A._EvaluateVisitor_visitAtRule_closure, A._EvaluateVisitor_visitAtRule_closure1, A._EvaluateVisitor_visitForRule__closure, A._EvaluateVisitor_visitForwardRule_closure, A._EvaluateVisitor_visitForwardRule_closure0, A._EvaluateVisitor_visitIfRule__closure, A._EvaluateVisitor__visitDynamicImport__closure, A._EvaluateVisitor__visitDynamicImport__closure0, A._EvaluateVisitor__visitDynamicImport__closure1, A._EvaluateVisitor_visitIncludeRule_closure2, A._EvaluateVisitor_visitMediaRule_closure, A._EvaluateVisitor_visitMediaRule_closure1, A._EvaluateVisitor_visitStyleRule_closure1, A._EvaluateVisitor_visitStyleRule_closure5, A._EvaluateVisitor_visitStyleRule_closure6, A._EvaluateVisitor_visitSupportsRule_closure0, A._EvaluateVisitor_visitUseRule_closure, A._EvaluateVisitor_visitWhileRule__closure, A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation, A._EvaluateVisitor_visitListExpression_closure, A._EvaluateVisitor__runUserDefinedCallable____closure, A._EvaluateVisitor__runBuiltInCallable_closure0, A._EvaluateVisitor__evaluateArguments_closure, A._EvaluateVisitor__evaluateArguments_closure0, A._EvaluateVisitor__evaluateArguments_closure2, A._EvaluateVisitor__evaluateMacroArguments_closure, A._EvaluateVisitor__evaluateMacroArguments_closure0, A._EvaluateVisitor__evaluateMacroArguments_closure2, A._EvaluateVisitor_visitStringExpression_closure, A._EvaluateVisitor_visitCssAtRule_closure0, A._EvaluateVisitor_visitCssKeyframeBlock_closure0, A._EvaluateVisitor_visitCssMediaRule_closure, A._EvaluateVisitor_visitCssMediaRule_closure1, A._EvaluateVisitor_visitCssStyleRule_closure0, A._EvaluateVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor__performInterpolation_closure, A._EvaluateVisitor__withoutSlash_recommendation, A._EvaluateVisitor__stackFrame_closure, A._EvaluateVisitor__stackTrace_closure, A._ImportedCssVisitor_visitCssAtRule_closure, A._ImportedCssVisitor_visitCssMediaRule_closure, A._ImportedCssVisitor_visitCssStyleRule_closure, A._ImportedCssVisitor_visitCssSupportsRule_closure, A.EveryCssVisitor_visitCssAtRule_closure, A.EveryCssVisitor_visitCssKeyframeBlock_closure, A.EveryCssVisitor_visitCssMediaRule_closure, A.EveryCssVisitor_visitCssStyleRule_closure, A.EveryCssVisitor_visitCssStylesheet_closure, A.EveryCssVisitor_visitCssSupportsRule_closure, A.serialize_closure, A._SerializeVisitor_visitList_closure, A._SerializeVisitor_visitList_closure0, A._SerializeVisitor_visitList_closure1, A._SerializeVisitor_visitMap_closure, A._SerializeVisitor_visitSelectorList_closure, A.StatementSearchVisitor_visitIfRule_closure, A.StatementSearchVisitor_visitIfRule__closure0, A.StatementSearchVisitor_visitIfRule_closure0, A.StatementSearchVisitor_visitIfRule__closure, A.StatementSearchVisitor_visitChildren_closure, A.SingleMapping_SingleMapping$fromEntries_closure1, A.SingleMapping_toJson_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.Chain_Chain$parse_closure, A.Chain_Chain$parse_closure0, A.Chain_Chain$parse_closure1, A.Chain_toTrace_closure, A.Chain_toString_closure0, A.Chain_toString__closure0, A.Chain_toString_closure, A.Chain_toString__closure, A.Trace__parseVM_closure, A.Trace__parseVM_closure0, A.Trace$parseV8_closure, A.Trace$parseV8_closure0, A.Trace$parseJSCore_closure, A.Trace$parseJSCore_closure0, A.Trace$parseFirefox_closure, A.Trace$parseFirefox_closure0, A.Trace$parseFriendly_closure, A.Trace$parseFriendly_closure0, A.Trace_terse_closure, A.Trace_foldFrames_closure, A.Trace_foldFrames_closure0, A.Trace_toString_closure0, A.Trace_toString_closure, A.TransformByHandlers_transformByHandlers__closure, A.RateLimit__debounceAggregate_closure0, A.AnySelectorVisitor_visitComplexSelector_closure0, A.AnySelectorVisitor_visitCompoundSelector_closure0, A.ArgumentDeclaration_verify_closure1, A.ArgumentDeclaration_verify_closure2, A.argumentListClass__closure, A.argumentListClass__closure0, A.AsyncBuiltInCallable$mixin_closure0, A._compileStylesheet_closure2, A.AsyncEnvironment_importForwards_closure2, A.AsyncEnvironment_importForwards_closure3, A.AsyncEnvironment_importForwards_closure4, A.AsyncEnvironment__getVariableFromGlobalModule_closure0, A.AsyncEnvironment_setVariable_closure3, A.AsyncEnvironment__getFunctionFromGlobalModule_closure0, A.AsyncEnvironment__getMixinFromGlobalModule_closure0, A.AsyncEnvironment_toModule_closure0, A.AsyncEnvironment_toDummyModule_closure0, A.AsyncEnvironment__fromOneModule_closure0, A.AsyncEnvironment__fromOneModule__closure0, A._EnvironmentModule__EnvironmentModule_closure17, A._EnvironmentModule__EnvironmentModule_closure18, A._EnvironmentModule__EnvironmentModule_closure19, A._EnvironmentModule__EnvironmentModule_closure20, A._EnvironmentModule__EnvironmentModule_closure21, A._EnvironmentModule__EnvironmentModule_closure22, A._EvaluateVisitor_closure29, A._EvaluateVisitor_closure30, A._EvaluateVisitor_closure31, A._EvaluateVisitor_closure32, A._EvaluateVisitor_closure33, A._EvaluateVisitor_closure34, A._EvaluateVisitor_closure35, A._EvaluateVisitor_closure36, A._EvaluateVisitor_closure37, A._EvaluateVisitor_closure38, A._EvaluateVisitor__closure9, A._EvaluateVisitor__loadModule__closure2, A._EvaluateVisitor__combineCss_closure8, A._EvaluateVisitor__combineCss_closure9, A._EvaluateVisitor__combineCss_closure10, A._EvaluateVisitor__extendModules_closure5, A._EvaluateVisitor__topologicalModules_visitModule2, A._EvaluateVisitor__scopeForAtRoot_closure17, A._EvaluateVisitor__scopeForAtRoot_closure18, A._EvaluateVisitor__scopeForAtRoot_closure19, A._EvaluateVisitor__scopeForAtRoot_closure20, A._EvaluateVisitor__scopeForAtRoot_closure21, A._EvaluateVisitor__scopeForAtRoot_closure22, A._EvaluateVisitor_visitDeclaration_closure5, A._EvaluateVisitor_visitEachRule_closure8, A._EvaluateVisitor_visitEachRule_closure9, A._EvaluateVisitor_visitEachRule__closure2, A._EvaluateVisitor_visitEachRule___closure2, A._EvaluateVisitor_visitAtRule_closure8, A._EvaluateVisitor_visitAtRule_closure10, A._EvaluateVisitor_visitForRule__closure2, A._EvaluateVisitor_visitForwardRule_closure5, A._EvaluateVisitor_visitForwardRule_closure6, A._EvaluateVisitor_visitIfRule__closure2, A._EvaluateVisitor__visitDynamicImport__closure11, A._EvaluateVisitor__visitDynamicImport__closure12, A._EvaluateVisitor__visitDynamicImport__closure13, A._EvaluateVisitor_visitIncludeRule_closure14, A._EvaluateVisitor_visitMediaRule_closure8, A._EvaluateVisitor_visitMediaRule_closure10, A._EvaluateVisitor_visitStyleRule_closure25, A._EvaluateVisitor_visitStyleRule_closure29, A._EvaluateVisitor_visitStyleRule_closure30, A._EvaluateVisitor_visitSupportsRule_closure6, A._EvaluateVisitor_visitUseRule_closure2, A._EvaluateVisitor_visitWhileRule__closure2, A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation2, A._EvaluateVisitor_visitListExpression_closure2, A._EvaluateVisitor__runUserDefinedCallable____closure2, A._EvaluateVisitor__runBuiltInCallable_closure6, A._EvaluateVisitor__evaluateArguments_closure11, A._EvaluateVisitor__evaluateArguments_closure12, A._EvaluateVisitor__evaluateArguments_closure14, A._EvaluateVisitor__evaluateMacroArguments_closure11, A._EvaluateVisitor__evaluateMacroArguments_closure12, A._EvaluateVisitor__evaluateMacroArguments_closure14, A._EvaluateVisitor_visitStringExpression_closure2, A._EvaluateVisitor_visitCssAtRule_closure6, A._EvaluateVisitor_visitCssKeyframeBlock_closure6, A._EvaluateVisitor_visitCssMediaRule_closure8, A._EvaluateVisitor_visitCssMediaRule_closure10, A._EvaluateVisitor_visitCssStyleRule_closure6, A._EvaluateVisitor_visitCssSupportsRule_closure6, A._EvaluateVisitor__performInterpolation_closure2, A._EvaluateVisitor__withoutSlash_recommendation2, A._EvaluateVisitor__stackFrame_closure2, A._EvaluateVisitor__stackTrace_closure2, A._ImportedCssVisitor_visitCssAtRule_closure2, A._ImportedCssVisitor_visitCssMediaRule_closure2, A._ImportedCssVisitor_visitCssStyleRule_closure2, A._ImportedCssVisitor_visitCssSupportsRule_closure2, A.AsyncImportCache_humanize_closure2, A.AsyncImportCache_humanize_closure3, A.AsyncImportCache_humanize_closure4, A.legacyBooleanClass__closure, A.legacyBooleanClass__closure0, A.booleanClass__closure, A.BuiltInCallable$mixin_closure0, A.CalculationExpression__verifyArguments_closure0, A.SassCalculation__verifyLength_closure0, A.global_closure30, A.global_closure31, A.global_closure32, A.global_closure33, A.global_closure34, A.global_closure35, A.global_closure36, A.global_closure37, A.global_closure38, A.global_closure39, A.global_closure40, A.global_closure41, A.global_closure42, A.global_closure43, A.global_closure44, A.global_closure45, A.global_closure46, A.global_closure47, A.global_closure48, A.global_closure49, A.global_closure50, A.global_closure51, A.global_closure52, A.global_closure53, A.global_closure54, A.global_closure55, A.global__closure0, A.global_closure56, A.module_closure8, A.module_closure9, A.module_closure10, A.module_closure11, A.module_closure12, A.module_closure13, A.module_closure14, A.module_closure15, A.module__closure0, A.module_closure16, A._red_closure0, A._green_closure0, A._blue_closure0, A._mix_closure0, A._hue_closure0, A._saturation_closure0, A._lightness_closure0, A._complement_closure0, A._adjust_closure0, A._scale_closure0, A._change_closure0, A._ieHexStr_closure0, A._ieHexStr_closure_hexString0, A._updateComponents_getParam0, A._updateComponents_closure0, A._updateComponents_updateValue0, A._functionString_closure0, A._removedColorFunction_closure0, A._rgb_closure0, A._hsl_closure0, A._removeUnits_closure1, A._removeUnits_closure2, A._hwb_closure0, A._parseChannels_closure0, A.legacyColorClass_closure, A.legacyColorClass_closure0, A.legacyColorClass_closure1, A.legacyColorClass_closure2, A.legacyColorClass_closure3, A.colorClass__closure1, A.colorClass__closure2, A.colorClass__closure3, A.colorClass__closure4, A.colorClass__closure5, A.colorClass__closure6, A.colorClass__closure7, A.colorClass__closure8, A.colorClass__closure9, A.SassColor_SassColor$hwb_toRgb0, A.compileAsync__closure, A.compileStringAsync__closure, A.compileStringAsync__closure0, A._wrapAsyncSassExceptions_closure, A._parseFunctions__closure2, A._parseFunctions__closure3, A._compileStylesheet_closure1, A.ComplexSelectorComponent_toString_closure0, A.Configuration_toString_closure0, A._disallowedFunctionNames_closure0, A.EachRule_toString_closure0, A.Environment_importForwards_closure2, A.Environment_importForwards_closure3, A.Environment_importForwards_closure4, A.Environment__getVariableFromGlobalModule_closure0, A.Environment_setVariable_closure3, A.Environment__getFunctionFromGlobalModule_closure0, A.Environment__getMixinFromGlobalModule_closure0, A.Environment_toModule_closure0, A.Environment_toDummyModule_closure0, A.Environment__fromOneModule_closure0, A.Environment__fromOneModule__closure0, A._EnvironmentModule__EnvironmentModule_closure11, A._EnvironmentModule__EnvironmentModule_closure12, A._EnvironmentModule__EnvironmentModule_closure13, A._EnvironmentModule__EnvironmentModule_closure14, A._EnvironmentModule__EnvironmentModule_closure15, A._EnvironmentModule__EnvironmentModule_closure16, A._EvaluateVisitor_closure19, A._EvaluateVisitor_closure20, A._EvaluateVisitor_closure21, A._EvaluateVisitor_closure22, A._EvaluateVisitor_closure23, A._EvaluateVisitor_closure24, A._EvaluateVisitor_closure25, A._EvaluateVisitor_closure26, A._EvaluateVisitor_closure27, A._EvaluateVisitor_closure28, A._EvaluateVisitor__closure6, A._EvaluateVisitor__loadModule__closure1, A._EvaluateVisitor__combineCss_closure5, A._EvaluateVisitor__combineCss_closure6, A._EvaluateVisitor__combineCss_closure7, A._EvaluateVisitor__extendModules_closure3, A._EvaluateVisitor__topologicalModules_visitModule1, A._EvaluateVisitor__scopeForAtRoot_closure11, A._EvaluateVisitor__scopeForAtRoot_closure12, A._EvaluateVisitor__scopeForAtRoot_closure13, A._EvaluateVisitor__scopeForAtRoot_closure14, A._EvaluateVisitor__scopeForAtRoot_closure15, A._EvaluateVisitor__scopeForAtRoot_closure16, A._EvaluateVisitor_visitDeclaration_closure3, A._EvaluateVisitor_visitEachRule_closure5, A._EvaluateVisitor_visitEachRule_closure6, A._EvaluateVisitor_visitEachRule__closure1, A._EvaluateVisitor_visitEachRule___closure1, A._EvaluateVisitor_visitAtRule_closure5, A._EvaluateVisitor_visitAtRule_closure7, A._EvaluateVisitor_visitForRule__closure1, A._EvaluateVisitor_visitForwardRule_closure3, A._EvaluateVisitor_visitForwardRule_closure4, A._EvaluateVisitor_visitIfRule__closure1, A._EvaluateVisitor__visitDynamicImport__closure7, A._EvaluateVisitor__visitDynamicImport__closure8, A._EvaluateVisitor__visitDynamicImport__closure9, A._EvaluateVisitor_visitIncludeRule_closure10, A._EvaluateVisitor_visitMediaRule_closure5, A._EvaluateVisitor_visitMediaRule_closure7, A._EvaluateVisitor_visitStyleRule_closure17, A._EvaluateVisitor_visitStyleRule_closure21, A._EvaluateVisitor_visitStyleRule_closure22, A._EvaluateVisitor_visitSupportsRule_closure4, A._EvaluateVisitor_visitUseRule_closure1, A._EvaluateVisitor_visitWhileRule__closure1, A._EvaluateVisitor_visitBinaryOperationExpression_closure_recommendation1, A._EvaluateVisitor_visitListExpression_closure1, A._EvaluateVisitor__runUserDefinedCallable____closure1, A._EvaluateVisitor__runBuiltInCallable_closure4, A._EvaluateVisitor__evaluateArguments_closure7, A._EvaluateVisitor__evaluateArguments_closure8, A._EvaluateVisitor__evaluateArguments_closure10, A._EvaluateVisitor__evaluateMacroArguments_closure7, A._EvaluateVisitor__evaluateMacroArguments_closure8, A._EvaluateVisitor__evaluateMacroArguments_closure10, A._EvaluateVisitor_visitStringExpression_closure1, A._EvaluateVisitor_visitCssAtRule_closure4, A._EvaluateVisitor_visitCssKeyframeBlock_closure4, A._EvaluateVisitor_visitCssMediaRule_closure5, A._EvaluateVisitor_visitCssMediaRule_closure7, A._EvaluateVisitor_visitCssStyleRule_closure4, A._EvaluateVisitor_visitCssSupportsRule_closure4, A._EvaluateVisitor__performInterpolation_closure1, A._EvaluateVisitor__withoutSlash_recommendation1, A._EvaluateVisitor__stackFrame_closure1, A._EvaluateVisitor__stackTrace_closure1, A._ImportedCssVisitor_visitCssAtRule_closure1, A._ImportedCssVisitor_visitCssMediaRule_closure1, A._ImportedCssVisitor_visitCssStyleRule_closure1, A._ImportedCssVisitor_visitCssSupportsRule_closure1, A.EveryCssVisitor_visitCssAtRule_closure0, A.EveryCssVisitor_visitCssKeyframeBlock_closure0, A.EveryCssVisitor_visitCssMediaRule_closure0, A.EveryCssVisitor_visitCssStyleRule_closure0, A.EveryCssVisitor_visitCssStylesheet_closure0, A.EveryCssVisitor_visitCssSupportsRule_closure0, A.exceptionClass__closure, A.exceptionClass__closure0, A.exceptionClass__closure1, A.ExtensionStore_extensionsWhereTarget_closure0, A.ExtensionStore_addExtensions_closure2, A.ExtensionStore_addExtensions__closure2, A.ExtensionStore_addExtensions__closure3, A.ExtensionStore__extendComplex_closure0, A.ExtensionStore__extendComplex__closure0, A.ExtensionStore__extendCompound_closure2, A.ExtensionStore__extendCompound_closure3, A.ExtensionStore__extendCompound_closure4, A.ExtensionStore__extendSimple_withoutPseudo0, A.ExtensionStore__extendSimple_closure1, A.ExtensionStore__extendSimple_closure2, A.ExtensionStore__extendPseudo_closure4, A.ExtensionStore__extendPseudo_closure5, A.ExtensionStore__extendPseudo_closure6, A.ExtensionStore__extendPseudo_closure7, A.ExtensionStore__extendPseudo_closure8, A.ExtensionStore__trim_closure1, A.ExtensionStore__trim_closure2, A.FilesystemImporter_canonicalize_closure0, A.functionClass__closure, A.functionClass__closure0, A.unifyComplex_closure0, A._weaveParents_closure4, A._weaveParents_closure5, A._weaveParents_closure6, A._mustUnify_closure0, A._mustUnify__closure0, A.paths__closure0, A.paths___closure0, A.listIsSuperselector_closure0, A.listIsSuperselector__closure0, A.complexIsSuperselector_closure1, A.complexIsSuperselector_closure2, A._selectorPseudoIsSuperselector_closure6, A._selectorPseudoIsSuperselector_closure7, A._selectorPseudoIsSuperselector_closure8, A._selectorPseudoIsSuperselector_closure9, A._selectorPseudoIsSuperselector_closure10, A._selectorPseudoIsSuperselector__closure0, A._selectorPseudoIsSuperselector___closure1, A._selectorPseudoIsSuperselector___closure2, A._selectorPseudoIsSuperselector_closure11, A._selectorPseudoIsSuperselector_closure12, A._selectorPseudoArgs_closure1, A._selectorPseudoArgs_closure2, A.globalFunctions_closure0, A.IDSelector_unify_closure0, A.IfRuleClause$__closure0, A.IfRuleClause$___closure0, A.immutableMapToDartMap_closure, A.NodeImporter__tryPath_closure0, A.ImportCache_humanize_closure2, A.ImportCache_humanize_closure3, A.ImportCache_humanize_closure4, A.Interpolation_toString_closure0, A._realCasePath_helper0, A._realCasePath_helper__closure0, A.render_closure0, A._parseFunctions__closure, A._parseFunctions___closure0, A._parseFunctions__closure0, A._parseFunctions__closure1, A._parseFunctions___closure, A._parseImporter_closure, A._parseImporter__closure, A._parseImporter___closure, A.ListExpression_toString_closure0, A._length_closure2, A._nth_closure0, A._setNth_closure0, A._join_closure0, A._append_closure2, A._zip_closure0, A._zip__closure2, A._zip__closure3, A._zip__closure4, A._index_closure2, A._separator_closure0, A._isBracketed_closure0, A._slash_closure0, A.SelectorList_asSassList_closure0, A.SelectorList_resolveParentSelectors_closure0, A.SelectorList_resolveParentSelectors__closure0, A.SelectorList__complexContainsParentSelector_closure0, A.SelectorList__complexContainsParentSelector__closure0, A.SelectorList__resolveParentSelectorsCompound_closure2, A.SelectorList__resolveParentSelectorsCompound_closure3, A.SelectorList__resolveParentSelectorsCompound_closure4, A.SelectorList_withAdditionalCombinators_closure0, A.legacyListClass_closure, A.legacyListClass__closure, A.legacyListClass_closure1, A.legacyListClass_closure2, A.legacyListClass_closure4, A.listClass__closure, A.SassList_isBlank_closure0, A.MapExpression_toString_closure0, A._get_closure0, A._set_closure1, A._set__closure2, A._set_closure2, A._set__closure1, A._merge_closure1, A._merge_closure2, A._merge__closure0, A._deepMerge_closure0, A._deepRemove_closure0, A._deepRemove__closure0, A._remove_closure1, A._remove_closure2, A._keys_closure0, A._values_closure0, A._hasKey_closure0, A._modify_modifyNestedMap0, A.legacyMapClass_closure, A.legacyMapClass__closure, A.legacyMapClass__closure0, A.legacyMapClass_closure2, A.legacyMapClass_closure3, A.legacyMapClass_closure4, A.mapClass__closure, A.mapClass__closure0, A._ceil_closure0, A._clamp_closure0, A._floor_closure0, A._max_closure0, A._min_closure0, A._round_closure0, A._abs_closure0, A._hypot_closure0, A._hypot__closure0, A._log_closure0, A._pow_closure0, A._sqrt_closure0, A._acos_closure0, A._asin_closure0, A._atan_closure0, A._atan2_closure0, A._cos_closure0, A._sin_closure0, A._tan_closure0, A._compatible_closure0, A._isUnitless_closure0, A._unit_closure0, A._percentage_closure0, A._randomFunction_closure0, A._div_closure0, A._numberFunction_closure0, A.global_closure57, A.global_closure58, A.global_closure59, A.global_closure60, A.local_closure1, A.local_closure2, A.local__closure0, A.listDir__closure1, A.listDir__closure2, A.listDir_closure_list0, A.listDir__list_closure0, A.ModifiableCssNode_hasFollowingSibling_closure0, A.legacyNullClass__closure, A.legacyNumberClass_closure, A.legacyNumberClass_closure0, A.legacyNumberClass_closure2, A._parseNumber_closure, A._parseNumber_closure0, A.numberClass__closure, A.numberClass__closure0, A.numberClass__closure1, A.numberClass__closure2, A.numberClass__closure3, A.numberClass__closure4, A.numberClass__closure5, A.numberClass__closure6, A.numberClass__closure7, A.numberClass__closure8, A.numberClass__closure9, A.numberClass__closure12, A.numberClass__closure13, A.numberClass__closure14, A.numberClass__closure15, A.numberClass__closure16, A.numberClass__closure17, A.numberClass__closure18, A.numberClass__closure19, A.SassNumber__coerceOrConvertValue_closure3, A.SassNumber__coerceOrConvertValue_closure5, A.SassNumber_multiplyUnits_closure3, A.SassNumber_multiplyUnits_closure5, A.SassNumber__areAnyConvertible_closure0, A.SassNumber__canonicalizeUnitList_closure0, A.ParentStatement_closure0, A.ParentStatement__closure0, A.Parser_scanIdentChar_matches0, A._PrefixedKeys_iterator_closure0, A.PseudoSelector_specificity__closure1, A.PseudoSelector_specificity__closure2, A.PseudoSelector_unify_closure0, A.JSClassExtension_setCustomInspect_closure, A._wrapMain_closure, A._wrapMain_closure0, A._IsBogusVisitor_visitComplexSelector_closure0, A._IsUselessVisitor_visitComplexSelector_closure0, A._nest_closure0, A._nest__closure1, A._append_closure1, A._append__closure1, A._append___closure0, A._extend_closure0, A._replace_closure0, A._unify_closure0, A._isSuperselector_closure0, A._simpleSelectors_closure0, A._simpleSelectors__closure0, A._parse_closure0, A.serialize_closure0, A._SerializeVisitor_visitList_closure2, A._SerializeVisitor_visitList_closure3, A._SerializeVisitor_visitList_closure4, A._SerializeVisitor_visitMap_closure0, A._SerializeVisitor_visitSelectorList_closure0, A.SimpleSelector_isSuperselector_closure0, A.SimpleSelector_isSuperselector__closure0, A.SingleUnitSassNumber__coerceToUnit_closure0, A.SingleUnitSassNumber__coerceValueToUnit_closure0, A.SingleUnitSassNumber_multiplyUnits_closure1, A.SourceMapBuffer_buildSourceMap_closure0, A.updateSourceSpanPrototype_closure, A.updateSourceSpanPrototype_closure0, A.updateSourceSpanPrototype_closure1, A.updateSourceSpanPrototype_closure2, A.updateSourceSpanPrototype_closure3, A.updateSourceSpanPrototype_closure4, A.updateSourceSpanPrototype_closure5, A.StatementSearchVisitor_visitIfRule_closure1, A.StatementSearchVisitor_visitIfRule__closure2, A.StatementSearchVisitor_visitIfRule_closure2, A.StatementSearchVisitor_visitIfRule__closure1, A.StatementSearchVisitor_visitChildren_closure0, A._unquote_closure0, A._quote_closure0, A._length_closure1, A._insert_closure0, A._index_closure1, A._slice_closure0, A._toUpperCase_closure0, A._toLowerCase_closure0, A._uniqueId_closure0, A.legacyStringClass_closure, A.legacyStringClass_closure0, A.stringClass__closure, A.stringClass__closure0, A.stringClass__closure1, A.stringClass__closure2, A.stringClass__closure3, A.StylesheetParser_parse__closure2, A.StylesheetParser__expression_addSingleExpression0, A.StylesheetParser__expression_addOperator0, A.StylesheetParser__unicodeRange_closure1, A.StylesheetParser__unicodeRange_closure2, A.StylesheetParser_trySpecialFunction_closure0, A.TerseLogger_summarize_closure1, A.TerseLogger_summarize_closure2, A._UnprefixedKeys_iterator_closure1, A._UnprefixedKeys_iterator_closure2, A._exactlyOne_closure0, A.futureToPromise__closure0, A.indent_closure0, A.flattenVertically_closure1, A.flattenVertically_closure2, A.valueClass__closure, A.valueClass__closure0, A.valueClass__closure1, A.valueClass__closure2, A.valueClass__closure3, A.valueClass__closure4, A.valueClass__closure5, A.valueClass__closure7, A.valueClass__closure8, A.valueClass__closure9, A.valueClass__closure10, A.valueClass__closure11, A.valueClass__closure12, A.valueClass__closure13, A.valueClass__closure15, A.valueClass__closure16]); + _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.Primitives_functionNoSuchMethod_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A.Future_wait_handleError, A._Future__chainForeignFuture_closure0, A.Stream_Stream$fromFuture_closure0, A._HashMap_addAll_closure, A.HashMap_HashMap$from_closure, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A.MapMixin_addAll_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A._createTables_build, A.Parser_parse_closure, A.StreamQueue__ensureListening_closure1, A.futureToPromise_closure, A.PathMap__create_closure, A.IfRule_toString_closure, A.ComplexSelector_specificity_closure, A.CompoundSelector_specificity_closure, A.ExtensionStore_addExtensions_closure, A.ExtensionStore_addExtensions__closure1, A.ExtensionStore_clone_closure, A._weaveParents_closure, A.paths_closure, A._updateComponents_updateRgb, A._deepMergeImpl_closure, A._nest__closure0, A._append__closure0, A.StylesheetParser__declarationOrBuffer_closure, A.StylesheetParser__declarationOrBuffer_closure0, A.StylesheetParser__styleRule_closure, A.StylesheetParser__propertyOrVariableDeclaration_closure, A.StylesheetParser__propertyOrVariableDeclaration_closure0, A.StylesheetParser__atRootRule_closure, A.StylesheetParser__atRootRule_closure0, A.StylesheetParser__eachRule_closure, A.StylesheetParser__functionRule_closure, A.StylesheetParser__forRule_closure0, A.StylesheetParser__includeRule_closure, A.StylesheetParser_mediaRule_closure, A.StylesheetParser__mixinRule_closure, A.StylesheetParser_mozDocumentRule_closure, A.StylesheetParser_supportsRule_closure, A.StylesheetParser__whileRule_closure, A.StylesheetParser_unknownAtRule_closure, A.StylesheetGraph__recanonicalizeImportsForNode_closure, A.longestCommonSubsequence_backtrack, A.mapAddAll2_closure, A.SassMap_asList_closure, A.SassNumber_plus_closure, A.SassNumber_minus_closure, A.SassNumber__canonicalMultiplier_closure, A._EvaluateVisitor__closure2, A._EvaluateVisitor__evaluateArguments_closure5, A._EvaluateVisitor__evaluateMacroArguments_closure5, A._EvaluateVisitor__addRestMap_closure0, A._EvaluateVisitor__closure, A._EvaluateVisitor__evaluateArguments_closure1, A._EvaluateVisitor__evaluateMacroArguments_closure1, A._EvaluateVisitor__addRestMap_closure, A.SingleMapping_toJson_closure0, A.Highlighter__collateLines_closure0, A.Frame_Frame$parseV8_closure_parseLocation, A.TransformByHandlers_transformByHandlers__closure1, A.RateLimit__debounceAggregate_closure, A._EvaluateVisitor__closure8, A._EvaluateVisitor__evaluateArguments_closure13, A._EvaluateVisitor__evaluateMacroArguments_closure13, A._EvaluateVisitor__addRestMap_closure2, A._updateComponents_updateRgb0, A.legacyColorClass_closure4, A.legacyColorClass_closure5, A.legacyColorClass_closure6, A.legacyColorClass_closure7, A.colorClass__closure, A.colorClass__closure0, A._parseFunctions_closure0, A.ComplexSelector_specificity_closure0, A.CompoundSelector_specificity_closure0, A._EvaluateVisitor__closure5, A._EvaluateVisitor__evaluateArguments_closure9, A._EvaluateVisitor__evaluateMacroArguments_closure9, A._EvaluateVisitor__addRestMap_closure1, A.ExtensionStore_addExtensions_closure1, A.ExtensionStore_addExtensions__closure4, A.ExtensionStore_clone_closure0, A._weaveParents_closure3, A.paths_closure0, A.IfRule_toString_closure0, A.render_closure1, A._parseFunctions_closure, A.legacyListClass_closure0, A.legacyListClass_closure3, A.listClass__closure0, A._deepMergeImpl_closure0, A.legacyMapClass_closure0, A.legacyMapClass_closure1, A.mapClass__closure1, A.SassMap_asList_closure0, A.main_closure0, A.main_closure1, A.legacyNumberClass_closure1, A.legacyNumberClass_closure3, A.numberClass__closure10, A.numberClass__closure11, A.SassNumber_plus_closure0, A.SassNumber_minus_closure0, A.SassNumber__canonicalMultiplier_closure0, A.JSClassExtension_get_defineMethod_closure, A.JSClassExtension_get_defineGetter_closure, A.main_printError, A._nest__closure2, A._append__closure2, A.legacyStringClass_closure1, A.StylesheetParser__declarationOrBuffer_closure1, A.StylesheetParser__declarationOrBuffer_closure2, A.StylesheetParser__styleRule_closure0, A.StylesheetParser__propertyOrVariableDeclaration_closure1, A.StylesheetParser__propertyOrVariableDeclaration_closure2, A.StylesheetParser__atRootRule_closure1, A.StylesheetParser__atRootRule_closure2, A.StylesheetParser__eachRule_closure0, A.StylesheetParser__functionRule_closure0, A.StylesheetParser__forRule_closure2, A.StylesheetParser__includeRule_closure0, A.StylesheetParser_mediaRule_closure0, A.StylesheetParser__mixinRule_closure0, A.StylesheetParser_mozDocumentRule_closure0, A.StylesheetParser_supportsRule_closure0, A.StylesheetParser__whileRule_closure0, A.StylesheetParser_unknownAtRule_closure0, A.futureToPromise_closure0, A.futureToPromise__closure1, A.objectToMap_closure, A.longestCommonSubsequence_backtrack0, A.mapAddAll2_closure0, A.valueClass__closure6, A.valueClass__closure14]); + _inherit(A.CastList, A._CastListBase); + _inherit(A.MapBase, A.MapMixin); + _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A.UnmodifiableMapBase, A.MergedMapView, A.MergedMapView0]); + _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.NullThrownError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError, A.CyclicInitializationError]); + _inherit(A.ListBase, A._ListBase_Object_ListMixin); + _inherit(A.UnmodifiableListBase, A.ListBase); + _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__asyncCompleteWithValue_closure, A._Future__chainFuture_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._AddStreamState_cancel_closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A.Utf8Decoder__decoder_closure, A.Utf8Decoder__decoderNonfatal_closure, A.Parser__setOption_closure, A.StreamGroup_add_closure, A.StreamGroup_add_closure0, A.StreamGroup__listenToStream_closure, A.StreamQueue__ensureListening_closure0, A.ReplAdapter_runAsync_closure, A.ParsedPath__splitExtension_closure0, A.PseudoSelector_specificity_closure, A.AsyncEnvironment_setVariable_closure, A.AsyncEnvironment_setVariable_closure1, A.AsyncImportCache_canonicalize_closure, A.AsyncImportCache_canonicalize_closure0, A.AsyncImportCache__canonicalize_closure, A.AsyncImportCache_importCanonical_closure, A.Environment_setVariable_closure, A.Environment_setVariable_closure1, A.ExecutableOptions__parser_closure, A.ExecutableOptions_interactive_closure, A.ExtensionStore__registerSelector_closure, A.ExtensionStore_addExtension_closure, A.ExtensionStore_addExtension_closure0, A.ExtensionStore_addExtension_closure1, A.ExtensionStore__extendExistingExtensions_closure, A.ExtensionStore__extendExistingExtensions_closure0, A.ExtensionStore_addExtensions___closure, A.ImportCache_canonicalize_closure, A.ImportCache_canonicalize_closure0, A.ImportCache__canonicalize_closure, A.ImportCache_importCanonical_closure, A.resolveImportPath_closure, A.resolveImportPath_closure0, A._tryPathAsDirectory_closure, A._realCasePath_helper_closure, A._readFile_closure, A.writeFile_closure, A.deleteFile_closure, A.fileExists_closure, A.dirExists_closure, A.ensureDir_closure, A.listDir_closure, A.modificationTime_closure, A.watchDir_closure3, A.watchDir__closure, A.AtRootQueryParser_parse_closure, A.KeyframeSelectorParser_parse_closure, A.MediaQueryParser_parse_closure, A.Parser__parseIdentifier_closure, A.SassParser_children_closure, A.SelectorParser_parse_closure, A.SelectorParser_parseCompoundSelector_closure, A.StylesheetParser_parse_closure, A.StylesheetParser_parse__closure, A.StylesheetParser_parseArgumentDeclaration_closure, A.StylesheetParser_parseVariableDeclaration_closure, A.StylesheetParser_parseUseRule_closure, A.StylesheetParser__parseSingleProduction_closure, A.StylesheetParser__statement_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure0, A.StylesheetParser__forRule_closure, A.StylesheetParser__memberList_closure, A.StylesheetParser__expression_resetState, A.StylesheetParser__expression_resolveOneOperation, A.StylesheetParser__expression_resolveOperations, A.StylesheetParser__expression_resolveSpaceExpressions, A.StylesheetParser_expressionUntilComma_closure, A.StylesheetParser_namespacedExpression_closure, A.StylesheetParser__expressionUntilComparison_closure, A.StylesheetParser__publicIdentifier_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure, A.StylesheetGraph__add_closure, A.StylesheetGraph_addCanonical_closure, A.StylesheetGraph_reload_closure, A.StylesheetGraph__nodeFor_closure, A.StylesheetGraph__nodeFor_closure0, A.SassNumber__coerceOrConvertValue_compatibilityException, A.SassNumber__coerceOrConvertValue_closure0, A.SassNumber__coerceOrConvertValue_closure2, A.SassNumber_multiplyUnits_closure0, A.SassNumber_multiplyUnits_closure2, A.SingleUnitSassNumber_multiplyUnits_closure0, A._EvaluateVisitor__closure4, A._EvaluateVisitor_run_closure0, A._EvaluateVisitor__loadModule_closure1, A._EvaluateVisitor__loadModule_closure2, A._EvaluateVisitor__execute_closure0, A._EvaluateVisitor__extendModules_closure2, A._EvaluateVisitor_visitAtRootRule_closure2, A._EvaluateVisitor_visitAtRootRule_closure3, A._EvaluateVisitor_visitAtRootRule_closure4, A._EvaluateVisitor__scopeForAtRoot__closure0, A._EvaluateVisitor_visitContentRule_closure0, A._EvaluateVisitor_visitDeclaration_closure2, A._EvaluateVisitor_visitEachRule_closure4, A._EvaluateVisitor_visitExtendRule_closure0, A._EvaluateVisitor_visitAtRule_closure3, A._EvaluateVisitor_visitAtRule__closure0, A._EvaluateVisitor_visitForRule_closure4, A._EvaluateVisitor_visitForRule_closure5, A._EvaluateVisitor_visitForRule_closure6, A._EvaluateVisitor_visitForRule_closure7, A._EvaluateVisitor_visitForRule_closure8, A._EvaluateVisitor_visitIfRule_closure0, A._EvaluateVisitor__visitDynamicImport_closure0, A._EvaluateVisitor__visitDynamicImport__closure6, A._EvaluateVisitor_visitIncludeRule_closure3, A._EvaluateVisitor_visitIncludeRule_closure4, A._EvaluateVisitor_visitIncludeRule_closure5, A._EvaluateVisitor_visitIncludeRule__closure0, A._EvaluateVisitor_visitIncludeRule___closure0, A._EvaluateVisitor_visitIncludeRule____closure0, A._EvaluateVisitor_visitMediaRule_closure3, A._EvaluateVisitor_visitMediaRule__closure0, A._EvaluateVisitor_visitMediaRule___closure0, A._EvaluateVisitor__visitMediaQueries_closure0, A._EvaluateVisitor_visitStyleRule_closure7, A._EvaluateVisitor_visitStyleRule_closure8, A._EvaluateVisitor_visitStyleRule_closure10, A._EvaluateVisitor_visitStyleRule_closure11, A._EvaluateVisitor_visitStyleRule_closure12, A._EvaluateVisitor_visitStyleRule__closure0, A._EvaluateVisitor_visitSupportsRule_closure1, A._EvaluateVisitor_visitSupportsRule__closure0, A._EvaluateVisitor_visitVariableDeclaration_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure3, A._EvaluateVisitor_visitVariableDeclaration_closure4, A._EvaluateVisitor_visitWarnRule_closure0, A._EvaluateVisitor_visitWhileRule_closure0, A._EvaluateVisitor_visitBinaryOperationExpression_closure0, A._EvaluateVisitor_visitVariableExpression_closure0, A._EvaluateVisitor_visitUnaryOperationExpression_closure0, A._EvaluateVisitor__visitCalculationValue_closure0, A._EvaluateVisitor_visitFunctionExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure2, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0, A._EvaluateVisitor__runUserDefinedCallable_closure0, A._EvaluateVisitor__runUserDefinedCallable__closure0, A._EvaluateVisitor__runUserDefinedCallable___closure0, A._EvaluateVisitor__runFunctionCallable_closure0, A._EvaluateVisitor__runBuiltInCallable_closure1, A._EvaluateVisitor__verifyArguments_closure0, A._EvaluateVisitor_visitCssAtRule_closure1, A._EvaluateVisitor_visitCssKeyframeBlock_closure1, A._EvaluateVisitor_visitCssMediaRule_closure3, A._EvaluateVisitor_visitCssMediaRule__closure0, A._EvaluateVisitor_visitCssMediaRule___closure0, A._EvaluateVisitor_visitCssStyleRule_closure1, A._EvaluateVisitor_visitCssStyleRule__closure0, A._EvaluateVisitor_visitCssSupportsRule_closure1, A._EvaluateVisitor_visitCssSupportsRule__closure0, A._EvaluateVisitor__serialize_closure0, A._EvaluateVisitor__expressionNode_closure0, A._EvaluateVisitor__closure1, A._EvaluateVisitor_run_closure, A._EvaluateVisitor_runExpression_closure, A._EvaluateVisitor_runExpression__closure, A._EvaluateVisitor_runStatement_closure, A._EvaluateVisitor_runStatement__closure, A._EvaluateVisitor__loadModule_closure, A._EvaluateVisitor__loadModule_closure0, A._EvaluateVisitor__execute_closure, A._EvaluateVisitor__extendModules_closure0, A._EvaluateVisitor_visitAtRootRule_closure, A._EvaluateVisitor_visitAtRootRule_closure0, A._EvaluateVisitor_visitAtRootRule_closure1, A._EvaluateVisitor__scopeForAtRoot__closure, A._EvaluateVisitor_visitContentRule_closure, A._EvaluateVisitor_visitDeclaration_closure0, A._EvaluateVisitor_visitEachRule_closure1, A._EvaluateVisitor_visitExtendRule_closure, A._EvaluateVisitor_visitAtRule_closure0, A._EvaluateVisitor_visitAtRule__closure, A._EvaluateVisitor_visitForRule_closure, A._EvaluateVisitor_visitForRule_closure0, A._EvaluateVisitor_visitForRule_closure1, A._EvaluateVisitor_visitForRule_closure2, A._EvaluateVisitor_visitForRule_closure3, A._EvaluateVisitor_visitIfRule_closure, A._EvaluateVisitor__visitDynamicImport_closure, A._EvaluateVisitor__visitDynamicImport__closure2, A._EvaluateVisitor_visitIncludeRule_closure, A._EvaluateVisitor_visitIncludeRule_closure0, A._EvaluateVisitor_visitIncludeRule_closure1, A._EvaluateVisitor_visitIncludeRule__closure, A._EvaluateVisitor_visitIncludeRule___closure, A._EvaluateVisitor_visitIncludeRule____closure, A._EvaluateVisitor_visitMediaRule_closure0, A._EvaluateVisitor_visitMediaRule__closure, A._EvaluateVisitor_visitMediaRule___closure, A._EvaluateVisitor__visitMediaQueries_closure, A._EvaluateVisitor_visitStyleRule_closure, A._EvaluateVisitor_visitStyleRule_closure0, A._EvaluateVisitor_visitStyleRule_closure2, A._EvaluateVisitor_visitStyleRule_closure3, A._EvaluateVisitor_visitStyleRule_closure4, A._EvaluateVisitor_visitStyleRule__closure, A._EvaluateVisitor_visitSupportsRule_closure, A._EvaluateVisitor_visitSupportsRule__closure, A._EvaluateVisitor_visitVariableDeclaration_closure, A._EvaluateVisitor_visitVariableDeclaration_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure1, A._EvaluateVisitor_visitWarnRule_closure, A._EvaluateVisitor_visitWhileRule_closure, A._EvaluateVisitor_visitBinaryOperationExpression_closure, A._EvaluateVisitor_visitVariableExpression_closure, A._EvaluateVisitor_visitUnaryOperationExpression_closure, A._EvaluateVisitor__visitCalculationValue_closure, A._EvaluateVisitor_visitFunctionExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure0, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure, A._EvaluateVisitor__runUserDefinedCallable_closure, A._EvaluateVisitor__runUserDefinedCallable__closure, A._EvaluateVisitor__runUserDefinedCallable___closure, A._EvaluateVisitor__runFunctionCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure, A._EvaluateVisitor__verifyArguments_closure, A._EvaluateVisitor_visitCssAtRule_closure, A._EvaluateVisitor_visitCssKeyframeBlock_closure, A._EvaluateVisitor_visitCssMediaRule_closure0, A._EvaluateVisitor_visitCssMediaRule__closure, A._EvaluateVisitor_visitCssMediaRule___closure, A._EvaluateVisitor_visitCssStyleRule_closure, A._EvaluateVisitor_visitCssStyleRule__closure, A._EvaluateVisitor_visitCssSupportsRule_closure, A._EvaluateVisitor_visitCssSupportsRule__closure, A._EvaluateVisitor__serialize_closure, A._EvaluateVisitor__expressionNode_closure, A._SerializeVisitor_visitCssComment_closure, A._SerializeVisitor_visitCssAtRule_closure, A._SerializeVisitor_visitCssMediaRule_closure, A._SerializeVisitor_visitCssImport_closure, A._SerializeVisitor_visitCssImport__closure, A._SerializeVisitor_visitCssKeyframeBlock_closure, A._SerializeVisitor_visitCssStyleRule_closure, A._SerializeVisitor_visitCssSupportsRule_closure, A._SerializeVisitor_visitCssDeclaration_closure, A._SerializeVisitor_visitCssDeclaration_closure0, A._SerializeVisitor__write_closure, A._SerializeVisitor__visitChildren_closure, A._SerializeVisitor__visitChildren_closure0, A.SingleMapping_SingleMapping$fromEntries_closure, A.SingleMapping_SingleMapping$fromEntries_closure0, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeLabel_closure, A.Highlighter__writeLabel_closure0, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$_parseFirefoxEval_closure, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, A.LazyTrace_terse_closure, A.Trace_Trace$from_closure, A.TransformByHandlers_transformByHandlers_closure, A.TransformByHandlers_transformByHandlers__closure0, A.TransformByHandlers_transformByHandlers__closure2, A.RateLimit__debounceAggregate_closure_emit, A.RateLimit__debounceAggregate__closure, A.argumentListClass_closure, A.AsyncEnvironment_setVariable_closure2, A.AsyncEnvironment_setVariable_closure4, A._EvaluateVisitor__closure10, A._EvaluateVisitor_run_closure2, A._EvaluateVisitor__loadModule_closure5, A._EvaluateVisitor__loadModule_closure6, A._EvaluateVisitor__execute_closure2, A._EvaluateVisitor__extendModules_closure6, A._EvaluateVisitor_visitAtRootRule_closure8, A._EvaluateVisitor_visitAtRootRule_closure9, A._EvaluateVisitor_visitAtRootRule_closure10, A._EvaluateVisitor__scopeForAtRoot__closure2, A._EvaluateVisitor_visitContentRule_closure2, A._EvaluateVisitor_visitDeclaration_closure6, A._EvaluateVisitor_visitEachRule_closure10, A._EvaluateVisitor_visitExtendRule_closure2, A._EvaluateVisitor_visitAtRule_closure9, A._EvaluateVisitor_visitAtRule__closure2, A._EvaluateVisitor_visitForRule_closure14, A._EvaluateVisitor_visitForRule_closure15, A._EvaluateVisitor_visitForRule_closure16, A._EvaluateVisitor_visitForRule_closure17, A._EvaluateVisitor_visitForRule_closure18, A._EvaluateVisitor_visitIfRule_closure2, A._EvaluateVisitor__visitDynamicImport_closure2, A._EvaluateVisitor__visitDynamicImport__closure14, A._EvaluateVisitor_visitIncludeRule_closure11, A._EvaluateVisitor_visitIncludeRule_closure12, A._EvaluateVisitor_visitIncludeRule_closure13, A._EvaluateVisitor_visitIncludeRule__closure2, A._EvaluateVisitor_visitIncludeRule___closure2, A._EvaluateVisitor_visitIncludeRule____closure2, A._EvaluateVisitor_visitMediaRule_closure9, A._EvaluateVisitor_visitMediaRule__closure2, A._EvaluateVisitor_visitMediaRule___closure2, A._EvaluateVisitor__visitMediaQueries_closure2, A._EvaluateVisitor_visitStyleRule_closure23, A._EvaluateVisitor_visitStyleRule_closure24, A._EvaluateVisitor_visitStyleRule_closure26, A._EvaluateVisitor_visitStyleRule_closure27, A._EvaluateVisitor_visitStyleRule_closure28, A._EvaluateVisitor_visitStyleRule__closure2, A._EvaluateVisitor_visitSupportsRule_closure5, A._EvaluateVisitor_visitSupportsRule__closure2, A._EvaluateVisitor_visitVariableDeclaration_closure8, A._EvaluateVisitor_visitVariableDeclaration_closure9, A._EvaluateVisitor_visitVariableDeclaration_closure10, A._EvaluateVisitor_visitWarnRule_closure2, A._EvaluateVisitor_visitWhileRule_closure2, A._EvaluateVisitor_visitBinaryOperationExpression_closure2, A._EvaluateVisitor_visitVariableExpression_closure2, A._EvaluateVisitor_visitUnaryOperationExpression_closure2, A._EvaluateVisitor__visitCalculationValue_closure2, A._EvaluateVisitor_visitFunctionExpression_closure5, A._EvaluateVisitor_visitFunctionExpression_closure6, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2, A._EvaluateVisitor__runUserDefinedCallable_closure2, A._EvaluateVisitor__runUserDefinedCallable__closure2, A._EvaluateVisitor__runUserDefinedCallable___closure2, A._EvaluateVisitor__runFunctionCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure5, A._EvaluateVisitor__verifyArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure5, A._EvaluateVisitor_visitCssKeyframeBlock_closure5, A._EvaluateVisitor_visitCssMediaRule_closure9, A._EvaluateVisitor_visitCssMediaRule__closure2, A._EvaluateVisitor_visitCssMediaRule___closure2, A._EvaluateVisitor_visitCssStyleRule_closure5, A._EvaluateVisitor_visitCssStyleRule__closure2, A._EvaluateVisitor_visitCssSupportsRule_closure5, A._EvaluateVisitor_visitCssSupportsRule__closure2, A._EvaluateVisitor__serialize_closure2, A._EvaluateVisitor__expressionNode_closure2, A.AsyncImportCache_canonicalize_closure1, A.AsyncImportCache_canonicalize_closure2, A.AsyncImportCache__canonicalize_closure0, A.AsyncImportCache_importCanonical_closure0, A.AtRootQueryParser_parse_closure0, A.legacyBooleanClass_closure, A.booleanClass_closure, A.colorClass_closure, A.compileAsync_closure, A.compileStringAsync_closure, A.Environment_setVariable_closure2, A.Environment_setVariable_closure4, A._EvaluateVisitor__closure7, A._EvaluateVisitor_run_closure1, A._EvaluateVisitor__loadModule_closure3, A._EvaluateVisitor__loadModule_closure4, A._EvaluateVisitor__execute_closure1, A._EvaluateVisitor__extendModules_closure4, A._EvaluateVisitor_visitAtRootRule_closure5, A._EvaluateVisitor_visitAtRootRule_closure6, A._EvaluateVisitor_visitAtRootRule_closure7, A._EvaluateVisitor__scopeForAtRoot__closure1, A._EvaluateVisitor_visitContentRule_closure1, A._EvaluateVisitor_visitDeclaration_closure4, A._EvaluateVisitor_visitEachRule_closure7, A._EvaluateVisitor_visitExtendRule_closure1, A._EvaluateVisitor_visitAtRule_closure6, A._EvaluateVisitor_visitAtRule__closure1, A._EvaluateVisitor_visitForRule_closure9, A._EvaluateVisitor_visitForRule_closure10, A._EvaluateVisitor_visitForRule_closure11, A._EvaluateVisitor_visitForRule_closure12, A._EvaluateVisitor_visitForRule_closure13, A._EvaluateVisitor_visitIfRule_closure1, A._EvaluateVisitor__visitDynamicImport_closure1, A._EvaluateVisitor__visitDynamicImport__closure10, A._EvaluateVisitor_visitIncludeRule_closure7, A._EvaluateVisitor_visitIncludeRule_closure8, A._EvaluateVisitor_visitIncludeRule_closure9, A._EvaluateVisitor_visitIncludeRule__closure1, A._EvaluateVisitor_visitIncludeRule___closure1, A._EvaluateVisitor_visitIncludeRule____closure1, A._EvaluateVisitor_visitMediaRule_closure6, A._EvaluateVisitor_visitMediaRule__closure1, A._EvaluateVisitor_visitMediaRule___closure1, A._EvaluateVisitor__visitMediaQueries_closure1, A._EvaluateVisitor_visitStyleRule_closure15, A._EvaluateVisitor_visitStyleRule_closure16, A._EvaluateVisitor_visitStyleRule_closure18, A._EvaluateVisitor_visitStyleRule_closure19, A._EvaluateVisitor_visitStyleRule_closure20, A._EvaluateVisitor_visitStyleRule__closure1, A._EvaluateVisitor_visitSupportsRule_closure3, A._EvaluateVisitor_visitSupportsRule__closure1, A._EvaluateVisitor_visitVariableDeclaration_closure5, A._EvaluateVisitor_visitVariableDeclaration_closure6, A._EvaluateVisitor_visitVariableDeclaration_closure7, A._EvaluateVisitor_visitWarnRule_closure1, A._EvaluateVisitor_visitWhileRule_closure1, A._EvaluateVisitor_visitBinaryOperationExpression_closure1, A._EvaluateVisitor_visitVariableExpression_closure1, A._EvaluateVisitor_visitUnaryOperationExpression_closure1, A._EvaluateVisitor__visitCalculationValue_closure1, A._EvaluateVisitor_visitFunctionExpression_closure3, A._EvaluateVisitor_visitFunctionExpression_closure4, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1, A._EvaluateVisitor__runUserDefinedCallable_closure1, A._EvaluateVisitor__runUserDefinedCallable__closure1, A._EvaluateVisitor__runUserDefinedCallable___closure1, A._EvaluateVisitor__runFunctionCallable_closure1, A._EvaluateVisitor__runBuiltInCallable_closure3, A._EvaluateVisitor__verifyArguments_closure1, A._EvaluateVisitor_visitCssAtRule_closure3, A._EvaluateVisitor_visitCssKeyframeBlock_closure3, A._EvaluateVisitor_visitCssMediaRule_closure6, A._EvaluateVisitor_visitCssMediaRule__closure1, A._EvaluateVisitor_visitCssMediaRule___closure1, A._EvaluateVisitor_visitCssStyleRule_closure3, A._EvaluateVisitor_visitCssStyleRule__closure1, A._EvaluateVisitor_visitCssSupportsRule_closure3, A._EvaluateVisitor_visitCssSupportsRule__closure1, A._EvaluateVisitor__serialize_closure1, A._EvaluateVisitor__expressionNode_closure1, A.exceptionClass_closure, A.ExtensionStore__registerSelector_closure0, A.ExtensionStore_addExtension_closure2, A.ExtensionStore_addExtension_closure3, A.ExtensionStore_addExtension_closure4, A.ExtensionStore__extendExistingExtensions_closure1, A.ExtensionStore__extendExistingExtensions_closure2, A.ExtensionStore_addExtensions___closure0, A.functionClass_closure, A.NodeImporter__tryPath_closure, A.ImportCache_canonicalize_closure1, A.ImportCache_canonicalize_closure2, A.ImportCache__canonicalize_closure0, A.ImportCache_importCanonical_closure0, A._realCasePath_helper_closure0, A.KeyframeSelectorParser_parse_closure0, A.render_closure, A._parseFunctions____closure, A._parseFunctions___closure1, A._parseImporter____closure, A._parseImporter___closure0, A.listClass_closure, A.mapClass_closure, A.MediaQueryParser_parse_closure0, A._readFile_closure0, A.fileExists_closure0, A.dirExists_closure0, A.listDir_closure0, A.NodeToDartLogger_warn_closure, A.NodeToDartLogger_debug_closure, A.legacyNullClass_closure, A.numberClass_closure, A.SassNumber__coerceOrConvertValue_compatibilityException0, A.SassNumber__coerceOrConvertValue_closure4, A.SassNumber__coerceOrConvertValue_closure6, A.SassNumber_multiplyUnits_closure4, A.SassNumber_multiplyUnits_closure6, A.Parser__parseIdentifier_closure0, A.PseudoSelector_specificity_closure0, A.main_closure, A.SassParser_children_closure0, A.SelectorParser_parse_closure0, A.SelectorParser_parseCompoundSelector_closure0, A._SerializeVisitor_visitCssComment_closure0, A._SerializeVisitor_visitCssAtRule_closure0, A._SerializeVisitor_visitCssMediaRule_closure0, A._SerializeVisitor_visitCssImport_closure0, A._SerializeVisitor_visitCssImport__closure0, A._SerializeVisitor_visitCssKeyframeBlock_closure0, A._SerializeVisitor_visitCssStyleRule_closure0, A._SerializeVisitor_visitCssSupportsRule_closure0, A._SerializeVisitor_visitCssDeclaration_closure1, A._SerializeVisitor_visitCssDeclaration_closure2, A._SerializeVisitor__write_closure0, A._SerializeVisitor__visitChildren_closure1, A._SerializeVisitor__visitChildren_closure2, A.SingleUnitSassNumber_multiplyUnits_closure2, A.stringClass_closure, A.StylesheetParser_parse_closure0, A.StylesheetParser_parse__closure1, A.StylesheetParser_parseArgumentDeclaration_closure0, A.StylesheetParser__parseSingleProduction_closure0, A.StylesheetParser_parseSignature_closure, A.StylesheetParser__statement_closure0, A.StylesheetParser_variableDeclarationWithoutNamespace_closure1, A.StylesheetParser_variableDeclarationWithoutNamespace_closure2, A.StylesheetParser__forRule_closure1, A.StylesheetParser__memberList_closure0, A.StylesheetParser__expression_resetState0, A.StylesheetParser__expression_resolveOneOperation0, A.StylesheetParser__expression_resolveOperations0, A.StylesheetParser__expression_resolveSpaceExpressions0, A.StylesheetParser_expressionUntilComma_closure0, A.StylesheetParser_namespacedExpression_closure0, A.StylesheetParser__expressionUntilComparison_closure0, A.StylesheetParser__publicIdentifier_closure0, A.resolveImportPath_closure1, A.resolveImportPath_closure2, A._tryPathAsDirectory_closure0, A.valueClass_closure]); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeyIterable, A._HashMapKeyIterable, A._MapBaseValueIterable]); + _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._GeneratorIterable]); + _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); + _inheritMany(A.Iterator, [A.MappedIterator, A.WhereIterator, A.TakeIterator, A.SkipIterator, A.SkipWhileIterator]); + _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); + _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); + _inherit(A.EfficientLengthFollowedByIterable, A.FollowedByIterable); + _inheritMany(A.MapView, [A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.PathMap]); + _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(A.ConstantMapView, A.UnmodifiableMapView); + _inheritMany(A.ConstantMap, [A.ConstantStringMap, A.GeneralConstantMap]); + _inherit(A.Instantiation1, A.Instantiation); + _inherit(A.NullError, A.TypeError); + _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); + _inheritMany(A.IterableBase, [A._AllMatchesIterable, A._SyncStarIterable, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A._PrefixedKeys, A._UnprefixedKeys, A._PrefixedKeys0, A._UnprefixedKeys0]); + _inherit(A.NativeTypedArray, A.NativeTypedData); + _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); + _inherit(A._TypeError, A._Error); + _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); + _inheritMany(A._StreamController, [A._AsyncStreamController, A._SyncStreamController]); + _inheritMany(A.Stream, [A._StreamImpl, A._ForwardingStream, A._CompleterStream]); + _inherit(A._ControllerStream, A._StreamImpl); + _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]); + _inherit(A._StreamControllerAddStreamState, A._AddStreamState); + _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); + _inherit(A._ExpandStream, A._ForwardingStream); + _inheritMany(A._Zone, [A._CustomZone, A._RootZone]); + _inherit(A._IdentityHashMap, A._HashMap); + _inheritMany(A.JsLinkedHashMap, [A._LinkedIdentityHashMap, A._LinkedCustomHashMap]); + _inherit(A._SetBase, A.__SetBase_Object_SetMixin); + _inheritMany(A._SetBase, [A._LinkedHashSet, A.__UnmodifiableSet__SetBase__UnmodifiableSetMixin]); + _inherit(A._LinkedIdentityHashSet, A._LinkedHashSet); + _inherit(A._UnmodifiableSet, A.__UnmodifiableSet__SetBase__UnmodifiableSetMixin); + _inheritMany(A.Codec, [A.Encoding, A.Base64Codec, A.JsonCodec]); + _inheritMany(A.Encoding, [A.AsciiCodec, A.Utf8Codec]); + _inherit(A.Converter, A.StreamTransformerBase); + _inheritMany(A.Converter, [A._UnicodeSubsetEncoder, A.Base64Encoder, A.JsonEncoder, A.Utf8Encoder, A.Utf8Decoder]); + _inherit(A.AsciiEncoder, A._UnicodeSubsetEncoder); + _inherit(A.ByteConversionSink, A.ChunkedConversionSink); + _inheritMany(A.ByteConversionSink, [A.ByteConversionSinkBase, A._Utf8StringSinkAdapter]); + _inherit(A._Base64EncoderSink, A.ByteConversionSinkBase); + _inherit(A._Utf8Base64EncoderSink, A._Base64EncoderSink); + _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); + _inherit(A._JsonStringStringifier, A._JsonStringifier); + _inherit(A.StringConversionSinkBase, A.StringConversionSinkMixin); + _inherit(A._StringSinkConversionSink, A.StringConversionSinkBase); + _inherit(A._StringCallbackSink, A._StringSinkConversionSink); + _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); + _inherit(A._DataUri, A._Uri); + _inherit(A.ArgParserException, A.FormatException); + _inherit(A.EmptyUnmodifiableSet, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin); + _inherit(A.QueueList, A._QueueList_Object_ListMixin); + _inherit(A._CastQueueList, A.QueueList); + _inheritMany(A._DelegatingIterableBase, [A.DelegatingSet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin]); + _inherit(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.DelegatingSet); + _inherit(A.UnmodifiableSetView, A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin); + _inherit(A.MapKeySet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin); + _inheritMany(A.NodeJsError, [A.JsAssertionError, A.JsRangeError, A.JsReferenceError, A.JsSyntaxError, A.JsTypeError, A.JsSystemError]); + _inheritMany(A.Socket, [A.TTYReadStream, A.TTYWriteStream]); + _inherit(A.InternalStyle, A.Style); + _inheritMany(A.InternalStyle, [A.PosixStyle, A.UrlStyle, A.WindowsStyle]); + _inherit(A.CssNode, A.AstNode); + _inheritMany(A.CssNode, [A.ModifiableCssNode, A.CssParentNode]); + _inheritMany(A.ModifiableCssNode, [A.ModifiableCssParentNode, A.ModifiableCssComment, A.ModifiableCssDeclaration, A.ModifiableCssImport]); + _inheritMany(A.ModifiableCssParentNode, [A.ModifiableCssAtRule, A.ModifiableCssKeyframeBlock, A.ModifiableCssMediaRule, A.ModifiableCssStyleRule, A.ModifiableCssStylesheet, A.ModifiableCssSupportsRule]); + _inherit(A._IsInvisibleVisitor, A.__IsInvisibleVisitor_Object_EveryCssVisitor); + _inherit(A.CssStylesheet, A.CssParentNode); + _inheritMany(A._Enum, [A.BinaryOperator, A.UnaryOperator, A.AttributeOperator, A.Combinator, A.ExtendMode, A.Syntax, A.CalculationOperator, A.ListSeparator, A.OutputStyle, A.LineFeed, A.AttributeOperator0, A.BinaryOperator0, A.CalculationOperator0, A.Combinator0, A.ListSeparator0, A.ExtendMode0, A.OutputStyle0, A.LineFeed0, A.Syntax0, A.UnaryOperator0]); + _inheritMany(A.ParentStatement, [A.AtRootRule, A.AtRule, A.CallableDeclaration, A.Declaration, A.EachRule, A.ForRule, A.MediaRule, A.StyleRule, A.Stylesheet, A.SupportsRule, A.WhileRule]); + _inheritMany(A.CallableDeclaration, [A.ContentBlock, A.FunctionRule, A.MixinRule]); + _inheritMany(A.IfRuleClause, [A.IfClause, A.ElseClause]); + _inherit(A._HasContentVisitor, A.__HasContentVisitor_Object_StatementSearchVisitor); + _inherit(A._IsInvisibleVisitor0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor); + _inherit(A._IsBogusVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor); + _inherit(A._IsUselessVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor); + _inheritMany(A.Selector, [A.SimpleSelector, A.ComplexSelector, A.CompoundSelector, A.SelectorList]); + _inheritMany(A.SimpleSelector, [A.AttributeSelector, A.ClassSelector, A.IDSelector, A.ParentSelector, A.PlaceholderSelector, A.PseudoSelector, A.TypeSelector, A.UniversalSelector]); + _inherit(A.ExplicitConfiguration, A.Configuration); + _inheritMany(A.SourceSpanException, [A.SassException, A.SourceSpanFormatException, A.SassException0]); + _inheritMany(A.SassException, [A.MultiSpanSassException, A.SassRuntimeException, A.SassFormatException]); + _inherit(A.MultiSpanSassRuntimeException, A.MultiSpanSassException); + _inherit(A.MultiSpanSassScriptException, A.SassScriptException); + _inherit(A.MergedExtension, A.Extension); + _inherit(A.Importer, A.AsyncImporter); + _inherit(A.FilesystemImporter, A.Importer); + _inheritMany(A.Parser, [A.AtRootQueryParser, A.StylesheetParser, A.KeyframeSelectorParser, A.MediaQueryParser, A.SelectorParser]); + _inheritMany(A.StylesheetParser, [A.ScssParser, A.SassParser]); + _inherit(A.CssParser, A.ScssParser); + _inheritMany(A.UnmodifiableMapBase, [A.LimitedMapView, A.PrefixedMapView, A.PublicMemberMapView, A.UnprefixedMapView, A.LimitedMapView0, A.PrefixedMapView0, A.PublicMemberMapView0, A.UnprefixedMapView0]); + _inheritMany(A.Value, [A.SassList, A.SassBoolean, A.SassCalculation, A.SassColor, A.SassFunction, A.SassMap, A._SassNull, A.SassNumber, A.SassString]); + _inherit(A.SassArgumentList, A.SassList); + _inheritMany(A.SassNumber, [A.ComplexSassNumber, A.SingleUnitSassNumber, A.UnitlessSassNumber]); + _inherit(A._FindDependenciesVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor); + _inherit(A.SingleMapping, A.Mapping); + _inherit(A.FileLocation, A.SourceLocationMixin); + _inheritMany(A.SourceSpanMixin, [A._FileSpan, A.SourceSpanBase]); + _inherit(A.SourceSpanWithContext, A.SourceSpanBase); + _inherit(A.StringScannerException, A.SourceSpanFormatException); + _inheritMany(A.StringScanner, [A.LineScanner, A.SpanScanner]); + _inheritMany(A.Value0, [A.SassList0, A.SassBoolean0, A.SassCalculation0, A.SassColor0, A.SassNumber0, A.SassFunction0, A.SassMap0, A._SassNull0, A.SassString0]); + _inherit(A.SassArgumentList0, A.SassList0); + _inheritMany(A.AsyncImporter0, [A.NodeToDartAsyncImporter, A.NodeToDartAsyncFileImporter, A.Importer0]); + _inheritMany(A.Parser1, [A.AtRootQueryParser0, A.StylesheetParser0, A.KeyframeSelectorParser0, A.MediaQueryParser0, A.SelectorParser0]); + _inheritMany(A.ParentStatement0, [A.AtRootRule0, A.AtRule0, A.CallableDeclaration0, A.Declaration0, A.EachRule0, A.ForRule0, A.MediaRule0, A.StyleRule0, A.Stylesheet0, A.SupportsRule0, A.WhileRule0]); + _inherit(A.CssNode0, A.AstNode0); + _inheritMany(A.CssNode0, [A.ModifiableCssNode0, A.CssParentNode0]); + _inheritMany(A.ModifiableCssNode0, [A.ModifiableCssParentNode0, A.ModifiableCssComment0, A.ModifiableCssDeclaration0, A.ModifiableCssImport0]); + _inheritMany(A.ModifiableCssParentNode0, [A.ModifiableCssAtRule0, A.ModifiableCssKeyframeBlock0, A.ModifiableCssMediaRule0, A.ModifiableCssStyleRule0, A.ModifiableCssStylesheet0, A.ModifiableCssSupportsRule0]); + _inheritMany(A.Selector0, [A.SimpleSelector0, A.ComplexSelector0, A.CompoundSelector0, A.SelectorList0]); + _inheritMany(A.SimpleSelector0, [A.AttributeSelector0, A.ClassSelector0, A.IDSelector0, A.ParentSelector0, A.PlaceholderSelector0, A.PseudoSelector0, A.TypeSelector0, A.UniversalSelector0]); + _inherit(A.CompileStringOptions, A.CompileOptions); + _inheritMany(A.SassNumber0, [A.ComplexSassNumber0, A.SingleUnitSassNumber0, A.UnitlessSassNumber0]); + _inherit(A.ExplicitConfiguration0, A.Configuration0); + _inheritMany(A.CallableDeclaration0, [A.ContentBlock0, A.FunctionRule0, A.MixinRule0]); + _inheritMany(A.StylesheetParser0, [A.ScssParser0, A.SassParser0]); + _inherit(A.CssParser0, A.ScssParser0); + _inherit(A._NodeException, A.JsError); + _inheritMany(A.SassException0, [A.MultiSpanSassException0, A.SassRuntimeException0, A.SassFormatException0]); + _inherit(A.MultiSpanSassRuntimeException0, A.MultiSpanSassException0); + _inherit(A.MultiSpanSassScriptException0, A.SassScriptException0); + _inheritMany(A.Importer0, [A.NodeToDartFileImporter, A.FilesystemImporter0, A.NoOpImporter, A.NodeToDartImporter]); + _inheritMany(A.IfRuleClause0, [A.IfClause0, A.ElseClause0]); + _inherit(A.MergedExtension0, A.Extension0); + _inherit(A._HasContentVisitor0, A.__HasContentVisitor_Object_StatementSearchVisitor0); + _inherit(A._IsInvisibleVisitor1, A.__IsInvisibleVisitor_Object_EveryCssVisitor0); + _inherit(A._IsInvisibleVisitor2, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsBogusVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsUselessVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0); + _inherit(A.CssStylesheet0, A.CssParentNode0); + _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin); + _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListMixin); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListMixin); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); + _mixin(A._SyncStreamController, A._SyncStreamControllerDispatch); + _mixin(A.UnmodifiableMapBase, A._UnmodifiableMapMixin); + _mixin(A._ListBase_Object_ListMixin, A.ListMixin); + _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); + _mixin(A.__SetBase_Object_SetMixin, A.SetMixin); + _mixin(A.__UnmodifiableSet__SetBase__UnmodifiableSetMixin, A._UnmodifiableSetMixin); + _mixin(A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._QueueList_Object_ListMixin, A.ListMixin); + _mixin(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.EveryCssVisitor); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor, A.StatementSearchVisitor); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.RecursiveStatementVisitor); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor0, A.StatementSearchVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.EveryCssVisitor0); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + })(); + var init = { + typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, + mangledNames: {}, + types: ["~()", "Null()", "Future()", "Value0(List)", "Value(List)", "String(String)", "bool(CssNode)", "bool(CssNode0)", "bool(String)", "bool(Object?)", "SassNumber(List)", "SassNumber0(List)", "int()", "bool(SimpleSelector0)", "bool(SimpleSelector)", "bool(ComplexSelector0)", "bool(ComplexSelector)", "SassString0(List)", "SassString(List)", "SassBoolean0(List)", "SassBoolean(List)", "SassList(List)", "SassList0(List)", "SassColor(List)", "SassColor0(List)", "JSClass0()", "~(Object?)", "Null(~())", "bool()", "double(double)", "String()", "FileSpan()", "bool(int?)", "Future(Future<~>())", "SassMap0(List)", "Value?()", "Value(Value)", "SassMap(List)", "Future<~>()", "Value0(Value0)", "Value0?()", "Value()", "String?()", "bool(num,num)", "bool(Value0)", "bool(ComplexSelectorComponent)", "String(Object)", "SelectorList()", "List()", "Value0()", "SelectorList0()", "bool(ComplexSelectorComponent0)", "~(Value)", "ValueExpression(Value)", "bool(int)", "double(SassColor0)", "~(Value0)", "double(double,double)", "~(Value0,Value0)", "ValueExpression0(Value0)", "~(Value,Value)", "Future()", "bool(Value)", "Frame(String)", "~(Object,StackTrace)", "Future()", "bool(SelectorList0)", "bool(SelectorList)", "Frame()", "ComplexSelector0(ComplexSelector0)", "Future()", "Future()", "ComplexSelector(ComplexSelector)", "Null(Object,StackTrace)", "~(Module0)", "~(Module)", "Null(@)", "Value0?(Statement0)", "~(String,Value)", "List?(List)", "Future(Object?)", "Uri(Uri)", "Future(Statement)", "Null(_NodeSassColor,num)", "Value?(Statement)", "Object()", "String(@)", "SassRuntimeException(AstNode)", "Declaration0(List,FileSpan)", "Declaration(List,FileSpan)", "Stylesheet?()", "int(Uri)", "@()", "Future(Statement0)", "@(@)", "~(String,Value0)", "Future(List)", "Null([Object?])", "SassRuntimeException0(AstNode0)", "List?(List)", "Tuple3?()", "String(String{color:@})", "bool(Module0)", "Iterable(Module0)", "int(Object?)", "bool(_Highlight)", "Callable?()", "Null(Module0)", "Null(Module)", "List()", "bool(ModifiableCssNode0)", "AsyncCallable?()", "bool(Object)", "String(Expression0)", "AtRootQuery0()", "Statement()", "List()", "AtRootQuery()", "~(Object)", "~(String)", "~(~())", "double(Value)", "Map()", "double(Value0)", "int(_NodeSassColor)", "bool(Module)", "AsyncCallable0?()", "Iterable(Module)", "~(String,Object?)", "Iterable(Module0)", "bool(Module0)", "Callable0?()", "bool(Module)", "Iterable(Module)", "Map()", "String(Expression)", "bool(ModifiableCssNode)", "bool(@)", "Statement0()", "~(@)", "int(SassColor0)", "Iterable()", "Set<0^>()", "Iterable(String)", "Trace(String)", "int(Frame)", "String(Frame)", "Iterable(@)", "Trace()", "DateTime()", "bool(Frame)", "~(String[~])", "SassNumber0(SassNumber0,SassNumber0[String?,String?])", "~(@,@)", "int(int)", "~(Iterable)", "Future<~>?()", "AsyncCallable0?(Module0)", "MapKeySet>(Map,AstNode0>)", "Map(Module0)", "List()", "AstNode0(AstNode0)", "bool(Queue)", "VariableDeclaration()", "SassFunction0(List)", "~(Object?,Object?)", "bool(String?)", "~(Module0)", "AtRootRule(List,FileSpan)", "Object(Object)", "AtRule(List,FileSpan)", "bool(ModifiableCssParentNode0)", "int(ComplexSelector)", "~([Object?])", "String(int)", "Entry(Entry)", "double?(String,num{assertPercent:bool,checkPercent:bool})", "Future()", "int(double)", "bool(UseRule0)", "bool(ForwardRule0)", "double(double,double?,num)", "double(double,String)", "AstNode(AstNode)", "SassFunction(List)", "int(int,double?)", "~(Module)", "AsyncCallable?(Module)", "List()", "MapKeySet>(Map,AstNode>)", "bool(ModifiableCssParentNode)", "AstNode0?()", "String(SassNumber0)", "Frame(Tuple2)", "Future?>()", "0&(@[@])", "~(Object[StackTrace?])", "~(Uint8List,String,int)", "Future?>()", "Uri?/()", "Future()", "String(Value0)", "bool(Statement)", "bool(UseRule)", "bool(ForwardRule)", "SelectorList(Value)", "Map(Module)", "Future()", "AsyncImporter0(Object?)", "SelectorList(SelectorList,SelectorList)", "~(Iterable)", "Future(List)", "Callable0?(Module0)", "MapKeySet>(Map,AstNode0>)", "Map(Module0)", "Future()", "Uri?()", "bool(Import)", "Value0?(Value0)", "Uri(String)", "SassNumber0()", "String(_NodeException)", "AstNode?()", "List()", "String(SassNumber)", "~(String,@)", "bool(Statement0)", "bool(Import0)", "Tuple3?()", "Frame(Tuple2)", "Value0(int)", "@(Value0,num)", "Object(_NodeSassMap,int)", "Null(_NodeSassMap,int,Object)", "bool(SassNumber0)", "ImmutableList(SassNumber0)", "bool(SassNumber0,String)", "SassNumber0(SassNumber0,Object,Object[String?])", "double(SassNumber0,Object,Object[String?])", "double(SassNumber0,SassNumber0[String?,String?])", "int(ComplexSelector0)", "~(String,Function)", "SelectorList0(Value0)", "SelectorList0(SelectorList0,SelectorList0)", "FileLocation(FileSpan)", "String(FileSpan)", "int(SourceLocation)", "Callable?(Module)", "MapKeySet>(Map,AstNode>)", "AtRootRule0(List,FileSpan)", "AtRule0(List,FileSpan)", "int(@,@)", "Map(Module)", "SassNumber()", "bool(Object?,Object?)", "List()", "WhileRule(List,FileSpan)", "CssValue(Interpolation)", "Module?(Module)", "UserDefinedCallable(ContentBlock)", "Null(@,StackTrace)", "Value(Expression)", "~(ContentBlock)", "~(List)", "~(CssMediaQuery)", "~(MapEntry)", "SourceFile()", "SourceFile?(int)", "String?(SourceFile?)", "int(_Line)", "SassMap(Value)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "SourceSpanWithContext()", "SassMap(SassMap)", "List(Trace)", "int(Trace)", "_Future<@>(@)", "String(Trace)", "FileSpan?(MapEntry,AstNode>)", "SassNumber(Value)", "Frame(String,String)", "Value(Object)", "Map(Module)", "Map(Module)", "Frame(Frame)", "SassString(SimpleSelector)", "Null(Function,Function)", "String(String?)", "String(Argument0)", "Null(@,@)", "SassArgumentList0(Object,Object,Object[String?])", "ImmutableMap(SassArgumentList0)", "bool(Tuple3)", "Uri(Tuple3)", "Value0?(Module0)", "Module0?(Module0)", "bool(String?,String?)", "Future()", "FileSpan?(MapEntry,AstNode0>)", "Map(Module0)", "Map(Module0)", "bool(Tuple3)", "Uri(Tuple3)", "Future>(Interpolation0{trim:bool,warnForColor:bool})", "int(String?)", "~(int,@)", "String(Argument)", "String(MapEntry)", "Expression(Expression)", "Future<~>(List)", "Value?(Module)", "Module?(Module)", "Future()", "~(Symbol0,@)", "Module0(Module0)", "String(Tuple2)", "FileSpan?(MapEntry,AstNode>)", "String(BuiltInCallable)", "Future>(Expression0)", "Map(Module)", "Map(Module)", "Future(Value0)", "CompoundSelector()", "Statement({root:bool})", "Future>(Interpolation0)", "~(String,int)", "Expression({bracketList:bool,singleEquals:bool,until:bool()?})", "Stylesheet()", "Statement?()", "VariableDeclaration(VariableDeclaration)", "UserDefinedCallable0(ContentBlock0)", "ArgumentDeclaration()", "String(int,IfClause)", "UseRule()", "~(String,int?)", "int(int,int)", "StyleRule(List,FileSpan)", "Future<~>(String)", "Future(Expression0)", "EachRule(List,FileSpan)", "FunctionRule(List,FileSpan)", "ForRule(List,FileSpan)", "ContentBlock(List,FileSpan)", "MediaRule(List,FileSpan)", "MixinRule(List,FileSpan)", "List(List)", "Future()", "bool(Tuple3)", "Uri(Tuple3)", "SupportsRule(List,FileSpan)", "0&(Object[Object?])", "@(String)", "Expression0(Expression0)", "~(Expression)", "~(BinaryOperator)", "bool(Extension)", "StringExpression(Interpolation)", "DateTime(StylesheetNode)", "0&(List)", "~(Uri,StylesheetNode?)", "Null(_NodeSassColor,num?[num?,num?,num?,SassColor0?])", "Set>()", "double(_NodeSassColor)", "Uint8List(@,@)", "SassColor0(Object,_Channels)", "SassColor0(SassColor0,_Channels)", "int(int,ComplexSelectorComponent)", "~(SimpleSelector,Map)", "SassScriptException()", "~(ComplexSelector,Extension)", "AsyncImporter0(NodeImporter0)", "0&(@)", "Null(Map>)", "int(int,ComplexSelectorComponent0)", "String(Combinator0)", "int(int,SimpleSelector0)", "String(MapEntry)", "String(BuiltInCallable0)", "SingleUnitSassNumber(double)", "Future>(Interpolation{trim:bool,warnForColor:bool})", "Value0?(Module0)", "Module0?(Module0)", "Map>?(List)", "~(Set>)", "FileSpan?(MapEntry,AstNode0>)", "Map(Module0)", "Map(Module0)", "Iterable(List)", "Future<~>(List)", "Object(Value0)", "List(Extender)", "~(List)", "Future()", "EvaluateResult0()", "Module0(Module0)", "CssValue0(Expression0)", "List?(SimpleSelector)", "Module(Module)", "CssValue0(Interpolation0)", "List(PseudoSelector)", "UserDefinedCallable0(ContentBlock0)", "Value0(Expression0)", "List>(List)", "FileSpan(_NodeException)", "bool(Extension0)", "Set>()", "List(ComplexSelector)", "Future>(Expression)", "~(SimpleSelector0,Map)", "~(ComplexSelector0,Extension0)", "Null(Map>)", "Map>?(List)", "~(Set>)", "Iterable(List)", "PseudoSelector(ComplexSelector)", "List(Extender0)", "List?(SimpleSelector0)", "List(PseudoSelector0)", "List>(List)", "List(ComplexSelector0)", "PseudoSelector0(ComplexSelector0)", "~(SimpleSelector0,Set>)", "SassFunction0(Object,String,Value0(List))", "List?(List,List)", "bool(Queue>)", "bool(List>)", "~(SimpleSelector,Set>)", "bool(PseudoSelector0)", "SelectorList0?(PseudoSelector0)", "String(int,IfClause0)", "Future(Value)", "List?(List,List)", "~(Object?,Object,Object?)", "Tuple2(String)", "Future>(Interpolation)", "Stylesheet0?()", "bool(Tuple3)", "Uri(Tuple3)", "Null(RenderResult)", "JSFunction0(JSFunction0)", "Object?(Object,String,String[Object?])", "Null(Object)", "bool(Queue>)", "List(Value0)", "bool(List)", "SassList0(ComplexSelector0)", "Iterable(ComplexSelector0)", "SimpleSelector0(SimpleSelector0)", "Null(_NodeSassList,int?[bool?,SassList0?])", "String(Combinator)", "Object(_NodeSassList,int)", "Null(_NodeSassList,int,Object)", "bool(_NodeSassList)", "Null(_NodeSassList,bool)", "int(_NodeSassList)", "SassList0(Object[Object?,_ConstructorOptions?])", "bool(List>)", "String(Tuple2)", "SassMap0(Value0)", "SassMap0(SassMap0)", "Null(_NodeSassMap,int?[SassMap0?])", "SassNumber0(int)", "bool(PseudoSelector)", "int(_NodeSassMap)", "SelectorList?(PseudoSelector)", "SassMap0(Object[ImmutableMap?])", "ImmutableMap(SassMap0)", "@(SassMap0,Object)", "SassNumber0(Value0)", "Value0(Object)", "~(String,WarnOptions)", "~(String,DebugOptions)", "Null(_NodeSassNumber,num?[String?,SassNumber0?])", "double(_NodeSassNumber)", "Null(_NodeSassNumber,num)", "String(_NodeSassNumber)", "Null(_NodeSassNumber,String)", "SassNumber0(Object,num[Object?])", "double(SassNumber0)", "UserDefinedCallable(ContentBlock)", "int?(SassNumber0)", "int(int,SimpleSelector)", "int(SassNumber0[String?])", "double(SassNumber0,num,num[String?])", "SassNumber0(SassNumber0[String?])", "SassNumber0(SassNumber0,String[String?])", "Future<@>()", "Object?(Object?)", "CssValue0(Interpolation0{trim:bool,warnForColor:bool})", "SassList(ComplexSelector)", "Iterable(ComplexSelector)", "SassScriptException0()", "Future(Expression)", "String(Object,@,@[@])", "~([Future<~>?])", "~(String,StackTrace?)", "SimpleSelector(SimpleSelector)", "~(String,Option)", "SassString0(SimpleSelector0)", "CompoundSelector0()", "~(CssMediaQuery0)", "~(MapEntry)", "SingleUnitSassNumber0(double)", "String(Value)", "JSUrl0?(FileSpan)", "0&(List)", "~(@,StackTrace)", "Null(_NodeSassString,String?[SassString0?])", "String(_NodeSassString)", "Null(_NodeSassString,String)", "SassString0(Object[Object?,_ConstructorOptions1?])", "String(SassString0)", "bool(SassString0)", "int(SassString0)", "int(SassString0,Value0[String?])", "Statement0({root:bool})", "@(@,String)", "Stylesheet0()", "Statement0?()", "VariableDeclaration0(VariableDeclaration0)", "ArgumentDeclaration0()", "Tuple2()", "VariableDeclaration0()", "CssValue(Interpolation{trim:bool,warnForColor:bool})", "StyleRule0(List,FileSpan)", "List(Value)", "EachRule0(List,FileSpan)", "FunctionRule0(List,FileSpan)", "ForRule0(List,FileSpan)", "ContentBlock0(List,FileSpan)", "MediaRule0(List,FileSpan)", "MixinRule0(List,FileSpan)", "~(List)", "SupportsRule0(List,FileSpan)", "WhileRule0(List,FileSpan)", "~(Expression0)", "~(BinaryOperator0)", "StringExpression0(Interpolation0)", "Null(~(Object?),~(Object?))", "ImmutableList(Value0)", "String?(Value0)", "int(Value0,Value0[String?])", "SassBoolean0(Value0[String?])", "SassColor0(Value0[String?])", "SassFunction0(Value0[String?])", "SassMap0(Value0[String?])", "SassNumber0(Value0[String?])", "SassString0(Value0[String?])", "SassMap0?(Value0)", "bool(Value0,Object?)", "int(Value0[Object?])", "bool(List)", "EvaluateResult()", "Module(Module)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "CssValue(Expression)", "0^(0^,0^)", "Value?(Value)", "~(Object,StackTrace,EventSink<0^>)", "List<0^>(0^,List<0^>?)", "NodeCompileResult(String[CompileOptions?])", "NodeCompileResult(String[CompileStringOptions?])", "Promise(String[CompileOptions?])", "Promise(String[CompileStringOptions?])", "Importer0(Object?)", "List(Object?)", "~(RenderOptions,~(Object?,RenderResult?))", "RenderResult(RenderOptions)", "Future<~>(List)", "Uri(JSUrl0)", "JSUrl0(Uri)", "String(String[String?,String?,String?,String?,String?,String?])", "Value?(Module)", "int(num)", "ArgParser()"], + interceptorsByTag: null, + leafTags: null, + arrayRti: Symbol("$ti") + }; + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","Stdin":"LegacyJavaScriptObject","Stdout":"LegacyJavaScriptObject","ReadlineModule":"LegacyJavaScriptObject","ReadlineOptions":"LegacyJavaScriptObject","ReadlineInterface":"LegacyJavaScriptObject","BufferModule":"LegacyJavaScriptObject","BufferConstants":"LegacyJavaScriptObject","Buffer":"LegacyJavaScriptObject","ConsoleModule":"LegacyJavaScriptObject","Console":"LegacyJavaScriptObject","EventEmitter":"LegacyJavaScriptObject","FS":"LegacyJavaScriptObject","FSConstants":"LegacyJavaScriptObject","FSWatcher":"LegacyJavaScriptObject","ReadStream":"LegacyJavaScriptObject","ReadStreamOptions":"LegacyJavaScriptObject","WriteStream":"LegacyJavaScriptObject","WriteStreamOptions":"LegacyJavaScriptObject","FileOptions":"LegacyJavaScriptObject","StatOptions":"LegacyJavaScriptObject","MkdirOptions":"LegacyJavaScriptObject","RmdirOptions":"LegacyJavaScriptObject","WatchOptions":"LegacyJavaScriptObject","WatchFileOptions":"LegacyJavaScriptObject","Stats":"LegacyJavaScriptObject","Promise":"LegacyJavaScriptObject","Date":"LegacyJavaScriptObject","JsError":"LegacyJavaScriptObject","Atomics":"LegacyJavaScriptObject","Modules":"LegacyJavaScriptObject","Module1":"LegacyJavaScriptObject","Net":"LegacyJavaScriptObject","Socket":"LegacyJavaScriptObject","NetAddress":"LegacyJavaScriptObject","NetServer":"LegacyJavaScriptObject","NodeJsError":"LegacyJavaScriptObject","JsAssertionError":"LegacyJavaScriptObject","JsRangeError":"LegacyJavaScriptObject","JsReferenceError":"LegacyJavaScriptObject","JsSyntaxError":"LegacyJavaScriptObject","JsTypeError":"LegacyJavaScriptObject","JsSystemError":"LegacyJavaScriptObject","Process":"LegacyJavaScriptObject","CPUUsage":"LegacyJavaScriptObject","Release":"LegacyJavaScriptObject","StreamModule":"LegacyJavaScriptObject","Readable":"LegacyJavaScriptObject","Writable":"LegacyJavaScriptObject","Duplex":"LegacyJavaScriptObject","Transform":"LegacyJavaScriptObject","WritableOptions":"LegacyJavaScriptObject","ReadableOptions":"LegacyJavaScriptObject","Immediate":"LegacyJavaScriptObject","Timeout":"LegacyJavaScriptObject","TTY":"LegacyJavaScriptObject","TTYReadStream":"LegacyJavaScriptObject","TTYWriteStream":"LegacyJavaScriptObject","Util":"LegacyJavaScriptObject","JSArray0":"LegacyJavaScriptObject","Chokidar":"LegacyJavaScriptObject","ChokidarOptions":"LegacyJavaScriptObject","ChokidarWatcher":"LegacyJavaScriptObject","JSFunction":"LegacyJavaScriptObject","NodeImporterResult":"LegacyJavaScriptObject","RenderContext":"LegacyJavaScriptObject","RenderContextOptions":"LegacyJavaScriptObject","RenderContextResult":"LegacyJavaScriptObject","RenderContextResultStats":"LegacyJavaScriptObject","JSClass":"LegacyJavaScriptObject","JSUrl":"LegacyJavaScriptObject","_PropertyDescriptor":"LegacyJavaScriptObject","JSArray1":"LegacyJavaScriptObject","Chokidar0":"LegacyJavaScriptObject","ChokidarOptions0":"LegacyJavaScriptObject","ChokidarWatcher0":"LegacyJavaScriptObject","_NodeSassColor":"LegacyJavaScriptObject","_Channels":"LegacyJavaScriptObject","CompileOptions":"LegacyJavaScriptObject","CompileStringOptions":"LegacyJavaScriptObject","NodeCompileResult":"LegacyJavaScriptObject","_NodeException":"LegacyJavaScriptObject","Exports":"LegacyJavaScriptObject","LoggerNamespace":"LegacyJavaScriptObject","Fiber":"LegacyJavaScriptObject","FiberClass":"LegacyJavaScriptObject","JSFunction0":"LegacyJavaScriptObject","ImmutableList":"LegacyJavaScriptObject","ImmutableMap":"LegacyJavaScriptObject","NodeImporter0":"LegacyJavaScriptObject","CanonicalizeOptions":"LegacyJavaScriptObject","NodeImporterResult0":"LegacyJavaScriptObject","NodeImporterResult1":"LegacyJavaScriptObject","_NodeSassList":"LegacyJavaScriptObject","_ConstructorOptions":"LegacyJavaScriptObject","WarnOptions":"LegacyJavaScriptObject","DebugOptions":"LegacyJavaScriptObject","NodeLogger":"LegacyJavaScriptObject","_NodeSassMap":"LegacyJavaScriptObject","_NodeSassNumber":"LegacyJavaScriptObject","_ConstructorOptions0":"LegacyJavaScriptObject","JSClass0":"LegacyJavaScriptObject","RenderContext0":"LegacyJavaScriptObject","RenderContextOptions0":"LegacyJavaScriptObject","RenderContextResult0":"LegacyJavaScriptObject","RenderContextResultStats0":"LegacyJavaScriptObject","RenderOptions":"LegacyJavaScriptObject","RenderResult":"LegacyJavaScriptObject","RenderResultStats":"LegacyJavaScriptObject","_Exports":"LegacyJavaScriptObject","_NodeSassString":"LegacyJavaScriptObject","_ConstructorOptions1":"LegacyJavaScriptObject","Types":"LegacyJavaScriptObject","JSUrl0":"LegacyJavaScriptObject","_PropertyDescriptor0":"LegacyJavaScriptObject","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"LegacyJavaScriptObject":{"Promise":[],"JsSystemError":[],"_NodeSassColor":[],"_Channels":[],"CompileOptions":[],"CompileStringOptions":[],"NodeCompileResult":[],"_NodeException":[],"Fiber":[],"JSFunction0":[],"ImmutableList":[],"ImmutableMap":[],"NodeImporter0":[],"NodeImporterResult0":[],"NodeImporterResult1":[],"_NodeSassList":[],"_ConstructorOptions":[],"WarnOptions":[],"DebugOptions":[],"_NodeSassMap":[],"_NodeSassNumber":[],"_ConstructorOptions0":[],"JSClass0":[],"RenderContextOptions0":[],"RenderOptions":[],"RenderResult":[],"_NodeSassString":[],"_ConstructorOptions1":[],"JSUrl0":[]},"JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"]},"JSString":{"String":[],"Comparable":["String"]},"_CastIterableBase":{"Iterable":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListMixin":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListMixin":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2","ListMixin.E":"2"},"CastSet":{"Set":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"CastMap":{"MapMixin":["3","4"],"Map":["3","4"],"MapMixin.K":"3","MapMixin.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1","ListIterable.E":"1"},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2","ListIterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipWhileIterable":{"Iterable":["1"],"Iterable.E":"1"},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"FollowedByIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthFollowedByIterable":{"FollowedByIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"UnmodifiableListBase":{"ListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1","ListIterable.E":"1"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_ConstantMapKeyIterable":{"Iterable":["1"],"Iterable.E":"1"},"GeneralConstantMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"Instantiation":{"Function":[]},"Instantiation1":{"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"NativeInt16List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"ListMixin":["int"],"Uint8List":[],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_Future":{"Future":["1"]},"_SyncStarIterable":{"Iterable":["1"],"Iterable.E":"1"},"_AsyncCompleter":{"_Completer":["1"]},"_SyncCompleter":{"_Completer":["1"]},"_StreamController":{"EventSink":["1"]},"_AsyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_SyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_BufferingStreamSubscription.T":"2"},"_ExpandStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"Zone":[]},"_RootZone":{"Zone":[]},"Queue":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_HashMap":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedIdentityHashMap":{"JsLinkedHashMap":["1","2"],"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"_LinkedHashSet":{"_SetBase":["1"],"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedIdentityHashSet":{"_LinkedHashSet":["1"],"_SetBase":["1"],"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableListView":{"ListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListMixin.E":"1"},"IterableBase":{"Iterable":["1"]},"ListBase":{"ListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"UnmodifiableMapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"_MapBaseValueIterable":{"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"Map":["1","2"]},"ListQueue":{"ListIterable":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1","ListIterable.E":"1"},"_SetBase":{"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_UnmodifiableSet":{"_SetBase":["1"],"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"AsciiCodec":{"Codec":["String","List"]},"_UnicodeSubsetEncoder":{"Converter":["String","List"]},"AsciiEncoder":{"Converter":["String","List"]},"Base64Codec":{"Codec":["List","String"]},"Base64Encoder":{"Converter":["List","String"]},"Encoding":{"Codec":["String","List"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"Utf8Codec":{"Codec":["String","List"]},"Utf8Encoder":{"Converter":["String","List"]},"Utf8Decoder":{"Converter":["List","String"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"RangeError":[],"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"_GeneratorIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1","ListIterable.E":"1"},"_StringStackTrace":{"StackTrace":[]},"Runes":{"Iterable":["int"],"Iterable.E":"int"},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"ArgParserException":{"FormatException":[],"Exception":[]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_CompleterStream":{"Stream":["1"],"Stream.T":"1"},"_NextRequest":{"_EventRequest":["1"]},"EmptyUnmodifiableSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"QueueList":{"ListMixin":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListMixin.E":"1","QueueList.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListMixin":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListMixin.E":"2","QueueList.E":"2"},"UnmodifiableSetView":{"DelegatingSet":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapKeySet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_DelegatingIterableBase":{"Iterable":["1"]},"DelegatingSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"PathException":{"Exception":[]},"PathMap":{"Map":["String?","1"]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"ModifiableCssAtRule":{"ModifiableCssParentNode":[],"CssAtRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssComment":{"ModifiableCssNode":[],"CssComment":[],"CssNode":[],"AstNode":[]},"ModifiableCssDeclaration":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssImport":{"ModifiableCssNode":[],"CssImport":[],"CssNode":[],"AstNode":[]},"ModifiableCssKeyframeBlock":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssMediaRule":{"ModifiableCssParentNode":[],"CssMediaRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssNode":{"CssNode":[],"AstNode":[]},"ModifiableCssParentNode":{"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStyleRule":{"ModifiableCssParentNode":[],"CssStyleRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStylesheet":{"ModifiableCssParentNode":[],"CssStylesheet":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssSupportsRule":{"ModifiableCssParentNode":[],"CssSupportsRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssValue":{"CssValue":["1"],"AstNode":[]},"CssNode":{"AstNode":[]},"CssParentNode":{"CssNode":[],"AstNode":[]},"CssStylesheet":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssValue":{"AstNode":[]},"_FakeAstNode":{"AstNode":[]},"Argument":{"AstNode":[]},"ArgumentDeclaration":{"AstNode":[]},"ArgumentInvocation":{"AstNode":[]},"ConfiguredVariable":{"AstNode":[]},"BinaryOperationExpression":{"Expression":[],"AstNode":[]},"BooleanExpression":{"Expression":[],"AstNode":[]},"CalculationExpression":{"Expression":[],"AstNode":[]},"ColorExpression":{"Expression":[],"AstNode":[]},"FunctionExpression":{"Expression":[],"AstNode":[]},"IfExpression":{"Expression":[],"AstNode":[]},"InterpolatedFunctionExpression":{"Expression":[],"AstNode":[]},"ListExpression":{"Expression":[],"AstNode":[]},"MapExpression":{"Expression":[],"AstNode":[]},"NullExpression":{"Expression":[],"AstNode":[]},"NumberExpression":{"Expression":[],"AstNode":[]},"ParenthesizedExpression":{"Expression":[],"AstNode":[]},"SelectorExpression":{"Expression":[],"AstNode":[]},"StringExpression":{"Expression":[],"AstNode":[]},"SupportsExpression":{"Expression":[],"AstNode":[]},"UnaryOperationExpression":{"Expression":[],"AstNode":[]},"ValueExpression":{"Expression":[],"AstNode":[]},"VariableExpression":{"Expression":[],"AstNode":[]},"DynamicImport":{"Import":[],"AstNode":[]},"StaticImport":{"Import":[],"AstNode":[]},"Interpolation":{"AstNode":[]},"AtRootRule":{"Statement":[],"AstNode":[]},"AtRule":{"Statement":[],"AstNode":[]},"CallableDeclaration":{"Statement":[],"AstNode":[]},"ContentBlock":{"Statement":[],"AstNode":[]},"ContentRule":{"Statement":[],"AstNode":[]},"DebugRule":{"Statement":[],"AstNode":[]},"Declaration":{"Statement":[],"AstNode":[]},"EachRule":{"Statement":[],"AstNode":[]},"ErrorRule":{"Statement":[],"AstNode":[]},"ExtendRule":{"Statement":[],"AstNode":[]},"ForRule":{"Statement":[],"AstNode":[]},"ForwardRule":{"Statement":[],"AstNode":[]},"FunctionRule":{"Statement":[],"AstNode":[]},"IfRule":{"Statement":[],"AstNode":[]},"ImportRule":{"Statement":[],"AstNode":[]},"IncludeRule":{"Statement":[],"AstNode":[]},"LoudComment":{"Statement":[],"AstNode":[]},"MediaRule":{"Statement":[],"AstNode":[]},"MixinRule":{"Statement":[],"AstNode":[]},"_HasContentVisitor":{"StatementSearchVisitor":["bool"],"StatementSearchVisitor.T":"bool"},"ParentStatement":{"Statement":[],"AstNode":[]},"ReturnRule":{"Statement":[],"AstNode":[]},"SilentComment":{"Statement":[],"AstNode":[]},"StyleRule":{"Statement":[],"AstNode":[]},"Stylesheet":{"Statement":[],"AstNode":[]},"SupportsRule":{"Statement":[],"AstNode":[]},"UseRule":{"Statement":[],"AstNode":[]},"VariableDeclaration":{"Statement":[],"AstNode":[]},"WarnRule":{"Statement":[],"AstNode":[]},"WhileRule":{"Statement":[],"AstNode":[]},"SupportsAnything":{"AstNode":[]},"SupportsDeclaration":{"AstNode":[]},"SupportsFunction":{"AstNode":[]},"SupportsInterpolation":{"AstNode":[]},"SupportsNegation":{"AstNode":[]},"SupportsOperation":{"AstNode":[]},"AttributeSelector":{"SimpleSelector":[]},"ClassSelector":{"SimpleSelector":[]},"IDSelector":{"SimpleSelector":[]},"ParentSelector":{"SimpleSelector":[]},"PlaceholderSelector":{"SimpleSelector":[]},"PseudoSelector":{"SimpleSelector":[]},"TypeSelector":{"SimpleSelector":[]},"UniversalSelector":{"SimpleSelector":[]},"_EnvironmentModule0":{"Module":["AsyncCallable"]},"AsyncBuiltInCallable":{"AsyncCallable":[]},"BuiltInCallable":{"Callable":[],"AsyncBuiltInCallable":[],"AsyncCallable":[]},"PlainCssCallable":{"Callable":[],"AsyncCallable":[]},"UserDefinedCallable":{"Callable":[],"AsyncCallable":[]},"ExplicitConfiguration":{"Configuration":[]},"_EnvironmentModule":{"Module":["Callable"]},"SassRuntimeException":{"Exception":[]},"SassException":{"Exception":[]},"MultiSpanSassException":{"Exception":[]},"MultiSpanSassRuntimeException":{"SassRuntimeException":[],"Exception":[]},"SassFormatException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"UsageException":{"Exception":[]},"EmptyExtensionStore":{"ExtensionStore":[]},"MergedExtension":{"Extension":[]},"Importer":{"AsyncImporter":[]},"FilesystemImporter":{"Importer":[],"AsyncImporter":[]},"BuiltInModule":{"Module":["1"]},"ForwardedModuleView":{"Module":["1"]},"ShadowedModuleView":{"Module":["1"]},"LimitedMapView":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"MergedMapView":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"MultiSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"PrefixedMapView":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"_PrefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"PublicMemberMapView":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"UnprefixedMapView":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"_UnprefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"SassArgumentList":{"SassList":[],"Value":[]},"SassBoolean":{"Value":[]},"SassCalculation":{"Value":[]},"SassColor":{"Value":[]},"SassFunction":{"Value":[]},"SassList":{"Value":[]},"SassMap":{"Value":[]},"_SassNull":{"Value":[]},"SassNumber":{"Value":[]},"ComplexSassNumber":{"SassNumber":[],"Value":[]},"SingleUnitSassNumber":{"SassNumber":[],"Value":[]},"UnitlessSassNumber":{"SassNumber":[],"Value":[]},"SassString":{"Value":[]},"_EvaluationContext0":{"EvaluationContext":[]},"_EvaluationContext":{"EvaluationContext":[]},"Entry":{"Comparable":["Entry"]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"_FileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"Chain":{"StackTrace":[]},"LazyTrace":{"Trace":[],"StackTrace":[]},"Trace":{"StackTrace":[]},"UnparsedFrame":{"Frame":[]},"StringScannerException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"SupportsAnything0":{"AstNode0":[]},"Argument0":{"AstNode0":[]},"ArgumentDeclaration0":{"AstNode0":[]},"ArgumentInvocation0":{"AstNode0":[]},"SassArgumentList0":{"SassList0":[],"Value0":[]},"NodeToDartAsyncImporter":{"AsyncImporter0":[]},"AsyncBuiltInCallable0":{"AsyncCallable0":[]},"_EnvironmentModule2":{"Module0":["AsyncCallable0"]},"_EvaluationContext2":{"EvaluationContext0":[]},"NodeToDartAsyncFileImporter":{"AsyncImporter0":[]},"AtRootRule0":{"Statement0":[],"AstNode0":[]},"ModifiableCssAtRule0":{"ModifiableCssParentNode0":[],"CssAtRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"AtRule0":{"Statement0":[],"AstNode0":[]},"AttributeSelector0":{"SimpleSelector0":[]},"BinaryOperationExpression0":{"Expression0":[],"AstNode0":[]},"BooleanExpression0":{"Expression0":[],"AstNode0":[]},"SassBoolean0":{"Value0":[]},"BuiltInCallable0":{"Callable0":[],"AsyncBuiltInCallable0":[],"AsyncCallable0":[]},"BuiltInModule0":{"Module0":["1"]},"CalculationExpression0":{"Expression0":[],"AstNode0":[]},"SassCalculation0":{"Value0":[]},"CallableDeclaration0":{"Statement0":[],"AstNode0":[]},"ClassSelector0":{"SimpleSelector0":[]},"ColorExpression0":{"Expression0":[],"AstNode0":[]},"SassColor0":{"Value0":[]},"ModifiableCssComment0":{"ModifiableCssNode0":[],"CssComment0":[],"CssNode0":[],"AstNode0":[]},"ComplexSassNumber0":{"SassNumber0":[],"Value0":[]},"ExplicitConfiguration0":{"Configuration0":[]},"ConfiguredVariable0":{"AstNode0":[]},"ContentBlock0":{"Statement0":[],"AstNode0":[]},"ContentRule0":{"Statement0":[],"AstNode0":[]},"DebugRule0":{"Statement0":[],"AstNode0":[]},"ModifiableCssDeclaration0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"Declaration0":{"Statement0":[],"AstNode0":[]},"SupportsDeclaration0":{"AstNode0":[]},"DynamicImport0":{"Import0":[],"AstNode0":[]},"EachRule0":{"Statement0":[],"AstNode0":[]},"EmptyExtensionStore0":{"ExtensionStore0":[]},"_EnvironmentModule1":{"Module0":["Callable0"]},"ErrorRule0":{"Statement0":[],"AstNode0":[]},"_EvaluationContext1":{"EvaluationContext0":[]},"SassRuntimeException0":{"Exception":[]},"SassException0":{"Exception":[]},"MultiSpanSassException0":{"Exception":[]},"MultiSpanSassRuntimeException0":{"SassRuntimeException0":[],"Exception":[]},"SassFormatException0":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"ExtendRule0":{"Statement0":[],"AstNode0":[]},"NodeToDartFileImporter":{"Importer0":[],"AsyncImporter0":[]},"FilesystemImporter0":{"Importer0":[],"AsyncImporter0":[]},"ForRule0":{"Statement0":[],"AstNode0":[]},"ForwardRule0":{"Statement0":[],"AstNode0":[]},"ForwardedModuleView0":{"Module0":["1"]},"FunctionExpression0":{"Expression0":[],"AstNode0":[]},"SupportsFunction0":{"AstNode0":[]},"SassFunction0":{"Value0":[]},"FunctionRule0":{"Statement0":[],"AstNode0":[]},"IDSelector0":{"SimpleSelector0":[]},"IfExpression0":{"Expression0":[],"AstNode0":[]},"IfRule0":{"Statement0":[],"AstNode0":[]},"ModifiableCssImport0":{"ModifiableCssNode0":[],"CssImport0":[],"CssNode0":[],"AstNode0":[]},"ImportRule0":{"Statement0":[],"AstNode0":[]},"Importer0":{"AsyncImporter0":[]},"IncludeRule0":{"Statement0":[],"AstNode0":[]},"InterpolatedFunctionExpression0":{"Expression0":[],"AstNode0":[]},"Interpolation0":{"AstNode0":[]},"SupportsInterpolation0":{"AstNode0":[]},"ModifiableCssKeyframeBlock0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"LimitedMapView0":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"ListExpression0":{"Expression0":[],"AstNode0":[]},"SassList0":{"Value0":[]},"LoudComment0":{"Statement0":[],"AstNode0":[]},"MapExpression0":{"Expression0":[],"AstNode0":[]},"SassMap0":{"Value0":[]},"ModifiableCssMediaRule0":{"ModifiableCssParentNode0":[],"CssMediaRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"MediaRule0":{"Statement0":[],"AstNode0":[]},"MergedExtension0":{"Extension0":[]},"MergedMapView0":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"MixinRule0":{"Statement0":[],"AstNode0":[]},"_HasContentVisitor0":{"StatementSearchVisitor0":["bool"],"StatementSearchVisitor0.T":"bool"},"MultiSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SupportsNegation0":{"AstNode0":[]},"NoOpImporter":{"Importer0":[],"AsyncImporter0":[]},"_FakeAstNode0":{"AstNode0":[]},"CssNode0":{"AstNode0":[]},"CssParentNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssParentNode0":{"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"NullExpression0":{"Expression0":[],"AstNode0":[]},"_SassNull0":{"Value0":[]},"NumberExpression0":{"Expression0":[],"AstNode0":[]},"SassNumber0":{"Value0":[]},"SupportsOperation0":{"AstNode0":[]},"ParentSelector0":{"SimpleSelector0":[]},"ParentStatement0":{"Statement0":[],"AstNode0":[]},"ParenthesizedExpression0":{"Expression0":[],"AstNode0":[]},"PlaceholderSelector0":{"SimpleSelector0":[]},"PlainCssCallable0":{"Callable0":[],"AsyncCallable0":[]},"PrefixedMapView0":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"_PrefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"PseudoSelector0":{"SimpleSelector0":[]},"PublicMemberMapView0":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"ReturnRule0":{"Statement0":[],"AstNode0":[]},"SelectorExpression0":{"Expression0":[],"AstNode0":[]},"ShadowedModuleView0":{"Module0":["1"]},"SilentComment0":{"Statement0":[],"AstNode0":[]},"SingleUnitSassNumber0":{"SassNumber0":[],"Value0":[]},"StaticImport0":{"Import0":[],"AstNode0":[]},"StringExpression0":{"Expression0":[],"AstNode0":[]},"SassString0":{"Value0":[]},"ModifiableCssStyleRule0":{"ModifiableCssParentNode0":[],"CssStyleRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"StyleRule0":{"Statement0":[],"AstNode0":[]},"CssStylesheet0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"ModifiableCssStylesheet0":{"ModifiableCssParentNode0":[],"CssStylesheet0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"Stylesheet0":{"Statement0":[],"AstNode0":[]},"SupportsExpression0":{"Expression0":[],"AstNode0":[]},"ModifiableCssSupportsRule0":{"ModifiableCssParentNode0":[],"CssSupportsRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"SupportsRule0":{"Statement0":[],"AstNode0":[]},"NodeToDartImporter":{"Importer0":[],"AsyncImporter0":[]},"TypeSelector0":{"SimpleSelector0":[]},"UnaryOperationExpression0":{"Expression0":[],"AstNode0":[]},"UnitlessSassNumber0":{"SassNumber0":[],"Value0":[]},"UniversalSelector0":{"SimpleSelector0":[]},"UnprefixedMapView0":{"MapMixin":["String","1"],"Map":["String","1"],"MapMixin.K":"String","MapMixin.V":"1"},"_UnprefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"UseRule0":{"Statement0":[],"AstNode0":[]},"UserDefinedCallable0":{"Callable0":[],"AsyncCallable0":[]},"CssValue0":{"AstNode0":[]},"ValueExpression0":{"Expression0":[],"AstNode0":[]},"ModifiableCssValue0":{"CssValue0":["1"],"AstNode0":[]},"VariableExpression0":{"Expression0":[],"AstNode0":[]},"VariableDeclaration0":{"Statement0":[],"AstNode0":[]},"WarnRule0":{"Statement0":[],"AstNode0":[]},"WhileRule0":{"Statement0":[],"AstNode0":[]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Expression":{"AstNode":[]},"Import":{"AstNode":[]},"Statement":{"AstNode":[]},"Callable":{"AsyncCallable":[]},"Callable0":{"AsyncCallable0":[]},"Expression0":{"AstNode0":[]},"Import0":{"AstNode0":[]},"Statement0":{"AstNode0":[]}}')); + A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"ArrayIterator":1,"ListIterator":1,"MappedIterator":2,"WhereIterator":1,"ExpandIterator":2,"TakeIterator":1,"SkipIterator":1,"SkipWhileIterator":1,"EmptyIterator":1,"FollowedByIterator":1,"FixedLengthListMixin":1,"UnmodifiableListMixin":1,"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"LinkedHashMapKeyIterator":1,"NativeTypedArray":1,"EventSink":1,"_SyncStarIterator":1,"StreamTransformerBase":2,"_SyncStreamControllerDispatch":1,"_AsyncStreamControllerDispatch":1,"_AddStreamState":1,"_StreamControllerAddStreamState":1,"_DelayedEvent":1,"_DelayedData":1,"_PendingEvents":1,"_StreamIterator":1,"_ZoneFunction":1,"Queue":1,"_HashMapKeyIterator":1,"_LinkedHashSetIterator":1,"IterableBase":1,"ListBase":1,"MapBase":2,"UnmodifiableMapBase":2,"_MapBaseValueIterator":2,"_UnmodifiableMapMixin":2,"MapView":2,"_ListQueueIterator":1,"_UnmodifiableSetMixin":1,"_ListBase_Object_ListMixin":1,"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":2,"__SetBase_Object_SetMixin":1,"__UnmodifiableSet__SetBase__UnmodifiableSetMixin":1,"ChunkedConversionSink":1,"_StringSinkConversionSink":1,"Iterator":1,"Expando":1,"_EventRequest":1,"_EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin":1,"DefaultEquality":1,"IterableEquality":1,"ListEquality":1,"MapEquality":2,"_QueueList_Object_ListMixin":1,"UnmodifiableSetMixin":1,"_UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin":1,"_DelegatingIterableBase":1,"_MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin":1,"ParentStatement":1,"ParentStatement0":1}')); + var string$ = { + x0a_BUG_: "\n\nBUG: This should include a source span!", + x0a_More: "\n\nMore info and automated migrator: https://sass-lang.com/d/slash-div", + x0a_To_p: "\n\nTo preserve current behavior: math.random(math.div($limit, 1", + x0a_but_: "\n\nbut you may have intended it to mean:\n\n ", + x0aRun_i: "\nRun in verbose mode to see all warnings.", + x0aThis_: "\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x0aYou_m: "\nYou may not @extend the same selector from within different media queries.", + x20It_wi: " It will be omitted from the generated CSS.", + x20be_an: " be an extender.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20in_in: " in interpolation here.\nIt may end up represented as ", + x20is_as: " is asynchronous.\nThis is probably caused by a bug in a Sass plugin.", + x20is_av: " is available from multiple global modules.", + x20is_noa: " is not a valid selector: it must be a string,\na list of strings, or a list of lists of strings.", + x20is_nov: " is not valid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20must_: " must not be greater than the number of characters in the file, ", + x20repet: " repetitive deprecation warnings omitted.", + x20to_cl: " to clarify that it's meant to be a binary operation, or wrap\nit in parentheses to make it a unary operation. This will be an error in future\nversions of Sass.\n\nMore info and automated migrator: https://sass-lang.com/d/strict-unary", + x20to_co: " to color.opacity() is deprecated.\n\nRecommendation: ", + x20was_a: ' was already loaded, so it can\'t be configured using "with".', + x20was_n: " was not declared with !default in the @used module.", + x20was_p: " was passed both by position and by name.", + x21globa: "!global isn't allowed for variables in other modules.", + x22x20is_d: '" is deprecated because it conflicts with official CSS syntax.\n\nTo preserve existing behavior: #{', + x22x20is_ix0a: '" is invalid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_ix20: '" is invalid CSS. It will be omitted from the generated CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_n: '" is not a valid Sass identifier.\n\nRecommendation: add an "as" clause to define an explicit namespace.', + x22x20is_o: "\" is only valid for nesting and shouldn't\nhave children other than style rules.", + x22x26__ma: '"&" may only used at the beginning of a compound selector.', + x22x29__If: "\").\nIf you really want to use the color value here, use '", + x22x2b__an: '"+" and "-" must be surrounded by whitespace in calculations.', + x22packa: '"package:" URLs aren\'t supported on this platform.', + x22x7d__Fo: '"}\n\nFor details, see https://sass-lang.com/d/media-logic', + x24css_a: "$css and $module may not both be passed at once.", + x24list1: "$list1, $list2, $separator: auto, $bracketed: auto", + x24selec: "$selectors: At least one selector must be passed.", + x24separ: '$separator: Must be "space", "comma", "slash", or "auto".', + x28__isn: "() isn't in the sass:color module.\n\nRecommendation: color.adjust(", + x29x0a_Morx20: ")\n\nMore info and automated migrator: https://sass-lang.com/d/slash-div", + x29x0a_Morx3a: ")\n\nMore info: https://sass-lang.com/documentation/functions/color#", + x29x20in_a: ") in a future release.\n\nRecommendation: math.random(math.div($limit, 1", + x29x20is_d: ") is deprecated.\n\nTo preserve current behavior: $", + x29x20to_cg: ") to color.grayscale() is deprecated.\n\nRecommendation: ", + x29x20to_ci: ") to color.invert() is deprecated.\n\nRecommendation: ", + x29x29__Mo: "))\n\nMore info: https://sass-lang.com/d/random-with-units", + x2c_whici: ", which is currently (incorrectly) converted to ", + x2c_whicw: ', which will likely produce invalid CSS.\nAlways quote color names when using them as strings or map keys (for example, "', + x2e_Rela: ".\nRelative canonical URLs are deprecated and will eventually be disallowed.\n", + x3d_____: "===== asynchronous gap ===========================\n", + x40_moz_: "@-moz-document is deprecated and support will be removed in Dart Sass 2.0.0.\n\nFor details, see https://sass-lang.com/d/moz-document.", + x40conte: "@content is only allowed within mixin declarations.", + x40elsei: "@elseif is deprecated and will not be supported in future Sass versions.\n\nRecommendation: @else if", + x40exten: "@extend may only be used within style rules.", + x40forwa: "@forward rules must be written before any other rules.", + x40funct: "@function if($condition, $if-true, $if-false) {", + x40use_r: "@use rules must be written before any other rules.", + A_list: "A list with more than one element must have an explicit separator.", + ABCDEF: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + An_impa: "An importer may not have a findFileUrl method as well as canonicalize and load methods.", + An_impu: "An importer must have either canonicalize and load methods, or a findFileUrl method.", + As_of_R: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nRecommendation: add `", + As_of_S: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nSince this assignment is at the root of the stylesheet, the !global flag is\nunnecessary and can safely be removed.", + At_rul: "At-rules may not be used within nested declarations.", + Cannotff: "Cannot extract a file path from a URI with a fragment component", + Cannotfq: "Cannot extract a file path from a URI with a query component", + Cannotn: "Cannot extract a non-Windows file path from a file URI with an authority", + Comple: "ComplexSassNumber.hasPossiblyCompatibleUnits is not implemented.", + Could_: 'Could not find an option with short name "-', + CssNod: "CssNodes must have a CssStylesheet transitive parent node.", + Declarm: "Declarations may only be used within style rules.", + Declarwa: 'Declarations whose names begin with "--" may not be nested.', + Declarwu: 'Declarations whose names begin with "--" must have StringExpression values (was `', + Either: "Either options.data or options.file must be set.", + Entrie: "Entries may not be removed from MergedMapView.", + Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", + Evalua: "Evaluation handles @include and its content block together.", + Expand: "Expandos are not allowed on strings, numbers, booleans or null", + Expectn: "Expected number, variable, function, or calculation.", + Expectv: "Expected variable, mixin, or function name", + Functi: "Functions may not be declared in control directives.", + HSL_pa: "HSL parameters may not be passed along with HWB parameters.", + If_con: "If conditions is longer than one element, conjunction may not be null.", + If_par: "If parsedAsCustomProperty is true, value must contain a SassString (was `", + In_Sas: 'In Sass, "&&" means two copies of the parent selector. You probably want to use "and" instead.', + Indent: "Indenting at the beginning of the document is illegal.", + Interpn: "Interpolation isn't allowed in namespaces.", + Interpp: "Interpolation isn't allowed in plain CSS.", + Invali: 'Invalid return value for custom function "', + It_s_n: "It's not clear which file to import. Found:\n", + May_on: "May only contains Strings or Expressions.", + Media_: "Media rules may not be used within nested declarations.", + Mixinsb: "Mixins may not be declared in control directives.", + Mixinscf: "Mixins may not contain function declarations.", + Mixinscm: "Mixins may not contain mixin declarations.", + Modulel: "Module loop: this module is already being loaded.", + Modulen: "Module namespaces aren't allowed in plain CSS.", + Nested: "Nested declarations aren't allowed in plain CSS.", + New_en: "New entries may not be added to MergedMapView.", + No_Sasc: "No Sass callable is currently being evaluated.", + No_Sass: "No Sass stylesheet is currently being evaluated.", + NoSour: "NoSourceMapBuffer.buildSourceMap() is not supported.", + Only_2: "Only 2 slash-separated elements allowed, but ", + Only_oa: "Only one argument may be passed to the plain-CSS invert() function.", + Only_op: "Only one positional argument is allowed. All other arguments must be passed by name.", + Other_: "Other modules' members can't be defined with !global.", + Passin: "Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\nRecommendation: call(get-function(", + Placeh: "Placeholder selectors aren't allowed here.", + Plain_: "Plain CSS functions don't support keyword arguments.", + Positi: "Positional arguments must come before keyword arguments.", + Privat: "Private members can't be accessed from outside their modules.", + RGB_pa: "RGB parameters may not be passed along with ", + Sass_v: "Sass variables aren't allowed in plain CSS.", + Silent: "Silent comments aren't allowed in plain CSS.", + Soon__: "Soon, it will instead be correctly converted to ", + Style_: "Style rules may not be used within nested declarations.", + Suppor: "Supports rules may not be used within nested declarations.", + The_Ex: "The ExtensionStore and CssStylesheet passed to cloneCssStylesheet() must come from the same compilation.", + The_ca: "The canonicalize() method must return a URL.", + The_fie: "The findFileUrl() method must return a URL.", + The_fiu: 'The findFileUrl() must return a URL with scheme file://, was "', + The_gi: "The given LineScannerState was not returned by this LineScanner.", + The_lo: "The load() function must return an object with contents and syntax fields.", + The_pa: "The parent selector isn't allowed in plain CSS.", + The_sa: "The same variable may only be configured once.", + The_ta: 'The target selector was not found.\nUse "@extend ', + There_: "There's already a module with namespace \"", + This_d: 'This declaration has no argument named "$', + This_f: "This function isn't allowed in plain CSS.", + This_ma: 'This module and the new module both define a variable named "$', + This_mw: 'This module was already loaded, so it can\'t be configured using "with".', + This_s: "This selector doesn't have any properties and won't be rendered.", + This_v: "This variable was not declared with !default in the @used module.", + Top_le: 'Top-level selectors may not contain the parent selector "&".', + Using__i: "Using / for division is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using__o: "Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using_c: "Using color.alpha() for a Microsoft filter is deprecated.\n\nRecommendation: ", + Variab_: "Variable keyword argument map must have string keys.\n", + Variabs: "Variable keyword arguments must be a map (was ", + You_ma: "You may not @extend selectors across media queries.", + You_pr: "You probably don't mean to use the color value ", + x60_inst: "` instead.\nSee https://sass-lang.com/d/extend-compound for details.\n", + addExt_: "addExtension() can't be called for a const ExtensionStore.", + addExts: "addExtensions() can't be called for a const ExtensionStore.", + addSel: "addSelector() can't be called for a const ExtensionStore.", + compou: "compound selectors may no longer be extended.\nConsider `@extend ", + conten: "content-exists() may only be called within a mixin.", + leadin: "leadingCombinators and components may not both be empty.", + math_d: "math.div() will only support number arguments in a future release.\nUse list.slash() instead for a slash separator.", + math_r: "math.random() will no longer ignore $limit units (", + must_b: "must be a UniversalSelector or a TypeSelector", + parsed: 'parsedAsCustomProperty must be false if name doesn\'t begin with "--".', + semico: "semicolons aren't allowed in the indented syntax.", + throug: "through() must return false for at least one parent of " + }; + var type$ = (function rtii() { + var findType = A.findType; + return { + $env_1_1_String: findType("@"), + ArgParser: findType("ArgParser"), + Argument: findType("Argument"), + ArgumentDeclaration: findType("ArgumentDeclaration"), + ArgumentDeclaration_2: findType("ArgumentDeclaration0"), + Argument_2: findType("Argument0"), + AstNode: findType("AstNode"), + AstNode_2: findType("AstNode0"), + AsyncBuiltInCallable: findType("AsyncBuiltInCallable"), + AsyncBuiltInCallable_2: findType("AsyncBuiltInCallable0"), + AsyncCallable: findType("AsyncCallable"), + AsyncCallable_2: findType("AsyncCallable0"), + AsyncImporter: findType("AsyncImporter0"), + BuiltInCallable: findType("BuiltInCallable"), + BuiltInCallable_2: findType("BuiltInCallable0"), + BuiltInModule_AsyncBuiltInCallable: findType("BuiltInModule"), + BuiltInModule_AsyncBuiltInCallable_2: findType("BuiltInModule0"), + BuiltInModule_BuiltInCallable: findType("BuiltInModule"), + BuiltInModule_BuiltInCallable_2: findType("BuiltInModule0"), + Callable: findType("Callable"), + Callable_2: findType("Callable0"), + ChangeType: findType("ChangeType"), + Combinator: findType("Combinator"), + Combinator_2: findType("Combinator0"), + Comparable_dynamic: findType("Comparable<@>"), + Comparable_nullable_Object: findType("Comparable"), + CompileResult: findType("CompileResult"), + CompileResult_2: findType("CompileResult0"), + ComplexSelector: findType("ComplexSelector"), + ComplexSelectorComponent: findType("ComplexSelectorComponent"), + ComplexSelectorComponent_2: findType("ComplexSelectorComponent0"), + ComplexSelector_2: findType("ComplexSelector0"), + Configuration: findType("Configuration"), + Configuration_2: findType("Configuration0"), + ConfiguredValue: findType("ConfiguredValue"), + ConfiguredValue_2: findType("ConfiguredValue0"), + ConfiguredVariable: findType("ConfiguredVariable"), + ConfiguredVariable_2: findType("ConfiguredVariable0"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), + ConstantStringMap_String_Null: findType("ConstantStringMap"), + ConstantStringMap_String_double: findType("ConstantStringMap"), + CssAtRule: findType("CssAtRule"), + CssAtRule_2: findType("CssAtRule0"), + CssComment: findType("CssComment"), + CssComment_2: findType("CssComment0"), + CssImport: findType("CssImport"), + CssImport_2: findType("CssImport0"), + CssMediaQuery: findType("CssMediaQuery"), + CssMediaQuery_2: findType("CssMediaQuery0"), + CssMediaRule: findType("CssMediaRule"), + CssMediaRule_2: findType("CssMediaRule0"), + CssParentNode: findType("CssParentNode"), + CssParentNode_2: findType("CssParentNode0"), + CssStyleRule: findType("CssStyleRule"), + CssStyleRule_2: findType("CssStyleRule0"), + CssStylesheet: findType("CssStylesheet"), + CssStylesheet_2: findType("CssStylesheet0"), + CssSupportsRule: findType("CssSupportsRule"), + CssSupportsRule_2: findType("CssSupportsRule0"), + CssValue_List_String: findType("CssValue>"), + CssValue_List_String_2: findType("CssValue0>"), + CssValue_SelectorList: findType("CssValue"), + CssValue_SelectorList_2: findType("CssValue0"), + CssValue_String: findType("CssValue"), + CssValue_String_2: findType("CssValue0"), + CssValue_Value: findType("CssValue"), + CssValue_Value_2: findType("CssValue0"), + DateTime: findType("DateTime"), + EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"), + Error: findType("Error"), + EvaluateResult: findType("EvaluateResult"), + EvaluateResult_2: findType("EvaluateResult0"), + EvaluationContext: findType("EvaluationContext"), + EvaluationContext_2: findType("EvaluationContext0"), + Exception: findType("Exception"), + Expression: findType("Expression"), + Expression_2: findType("Expression0"), + Extender: findType("Extender"), + Extender_2: findType("Extender0"), + Extension: findType("Extension"), + Extension_2: findType("Extension0"), + FileSpan: findType("FileSpan"), + FormatException: findType("FormatException"), + Frame: findType("Frame"), + Function: findType("Function"), + FutureOr_EvaluateResult: findType("EvaluateResult/"), + FutureOr_EvaluateResult_2: findType("EvaluateResult0/"), + FutureOr_nullable_Uri: findType("Uri?/"), + Future_dynamic: findType("Future<@>"), + Future_void: findType("Future<~>"), + IfClause: findType("IfClause"), + IfClause_2: findType("IfClause0"), + ImmutableList: findType("ImmutableList"), + ImmutableMap: findType("ImmutableMap"), + Import: findType("Import"), + Import_2: findType("Import0"), + Importer: findType("Importer0"), + ImporterResult: findType("ImporterResult"), + ImporterResult_2: findType("ImporterResult0"), + InternalStyle: findType("InternalStyle"), + Interpolation: findType("Interpolation"), + InterpolationBuffer: findType("InterpolationBuffer"), + InterpolationBuffer_2: findType("InterpolationBuffer0"), + Interpolation_2: findType("Interpolation0"), + Iterable_ComplexSelectorComponent: findType("Iterable"), + Iterable_ComplexSelectorComponent_2: findType("Iterable"), + Iterable_dynamic: findType("Iterable<@>"), + JSArray_Argument: findType("JSArray"), + JSArray_Argument_2: findType("JSArray"), + JSArray_AstNode: findType("JSArray"), + JSArray_AstNode_2: findType("JSArray"), + JSArray_AsyncBuiltInCallable: findType("JSArray"), + JSArray_AsyncBuiltInCallable_2: findType("JSArray"), + JSArray_AsyncCallable: findType("JSArray"), + JSArray_AsyncCallable_2: findType("JSArray"), + JSArray_AsyncImporter: findType("JSArray"), + JSArray_AsyncImporter_2: findType("JSArray"), + JSArray_BinaryOperator: findType("JSArray"), + JSArray_BinaryOperator_2: findType("JSArray"), + JSArray_BuiltInCallable: findType("JSArray"), + JSArray_BuiltInCallable_2: findType("JSArray"), + JSArray_Callable: findType("JSArray"), + JSArray_Callable_2: findType("JSArray"), + JSArray_Combinator: findType("JSArray"), + JSArray_Combinator_2: findType("JSArray"), + JSArray_ComplexSelector: findType("JSArray"), + JSArray_ComplexSelectorComponent: findType("JSArray"), + JSArray_ComplexSelectorComponent_2: findType("JSArray"), + JSArray_ComplexSelector_2: findType("JSArray"), + JSArray_ConfiguredVariable: findType("JSArray"), + JSArray_ConfiguredVariable_2: findType("JSArray"), + JSArray_CssMediaQuery: findType("JSArray"), + JSArray_CssMediaQuery_2: findType("JSArray"), + JSArray_CssNode: findType("JSArray"), + JSArray_CssNode_2: findType("JSArray"), + JSArray_Entry: findType("JSArray"), + JSArray_Expression: findType("JSArray"), + JSArray_Expression_2: findType("JSArray"), + JSArray_Extender: findType("JSArray"), + JSArray_Extender_2: findType("JSArray"), + JSArray_Extension: findType("JSArray"), + JSArray_ExtensionStore: findType("JSArray"), + JSArray_ExtensionStore_2: findType("JSArray"), + JSArray_Extension_2: findType("JSArray"), + JSArray_ForwardRule: findType("JSArray"), + JSArray_ForwardRule_2: findType("JSArray"), + JSArray_Frame: findType("JSArray"), + JSArray_IfClause: findType("JSArray"), + JSArray_IfClause_2: findType("JSArray"), + JSArray_Import: findType("JSArray"), + JSArray_Import_2: findType("JSArray"), + JSArray_Importer: findType("JSArray"), + JSArray_Importer_2: findType("JSArray"), + JSArray_Iterable_ComplexSelectorComponent: findType("JSArray>"), + JSArray_Iterable_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_JSFunction: findType("JSArray"), + JSArray_List_ComplexSelector: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_List_ComplexSelector_2: findType("JSArray>"), + JSArray_List_Extender: findType("JSArray>"), + JSArray_List_Extender_2: findType("JSArray>"), + JSArray_List_Iterable_ComplexSelectorComponent: findType("JSArray>>"), + JSArray_List_Iterable_ComplexSelectorComponent_2: findType("JSArray>>"), + JSArray_Map_String_AstNode: findType("JSArray>"), + JSArray_Map_String_AstNode_2: findType("JSArray>"), + JSArray_Map_String_AsyncCallable: findType("JSArray>"), + JSArray_Map_String_AsyncCallable_2: findType("JSArray>"), + JSArray_Map_String_Callable: findType("JSArray>"), + JSArray_Map_String_Callable_2: findType("JSArray>"), + JSArray_Map_String_Value: findType("JSArray>"), + JSArray_Map_String_Value_2: findType("JSArray>"), + JSArray_ModifiableCssImport: findType("JSArray"), + JSArray_ModifiableCssImport_2: findType("JSArray"), + JSArray_ModifiableCssNode: findType("JSArray"), + JSArray_ModifiableCssNode_2: findType("JSArray"), + JSArray_ModifiableCssParentNode: findType("JSArray"), + JSArray_ModifiableCssParentNode_2: findType("JSArray"), + JSArray_Module_AsyncCallable: findType("JSArray>"), + JSArray_Module_AsyncCallable_2: findType("JSArray>"), + JSArray_Module_Callable: findType("JSArray>"), + JSArray_Module_Callable_2: findType("JSArray>"), + JSArray_Object: findType("JSArray"), + JSArray_PseudoSelector: findType("JSArray"), + JSArray_PseudoSelector_2: findType("JSArray"), + JSArray_SassList: findType("JSArray"), + JSArray_SassList_2: findType("JSArray"), + JSArray_SimpleSelector: findType("JSArray"), + JSArray_SimpleSelector_2: findType("JSArray"), + JSArray_Statement: findType("JSArray"), + JSArray_Statement_2: findType("JSArray"), + JSArray_String: findType("JSArray"), + JSArray_StylesheetNode: findType("JSArray"), + JSArray_TargetEntry: findType("JSArray"), + JSArray_TargetLineEntry: findType("JSArray"), + JSArray_Trace: findType("JSArray"), + JSArray_Tuple2_Expression_Expression: findType("JSArray>"), + JSArray_Tuple2_Expression_Expression_2: findType("JSArray>"), + JSArray_Tuple2_String_AstNode: findType("JSArray>"), + JSArray_Tuple2_String_AstNode_2: findType("JSArray>"), + JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value: findType("JSArray)>>"), + JSArray_Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2: findType("JSArray)>>"), + JSArray_Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri: findType("JSArray>"), + JSArray_Uri: findType("JSArray"), + JSArray_UseRule: findType("JSArray"), + JSArray_UseRule_2: findType("JSArray"), + JSArray_Value: findType("JSArray"), + JSArray_Value_2: findType("JSArray"), + JSArray_WatchEvent: findType("JSArray"), + JSArray__Highlight: findType("JSArray<_Highlight>"), + JSArray__Line: findType("JSArray<_Line>"), + JSArray_dynamic: findType("JSArray<@>"), + JSArray_int: findType("JSArray"), + JSArray_nullable_String: findType("JSArray"), + JSClass: findType("JSClass0"), + JSFunction: findType("JSFunction0"), + JSNull: findType("JSNull"), + JSUrl: findType("JSUrl0"), + JavaScriptFunction: findType("JavaScriptFunction"), + JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), + JsSystemError: findType("JsSystemError"), + LimitedMapView_String_ConfiguredValue: findType("LimitedMapView"), + LimitedMapView_String_ConfiguredValue_2: findType("LimitedMapView0"), + List_ComplexSelectorComponent: findType("List"), + List_ComplexSelectorComponent_2: findType("List"), + List_CssMediaQuery: findType("List"), + List_CssMediaQuery_2: findType("List"), + List_Extension: findType("List"), + List_ExtensionStore: findType("List"), + List_ExtensionStore_2: findType("List"), + List_Extension_2: findType("List"), + List_List_ComplexSelectorComponent: findType("List>"), + List_List_ComplexSelectorComponent_2: findType("List>"), + List_Module_AsyncCallable: findType("List>"), + List_Module_AsyncCallable_2: findType("List>"), + List_Module_Callable: findType("List>"), + List_Module_Callable_2: findType("List>"), + List_String: findType("List"), + List_Value: findType("List"), + List_Value_2: findType("List"), + List_WatchEvent: findType("List"), + List_dynamic: findType("List<@>"), + List_int: findType("List"), + List_nullable_Object: findType("List"), + MapKeySet_Module_AsyncCallable: findType("MapKeySet>"), + MapKeySet_Module_AsyncCallable_2: findType("MapKeySet>"), + MapKeySet_Module_Callable: findType("MapKeySet>"), + MapKeySet_Module_Callable_2: findType("MapKeySet>"), + MapKeySet_SimpleSelector: findType("MapKeySet"), + MapKeySet_SimpleSelector_2: findType("MapKeySet"), + MapKeySet_String: findType("MapKeySet"), + MapKeySet_nullable_Object: findType("MapKeySet"), + Map_ComplexSelector_Extension: findType("Map"), + Map_ComplexSelector_Extension_2: findType("Map"), + Map_String_AstNode: findType("Map"), + Map_String_AstNode_2: findType("Map"), + Map_String_AsyncCallable: findType("Map"), + Map_String_AsyncCallable_2: findType("Map"), + Map_String_Callable: findType("Map"), + Map_String_Callable_2: findType("Map"), + Map_String_Value: findType("Map"), + Map_String_Value_2: findType("Map"), + Map_String_dynamic: findType("Map"), + Map_dynamic_dynamic: findType("Map<@,@>"), + MappedIterable_String_Frame: findType("MappedIterable"), + MappedListIterable_Frame_Frame: findType("MappedListIterable"), + MappedListIterable_String_String: findType("MappedListIterable"), + MappedListIterable_String_Trace: findType("MappedListIterable"), + MappedListIterable_String_dynamic: findType("MappedListIterable"), + MediaQuerySuccessfulMergeResult: findType("MediaQuerySuccessfulMergeResult"), + MediaQuerySuccessfulMergeResult_2: findType("MediaQuerySuccessfulMergeResult0"), + MixinRule: findType("MixinRule"), + MixinRule_2: findType("MixinRule0"), + ModifiableCssAtRule: findType("ModifiableCssAtRule"), + ModifiableCssAtRule_2: findType("ModifiableCssAtRule0"), + ModifiableCssKeyframeBlock: findType("ModifiableCssKeyframeBlock"), + ModifiableCssKeyframeBlock_2: findType("ModifiableCssKeyframeBlock0"), + ModifiableCssMediaRule: findType("ModifiableCssMediaRule"), + ModifiableCssMediaRule_2: findType("ModifiableCssMediaRule0"), + ModifiableCssNode: findType("ModifiableCssNode"), + ModifiableCssNode_2: findType("ModifiableCssNode0"), + ModifiableCssParentNode: findType("ModifiableCssParentNode"), + ModifiableCssParentNode_2: findType("ModifiableCssParentNode0"), + ModifiableCssStyleRule: findType("ModifiableCssStyleRule"), + ModifiableCssStyleRule_2: findType("ModifiableCssStyleRule0"), + ModifiableCssSupportsRule: findType("ModifiableCssSupportsRule"), + ModifiableCssSupportsRule_2: findType("ModifiableCssSupportsRule0"), + ModifiableCssValue_SelectorList: findType("ModifiableCssValue"), + ModifiableCssValue_SelectorList_2: findType("ModifiableCssValue0"), + Module_AsyncCallable: findType("Module"), + Module_AsyncCallable_2: findType("Module0"), + Module_Callable: findType("Module"), + Module_Callable_2: findType("Module0"), + NativeTypedArrayOfDouble: findType("NativeTypedArrayOfDouble"), + NativeTypedArrayOfInt: findType("NativeTypedArrayOfInt"), + NativeUint8List: findType("NativeUint8List"), + Never: findType("0&"), + NodeCompileResult: findType("NodeCompileResult"), + NodeImporter: findType("NodeImporter0"), + NodeImporterResult: findType("NodeImporterResult0"), + NodeImporterResult_2: findType("NodeImporterResult1"), + Null: findType("Null"), + Object: findType("Object"), + Option: findType("Option"), + PathMap_Stream_WatchEvent: findType("PathMap>"), + PathMap_String: findType("PathMap"), + PathMap_nullable_String: findType("PathMap"), + Promise: findType("Promise"), + PseudoSelector: findType("PseudoSelector"), + PseudoSelector_2: findType("PseudoSelector0"), + RangeError: findType("RangeError"), + RegExpMatch: findType("RegExpMatch"), + RenderContextOptions: findType("RenderContextOptions0"), + RenderResult: findType("RenderResult"), + Result_String: findType("Result"), + SassArgumentList: findType("SassArgumentList"), + SassArgumentList_2: findType("SassArgumentList0"), + SassBoolean: findType("SassBoolean"), + SassBoolean_2: findType("SassBoolean0"), + SassColor: findType("SassColor"), + SassColor_2: findType("SassColor0"), + SassList: findType("SassList"), + SassList_2: findType("SassList0"), + SassMap: findType("SassMap"), + SassMap_2: findType("SassMap0"), + SassNumber: findType("SassNumber"), + SassNumber_2: findType("SassNumber0"), + SassRuntimeException: findType("SassRuntimeException"), + SassRuntimeException_2: findType("SassRuntimeException0"), + SassString: findType("SassString"), + SassString_2: findType("SassString0"), + SelectorList: findType("SelectorList"), + SelectorList_2: findType("SelectorList0"), + Set_ModifiableCssValue_SelectorList: findType("Set>"), + Set_ModifiableCssValue_SelectorList_2: findType("Set>"), + SimpleSelector: findType("SimpleSelector"), + SimpleSelector_2: findType("SimpleSelector0"), + SourceFile: findType("SourceFile"), + SourceLocation: findType("SourceLocation"), + SourceSpan: findType("SourceSpan"), + SourceSpanFormatException: findType("SourceSpanFormatException"), + SourceSpanWithContext: findType("SourceSpanWithContext"), + SpanColorFormat: findType("SpanColorFormat"), + SpanColorFormat_2: findType("SpanColorFormat0"), + StackTrace: findType("StackTrace"), + Statement: findType("Statement"), + Statement_2: findType("Statement0"), + StaticImport: findType("StaticImport"), + StaticImport_2: findType("StaticImport0"), + StreamCompleter_WatchEvent: findType("StreamCompleter"), + StreamGroup_WatchEvent: findType("StreamGroup"), + StreamQueue_String: findType("StreamQueue"), + Stream_WatchEvent: findType("Stream"), + String: findType("String"), + StylesheetNode: findType("StylesheetNode"), + Symbol: findType("Symbol0"), + Timer: findType("Timer"), + Trace: findType("Trace"), + Tuple2_Expression_Expression: findType("Tuple2"), + Tuple2_Expression_Expression_2: findType("Tuple2"), + Tuple2_ModifiableCssStylesheet_ExtensionStore: findType("Tuple2"), + Tuple2_ModifiableCssStylesheet_ExtensionStore_2: findType("Tuple2"), + Tuple2_PseudoSelector_int: findType("Tuple2"), + Tuple2_PseudoSelector_int_2: findType("Tuple2"), + Tuple2_SassNumber_SassNumber: findType("Tuple2"), + Tuple2_SassNumber_SassNumber_2: findType("Tuple2"), + Tuple2_String_ArgumentDeclaration: findType("Tuple2"), + Tuple2_String_AstNode: findType("Tuple2"), + Tuple2_String_AstNode_2: findType("Tuple2"), + Tuple2_String_SourceSpan: findType("Tuple2"), + Tuple2_String_String: findType("Tuple2"), + Tuple2_Uri_bool: findType("Tuple2"), + Tuple2_of_ArgumentDeclaration_and_FutureOr_Value_Function_List_Value: findType("Tuple2)>"), + Tuple2_of_ArgumentDeclaration_and_FutureOr_Value_Function_List_Value_2: findType("Tuple2)>"), + Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value: findType("Tuple2)>"), + Tuple2_of_ArgumentDeclaration_and_Value_Function_List_Value_2: findType("Tuple2)>"), + Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList: findType("Tuple2,ModifiableCssValue>>"), + Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList_2: findType("Tuple2,ModifiableCssValue0>>"), + Tuple2_of_List_Expression_and_Map_String_Expression: findType("Tuple2,Map>"), + Tuple2_of_List_Expression_and_Map_String_Expression_2: findType("Tuple2,Map>"), + Tuple2_of_List_Uri_and_List_Uri: findType("Tuple2,List>"), + Tuple2_of_Map_of_Uri_and_nullable_StylesheetNode_and_Map_of_Uri_and_nullable_StylesheetNode: findType("Tuple2,Map>"), + Tuple2_of_Set_String_and_Set_String: findType("Tuple2,Set>"), + Tuple3_AsyncImporter_Uri_Uri: findType("Tuple3"), + Tuple3_AsyncImporter_Uri_Uri_2: findType("Tuple3"), + Tuple3_Importer_Uri_Uri: findType("Tuple3"), + Tuple3_Importer_Uri_Uri_2: findType("Tuple3"), + Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri: findType("Tuple4"), + Tuple4_of_Uri_and_bool_and_AsyncImporter_and_nullable_Uri_2: findType("Tuple4"), + Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri: findType("Tuple4"), + Tuple4_of_Uri_and_bool_and_Importer_and_nullable_Uri_2: findType("Tuple4"), + Type: findType("Type"), + TypeError: findType("TypeError"), + Uint8List: findType("Uint8List"), + UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), + UnmodifiableListView_CssNode: findType("UnmodifiableListView"), + UnmodifiableListView_CssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule_2: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_String: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule_2: findType("UnmodifiableListView"), + UnmodifiableMapView_String_ArgParser: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Option: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_String: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_nullable_String: findType("UnmodifiableMapView"), + UnmodifiableSetView_String: findType("UnmodifiableSetView"), + UnmodifiableSetView_StylesheetNode: findType("UnmodifiableSetView"), + UnprefixedMapView_ConfiguredValue: findType("UnprefixedMapView"), + UnprefixedMapView_ConfiguredValue_2: findType("UnprefixedMapView0"), + Uri: findType("Uri"), + UseRule: findType("UseRule"), + UserDefinedCallable_AsyncEnvironment: findType("UserDefinedCallable"), + UserDefinedCallable_AsyncEnvironment_2: findType("UserDefinedCallable0"), + UserDefinedCallable_Environment: findType("UserDefinedCallable"), + UserDefinedCallable_Environment_2: findType("UserDefinedCallable0"), + Value: findType("Value"), + Value_2: findType("Value0"), + Value_Function_List_Value: findType("Value(List)"), + Value_Function_List_Value_2: findType("Value0(List)"), + VariableDeclaration: findType("VariableDeclaration"), + VariableDeclaration_2: findType("VariableDeclaration0"), + WatchEvent: findType("WatchEvent"), + WhereIterable_List_Iterable_ComplexSelectorComponent: findType("WhereIterable>>"), + WhereIterable_List_Iterable_ComplexSelectorComponent_2: findType("WhereIterable>>"), + WhereIterable_String: findType("WhereIterable"), + WhereTypeIterable_PseudoSelector: findType("WhereTypeIterable"), + WhereTypeIterable_PseudoSelector_2: findType("WhereTypeIterable"), + WhereTypeIterable_String: findType("WhereTypeIterable"), + _ArgumentResults: findType("_ArgumentResults0"), + _ArgumentResults_2: findType("_ArgumentResults2"), + _AsyncCompleter_Object: findType("_AsyncCompleter"), + _AsyncCompleter_Stream_WatchEvent: findType("_AsyncCompleter>"), + _AsyncCompleter_String: findType("_AsyncCompleter"), + _AsyncCompleter_nullable_Object: findType("_AsyncCompleter"), + _CompleterStream_WatchEvent: findType("_CompleterStream"), + _EventRequest_dynamic: findType("_EventRequest<@>"), + _Future_Object: findType("_Future"), + _Future_Stream_WatchEvent: findType("_Future>"), + _Future_String: findType("_Future"), + _Future_bool: findType("_Future"), + _Future_dynamic: findType("_Future<@>"), + _Future_int: findType("_Future"), + _Future_nullable_Object: findType("_Future"), + _Future_void: findType("_Future<~>"), + _Highlight: findType("_Highlight"), + _IdentityHashMap_dynamic_dynamic: findType("_IdentityHashMap<@,@>"), + _LinkedIdentityHashMap_SimpleSelector_int: findType("_LinkedIdentityHashMap"), + _LinkedIdentityHashMap_SimpleSelector_int_2: findType("_LinkedIdentityHashMap"), + _LinkedIdentityHashSet_ComplexSelector: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_ComplexSelector_2: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension_2: findType("_LinkedIdentityHashSet"), + _LoadedStylesheet: findType("_LoadedStylesheet0"), + _LoadedStylesheet_2: findType("_LoadedStylesheet2"), + _MapEntry: findType("_MapEntry"), + _NodeException: findType("_NodeException"), + _UnmodifiableSet_String: findType("_UnmodifiableSet"), + bool: findType("bool"), + double: findType("double"), + dynamic: findType("@"), + dynamic_Function: findType("@()"), + dynamic_Function_Object: findType("@(Object)"), + dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), + int: findType("int"), + legacy_Never: findType("0&*"), + legacy_Object: findType("Object*"), + nullable_AstNode: findType("AstNode?"), + nullable_AstNode_2: findType("AstNode0?"), + nullable_FileSpan: findType("FileSpan?"), + nullable_Future_Null: findType("Future?"), + nullable_Future_void: findType("Future<~>?"), + nullable_ImporterResult: findType("ImporterResult0?"), + nullable_Object: findType("Object?"), + nullable_SourceFile: findType("SourceFile?"), + nullable_SourceSpan: findType("SourceSpan?"), + nullable_StreamSubscription_WatchEvent: findType("StreamSubscription?"), + nullable_String: findType("String?"), + nullable_Stylesheet: findType("Stylesheet?"), + nullable_StylesheetNode: findType("StylesheetNode?"), + nullable_Stylesheet_2: findType("Stylesheet0?"), + nullable_Tuple2_String_String: findType("Tuple2?"), + nullable_Tuple3_AsyncImporter_Uri_Uri: findType("Tuple3?"), + nullable_Tuple3_AsyncImporter_Uri_Uri_2: findType("Tuple3?"), + nullable_Tuple3_Importer_Uri_Uri: findType("Tuple3?"), + nullable_Tuple3_Importer_Uri_Uri_2: findType("Tuple3?"), + nullable_Uri: findType("Uri?"), + nullable_Value: findType("Value?"), + nullable_Value_2: findType("Value0?"), + nullable__ConstructorOptions: findType("_ConstructorOptions?"), + nullable__ConstructorOptions_2: findType("_ConstructorOptions0?"), + nullable__ConstructorOptions_3: findType("_ConstructorOptions1?"), + nullable__Highlight: findType("_Highlight?"), + nullable__LoadedStylesheet: findType("_LoadedStylesheet0?"), + nullable__LoadedStylesheet_2: findType("_LoadedStylesheet2?"), + num: findType("num"), + void: findType("~"), + void_Function_Object: findType("~(Object)"), + void_Function_Object_StackTrace: findType("~(Object,StackTrace)") + }; + })(); + (function constants() { + var makeConstList = hunkHelpers.makeConstList; + B.Interceptor_methods = J.Interceptor.prototype; + B.JSArray_methods = J.JSArray.prototype; + B.JSBool_methods = J.JSBool.prototype; + B.JSInt_methods = J.JSInt.prototype; + B.JSNumber_methods = J.JSNumber.prototype; + B.JSString_methods = J.JSString.prototype; + B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + B.JavaScriptObject_methods = J.JavaScriptObject.prototype; + B.NativeUint32List_methods = A.NativeUint32List.prototype; + B.NativeUint8List_methods = A.NativeUint8List.prototype; + B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + B.AsciiEncoder_127 = new A.AsciiEncoder(127); + B.C_EmptyUnmodifiableSet1 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.AtRootQuery_UsS = new A.AtRootQuery(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AtRootQuery_UsS0 = new A.AtRootQuery0(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AttributeOperator_8aB = new A.AttributeOperator("*=", "substring"); + B.AttributeOperator_8aB0 = new A.AttributeOperator0("*=", "substring"); + B.AttributeOperator_BGd = new A.AttributeOperator("$=", "suffix"); + B.AttributeOperator_BGd0 = new A.AttributeOperator0("$=", "suffix"); + B.AttributeOperator_ES6 = new A.AttributeOperator("=", "equal"); + B.AttributeOperator_ES60 = new A.AttributeOperator0("=", "equal"); + B.AttributeOperator_eot = new A.AttributeOperator("^=", "prefix"); + B.AttributeOperator_eot0 = new A.AttributeOperator0("^=", "prefix"); + B.AttributeOperator_ivT = new A.AttributeOperator("|=", "dash"); + B.AttributeOperator_ivT0 = new A.AttributeOperator0("|=", "dash"); + B.AttributeOperator_r60 = new A.AttributeOperator("~=", "include"); + B.AttributeOperator_r600 = new A.AttributeOperator0("~=", "include"); + B.BinaryOperator_6pl = new A.BinaryOperator("times", "*", 6, "times"); + B.BinaryOperator_6pl0 = new A.BinaryOperator0("times", "*", 6, "times"); + B.BinaryOperator_KlB = new A.BinaryOperator("minus", "-", 5, "minus"); + B.BinaryOperator_KlB0 = new A.BinaryOperator0("minus", "-", 5, "minus"); + B.BinaryOperator_PHH = new A.BinaryOperator("modulo", "%", 6, "modulo"); + B.BinaryOperator_PHH0 = new A.BinaryOperator0("modulo", "%", 6, "modulo"); + B.BinaryOperator_Vr9 = new A.BinaryOperator("not equals", "!=", 3, "notEquals"); + B.BinaryOperator_Vr90 = new A.BinaryOperator0("not equals", "!=", 3, "notEquals"); + B.BinaryOperator_Wma = new A.BinaryOperator("greater than or equals", ">=", 4, "greaterThanOrEquals"); + B.BinaryOperator_Wma0 = new A.BinaryOperator0("greater than or equals", ">=", 4, "greaterThanOrEquals"); + B.BinaryOperator_and_and_2_and = new A.BinaryOperator("and", "and", 2, "and"); + B.BinaryOperator_and_and_2_and0 = new A.BinaryOperator0("and", "and", 2, "and"); + B.BinaryOperator_apg = new A.BinaryOperator("less than", "<", 4, "lessThan"); + B.BinaryOperator_apg0 = new A.BinaryOperator0("less than", "<", 4, "lessThan"); + B.BinaryOperator_axY = new A.BinaryOperator("single equals", "=", 0, "singleEquals"); + B.BinaryOperator_axY0 = new A.BinaryOperator0("single equals", "=", 0, "singleEquals"); + B.BinaryOperator_cw1 = new A.BinaryOperator("greater than", ">", 4, "greaterThan"); + B.BinaryOperator_cw10 = new A.BinaryOperator0("greater than", ">", 4, "greaterThan"); + B.BinaryOperator_nZh = new A.BinaryOperator("equals", "==", 3, "equals"); + B.BinaryOperator_nZh0 = new A.BinaryOperator0("equals", "==", 3, "equals"); + B.BinaryOperator_oqF = new A.BinaryOperator("less than or equals", "<=", 4, "lessThanOrEquals"); + B.BinaryOperator_oqF0 = new A.BinaryOperator0("less than or equals", "<=", 4, "lessThanOrEquals"); + B.BinaryOperator_or_or_1_or = new A.BinaryOperator("or", "or", 1, "or"); + B.BinaryOperator_or_or_1_or0 = new A.BinaryOperator0("or", "or", 1, "or"); + B.BinaryOperator_qbf = new A.BinaryOperator("plus", "+", 5, "plus"); + B.BinaryOperator_qbf0 = new A.BinaryOperator0("plus", "+", 5, "plus"); + B.BinaryOperator_qpm = new A.BinaryOperator("divided by", "/", 6, "dividedBy"); + B.BinaryOperator_qpm0 = new A.BinaryOperator0("divided by", "/", 6, "dividedBy"); + B.CONSTANT = new A.Instantiation1(A.math0__max$closure(), A.findType("Instantiation1")); + B.C_AsciiCodec = new A.AsciiCodec(); + B.C_AsciiGlyphSet = new A.AsciiGlyphSet(); + B.C_Base64Encoder = new A.Base64Encoder(); + B.C_Base64Codec = new A.Base64Codec(); + B.C_DefaultEquality = new A.DefaultEquality(); + B.C_EmptyExtensionStore = new A.EmptyExtensionStore(); + B.C_EmptyExtensionStore0 = new A.EmptyExtensionStore0(); + B.C_EmptyIterator = new A.EmptyIterator(); + B.C_EmptyUnmodifiableSet = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_EmptyUnmodifiableSet0 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_IterableEquality = new A.IterableEquality(); + B.C_JS_CONST = function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +}; + B.C_JS_CONST0 = function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +}; + B.C_JS_CONST6 = function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +}; + B.C_JS_CONST1 = function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +}; + B.C_JS_CONST2 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +}; + B.C_JS_CONST5 = function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +}; + B.C_JS_CONST4 = function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +}; + B.C_JS_CONST3 = function(hooks) { return hooks; } +; + B.C_JsonCodec = new A.JsonCodec(); + B.C_ListEquality0 = new A.ListEquality(); + B.C_ListEquality = new A.ListEquality(); + B.C_MapEquality = new A.MapEquality(); + B.C_OutOfMemoryError = new A.OutOfMemoryError(); + B.C_SentinelValue = new A.SentinelValue(); + B.C_UnicodeGlyphSet = new A.UnicodeGlyphSet(); + B.C_Utf8Codec = new A.Utf8Codec(); + B.C_Utf8Encoder = new A.Utf8Encoder(); + B.C__DelayedDone = new A._DelayedDone(); + B.C__HasContentVisitor = new A._HasContentVisitor(); + B.C__HasContentVisitor0 = new A._HasContentVisitor0(); + B.C__IsUselessVisitor = new A._IsUselessVisitor(); + B.C__IsUselessVisitor0 = new A._IsUselessVisitor0(); + B.C__JSRandom = new A._JSRandom(); + B.C__Required = new A._Required(); + B.C__RootZone = new A._RootZone(); + B.C__SassNull = new A._SassNull(); + B.C__SassNull0 = new A._SassNull0(); + B.CalculationOperator_2bx = new A.CalculationOperator("minus", "-", 1, "minus"); + B.CalculationOperator_2bx0 = new A.CalculationOperator0("minus", "-", 1, "minus"); + B.CalculationOperator_IyK = new A.CalculationOperator("plus", "+", 1, "plus"); + B.CalculationOperator_IyK0 = new A.CalculationOperator0("plus", "+", 1, "plus"); + B.CalculationOperator_OvN = new A.CalculationOperator("divided by", "/", 2, "dividedBy"); + B.CalculationOperator_OvN0 = new A.CalculationOperator0("divided by", "/", 2, "dividedBy"); + B.CalculationOperator_jFr = new A.CalculationOperator("times", "*", 2, "times"); + B.CalculationOperator_jFr0 = new A.CalculationOperator0("times", "*", 2, "times"); + B.ChangeType_add = new A.ChangeType("add"); + B.ChangeType_modify = new A.ChangeType("modify"); + B.ChangeType_remove = new A.ChangeType("remove"); + B.Combinator_4QF = new A.Combinator("+", "nextSibling"); + B.Combinator_4QF0 = new A.Combinator0("+", "nextSibling"); + B.Combinator_Cht = new A.Combinator(">", "child"); + B.Combinator_Cht0 = new A.Combinator0(">", "child"); + B.Combinator_Htt = new A.Combinator("~", "followingSibling"); + B.Combinator_Htt0 = new A.Combinator0("~", "followingSibling"); + B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); + B.Map_empty11 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null = new A.Configuration(B.Map_empty11, null); + B.Map_empty12 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null0 = new A.Configuration0(B.Map_empty12, null); + B.Duration_0 = new A.Duration(0); + B.ExtendMode_allTargets_allTargets = new A.ExtendMode("allTargets", "allTargets"); + B.ExtendMode_allTargets_allTargets0 = new A.ExtendMode0("allTargets", "allTargets"); + B.ExtendMode_normal_normal = new A.ExtendMode("normal", "normal"); + B.ExtendMode_normal_normal0 = new A.ExtendMode0("normal", "normal"); + B.ExtendMode_replace_replace = new A.ExtendMode("replace", "replace"); + B.ExtendMode_replace_replace0 = new A.ExtendMode0("replace", "replace"); + B.JsonEncoder_null = new A.JsonEncoder(null); + B.LineFeed_SsD = new A.LineFeed0("lf", "\n", "lf"); + B.LineFeed_gg4 = new A.LineFeed0("crlf", "\r\n", "crlf"); + B.LineFeed_lf = new A.LineFeed("lf"); + B.LineFeed_oyU = new A.LineFeed0("cr", "\r", "cr"); + B.LineFeed_t2a = new A.LineFeed0("lfcr", "\n\r", "lfcr"); + B.ListSeparator_EVt = new A.ListSeparator("space", " ", "space"); + B.ListSeparator_EVt0 = new A.ListSeparator0("space", " ", "space"); + B.ListSeparator_rXA = new A.ListSeparator("comma", ",", "comma"); + B.ListSeparator_rXA0 = new A.ListSeparator0("comma", ",", "comma"); + B.ListSeparator_undecided_null_undecided = new A.ListSeparator("undecided", null, "undecided"); + B.ListSeparator_undecided_null_undecided0 = new A.ListSeparator0("undecided", null, "undecided"); + B.ListSeparator_zg9 = new A.ListSeparator("slash", "/", "slash"); + B.ListSeparator_zg90 = new A.ListSeparator0("slash", "/", "slash"); + B.List_2Vk = A._setArrayType(makeConstList([0, 0, 32776, 33792, 1, 10240, 0, 0]), type$.JSArray_int); + B.List_Opy = A._setArrayType(makeConstList(["em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax", "cm", "mm", "q", "in", "pt", "pc", "px"]), type$.JSArray_String); + B.Map_Op0VJ = new A.ConstantStringMap(15, {em: null, ex: null, ch: null, rem: null, vw: null, vh: null, vmin: null, vmax: null, cm: null, mm: null, q: null, in: null, pt: null, pc: null, px: null}, B.List_Opy, type$.ConstantStringMap_String_Null); + B.Set_Opyzl = new A._UnmodifiableSet(B.Map_Op0VJ, type$._UnmodifiableSet_String); + B.List_deg_grad_rad_turn = A._setArrayType(makeConstList(["deg", "grad", "rad", "turn"]), type$.JSArray_String); + B.Map_EGso3 = new A.ConstantStringMap(4, {deg: null, grad: null, rad: null, turn: null}, B.List_deg_grad_rad_turn, type$.ConstantStringMap_String_Null); + B.Set_EGJh = new A._UnmodifiableSet(B.Map_EGso3, type$._UnmodifiableSet_String); + B.List_s_ms = A._setArrayType(makeConstList(["s", "ms"]), type$.JSArray_String); + B.Map_maDht = new A.ConstantStringMap(2, {s: null, ms: null}, B.List_s_ms, type$.ConstantStringMap_String_Null); + B.Set_maSD = new A._UnmodifiableSet(B.Map_maDht, type$._UnmodifiableSet_String); + B.List_hz_khz = A._setArrayType(makeConstList(["hz", "khz"]), type$.JSArray_String); + B.Map_kfoGx = new A.ConstantStringMap(2, {hz: null, khz: null}, B.List_hz_khz, type$.ConstantStringMap_String_Null); + B.Set_kfn1 = new A._UnmodifiableSet(B.Map_kfoGx, type$._UnmodifiableSet_String); + B.List_dpi_dpcm_dppx = A._setArrayType(makeConstList(["dpi", "dpcm", "dppx"]), type$.JSArray_String); + B.Map_H20 = new A.ConstantStringMap(3, {dpi: null, dpcm: null, dppx: null}, B.List_dpi_dpcm_dppx, type$.ConstantStringMap_String_Null); + B.Set_H2nB4 = new A._UnmodifiableSet(B.Map_H20, type$._UnmodifiableSet_String); + B.List_AqW = A._setArrayType(makeConstList([B.Set_Opyzl, B.Set_EGJh, B.Set_maSD, B.Set_kfn1, B.Set_H2nB4]), A.findType("JSArray>")); + B.List_CVk = A._setArrayType(makeConstList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_IoD = A._setArrayType(makeConstList([B.Combinator_4QF]), type$.JSArray_Combinator); + B.List_IoD0 = A._setArrayType(makeConstList([B.Combinator_4QF0]), type$.JSArray_Combinator_2); + B.List_JYB = A._setArrayType(makeConstList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]), type$.JSArray_int); + B.List_Kw1 = A._setArrayType(makeConstList([B.Combinator_Htt]), type$.JSArray_Combinator); + B.List_Kw10 = A._setArrayType(makeConstList([B.Combinator_Htt0]), type$.JSArray_Combinator_2); + B.List_empty10 = A._setArrayType(makeConstList([]), type$.JSArray_Argument); + B.List_empty22 = A._setArrayType(makeConstList([]), type$.JSArray_Argument_2); + B.List_empty24 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncCallable_2); + B.List_empty25 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncImporter); + B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_Combinator); + B.List_empty13 = A._setArrayType(makeConstList([]), type$.JSArray_Combinator_2); + B.List_empty1 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector); + B.List_empty14 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector_2); + B.List_empty2 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent); + B.List_empty15 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent_2); + B.List_empty8 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable); + B.List_empty20 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable_2); + B.List_empty3 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode); + B.List_empty16 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode_2); + B.List_empty9 = A._setArrayType(makeConstList([]), type$.JSArray_Expression); + B.List_empty21 = A._setArrayType(makeConstList([]), type$.JSArray_Expression_2); + B.List_empty5 = A._setArrayType(makeConstList([]), type$.JSArray_Extension); + B.List_empty17 = A._setArrayType(makeConstList([]), type$.JSArray_Extension_2); + B.List_empty23 = A._setArrayType(makeConstList([]), type$.JSArray_Importer); + B.List_empty6 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.List_empty18 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.List_empty12 = A._setArrayType(makeConstList([]), type$.JSArray_Statement); + B.List_empty7 = A._setArrayType(makeConstList([]), type$.JSArray_Value); + B.List_empty19 = A._setArrayType(makeConstList([]), type$.JSArray_Value_2); + B.List_empty4 = A._setArrayType(makeConstList([]), type$.JSArray_int); + B.List_empty11 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); + B.List_gRj = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_nxB = A._setArrayType(makeConstList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qFt = A._setArrayType(makeConstList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767]), type$.JSArray_int); + B.List_qNA = A._setArrayType(makeConstList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qg40 = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qg4 = A._setArrayType(makeConstList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_K2O = A._setArrayType(makeConstList(["in", "cm", "pc", "mm", "q", "pt", "px", "deg", "grad", "rad", "turn", "s", "ms", "Hz", "kHz", "dpi", "dpcm", "dppx"]), type$.JSArray_String); + B.List_aha = A._setArrayType(makeConstList(["in", "cm", "pc", "mm", "q", "pt", "px"]), type$.JSArray_String); + B.Map_ahsJO = new A.ConstantStringMap(7, {in: 1, cm: 0.39370078740157477, pc: 0.16666666666666666, mm: 0.03937007874015748, q: 0.00984251968503937, pt: 0.013888888888888888, px: 0.010416666666666666}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahM6L = new A.ConstantStringMap(7, {in: 2.54, cm: 1, pc: 0.42333333333333334, mm: 0.1, q: 0.025, pt: 0.035277777777777776, px: 0.026458333333333334}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahNsa = new A.ConstantStringMap(7, {in: 6, cm: 2.3622047244094486, pc: 1, mm: 0.2362204724409449, q: 0.05905511811023623, pt: 0.08333333333333333, px: 0.0625}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahPSt = new A.ConstantStringMap(7, {in: 25.4, cm: 10, pc: 4.233333333333333, mm: 1, q: 0.25, pt: 0.35277777777777775, px: 0.26458333333333334}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahgya = new A.ConstantStringMap(7, {in: 101.6, cm: 40, pc: 16.933333333333334, mm: 4, q: 1, pt: 1.411111111111111, px: 1.0583333333333333}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahGvh = new A.ConstantStringMap(7, {in: 72, cm: 28.346456692913385, pc: 12, mm: 2.834645669291339, q: 0.7086614173228347, pt: 1, px: 0.75}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_ahkuc = new A.ConstantStringMap(7, {in: 96, cm: 37.79527559055118, pc: 16, mm: 3.7795275590551185, q: 0.9448818897637796, pt: 1.3333333333333333, px: 1}, B.List_aha, type$.ConstantStringMap_String_double); + B.Map_EGyvr = new A.ConstantStringMap(4, {deg: 1, grad: 0.9, rad: 57.29577951308232, turn: 360}, B.List_deg_grad_rad_turn, type$.ConstantStringMap_String_double); + B.Map_EGfqB = new A.ConstantStringMap(4, {deg: 1.1111111111111112, grad: 1, rad: 63.66197723675813, turn: 400}, B.List_deg_grad_rad_turn, type$.ConstantStringMap_String_double); + B.Map_EGswR = new A.ConstantStringMap(4, {deg: 0.017453292519943295, grad: 0.015707963267948967, rad: 1, turn: 6.283185307179586}, B.List_deg_grad_rad_turn, type$.ConstantStringMap_String_double); + B.Map_EGY2F = new A.ConstantStringMap(4, {deg: 0.002777777777777778, grad: 0.0025, rad: 0.15915494309189535, turn: 1}, B.List_deg_grad_rad_turn, type$.ConstantStringMap_String_double); + B.Map_ma2bi = new A.ConstantStringMap(2, {s: 1, ms: 0.001}, B.List_s_ms, type$.ConstantStringMap_String_double); + B.Map_maDht0 = new A.ConstantStringMap(2, {s: 1000, ms: 1}, B.List_s_ms, type$.ConstantStringMap_String_double); + B.List_Hz_kHz = A._setArrayType(makeConstList(["Hz", "kHz"]), type$.JSArray_String); + B.Map_0IpUe = new A.ConstantStringMap(2, {Hz: 1, kHz: 1000}, B.List_Hz_kHz, type$.ConstantStringMap_String_double); + B.Map_0IVs0 = new A.ConstantStringMap(2, {Hz: 0.001, kHz: 1}, B.List_Hz_kHz, type$.ConstantStringMap_String_double); + B.Map_H2OWd = new A.ConstantStringMap(3, {dpi: 1, dpcm: 2.54, dppx: 96}, B.List_dpi_dpcm_dppx, type$.ConstantStringMap_String_double); + B.Map_H24em = new A.ConstantStringMap(3, {dpi: 0.39370078740157477, dpcm: 1, dppx: 37.79527559055118}, B.List_dpi_dpcm_dppx, type$.ConstantStringMap_String_double); + B.Map_H25Om = new A.ConstantStringMap(3, {dpi: 0.010416666666666666, dpcm: 0.026458333333333334, dppx: 1}, B.List_dpi_dpcm_dppx, type$.ConstantStringMap_String_double); + B.Map_K2BWj = new A.ConstantStringMap(18, {in: B.Map_ahsJO, cm: B.Map_ahM6L, pc: B.Map_ahNsa, mm: B.Map_ahPSt, q: B.Map_ahgya, pt: B.Map_ahGvh, px: B.Map_ahkuc, deg: B.Map_EGyvr, grad: B.Map_EGfqB, rad: B.Map_EGswR, turn: B.Map_EGY2F, s: B.Map_ma2bi, ms: B.Map_maDht0, Hz: B.Map_0IpUe, kHz: B.Map_0IVs0, dpi: B.Map_H2OWd, dpcm: B.Map_H24em, dppx: B.Map_H25Om}, B.List_K2O, A.findType("ConstantStringMap>")); + B.List_U8g = A._setArrayType(makeConstList(["length", "angle", "time", "frequency", "pixel density"]), type$.JSArray_String); + B.Map_U8AHF = new A.ConstantStringMap(5, {length: B.List_aha, angle: B.List_deg_grad_rad_turn, time: B.List_s_ms, frequency: B.List_Hz_kHz, "pixel density": B.List_dpi_dpcm_dppx}, B.List_U8g, A.findType("ConstantStringMap>")); + B.Map_empty0 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Map_empty7 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Map_empty2 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Map_empty9 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Map_empty3 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap>")); + B.Map_empty = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap>")); + B.Map_empty10 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap>")); + B.Map_empty6 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap>")); + B.Map_empty1 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.Map_empty8 = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.List_empty26 = A._setArrayType(makeConstList([]), A.findType("JSArray")); + B.Map_empty4 = new A.ConstantStringMap(0, {}, B.List_empty26, A.findType("ConstantStringMap")); + B.List_empty27 = A._setArrayType(makeConstList([]), type$.JSArray_nullable_String); + B.Map_empty5 = new A.ConstantStringMap(0, {}, B.List_empty27, A.findType("ConstantStringMap")); + B.OptionType_YwU = new A.OptionType("OptionType.single"); + B.OptionType_nMZ = new A.OptionType("OptionType.flag"); + B.OptionType_qyr = new A.OptionType("OptionType.multiple"); + B.OutputStyle_0 = new A.OutputStyle("expanded"); + B.OutputStyle_00 = new A.OutputStyle0("expanded"); + B.OutputStyle_1 = new A.OutputStyle("compressed"); + B.OutputStyle_10 = new A.OutputStyle0("compressed"); + B.SassBoolean_false = new A.SassBoolean(false); + B.SassBoolean_false0 = new A.SassBoolean0(false); + B.SassBoolean_true = new A.SassBoolean(true); + B.SassBoolean_true0 = new A.SassBoolean0(true); + B.SassList_Sof = new A.SassList(B.List_empty7, B.ListSeparator_rXA, false); + B.SassList_Sof0 = new A.SassList0(B.List_empty19, B.ListSeparator_rXA0, false); + B.SassList_nj9 = new A.SassList0(B.List_empty19, B.ListSeparator_undecided_null_undecided0, false); + B.Map_empty13 = new A.ConstantStringMap(0, {}, B.List_empty7, A.findType("ConstantStringMap")); + B.SassMap_Map_empty = new A.SassMap(B.Map_empty13); + B.Map_empty14 = new A.ConstantStringMap(0, {}, B.List_empty19, A.findType("ConstantStringMap")); + B.SassMap_Map_empty0 = new A.SassMap0(B.Map_empty14); + B.Map_2Vaha = new A.GeneralConstantMap([91, null, 46, null, 35, null, 37, null, 58, null, 38, null, 42, null, 124, null], A.findType("GeneralConstantMap")); + B.Set_2Vk2 = new A._UnmodifiableSet(B.Map_2Vaha, A.findType("_UnmodifiableSet")); + B.List_is_matches_where = A._setArrayType(makeConstList(["is", "matches", "where"]), type$.JSArray_String); + B.Map_YEyLX = new A.ConstantStringMap(3, {is: null, matches: null, where: null}, B.List_is_matches_where, type$.ConstantStringMap_String_Null); + B.Set_YEQji = new A._UnmodifiableSet(B.Map_YEyLX, type$._UnmodifiableSet_String); + B.List_empty28 = A._setArrayType(makeConstList([]), type$.JSArray_CssMediaQuery); + B.Map_empty15 = new A.ConstantStringMap(0, {}, B.List_empty28, A.findType("ConstantStringMap")); + B.Set_empty0 = new A._UnmodifiableSet(B.Map_empty15, A.findType("_UnmodifiableSet")); + B.List_empty29 = A._setArrayType(makeConstList([]), type$.JSArray_CssMediaQuery_2); + B.Map_empty16 = new A.ConstantStringMap(0, {}, B.List_empty29, A.findType("ConstantStringMap")); + B.Set_empty4 = new A._UnmodifiableSet(B.Map_empty16, A.findType("_UnmodifiableSet")); + B.List_empty30 = A._setArrayType(makeConstList([]), type$.JSArray_Module_AsyncCallable); + B.Map_empty17 = new A.ConstantStringMap(0, {}, B.List_empty30, A.findType("ConstantStringMap,Null>")); + B.Set_empty1 = new A._UnmodifiableSet(B.Map_empty17, A.findType("_UnmodifiableSet>")); + B.List_empty31 = A._setArrayType(makeConstList([]), type$.JSArray_Module_Callable); + B.Map_empty18 = new A.ConstantStringMap(0, {}, B.List_empty31, A.findType("ConstantStringMap,Null>")); + B.Set_empty = new A._UnmodifiableSet(B.Map_empty18, A.findType("_UnmodifiableSet>")); + B.List_empty32 = A._setArrayType(makeConstList([]), type$.JSArray_Module_AsyncCallable_2); + B.Map_empty19 = new A.ConstantStringMap(0, {}, B.List_empty32, A.findType("ConstantStringMap,Null>")); + B.Set_empty5 = new A._UnmodifiableSet(B.Map_empty19, A.findType("_UnmodifiableSet>")); + B.List_empty33 = A._setArrayType(makeConstList([]), type$.JSArray_Module_Callable_2); + B.Map_empty20 = new A.ConstantStringMap(0, {}, B.List_empty33, A.findType("ConstantStringMap,Null>")); + B.Set_empty3 = new A._UnmodifiableSet(B.Map_empty20, A.findType("_UnmodifiableSet>")); + B.List_empty34 = A._setArrayType(makeConstList([]), type$.JSArray_StylesheetNode); + B.Map_empty21 = new A.ConstantStringMap(0, {}, B.List_empty34, A.findType("ConstantStringMap")); + B.Set_empty2 = new A._UnmodifiableSet(B.Map_empty21, A.findType("_UnmodifiableSet")); + B.StderrLogger_false = new A.StderrLogger(false); + B.StderrLogger_false0 = new A.StderrLogger0(false); + B.Symbol__evaluationContext = new A.Symbol("_evaluationContext"); + B.Symbol__inImportRule = new A.Symbol("_inImportRule"); + B.Symbol_call = new A.Symbol("call"); + B.Syntax_CSS_css = new A.Syntax("CSS", "css"); + B.Syntax_CSS_css0 = new A.Syntax0("CSS", "css"); + B.Syntax_SCSS_scss = new A.Syntax("SCSS", "scss"); + B.Syntax_SCSS_scss0 = new A.Syntax0("SCSS", "scss"); + B.Syntax_Sass_sass = new A.Syntax("Sass", "sass"); + B.Syntax_Sass_sass0 = new A.Syntax0("Sass", "sass"); + B.List_empty35 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.Map_empty22 = new A.ConstantStringMap(0, {}, B.List_empty35, A.findType("ConstantStringMap,ModifiableCssValue>")); + B.Tuple2_EmptyExtensionStore_Map_empty = new A.Tuple2(B.C_EmptyExtensionStore, B.Map_empty22, type$.Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList); + B.List_empty36 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.Map_empty23 = new A.ConstantStringMap(0, {}, B.List_empty36, A.findType("ConstantStringMap,ModifiableCssValue0>")); + B.Tuple2_EmptyExtensionStore_Map_empty0 = new A.Tuple2(B.C_EmptyExtensionStore0, B.Map_empty23, type$.Tuple2_of_ExtensionStore_and_Map_of_CssValue_SelectorList_and_ModifiableCssValue_SelectorList_2); + B.Type_Null_Yyn = A.typeLiteral("Null"); + B.Type_Object_xQ6 = A.typeLiteral("Object"); + B.UnaryOperator_Ix1 = new A.UnaryOperator("divide", "/", "divide"); + B.UnaryOperator_Ix10 = new A.UnaryOperator0("divide", "/", "divide"); + B.UnaryOperator_TLI = new A.UnaryOperator("minus", "-", "minus"); + B.UnaryOperator_TLI0 = new A.UnaryOperator0("minus", "-", "minus"); + B.UnaryOperator_gg4 = new A.UnaryOperator("plus", "+", "plus"); + B.UnaryOperator_gg40 = new A.UnaryOperator0("plus", "+", "plus"); + B.UnaryOperator_not_not_not = new A.UnaryOperator("not", "not", "not"); + B.UnaryOperator_not_not_not0 = new A.UnaryOperator0("not", "not", "not"); + B.Utf8Decoder_false = new A.Utf8Decoder(false); + B._ColorFormatEnum_hslFunction = new A._ColorFormatEnum("hslFunction"); + B._ColorFormatEnum_hslFunction0 = new A._ColorFormatEnum0("hslFunction"); + B._ColorFormatEnum_rgbFunction = new A._ColorFormatEnum("rgbFunction"); + B._ColorFormatEnum_rgbFunction0 = new A._ColorFormatEnum0("rgbFunction"); + B._IsBogusVisitor_false = new A._IsBogusVisitor(false); + B._IsBogusVisitor_false0 = new A._IsBogusVisitor0(false); + B._IsBogusVisitor_true = new A._IsBogusVisitor(true); + B._IsBogusVisitor_true0 = new A._IsBogusVisitor0(true); + B._IsInvisibleVisitor_false = new A._IsInvisibleVisitor0(false); + B._IsInvisibleVisitor_false0 = new A._IsInvisibleVisitor2(false); + B._IsInvisibleVisitor_false_false = new A._IsInvisibleVisitor(false, false); + B._IsInvisibleVisitor_false_false0 = new A._IsInvisibleVisitor1(false, false); + B._IsInvisibleVisitor_true = new A._IsInvisibleVisitor0(true); + B._IsInvisibleVisitor_true0 = new A._IsInvisibleVisitor2(true); + B._IsInvisibleVisitor_true_false = new A._IsInvisibleVisitor(true, false); + B._IsInvisibleVisitor_true_false0 = new A._IsInvisibleVisitor1(true, false); + B._IsInvisibleVisitor_true_true = new A._IsInvisibleVisitor(true, true); + B._IsInvisibleVisitor_true_true0 = new A._IsInvisibleVisitor1(true, true); + B._IterationMarker_null_2 = new A._IterationMarker(null, 2); + B._PathDirection_8Gl = new A._PathDirection("at root"); + B._PathDirection_988 = new A._PathDirection("below root"); + B._PathDirection_FIw = new A._PathDirection("reaches root"); + B._PathDirection_ZGD = new A._PathDirection("above root"); + B._PathRelation_different = new A._PathRelation("different"); + B._PathRelation_equal = new A._PathRelation("equal"); + B._PathRelation_inconclusive = new A._PathRelation("inconclusive"); + B._PathRelation_within = new A._PathRelation("within"); + B._SingletonCssMediaQueryMergeResult_empty = new A._SingletonCssMediaQueryMergeResult("empty"); + B._SingletonCssMediaQueryMergeResult_empty0 = new A._SingletonCssMediaQueryMergeResult0("empty"); + B._SingletonCssMediaQueryMergeResult_unrepresentable = new A._SingletonCssMediaQueryMergeResult("unrepresentable"); + B._SingletonCssMediaQueryMergeResult_unrepresentable0 = new A._SingletonCssMediaQueryMergeResult0("unrepresentable"); + B._StreamGroupState_canceled = new A._StreamGroupState("canceled"); + B._StreamGroupState_dormant = new A._StreamGroupState("dormant"); + B._StreamGroupState_listening = new A._StreamGroupState("listening"); + B._StreamGroupState_paused = new A._StreamGroupState("paused"); + B._StringStackTrace_3uE = new A._StringStackTrace(""); + B._ZoneFunction_3bB = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer$closure()); + B._ZoneFunction_7G2 = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback$closure()); + B._ZoneFunction_Eeh = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback$closure()); + B._ZoneFunction_NMc = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError$closure()); + B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer$closure()); + B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback$closure()); + B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork$closure()); + B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint$closure()); + B._ZoneFunction__RootZone__rootRegisterCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterCallback$closure()); + B._ZoneFunction__RootZone__rootRun = new A._ZoneFunction(B.C__RootZone, A.async___rootRun$closure()); + B._ZoneFunction__RootZone__rootRunBinary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunBinary$closure()); + B._ZoneFunction__RootZone__rootRunUnary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunUnary$closure()); + B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask$closure()); + B._ZoneSpecification_ALf = new A._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null); + })(); + (function staticFields() { + $._JS_INTEROP_INTERCEPTOR_TAG = null; + $.printToZone = null; + $.Primitives__identityHashCodeProperty = null; + $.BoundClosure__receiverFieldNameCache = null; + $.BoundClosure__interceptorFieldNameCache = null; + $.getTagFunction = null; + $.alternateTagFunction = null; + $.prototypeForTagFunction = null; + $.dispatchRecordsForInstanceTags = null; + $.interceptorsForUncacheableTags = null; + $.initNativeDispatchFlag = null; + $._nextCallback = null; + $._lastCallback = null; + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + $.Zone__current = B.C__RootZone; + $._RootZone__rootDelegate = null; + $._toStringVisiting = A._setArrayType([], type$.JSArray_Object); + $._fs = null; + $._currentUriBase = null; + $._current = null; + $._subselectorPseudos = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + $._rootishPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._features = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $._realCaseCache = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._selectorPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $._selectorPseudoElements = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._glyphs = B.C_UnicodeGlyphSet; + $._rootishPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._realCaseCache0 = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._features0 = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $._selectorPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $._selectorPseudoElements0 = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._subselectorPseudos0 = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + })(); + (function lazyInitializers() { + var _lazyFinal = hunkHelpers.lazyFinal, + _lazy = hunkHelpers.lazy; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); + _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(0, new A.nullFuture_closure(), A.findType("Future"))); + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => A.findType("_Future")._as($.$get$nullFuture())); + _lazyFinal($, "Future__falseFuture", "$get$Future__falseFuture", () => A._Future$zoneValue(false, B.C__RootZone, type$.bool)); + _lazyFinal($, "_RootZone__rootMap", "$get$_RootZone__rootMap", () => { + var t1 = type$.dynamic; + return A.HashMap_HashMap(t1, t1); + }); + _lazyFinal($, "Utf8Decoder__decoder", "$get$Utf8Decoder__decoder", () => new A.Utf8Decoder__decoder_closure().call$0()); + _lazyFinal($, "Utf8Decoder__decoderNonfatal", "$get$Utf8Decoder__decoderNonfatal", () => new A.Utf8Decoder__decoderNonfatal_closure().call$0()); + _lazyFinal($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", () => A.NativeInt8List__create1(A._ensureNativeList(A._setArrayType([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], type$.JSArray_int)))); + _lazyFinal($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", () => typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"); + _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false)); + _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", () => new Error().stack != void 0); + _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_xQ6)); + _lazyFinal($, "_scannerTables", "$get$_scannerTables", () => A._createTables()); + _lazyFinal($, "Option__invalidChars", "$get$Option__invalidChars", () => A.RegExp_RegExp("[ \\t\\r\\n\"'\\\\/]", false)); + _lazyFinal($, "alwaysValid", "$get$alwaysValid", () => new A.alwaysValid_closure()); + _lazyFinal($, "readline", "$get$readline", () => self.readline); + _lazyFinal($, "windows", "$get$windows", () => A.Context_Context($.$get$Style_windows())); + _lazyFinal($, "url", "$get$url", () => A.Context_Context($.$get$Style_url())); + _lazyFinal($, "context", "$get$context", () => new A.Context(type$.InternalStyle._as($.$get$Style_platform()), null)); + _lazyFinal($, "Style_posix", "$get$Style_posix", () => new A.PosixStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("[^/]$", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_windows", "$get$Style_windows", () => new A.WindowsStyle(A.RegExp_RegExp("[/\\\\]", false), A.RegExp_RegExp("[^/\\\\]$", false), A.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false), A.RegExp_RegExp("^[/\\\\](?![/\\\\])", false))); + _lazyFinal($, "Style_url", "$get$Style_url", () => new A.UrlStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false), A.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_platform", "$get$Style_platform", () => A.Style__getPlatformStyle()); + _lazyFinal($, "IfExpression_declaration", "$get$IfExpression_declaration", () => A.ArgumentDeclaration_ArgumentDeclaration$parse(string$.x40funct, null)); + _lazyFinal($, "colorsByName", "$get$colorsByName", () => { + var _null = null; + return A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor$rgb(154, 205, 50, _null), "yellow", A.SassColor$rgb(255, 255, 0, _null), "whitesmoke", A.SassColor$rgb(245, 245, 245, _null), "white", A.SassColor$rgb(255, 255, 255, _null), "wheat", A.SassColor$rgb(245, 222, 179, _null), "violet", A.SassColor$rgb(238, 130, 238, _null), "turquoise", A.SassColor$rgb(64, 224, 208, _null), "transparent", A.SassColor$rgb(0, 0, 0, 0), "tomato", A.SassColor$rgb(255, 99, 71, _null), "thistle", A.SassColor$rgb(216, 191, 216, _null), "teal", A.SassColor$rgb(0, 128, 128, _null), "tan", A.SassColor$rgb(210, 180, 140, _null), "steelblue", A.SassColor$rgb(70, 130, 180, _null), "springgreen", A.SassColor$rgb(0, 255, 127, _null), "snow", A.SassColor$rgb(255, 250, 250, _null), "slategrey", A.SassColor$rgb(112, 128, 144, _null), "slategray", A.SassColor$rgb(112, 128, 144, _null), "slateblue", A.SassColor$rgb(106, 90, 205, _null), "skyblue", A.SassColor$rgb(135, 206, 235, _null), "silver", A.SassColor$rgb(192, 192, 192, _null), "sienna", A.SassColor$rgb(160, 82, 45, _null), "seashell", A.SassColor$rgb(255, 245, 238, _null), "seagreen", A.SassColor$rgb(46, 139, 87, _null), "sandybrown", A.SassColor$rgb(244, 164, 96, _null), "salmon", A.SassColor$rgb(250, 128, 114, _null), "saddlebrown", A.SassColor$rgb(139, 69, 19, _null), "royalblue", A.SassColor$rgb(65, 105, 225, _null), "rosybrown", A.SassColor$rgb(188, 143, 143, _null), "red", A.SassColor$rgb(255, 0, 0, _null), "rebeccapurple", A.SassColor$rgb(102, 51, 153, _null), "purple", A.SassColor$rgb(128, 0, 128, _null), "powderblue", A.SassColor$rgb(176, 224, 230, _null), "plum", A.SassColor$rgb(221, 160, 221, _null), "pink", A.SassColor$rgb(255, 192, 203, _null), "peru", A.SassColor$rgb(205, 133, 63, _null), "peachpuff", A.SassColor$rgb(255, 218, 185, _null), "papayawhip", A.SassColor$rgb(255, 239, 213, _null), "palevioletred", A.SassColor$rgb(219, 112, 147, _null), "paleturquoise", A.SassColor$rgb(175, 238, 238, _null), "palegreen", A.SassColor$rgb(152, 251, 152, _null), "palegoldenrod", A.SassColor$rgb(238, 232, 170, _null), "orchid", A.SassColor$rgb(218, 112, 214, _null), "orangered", A.SassColor$rgb(255, 69, 0, _null), "orange", A.SassColor$rgb(255, 165, 0, _null), "olivedrab", A.SassColor$rgb(107, 142, 35, _null), "olive", A.SassColor$rgb(128, 128, 0, _null), "oldlace", A.SassColor$rgb(253, 245, 230, _null), "navy", A.SassColor$rgb(0, 0, 128, _null), "navajowhite", A.SassColor$rgb(255, 222, 173, _null), "moccasin", A.SassColor$rgb(255, 228, 181, _null), "mistyrose", A.SassColor$rgb(255, 228, 225, _null), "mintcream", A.SassColor$rgb(245, 255, 250, _null), "midnightblue", A.SassColor$rgb(25, 25, 112, _null), "mediumvioletred", A.SassColor$rgb(199, 21, 133, _null), "mediumturquoise", A.SassColor$rgb(72, 209, 204, _null), "mediumspringgreen", A.SassColor$rgb(0, 250, 154, _null), "mediumslateblue", A.SassColor$rgb(123, 104, 238, _null), "mediumseagreen", A.SassColor$rgb(60, 179, 113, _null), "mediumpurple", A.SassColor$rgb(147, 112, 219, _null), "mediumorchid", A.SassColor$rgb(186, 85, 211, _null), "mediumblue", A.SassColor$rgb(0, 0, 205, _null), "mediumaquamarine", A.SassColor$rgb(102, 205, 170, _null), "maroon", A.SassColor$rgb(128, 0, 0, _null), "magenta", A.SassColor$rgb(255, 0, 255, _null), "linen", A.SassColor$rgb(250, 240, 230, _null), "limegreen", A.SassColor$rgb(50, 205, 50, _null), "lime", A.SassColor$rgb(0, 255, 0, _null), "lightyellow", A.SassColor$rgb(255, 255, 224, _null), "lightsteelblue", A.SassColor$rgb(176, 196, 222, _null), "lightslategrey", A.SassColor$rgb(119, 136, 153, _null), "lightslategray", A.SassColor$rgb(119, 136, 153, _null), "lightskyblue", A.SassColor$rgb(135, 206, 250, _null), "lightseagreen", A.SassColor$rgb(32, 178, 170, _null), "lightsalmon", A.SassColor$rgb(255, 160, 122, _null), "lightpink", A.SassColor$rgb(255, 182, 193, _null), "lightgrey", A.SassColor$rgb(211, 211, 211, _null), "lightgreen", A.SassColor$rgb(144, 238, 144, _null), "lightgray", A.SassColor$rgb(211, 211, 211, _null), "lightgoldenrodyellow", A.SassColor$rgb(250, 250, 210, _null), "lightcyan", A.SassColor$rgb(224, 255, 255, _null), "lightcoral", A.SassColor$rgb(240, 128, 128, _null), "lightblue", A.SassColor$rgb(173, 216, 230, _null), "lemonchiffon", A.SassColor$rgb(255, 250, 205, _null), "lawngreen", A.SassColor$rgb(124, 252, 0, _null), "lavenderblush", A.SassColor$rgb(255, 240, 245, _null), "lavender", A.SassColor$rgb(230, 230, 250, _null), "khaki", A.SassColor$rgb(240, 230, 140, _null), "ivory", A.SassColor$rgb(255, 255, 240, _null), "indigo", A.SassColor$rgb(75, 0, 130, _null), "indianred", A.SassColor$rgb(205, 92, 92, _null), "hotpink", A.SassColor$rgb(255, 105, 180, _null), "honeydew", A.SassColor$rgb(240, 255, 240, _null), "grey", A.SassColor$rgb(128, 128, 128, _null), "greenyellow", A.SassColor$rgb(173, 255, 47, _null), "green", A.SassColor$rgb(0, 128, 0, _null), "gray", A.SassColor$rgb(128, 128, 128, _null), "goldenrod", A.SassColor$rgb(218, 165, 32, _null), "gold", A.SassColor$rgb(255, 215, 0, _null), "ghostwhite", A.SassColor$rgb(248, 248, 255, _null), "gainsboro", A.SassColor$rgb(220, 220, 220, _null), "fuchsia", A.SassColor$rgb(255, 0, 255, _null), "forestgreen", A.SassColor$rgb(34, 139, 34, _null), "floralwhite", A.SassColor$rgb(255, 250, 240, _null), "firebrick", A.SassColor$rgb(178, 34, 34, _null), "dodgerblue", A.SassColor$rgb(30, 144, 255, _null), "dimgrey", A.SassColor$rgb(105, 105, 105, _null), "dimgray", A.SassColor$rgb(105, 105, 105, _null), "deepskyblue", A.SassColor$rgb(0, 191, 255, _null), "deeppink", A.SassColor$rgb(255, 20, 147, _null), "darkviolet", A.SassColor$rgb(148, 0, 211, _null), "darkturquoise", A.SassColor$rgb(0, 206, 209, _null), "darkslategrey", A.SassColor$rgb(47, 79, 79, _null), "darkslategray", A.SassColor$rgb(47, 79, 79, _null), "darkslateblue", A.SassColor$rgb(72, 61, 139, _null), "darkseagreen", A.SassColor$rgb(143, 188, 143, _null), "darksalmon", A.SassColor$rgb(233, 150, 122, _null), "darkred", A.SassColor$rgb(139, 0, 0, _null), "darkorchid", A.SassColor$rgb(153, 50, 204, _null), "darkorange", A.SassColor$rgb(255, 140, 0, _null), "darkolivegreen", A.SassColor$rgb(85, 107, 47, _null), "darkmagenta", A.SassColor$rgb(139, 0, 139, _null), "darkkhaki", A.SassColor$rgb(189, 183, 107, _null), "darkgrey", A.SassColor$rgb(169, 169, 169, _null), "darkgreen", A.SassColor$rgb(0, 100, 0, _null), "darkgray", A.SassColor$rgb(169, 169, 169, _null), "darkgoldenrod", A.SassColor$rgb(184, 134, 11, _null), "darkcyan", A.SassColor$rgb(0, 139, 139, _null), "darkblue", A.SassColor$rgb(0, 0, 139, _null), "cyan", A.SassColor$rgb(0, 255, 255, _null), "crimson", A.SassColor$rgb(220, 20, 60, _null), "cornsilk", A.SassColor$rgb(255, 248, 220, _null), "cornflowerblue", A.SassColor$rgb(100, 149, 237, _null), "coral", A.SassColor$rgb(255, 127, 80, _null), "chocolate", A.SassColor$rgb(210, 105, 30, _null), "chartreuse", A.SassColor$rgb(127, 255, 0, _null), "cadetblue", A.SassColor$rgb(95, 158, 160, _null), "burlywood", A.SassColor$rgb(222, 184, 135, _null), "brown", A.SassColor$rgb(165, 42, 42, _null), "blueviolet", A.SassColor$rgb(138, 43, 226, _null), "blue", A.SassColor$rgb(0, 0, 255, _null), "blanchedalmond", A.SassColor$rgb(255, 235, 205, _null), "black", A.SassColor$rgb(0, 0, 0, _null), "bisque", A.SassColor$rgb(255, 228, 196, _null), "beige", A.SassColor$rgb(245, 245, 220, _null), "azure", A.SassColor$rgb(240, 255, 255, _null), "aquamarine", A.SassColor$rgb(127, 255, 212, _null), "aqua", A.SassColor$rgb(0, 255, 255, _null), "antiquewhite", A.SassColor$rgb(250, 235, 215, _null), "aliceblue", A.SassColor$rgb(240, 248, 255, _null)], type$.String, type$.SassColor); + }); + _lazyFinal($, "namesByColor", "$get$namesByColor", () => { + var t2, t3, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.SassColor, type$.String); + for (t2 = $.$get$colorsByName(), t2 = t2.get$entries(t2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.$indexSet(0, t3.value, t3.key); + } + return t1; + }); + _lazyFinal($, "ExecutableOptions__separatorBar", "$get$ExecutableOptions__separatorBar", () => A.isWindows() ? "=" : "\u2501"); + _lazyFinal($, "ExecutableOptions__parser", "$get$ExecutableOptions__parser", () => new A.ExecutableOptions__parser_closure().call$0()); + _lazyFinal($, "globalFunctions", "$get$globalFunctions", () => { + var t1 = type$.BuiltInCallable, + t2 = A.List_List$of($.$get$global0(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global1()); + B.JSArray_methods.addAll$1(t2, $.$get$global2()); + B.JSArray_methods.addAll$1(t2, $.$get$global3()); + B.JSArray_methods.addAll$1(t2, $.$get$global4()); + B.JSArray_methods.addAll$1(t2, $.$get$global5()); + B.JSArray_methods.addAll$1(t2, $.$get$global()); + t2.push(A.BuiltInCallable$function("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules", "$get$coreModules", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module(), $.$get$module0(), $.$get$module1(), $.$get$module2(), $.$get$module3(), $.$get$module4()], A.findType("JSArray>")), type$.BuiltInModule_BuiltInCallable)); + _lazyFinal($, "_microsoftFilterStart", "$get$_microsoftFilterStart", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global", "$get$global0", () => { + var _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_red(), $.$get$_green(), $.$get$_blue(), $.$get$_mix(), A.BuiltInCallable$overloadedFunction("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure(), _s19_, new A.global_closure0(), "$color, $alpha", new A.global_closure1(), "$channels", new A.global_closure2()], t1, t2)), A.BuiltInCallable$overloadedFunction("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure3(), _s19_, new A.global_closure4(), "$color, $alpha", new A.global_closure5(), "$channels", new A.global_closure6()], t1, t2)), A._function4("invert", "$color, $weight: 100%", new A.global_closure7()), $.$get$_hue(), $.$get$_saturation(), $.$get$_lightness(), $.$get$_complement(), A.BuiltInCallable$overloadedFunction("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure8(), _s29_, new A.global_closure9(), _s17_, new A.global_closure10(), "$channels", new A.global_closure11()], t1, t2)), A.BuiltInCallable$overloadedFunction("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure12(), _s29_, new A.global_closure13(), _s17_, new A.global_closure14(), "$channels", new A.global_closure15()], t1, t2)), A._function4("grayscale", "$color", new A.global_closure16()), A._function4("adjust-hue", "$color, $degrees", new A.global_closure17()), A._function4("lighten", _s15_, new A.global_closure18()), A._function4("darken", _s15_, new A.global_closure19()), A.BuiltInCallable$overloadedFunction("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure20(), "$color, $amount", new A.global_closure21()], t1, t2)), A._function4("desaturate", _s15_, new A.global_closure22()), A._function4("opacify", _s15_, A.color0___opacify$closure()), A._function4("fade-in", _s15_, A.color0___opacify$closure()), A._function4("transparentize", _s15_, A.color0___transparentize$closure()), A._function4("fade-out", _s15_, A.color0___transparentize$closure()), A.BuiltInCallable$overloadedFunction("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure23(), "$args...", new A.global_closure24()], t1, t2)), A._function4("opacity", "$color", new A.global_closure25()), $.$get$_ieHexStr(), $.$get$_adjust().withName$1("adjust-color"), $.$get$_scale().withName$1("scale-color"), $.$get$_change().withName$1("change-color")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module", "$get$module", () => { + var _s9_ = "lightness", + _s10_ = "saturation", + _s6_ = "$color", _s5_ = "alpha", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.BuiltInModule$("color", A._setArrayType([$.$get$_red(), $.$get$_green(), $.$get$_blue(), $.$get$_mix(), A._function4("invert", "$color, $weight: 100%", new A.module_closure()), $.$get$_hue(), $.$get$_saturation(), $.$get$_lightness(), $.$get$_complement(), A._removedColorFunction("adjust-hue", "hue", false), A._removedColorFunction("lighten", _s9_, false), A._removedColorFunction("darken", _s9_, true), A._removedColorFunction("saturate", _s10_, false), A._removedColorFunction("desaturate", _s10_, true), A._function4("grayscale", _s6_, new A.module_closure0()), A.BuiltInCallable$overloadedFunction("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure1(), "$channels", new A.module_closure2()], t1, t2)), A._function4("whiteness", _s6_, new A.module_closure3()), A._function4("blackness", _s6_, new A.module_closure4()), A._removedColorFunction("opacify", _s5_, false), A._removedColorFunction("fade-in", _s5_, false), A._removedColorFunction("transparentize", _s5_, true), A._removedColorFunction("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure5(), "$args...", new A.module_closure6()], t1, t2)), A._function4("opacity", _s6_, new A.module_closure7()), $.$get$_adjust(), $.$get$_scale(), $.$get$_change(), $.$get$_ieHexStr()], type$.JSArray_BuiltInCallable), null, null, type$.BuiltInCallable); + }); + _lazyFinal($, "_red", "$get$_red", () => A._function4("red", "$color", new A._red_closure())); + _lazyFinal($, "_green", "$get$_green", () => A._function4("green", "$color", new A._green_closure())); + _lazyFinal($, "_blue", "$get$_blue", () => A._function4("blue", "$color", new A._blue_closure())); + _lazyFinal($, "_mix", "$get$_mix", () => A._function4("mix", "$color1, $color2, $weight: 50%", new A._mix_closure())); + _lazyFinal($, "_hue", "$get$_hue", () => A._function4("hue", "$color", new A._hue_closure())); + _lazyFinal($, "_saturation", "$get$_saturation", () => A._function4("saturation", "$color", new A._saturation_closure())); + _lazyFinal($, "_lightness", "$get$_lightness", () => A._function4("lightness", "$color", new A._lightness_closure())); + _lazyFinal($, "_complement", "$get$_complement", () => A._function4("complement", "$color", new A._complement_closure())); + _lazyFinal($, "_adjust", "$get$_adjust", () => A._function4("adjust", "$color, $kwargs...", new A._adjust_closure())); + _lazyFinal($, "_scale", "$get$_scale", () => A._function4("scale", "$color, $kwargs...", new A._scale_closure())); + _lazyFinal($, "_change", "$get$_change", () => A._function4("change", "$color, $kwargs...", new A._change_closure())); + _lazyFinal($, "_ieHexStr", "$get$_ieHexStr", () => A._function4("ie-hex-str", "$color", new A._ieHexStr_closure())); + _lazyFinal($, "global0", "$get$global1", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_length0(), $.$get$_nth(), $.$get$_setNth(), $.$get$_join(), $.$get$_append0(), $.$get$_zip(), $.$get$_index0(), $.$get$_isBracketed(), $.$get$_separator().withName$1("list-separator")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "module0", "$get$module0", () => A.BuiltInModule$("list", A._setArrayType([$.$get$_length0(), $.$get$_nth(), $.$get$_setNth(), $.$get$_join(), $.$get$_append0(), $.$get$_zip(), $.$get$_index0(), $.$get$_isBracketed(), $.$get$_separator(), $.$get$_slash()], type$.JSArray_BuiltInCallable), null, null, type$.BuiltInCallable)); + _lazyFinal($, "_length", "$get$_length0", () => A._function3("length", "$list", new A._length_closure0())); + _lazyFinal($, "_nth", "$get$_nth", () => A._function3("nth", "$list, $n", new A._nth_closure())); + _lazyFinal($, "_setNth", "$get$_setNth", () => A._function3("set-nth", "$list, $n, $value", new A._setNth_closure())); + _lazyFinal($, "_join", "$get$_join", () => A._function3("join", string$.x24list1, new A._join_closure())); + _lazyFinal($, "_append", "$get$_append0", () => A._function3("append", "$list, $val, $separator: auto", new A._append_closure0())); + _lazyFinal($, "_zip", "$get$_zip", () => A._function3("zip", "$lists...", new A._zip_closure())); + _lazyFinal($, "_index", "$get$_index0", () => A._function3("index", "$list, $value", new A._index_closure0())); + _lazyFinal($, "_separator", "$get$_separator", () => A._function3("separator", "$list", new A._separator_closure())); + _lazyFinal($, "_isBracketed", "$get$_isBracketed", () => A._function3("is-bracketed", "$list", new A._isBracketed_closure())); + _lazyFinal($, "_slash", "$get$_slash", () => A._function3("slash", "$elements...", new A._slash_closure())); + _lazyFinal($, "global1", "$get$global2", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_get().withName$1("map-get"), $.$get$_merge().withName$1("map-merge"), $.$get$_remove().withName$1("map-remove"), $.$get$_keys().withName$1("map-keys"), $.$get$_values().withName$1("map-values"), $.$get$_hasKey().withName$1("map-has-key")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "module1", "$get$module1", () => A.BuiltInModule$("map", A._setArrayType([$.$get$_get(), $.$get$_set(), $.$get$_merge(), $.$get$_remove(), $.$get$_keys(), $.$get$_values(), $.$get$_hasKey(), $.$get$_deepMerge(), $.$get$_deepRemove()], type$.JSArray_BuiltInCallable), null, null, type$.BuiltInCallable)); + _lazyFinal($, "_get", "$get$_get", () => A._function2("get", "$map, $key, $keys...", new A._get_closure())); + _lazyFinal($, "_set", "$get$_set", () => A.BuiltInCallable$overloadedFunction("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure(), "$map, $args...", new A._set_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_merge", "$get$_merge", () => A.BuiltInCallable$overloadedFunction("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure(), "$map1, $args...", new A._merge_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_deepMerge", "$get$_deepMerge", () => A._function2("deep-merge", "$map1, $map2", new A._deepMerge_closure())); + _lazyFinal($, "_deepRemove", "$get$_deepRemove", () => A._function2("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure())); + _lazyFinal($, "_remove", "$get$_remove", () => A.BuiltInCallable$overloadedFunction("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure(), "$map, $key, $keys...", new A._remove_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_keys", "$get$_keys", () => A._function2("keys", "$map", new A._keys_closure())); + _lazyFinal($, "_values", "$get$_values", () => A._function2("values", "$map", new A._values_closure())); + _lazyFinal($, "_hasKey", "$get$_hasKey", () => A._function2("has-key", "$map, $key, $keys...", new A._hasKey_closure())); + _lazyFinal($, "global2", "$get$global3", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_abs(), $.$get$_ceil(), $.$get$_floor(), $.$get$_max(), $.$get$_min(), $.$get$_percentage(), $.$get$_randomFunction(), $.$get$_round(), $.$get$_unit(), $.$get$_compatible().withName$1("comparable"), $.$get$_isUnitless().withName$1("unitless")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "module2", "$get$module2", () => { + var _null = null; + return A.BuiltInModule$("math", A._setArrayType([$.$get$_abs(), $.$get$_acos(), $.$get$_asin(), $.$get$_atan(), $.$get$_atan2(), $.$get$_ceil(), $.$get$_clamp(), $.$get$_cos(), $.$get$_compatible(), $.$get$_floor(), $.$get$_hypot(), $.$get$_isUnitless(), $.$get$_log(), $.$get$_max(), $.$get$_min(), $.$get$_percentage(), $.$get$_pow(), $.$get$_randomFunction(), $.$get$_round(), $.$get$_sin(), $.$get$_sqrt(), $.$get$_tan(), $.$get$_unit(), $.$get$_div()], type$.JSArray_BuiltInCallable), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber(2.718281828459045, _null), "pi", A.SassNumber_SassNumber(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber(5e-324, _null)], type$.String, type$.Value), type$.BuiltInCallable); + }); + _lazyFinal($, "_ceil", "$get$_ceil", () => A._numberFunction("ceil", new A._ceil_closure())); + _lazyFinal($, "_clamp", "$get$_clamp", () => A._function1("clamp", "$min, $number, $max", new A._clamp_closure())); + _lazyFinal($, "_floor", "$get$_floor", () => A._numberFunction("floor", new A._floor_closure())); + _lazyFinal($, "_max", "$get$_max", () => A._function1("max", "$numbers...", new A._max_closure())); + _lazyFinal($, "_min", "$get$_min", () => A._function1("min", "$numbers...", new A._min_closure())); + _lazyFinal($, "_round", "$get$_round", () => A._numberFunction("round", new A._round_closure())); + _lazyFinal($, "_abs", "$get$_abs", () => A._numberFunction("abs", new A._abs_closure())); + _lazyFinal($, "_hypot", "$get$_hypot", () => A._function1("hypot", "$numbers...", new A._hypot_closure())); + _lazyFinal($, "_log", "$get$_log", () => A._function1("log", "$number, $base: null", new A._log_closure())); + _lazyFinal($, "_pow", "$get$_pow", () => A._function1("pow", "$base, $exponent", new A._pow_closure())); + _lazyFinal($, "_sqrt", "$get$_sqrt", () => A._function1("sqrt", "$number", new A._sqrt_closure())); + _lazyFinal($, "_acos", "$get$_acos", () => A._function1("acos", "$number", new A._acos_closure())); + _lazyFinal($, "_asin", "$get$_asin", () => A._function1("asin", "$number", new A._asin_closure())); + _lazyFinal($, "_atan", "$get$_atan", () => A._function1("atan", "$number", new A._atan_closure())); + _lazyFinal($, "_atan2", "$get$_atan2", () => A._function1("atan2", "$y, $x", new A._atan2_closure())); + _lazyFinal($, "_cos", "$get$_cos", () => A._function1("cos", "$number", new A._cos_closure())); + _lazyFinal($, "_sin", "$get$_sin", () => A._function1("sin", "$number", new A._sin_closure())); + _lazyFinal($, "_tan", "$get$_tan", () => A._function1("tan", "$number", new A._tan_closure())); + _lazyFinal($, "_compatible", "$get$_compatible", () => A._function1("compatible", "$number1, $number2", new A._compatible_closure())); + _lazyFinal($, "_isUnitless", "$get$_isUnitless", () => A._function1("is-unitless", "$number", new A._isUnitless_closure())); + _lazyFinal($, "_unit", "$get$_unit", () => A._function1("unit", "$number", new A._unit_closure())); + _lazyFinal($, "_percentage", "$get$_percentage", () => A._function1("percentage", "$number", new A._percentage_closure())); + _lazyFinal($, "_random", "$get$_random0", () => A.Random_Random()); + _lazyFinal($, "_randomFunction", "$get$_randomFunction", () => A._function1("random", "$limit: null", new A._randomFunction_closure())); + _lazyFinal($, "_div", "$get$_div", () => A._function1("div", "$number1, $number2", new A._div_closure())); + _lazyFinal($, "global3", "$get$global", () => A.UnmodifiableListView$(A._setArrayType([A._function5("feature-exists", "$feature", new A.global_closure26()), A._function5("inspect", "$value", new A.global_closure27()), A._function5("type-of", "$value", new A.global_closure28()), A._function5("keywords", "$args", new A.global_closure29())], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "local", "$get$local", () => A.UnmodifiableListView$(A._setArrayType([A._function5("calc-name", "$calc", new A.local_closure()), A._function5("calc-args", "$calc", new A.local_closure0())], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "global4", "$get$global4", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector(), $.$get$_simpleSelectors(), $.$get$_parse().withName$1("selector-parse"), $.$get$_nest().withName$1("selector-nest"), $.$get$_append().withName$1("selector-append"), $.$get$_extend().withName$1("selector-extend"), $.$get$_replace().withName$1("selector-replace"), $.$get$_unify().withName$1("selector-unify")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "module3", "$get$module3", () => A.BuiltInModule$("selector", A._setArrayType([$.$get$_isSuperselector(), $.$get$_simpleSelectors(), $.$get$_parse(), $.$get$_nest(), $.$get$_append(), $.$get$_extend(), $.$get$_replace(), $.$get$_unify()], type$.JSArray_BuiltInCallable), null, null, type$.BuiltInCallable)); + _lazyFinal($, "_nest", "$get$_nest", () => A._function0("nest", "$selectors...", new A._nest_closure())); + _lazyFinal($, "_append0", "$get$_append", () => A._function0("append", "$selectors...", new A._append_closure())); + _lazyFinal($, "_extend", "$get$_extend", () => A._function0("extend", "$selector, $extendee, $extender", new A._extend_closure())); + _lazyFinal($, "_replace", "$get$_replace", () => A._function0("replace", "$selector, $original, $replacement", new A._replace_closure())); + _lazyFinal($, "_unify", "$get$_unify", () => A._function0("unify", "$selector1, $selector2", new A._unify_closure())); + _lazyFinal($, "_isSuperselector", "$get$_isSuperselector", () => A._function0("is-superselector", "$super, $sub", new A._isSuperselector_closure())); + _lazyFinal($, "_simpleSelectors", "$get$_simpleSelectors", () => A._function0("simple-selectors", "$selector", new A._simpleSelectors_closure())); + _lazyFinal($, "_parse", "$get$_parse", () => A._function0("parse", "$selector", new A._parse_closure())); + _lazyFinal($, "_random0", "$get$_random", () => A.Random_Random()); + _lazy($, "_previousUniqueId", "$get$_previousUniqueId", () => $.$get$_random().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global5", "$get$global5", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote(), $.$get$_quote(), $.$get$_toUpperCase(), $.$get$_toLowerCase(), $.$get$_uniqueId(), $.$get$_length().withName$1("str-length"), $.$get$_insert().withName$1("str-insert"), $.$get$_index().withName$1("str-index"), $.$get$_slice().withName$1("str-slice")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "module4", "$get$module4", () => A.BuiltInModule$("string", A._setArrayType([$.$get$_unquote(), $.$get$_quote(), $.$get$_toUpperCase(), $.$get$_toLowerCase(), $.$get$_length(), $.$get$_insert(), $.$get$_index(), $.$get$_slice(), $.$get$_uniqueId()], type$.JSArray_BuiltInCallable), null, null, type$.BuiltInCallable)); + _lazyFinal($, "_unquote", "$get$_unquote", () => A._function("unquote", "$string", new A._unquote_closure())); + _lazyFinal($, "_quote", "$get$_quote", () => A._function("quote", "$string", new A._quote_closure())); + _lazyFinal($, "_length0", "$get$_length", () => A._function("length", "$string", new A._length_closure())); + _lazyFinal($, "_insert", "$get$_insert", () => A._function("insert", "$string, $insert, $index", new A._insert_closure())); + _lazyFinal($, "_index0", "$get$_index", () => A._function("index", "$string, $substring", new A._index_closure())); + _lazyFinal($, "_slice", "$get$_slice", () => A._function("slice", "$string, $start-at, $end-at: -1", new A._slice_closure())); + _lazyFinal($, "_toUpperCase", "$get$_toUpperCase", () => A._function("to-upper-case", "$string", new A._toUpperCase_closure())); + _lazyFinal($, "_toLowerCase", "$get$_toLowerCase", () => A._function("to-lower-case", "$string", new A._toLowerCase_closure())); + _lazyFinal($, "_uniqueId", "$get$_uniqueId", () => A._function("unique-id", "", new A._uniqueId_closure())); + _lazyFinal($, "stderr", "$get$stderr", () => new A.Stderr(J.get$stderr$x(self.process))); + _lazyFinal($, "Logger_quiet", "$get$Logger_quiet", () => new A._QuietLogger()); + _lazyFinal($, "_disallowedFunctionNames", "$get$_disallowedFunctionNames", () => { + var t1 = $.$get$globalFunctions(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure(), type$.String).toSet$0(0); + t1.add$1(0, "if"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "saturate"); + return t1; + }); + _lazyFinal($, "_epsilon", "$get$_epsilon", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon", "$get$_inverseEpsilon", () => A.pow(10, 11)); + _lazyFinal($, "_noSourceUrl", "$get$_noSourceUrl", () => A.Uri_parse("-")); + _lazyFinal($, "_traces", "$get$_traces", () => A.Expando$()); + _lazyFinal($, "_typesByUnit", "$get$_typesByUnit", () => { + var t2, t3, t4, + t1 = type$.String; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = B.Map_U8AHF.get$entries(B.Map_U8AHF), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + for (t4 = J.get$iterator$ax(t3.value), t3 = t3.key; t4.moveNext$0();) + t1.$indexSet(0, t4.get$current(t4), t3); + } + return t1; + }); + _lazyFinal($, "_knownCompatibilitiesByUnit", "$get$_knownCompatibilitiesByUnit", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_AqW[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(t2), set); + } + return t1; + }); + _lazyFinal($, "_emptyQuoted", "$get$_emptyQuoted", () => A.SassString$("", true)); + _lazyFinal($, "_emptyUnquoted", "$get$_emptyUnquoted", () => A.SassString$("", false)); + _lazyFinal($, "MAX_INT32", "$get$MAX_INT32", () => A._asInt(A.pow(2, 31)) - 1); + _lazyFinal($, "MIN_INT32", "$get$MIN_INT32", () => -A._asInt(A.pow(2, 31))); + _lazyFinal($, "_vmFrame", "$get$_vmFrame", () => A.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false)); + _lazyFinal($, "_v8Frame", "$get$_v8Frame", () => A.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false)); + _lazyFinal($, "_v8UrlLocation", "$get$_v8UrlLocation", () => A.RegExp_RegExp("^(.*?):(\\d+)(?::(\\d+))?$|native$", false)); + _lazyFinal($, "_v8EvalLocation", "$get$_v8EvalLocation", () => A.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false)); + _lazyFinal($, "_firefoxEvalLocation", "$get$_firefoxEvalLocation", () => A.RegExp_RegExp("(\\S+)@(\\S+) line (\\d+) >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariFrame", "$get$_firefoxSafariFrame", () => A.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false)); + _lazyFinal($, "_friendlyFrame", "$get$_friendlyFrame", () => A.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false)); + _lazyFinal($, "_asyncBody", "$get$_asyncBody", () => A.RegExp_RegExp("<(|[^>]+)_async_body>", false)); + _lazyFinal($, "_initialDot", "$get$_initialDot", () => A.RegExp_RegExp("^\\.", false)); + _lazyFinal($, "Frame__uriRegExp", "$get$Frame__uriRegExp", () => A.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false)); + _lazyFinal($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", () => A.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false)); + _lazyFinal($, "_terseRegExp", "$get$_terseRegExp", () => A.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false)); + _lazyFinal($, "_v8Trace", "$get$_v8Trace", () => A.RegExp_RegExp("\\n ?at ", false)); + _lazyFinal($, "_v8TraceLine", "$get$_v8TraceLine", () => A.RegExp_RegExp(" ?at ", false)); + _lazyFinal($, "_firefoxEvalTrace", "$get$_firefoxEvalTrace", () => A.RegExp_RegExp("@\\S+ line \\d+ >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", () => A.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true)); + _lazyFinal($, "_friendlyTrace", "$get$_friendlyTrace", () => A.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true)); + _lazyFinal($, "vmChainGap", "$get$vmChainGap", () => A.RegExp_RegExp("^\\n?$", true)); + _lazyFinal($, "_newlineRegExp", "$get$_newlineRegExp", () => A.RegExp_RegExp("\\r\\n?|\\n", false)); + _lazyFinal($, "argumentListClass", "$get$argumentListClass", () => new A.argumentListClass_closure().call$0()); + _lazyFinal($, "_filesystemImporter", "$get$_filesystemImporter", () => A.FilesystemImporter$(".")); + _lazyFinal($, "legacyBooleanClass", "$get$legacyBooleanClass", () => new A.legacyBooleanClass_closure().call$0()); + _lazyFinal($, "booleanClass", "$get$booleanClass", () => new A.booleanClass_closure().call$0()); + _lazyFinal($, "_microsoftFilterStart0", "$get$_microsoftFilterStart0", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global6", "$get$global7", () => { + var _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_red0(), $.$get$_green0(), $.$get$_blue0(), $.$get$_mix0(), A.BuiltInCallable$overloadedFunction0("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure30(), _s19_, new A.global_closure31(), "$color, $alpha", new A.global_closure32(), "$channels", new A.global_closure33()], t1, t2)), A.BuiltInCallable$overloadedFunction0("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure34(), _s19_, new A.global_closure35(), "$color, $alpha", new A.global_closure36(), "$channels", new A.global_closure37()], t1, t2)), A._function11("invert", "$color, $weight: 100%", new A.global_closure38()), $.$get$_hue0(), $.$get$_saturation0(), $.$get$_lightness0(), $.$get$_complement0(), A.BuiltInCallable$overloadedFunction0("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure39(), _s29_, new A.global_closure40(), _s17_, new A.global_closure41(), "$channels", new A.global_closure42()], t1, t2)), A.BuiltInCallable$overloadedFunction0("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure43(), _s29_, new A.global_closure44(), _s17_, new A.global_closure45(), "$channels", new A.global_closure46()], t1, t2)), A._function11("grayscale", "$color", new A.global_closure47()), A._function11("adjust-hue", "$color, $degrees", new A.global_closure48()), A._function11("lighten", _s15_, new A.global_closure49()), A._function11("darken", _s15_, new A.global_closure50()), A.BuiltInCallable$overloadedFunction0("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure51(), "$color, $amount", new A.global_closure52()], t1, t2)), A._function11("desaturate", _s15_, new A.global_closure53()), A._function11("opacify", _s15_, A.color2___opacify$closure()), A._function11("fade-in", _s15_, A.color2___opacify$closure()), A._function11("transparentize", _s15_, A.color2___transparentize$closure()), A._function11("fade-out", _s15_, A.color2___transparentize$closure()), A.BuiltInCallable$overloadedFunction0("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure54(), "$args...", new A.global_closure55()], t1, t2)), A._function11("opacity", "$color", new A.global_closure56()), $.$get$_ieHexStr0(), $.$get$_adjust0().withName$1("adjust-color"), $.$get$_scale0().withName$1("scale-color"), $.$get$_change0().withName$1("change-color")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module5", "$get$module5", () => { + var _s9_ = "lightness", + _s10_ = "saturation", + _s6_ = "$color", _s5_ = "alpha", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.BuiltInModule$0("color", A._setArrayType([$.$get$_red0(), $.$get$_green0(), $.$get$_blue0(), $.$get$_mix0(), A._function11("invert", "$color, $weight: 100%", new A.module_closure8()), $.$get$_hue0(), $.$get$_saturation0(), $.$get$_lightness0(), $.$get$_complement0(), A._removedColorFunction0("adjust-hue", "hue", false), A._removedColorFunction0("lighten", _s9_, false), A._removedColorFunction0("darken", _s9_, true), A._removedColorFunction0("saturate", _s10_, false), A._removedColorFunction0("desaturate", _s10_, true), A._function11("grayscale", _s6_, new A.module_closure9()), A.BuiltInCallable$overloadedFunction0("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure10(), "$channels", new A.module_closure11()], t1, t2)), A._function11("whiteness", _s6_, new A.module_closure12()), A._function11("blackness", _s6_, new A.module_closure13()), A._removedColorFunction0("opacify", _s5_, false), A._removedColorFunction0("fade-in", _s5_, false), A._removedColorFunction0("transparentize", _s5_, true), A._removedColorFunction0("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction0(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure14(), "$args...", new A.module_closure15()], t1, t2)), A._function11("opacity", _s6_, new A.module_closure16()), $.$get$_adjust0(), $.$get$_scale0(), $.$get$_change0(), $.$get$_ieHexStr0()], type$.JSArray_BuiltInCallable_2), null, null, type$.BuiltInCallable_2); + }); + _lazyFinal($, "_red0", "$get$_red0", () => A._function11("red", "$color", new A._red_closure0())); + _lazyFinal($, "_green0", "$get$_green0", () => A._function11("green", "$color", new A._green_closure0())); + _lazyFinal($, "_blue0", "$get$_blue0", () => A._function11("blue", "$color", new A._blue_closure0())); + _lazyFinal($, "_mix0", "$get$_mix0", () => A._function11("mix", "$color1, $color2, $weight: 50%", new A._mix_closure0())); + _lazyFinal($, "_hue0", "$get$_hue0", () => A._function11("hue", "$color", new A._hue_closure0())); + _lazyFinal($, "_saturation0", "$get$_saturation0", () => A._function11("saturation", "$color", new A._saturation_closure0())); + _lazyFinal($, "_lightness0", "$get$_lightness0", () => A._function11("lightness", "$color", new A._lightness_closure0())); + _lazyFinal($, "_complement0", "$get$_complement0", () => A._function11("complement", "$color", new A._complement_closure0())); + _lazyFinal($, "_adjust0", "$get$_adjust0", () => A._function11("adjust", "$color, $kwargs...", new A._adjust_closure0())); + _lazyFinal($, "_scale0", "$get$_scale0", () => A._function11("scale", "$color, $kwargs...", new A._scale_closure0())); + _lazyFinal($, "_change0", "$get$_change0", () => A._function11("change", "$color, $kwargs...", new A._change_closure0())); + _lazyFinal($, "_ieHexStr0", "$get$_ieHexStr0", () => A._function11("ie-hex-str", "$color", new A._ieHexStr_closure0())); + _lazyFinal($, "legacyColorClass", "$get$legacyColorClass", () => { + var t1 = A.createJSClass("sass.types.Color", new A.legacyColorClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getR", new A.legacyColorClass_closure0(), "getG", new A.legacyColorClass_closure1(), "getB", new A.legacyColorClass_closure2(), "getA", new A.legacyColorClass_closure3(), "setR", new A.legacyColorClass_closure4(), "setG", new A.legacyColorClass_closure5(), "setB", new A.legacyColorClass_closure6(), "setA", new A.legacyColorClass_closure7()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "colorClass", "$get$colorClass", () => new A.colorClass_closure().call$0()); + _lazyFinal($, "colorsByName0", "$get$colorsByName0", () => { + var _null = null; + return A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor$rgb0(154, 205, 50, _null), "yellow", A.SassColor$rgb0(255, 255, 0, _null), "whitesmoke", A.SassColor$rgb0(245, 245, 245, _null), "white", A.SassColor$rgb0(255, 255, 255, _null), "wheat", A.SassColor$rgb0(245, 222, 179, _null), "violet", A.SassColor$rgb0(238, 130, 238, _null), "turquoise", A.SassColor$rgb0(64, 224, 208, _null), "transparent", A.SassColor$rgb0(0, 0, 0, 0), "tomato", A.SassColor$rgb0(255, 99, 71, _null), "thistle", A.SassColor$rgb0(216, 191, 216, _null), "teal", A.SassColor$rgb0(0, 128, 128, _null), "tan", A.SassColor$rgb0(210, 180, 140, _null), "steelblue", A.SassColor$rgb0(70, 130, 180, _null), "springgreen", A.SassColor$rgb0(0, 255, 127, _null), "snow", A.SassColor$rgb0(255, 250, 250, _null), "slategrey", A.SassColor$rgb0(112, 128, 144, _null), "slategray", A.SassColor$rgb0(112, 128, 144, _null), "slateblue", A.SassColor$rgb0(106, 90, 205, _null), "skyblue", A.SassColor$rgb0(135, 206, 235, _null), "silver", A.SassColor$rgb0(192, 192, 192, _null), "sienna", A.SassColor$rgb0(160, 82, 45, _null), "seashell", A.SassColor$rgb0(255, 245, 238, _null), "seagreen", A.SassColor$rgb0(46, 139, 87, _null), "sandybrown", A.SassColor$rgb0(244, 164, 96, _null), "salmon", A.SassColor$rgb0(250, 128, 114, _null), "saddlebrown", A.SassColor$rgb0(139, 69, 19, _null), "royalblue", A.SassColor$rgb0(65, 105, 225, _null), "rosybrown", A.SassColor$rgb0(188, 143, 143, _null), "red", A.SassColor$rgb0(255, 0, 0, _null), "rebeccapurple", A.SassColor$rgb0(102, 51, 153, _null), "purple", A.SassColor$rgb0(128, 0, 128, _null), "powderblue", A.SassColor$rgb0(176, 224, 230, _null), "plum", A.SassColor$rgb0(221, 160, 221, _null), "pink", A.SassColor$rgb0(255, 192, 203, _null), "peru", A.SassColor$rgb0(205, 133, 63, _null), "peachpuff", A.SassColor$rgb0(255, 218, 185, _null), "papayawhip", A.SassColor$rgb0(255, 239, 213, _null), "palevioletred", A.SassColor$rgb0(219, 112, 147, _null), "paleturquoise", A.SassColor$rgb0(175, 238, 238, _null), "palegreen", A.SassColor$rgb0(152, 251, 152, _null), "palegoldenrod", A.SassColor$rgb0(238, 232, 170, _null), "orchid", A.SassColor$rgb0(218, 112, 214, _null), "orangered", A.SassColor$rgb0(255, 69, 0, _null), "orange", A.SassColor$rgb0(255, 165, 0, _null), "olivedrab", A.SassColor$rgb0(107, 142, 35, _null), "olive", A.SassColor$rgb0(128, 128, 0, _null), "oldlace", A.SassColor$rgb0(253, 245, 230, _null), "navy", A.SassColor$rgb0(0, 0, 128, _null), "navajowhite", A.SassColor$rgb0(255, 222, 173, _null), "moccasin", A.SassColor$rgb0(255, 228, 181, _null), "mistyrose", A.SassColor$rgb0(255, 228, 225, _null), "mintcream", A.SassColor$rgb0(245, 255, 250, _null), "midnightblue", A.SassColor$rgb0(25, 25, 112, _null), "mediumvioletred", A.SassColor$rgb0(199, 21, 133, _null), "mediumturquoise", A.SassColor$rgb0(72, 209, 204, _null), "mediumspringgreen", A.SassColor$rgb0(0, 250, 154, _null), "mediumslateblue", A.SassColor$rgb0(123, 104, 238, _null), "mediumseagreen", A.SassColor$rgb0(60, 179, 113, _null), "mediumpurple", A.SassColor$rgb0(147, 112, 219, _null), "mediumorchid", A.SassColor$rgb0(186, 85, 211, _null), "mediumblue", A.SassColor$rgb0(0, 0, 205, _null), "mediumaquamarine", A.SassColor$rgb0(102, 205, 170, _null), "maroon", A.SassColor$rgb0(128, 0, 0, _null), "magenta", A.SassColor$rgb0(255, 0, 255, _null), "linen", A.SassColor$rgb0(250, 240, 230, _null), "limegreen", A.SassColor$rgb0(50, 205, 50, _null), "lime", A.SassColor$rgb0(0, 255, 0, _null), "lightyellow", A.SassColor$rgb0(255, 255, 224, _null), "lightsteelblue", A.SassColor$rgb0(176, 196, 222, _null), "lightslategrey", A.SassColor$rgb0(119, 136, 153, _null), "lightslategray", A.SassColor$rgb0(119, 136, 153, _null), "lightskyblue", A.SassColor$rgb0(135, 206, 250, _null), "lightseagreen", A.SassColor$rgb0(32, 178, 170, _null), "lightsalmon", A.SassColor$rgb0(255, 160, 122, _null), "lightpink", A.SassColor$rgb0(255, 182, 193, _null), "lightgrey", A.SassColor$rgb0(211, 211, 211, _null), "lightgreen", A.SassColor$rgb0(144, 238, 144, _null), "lightgray", A.SassColor$rgb0(211, 211, 211, _null), "lightgoldenrodyellow", A.SassColor$rgb0(250, 250, 210, _null), "lightcyan", A.SassColor$rgb0(224, 255, 255, _null), "lightcoral", A.SassColor$rgb0(240, 128, 128, _null), "lightblue", A.SassColor$rgb0(173, 216, 230, _null), "lemonchiffon", A.SassColor$rgb0(255, 250, 205, _null), "lawngreen", A.SassColor$rgb0(124, 252, 0, _null), "lavenderblush", A.SassColor$rgb0(255, 240, 245, _null), "lavender", A.SassColor$rgb0(230, 230, 250, _null), "khaki", A.SassColor$rgb0(240, 230, 140, _null), "ivory", A.SassColor$rgb0(255, 255, 240, _null), "indigo", A.SassColor$rgb0(75, 0, 130, _null), "indianred", A.SassColor$rgb0(205, 92, 92, _null), "hotpink", A.SassColor$rgb0(255, 105, 180, _null), "honeydew", A.SassColor$rgb0(240, 255, 240, _null), "grey", A.SassColor$rgb0(128, 128, 128, _null), "greenyellow", A.SassColor$rgb0(173, 255, 47, _null), "green", A.SassColor$rgb0(0, 128, 0, _null), "gray", A.SassColor$rgb0(128, 128, 128, _null), "goldenrod", A.SassColor$rgb0(218, 165, 32, _null), "gold", A.SassColor$rgb0(255, 215, 0, _null), "ghostwhite", A.SassColor$rgb0(248, 248, 255, _null), "gainsboro", A.SassColor$rgb0(220, 220, 220, _null), "fuchsia", A.SassColor$rgb0(255, 0, 255, _null), "forestgreen", A.SassColor$rgb0(34, 139, 34, _null), "floralwhite", A.SassColor$rgb0(255, 250, 240, _null), "firebrick", A.SassColor$rgb0(178, 34, 34, _null), "dodgerblue", A.SassColor$rgb0(30, 144, 255, _null), "dimgrey", A.SassColor$rgb0(105, 105, 105, _null), "dimgray", A.SassColor$rgb0(105, 105, 105, _null), "deepskyblue", A.SassColor$rgb0(0, 191, 255, _null), "deeppink", A.SassColor$rgb0(255, 20, 147, _null), "darkviolet", A.SassColor$rgb0(148, 0, 211, _null), "darkturquoise", A.SassColor$rgb0(0, 206, 209, _null), "darkslategrey", A.SassColor$rgb0(47, 79, 79, _null), "darkslategray", A.SassColor$rgb0(47, 79, 79, _null), "darkslateblue", A.SassColor$rgb0(72, 61, 139, _null), "darkseagreen", A.SassColor$rgb0(143, 188, 143, _null), "darksalmon", A.SassColor$rgb0(233, 150, 122, _null), "darkred", A.SassColor$rgb0(139, 0, 0, _null), "darkorchid", A.SassColor$rgb0(153, 50, 204, _null), "darkorange", A.SassColor$rgb0(255, 140, 0, _null), "darkolivegreen", A.SassColor$rgb0(85, 107, 47, _null), "darkmagenta", A.SassColor$rgb0(139, 0, 139, _null), "darkkhaki", A.SassColor$rgb0(189, 183, 107, _null), "darkgrey", A.SassColor$rgb0(169, 169, 169, _null), "darkgreen", A.SassColor$rgb0(0, 100, 0, _null), "darkgray", A.SassColor$rgb0(169, 169, 169, _null), "darkgoldenrod", A.SassColor$rgb0(184, 134, 11, _null), "darkcyan", A.SassColor$rgb0(0, 139, 139, _null), "darkblue", A.SassColor$rgb0(0, 0, 139, _null), "cyan", A.SassColor$rgb0(0, 255, 255, _null), "crimson", A.SassColor$rgb0(220, 20, 60, _null), "cornsilk", A.SassColor$rgb0(255, 248, 220, _null), "cornflowerblue", A.SassColor$rgb0(100, 149, 237, _null), "coral", A.SassColor$rgb0(255, 127, 80, _null), "chocolate", A.SassColor$rgb0(210, 105, 30, _null), "chartreuse", A.SassColor$rgb0(127, 255, 0, _null), "cadetblue", A.SassColor$rgb0(95, 158, 160, _null), "burlywood", A.SassColor$rgb0(222, 184, 135, _null), "brown", A.SassColor$rgb0(165, 42, 42, _null), "blueviolet", A.SassColor$rgb0(138, 43, 226, _null), "blue", A.SassColor$rgb0(0, 0, 255, _null), "blanchedalmond", A.SassColor$rgb0(255, 235, 205, _null), "black", A.SassColor$rgb0(0, 0, 0, _null), "bisque", A.SassColor$rgb0(255, 228, 196, _null), "beige", A.SassColor$rgb0(245, 245, 220, _null), "azure", A.SassColor$rgb0(240, 255, 255, _null), "aquamarine", A.SassColor$rgb0(127, 255, 212, _null), "aqua", A.SassColor$rgb0(0, 255, 255, _null), "antiquewhite", A.SassColor$rgb0(250, 235, 215, _null), "aliceblue", A.SassColor$rgb0(240, 248, 255, _null)], type$.String, type$.SassColor_2); + }); + _lazyFinal($, "namesByColor0", "$get$namesByColor0", () => { + var t2, t3, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.SassColor_2, type$.String); + for (t2 = $.$get$colorsByName0(), t2 = t2.get$entries(t2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.$indexSet(0, t3.value, t3.key); + } + return t1; + }); + _lazyFinal($, "_disallowedFunctionNames0", "$get$_disallowedFunctionNames0", () => { + var t1 = $.$get$globalFunctions0(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure0(), type$.String).toSet$0(0); + t1.add$1(0, "if"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "saturate"); + return t1; + }); + _lazyFinal($, "exceptionClass", "$get$exceptionClass", () => new A.exceptionClass_closure().call$0()); + _lazyFinal($, "_filesystemImporter0", "$get$_filesystemImporter0", () => A.FilesystemImporter$(".")); + _lazyFinal($, "functionClass", "$get$functionClass", () => new A.functionClass_closure().call$0()); + _lazyFinal($, "globalFunctions0", "$get$globalFunctions0", () => { + var t1 = type$.BuiltInCallable_2, + t2 = A.List_List$of($.$get$global7(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global8()); + B.JSArray_methods.addAll$1(t2, $.$get$global9()); + B.JSArray_methods.addAll$1(t2, $.$get$global10()); + B.JSArray_methods.addAll$1(t2, $.$get$global11()); + B.JSArray_methods.addAll$1(t2, $.$get$global12()); + B.JSArray_methods.addAll$1(t2, $.$get$global6()); + t2.push(A.BuiltInCallable$function0("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure0(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules0", "$get$coreModules0", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module5(), $.$get$module6(), $.$get$module7(), $.$get$module8(), $.$get$module9(), $.$get$module10()], A.findType("JSArray>")), type$.BuiltInModule_BuiltInCallable_2)); + _lazyFinal($, "IfExpression_declaration0", "$get$IfExpression_declaration0", () => A.ArgumentDeclaration_ArgumentDeclaration$parse0(string$.x40funct, null)); + _lazyFinal($, "global7", "$get$global8", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_length2(), $.$get$_nth0(), $.$get$_setNth0(), $.$get$_join0(), $.$get$_append2(), $.$get$_zip0(), $.$get$_index2(), $.$get$_isBracketed0(), $.$get$_separator0().withName$1("list-separator")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "module6", "$get$module6", () => A.BuiltInModule$0("list", A._setArrayType([$.$get$_length2(), $.$get$_nth0(), $.$get$_setNth0(), $.$get$_join0(), $.$get$_append2(), $.$get$_zip0(), $.$get$_index2(), $.$get$_isBracketed0(), $.$get$_separator0(), $.$get$_slash0()], type$.JSArray_BuiltInCallable_2), null, null, type$.BuiltInCallable_2)); + _lazyFinal($, "_length1", "$get$_length2", () => A._function10("length", "$list", new A._length_closure2())); + _lazyFinal($, "_nth0", "$get$_nth0", () => A._function10("nth", "$list, $n", new A._nth_closure0())); + _lazyFinal($, "_setNth0", "$get$_setNth0", () => A._function10("set-nth", "$list, $n, $value", new A._setNth_closure0())); + _lazyFinal($, "_join0", "$get$_join0", () => A._function10("join", string$.x24list1, new A._join_closure0())); + _lazyFinal($, "_append1", "$get$_append2", () => A._function10("append", "$list, $val, $separator: auto", new A._append_closure2())); + _lazyFinal($, "_zip0", "$get$_zip0", () => A._function10("zip", "$lists...", new A._zip_closure0())); + _lazyFinal($, "_index1", "$get$_index2", () => A._function10("index", "$list, $value", new A._index_closure2())); + _lazyFinal($, "_separator0", "$get$_separator0", () => A._function10("separator", "$list", new A._separator_closure0())); + _lazyFinal($, "_isBracketed0", "$get$_isBracketed0", () => A._function10("is-bracketed", "$list", new A._isBracketed_closure0())); + _lazyFinal($, "_slash0", "$get$_slash0", () => A._function10("slash", "$elements...", new A._slash_closure0())); + _lazyFinal($, "legacyListClass", "$get$legacyListClass", () => { + var t1 = A.createJSClass("sass.types.List", new A.legacyListClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyListClass_closure0(), "setValue", new A.legacyListClass_closure1(), "getSeparator", new A.legacyListClass_closure2(), "setSeparator", new A.legacyListClass_closure3(), "getLength", new A.legacyListClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "listClass", "$get$listClass", () => new A.listClass_closure().call$0()); + _lazyFinal($, "Logger_quiet0", "$get$Logger_quiet0", () => new A._QuietLogger0()); + _lazyFinal($, "global8", "$get$global9", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_get0().withName$1("map-get"), $.$get$_merge0().withName$1("map-merge"), $.$get$_remove0().withName$1("map-remove"), $.$get$_keys0().withName$1("map-keys"), $.$get$_values0().withName$1("map-values"), $.$get$_hasKey0().withName$1("map-has-key")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "module7", "$get$module7", () => A.BuiltInModule$0("map", A._setArrayType([$.$get$_get0(), $.$get$_set0(), $.$get$_merge0(), $.$get$_remove0(), $.$get$_keys0(), $.$get$_values0(), $.$get$_hasKey0(), $.$get$_deepMerge0(), $.$get$_deepRemove0()], type$.JSArray_BuiltInCallable_2), null, null, type$.BuiltInCallable_2)); + _lazyFinal($, "_get0", "$get$_get0", () => A._function9("get", "$map, $key, $keys...", new A._get_closure0())); + _lazyFinal($, "_set0", "$get$_set0", () => A.BuiltInCallable$overloadedFunction0("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure1(), "$map, $args...", new A._set_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_merge0", "$get$_merge0", () => A.BuiltInCallable$overloadedFunction0("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure1(), "$map1, $args...", new A._merge_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_deepMerge0", "$get$_deepMerge0", () => A._function9("deep-merge", "$map1, $map2", new A._deepMerge_closure0())); + _lazyFinal($, "_deepRemove0", "$get$_deepRemove0", () => A._function9("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure0())); + _lazyFinal($, "_remove0", "$get$_remove0", () => A.BuiltInCallable$overloadedFunction0("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure1(), "$map, $key, $keys...", new A._remove_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_keys0", "$get$_keys0", () => A._function9("keys", "$map", new A._keys_closure0())); + _lazyFinal($, "_values0", "$get$_values0", () => A._function9("values", "$map", new A._values_closure0())); + _lazyFinal($, "_hasKey0", "$get$_hasKey0", () => A._function9("has-key", "$map, $key, $keys...", new A._hasKey_closure0())); + _lazyFinal($, "legacyMapClass", "$get$legacyMapClass", () => { + var t1 = A.createJSClass("sass.types.Map", new A.legacyMapClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getKey", new A.legacyMapClass_closure0(), "getValue", new A.legacyMapClass_closure1(), "getLength", new A.legacyMapClass_closure2(), "setKey", new A.legacyMapClass_closure3(), "setValue", new A.legacyMapClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "mapClass", "$get$mapClass", () => new A.mapClass_closure().call$0()); + _lazyFinal($, "global9", "$get$global10", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_abs0(), $.$get$_ceil0(), $.$get$_floor0(), $.$get$_max0(), $.$get$_min0(), $.$get$_percentage0(), $.$get$_randomFunction0(), $.$get$_round0(), $.$get$_unit0(), $.$get$_compatible0().withName$1("comparable"), $.$get$_isUnitless0().withName$1("unitless")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "module8", "$get$module8", () => { + var _null = null; + return A.BuiltInModule$0("math", A._setArrayType([$.$get$_abs0(), $.$get$_acos0(), $.$get$_asin0(), $.$get$_atan0(), $.$get$_atan20(), $.$get$_ceil0(), $.$get$_clamp0(), $.$get$_cos0(), $.$get$_compatible0(), $.$get$_floor0(), $.$get$_hypot0(), $.$get$_isUnitless0(), $.$get$_log0(), $.$get$_max0(), $.$get$_min0(), $.$get$_percentage0(), $.$get$_pow0(), $.$get$_randomFunction0(), $.$get$_round0(), $.$get$_sin0(), $.$get$_sqrt0(), $.$get$_tan0(), $.$get$_unit0(), $.$get$_div0()], type$.JSArray_BuiltInCallable_2), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber0(2.718281828459045, _null), "pi", A.SassNumber_SassNumber0(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber0(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber0(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber0(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber0(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber0(5e-324, _null)], type$.String, type$.Value_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "_ceil0", "$get$_ceil0", () => A._numberFunction0("ceil", new A._ceil_closure0())); + _lazyFinal($, "_clamp0", "$get$_clamp0", () => A._function8("clamp", "$min, $number, $max", new A._clamp_closure0())); + _lazyFinal($, "_floor0", "$get$_floor0", () => A._numberFunction0("floor", new A._floor_closure0())); + _lazyFinal($, "_max0", "$get$_max0", () => A._function8("max", "$numbers...", new A._max_closure0())); + _lazyFinal($, "_min0", "$get$_min0", () => A._function8("min", "$numbers...", new A._min_closure0())); + _lazyFinal($, "_round0", "$get$_round0", () => A._numberFunction0("round", new A._round_closure0())); + _lazyFinal($, "_abs0", "$get$_abs0", () => A._numberFunction0("abs", new A._abs_closure0())); + _lazyFinal($, "_hypot0", "$get$_hypot0", () => A._function8("hypot", "$numbers...", new A._hypot_closure0())); + _lazyFinal($, "_log0", "$get$_log0", () => A._function8("log", "$number, $base: null", new A._log_closure0())); + _lazyFinal($, "_pow0", "$get$_pow0", () => A._function8("pow", "$base, $exponent", new A._pow_closure0())); + _lazyFinal($, "_sqrt0", "$get$_sqrt0", () => A._function8("sqrt", "$number", new A._sqrt_closure0())); + _lazyFinal($, "_acos0", "$get$_acos0", () => A._function8("acos", "$number", new A._acos_closure0())); + _lazyFinal($, "_asin0", "$get$_asin0", () => A._function8("asin", "$number", new A._asin_closure0())); + _lazyFinal($, "_atan0", "$get$_atan0", () => A._function8("atan", "$number", new A._atan_closure0())); + _lazyFinal($, "_atan20", "$get$_atan20", () => A._function8("atan2", "$y, $x", new A._atan2_closure0())); + _lazyFinal($, "_cos0", "$get$_cos0", () => A._function8("cos", "$number", new A._cos_closure0())); + _lazyFinal($, "_sin0", "$get$_sin0", () => A._function8("sin", "$number", new A._sin_closure0())); + _lazyFinal($, "_tan0", "$get$_tan0", () => A._function8("tan", "$number", new A._tan_closure0())); + _lazyFinal($, "_compatible0", "$get$_compatible0", () => A._function8("compatible", "$number1, $number2", new A._compatible_closure0())); + _lazyFinal($, "_isUnitless0", "$get$_isUnitless0", () => A._function8("is-unitless", "$number", new A._isUnitless_closure0())); + _lazyFinal($, "_unit0", "$get$_unit0", () => A._function8("unit", "$number", new A._unit_closure0())); + _lazyFinal($, "_percentage0", "$get$_percentage0", () => A._function8("percentage", "$number", new A._percentage_closure0())); + _lazyFinal($, "_random1", "$get$_random2", () => A.Random_Random()); + _lazyFinal($, "_randomFunction0", "$get$_randomFunction0", () => A._function8("random", "$limit: null", new A._randomFunction_closure0())); + _lazyFinal($, "_div0", "$get$_div0", () => A._function8("div", "$number1, $number2", new A._div_closure0())); + _lazyFinal($, "global10", "$get$global6", () => A.UnmodifiableListView$(A._setArrayType([A._function12("feature-exists", "$feature", new A.global_closure57()), A._function12("inspect", "$value", new A.global_closure58()), A._function12("type-of", "$value", new A.global_closure59()), A._function12("keywords", "$args", new A.global_closure60())], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "local0", "$get$local0", () => A.UnmodifiableListView$(A._setArrayType([A._function12("calc-name", "$calc", new A.local_closure1()), A._function12("calc-args", "$calc", new A.local_closure2())], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "stderr0", "$get$stderr0", () => new A.Stderr0(J.get$stderr$x(self.process))); + _lazyFinal($, "legacyNullClass", "$get$legacyNullClass", () => new A.legacyNullClass_closure().call$0()); + _lazyFinal($, "_epsilon0", "$get$_epsilon0", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon0", "$get$_inverseEpsilon0", () => A.pow(10, 11)); + _lazyFinal($, "legacyNumberClass", "$get$legacyNumberClass", () => { + var t1 = A.createJSClass("sass.types.Number", new A.legacyNumberClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyNumberClass_closure0(), "setValue", new A.legacyNumberClass_closure1(), "getUnit", new A.legacyNumberClass_closure2(), "setUnit", new A.legacyNumberClass_closure3()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "numberClass", "$get$numberClass", () => new A.numberClass_closure().call$0()); + _lazyFinal($, "_typesByUnit0", "$get$_typesByUnit0", () => { + var t2, t3, t4, + t1 = type$.String; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = B.Map_U8AHF.get$entries(B.Map_U8AHF), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + for (t4 = J.get$iterator$ax(t3.value), t3 = t3.key; t4.moveNext$0();) + t1.$indexSet(0, t4.get$current(t4), t3); + } + return t1; + }); + _lazyFinal($, "global11", "$get$global11", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector0(), $.$get$_simpleSelectors0(), $.$get$_parse0().withName$1("selector-parse"), $.$get$_nest0().withName$1("selector-nest"), $.$get$_append1().withName$1("selector-append"), $.$get$_extend0().withName$1("selector-extend"), $.$get$_replace0().withName$1("selector-replace"), $.$get$_unify0().withName$1("selector-unify")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "module9", "$get$module9", () => A.BuiltInModule$0("selector", A._setArrayType([$.$get$_isSuperselector0(), $.$get$_simpleSelectors0(), $.$get$_parse0(), $.$get$_nest0(), $.$get$_append1(), $.$get$_extend0(), $.$get$_replace0(), $.$get$_unify0()], type$.JSArray_BuiltInCallable_2), null, null, type$.BuiltInCallable_2)); + _lazyFinal($, "_nest0", "$get$_nest0", () => A._function7("nest", "$selectors...", new A._nest_closure0())); + _lazyFinal($, "_append2", "$get$_append1", () => A._function7("append", "$selectors...", new A._append_closure1())); + _lazyFinal($, "_extend0", "$get$_extend0", () => A._function7("extend", "$selector, $extendee, $extender", new A._extend_closure0())); + _lazyFinal($, "_replace0", "$get$_replace0", () => A._function7("replace", "$selector, $original, $replacement", new A._replace_closure0())); + _lazyFinal($, "_unify0", "$get$_unify0", () => A._function7("unify", "$selector1, $selector2", new A._unify_closure0())); + _lazyFinal($, "_isSuperselector0", "$get$_isSuperselector0", () => A._function7("is-superselector", "$super, $sub", new A._isSuperselector_closure0())); + _lazyFinal($, "_simpleSelectors0", "$get$_simpleSelectors0", () => A._function7("simple-selectors", "$selector", new A._simpleSelectors_closure0())); + _lazyFinal($, "_parse0", "$get$_parse0", () => A._function7("parse", "$selector", new A._parse_closure0())); + _lazyFinal($, "_knownCompatibilitiesByUnit0", "$get$_knownCompatibilitiesByUnit0", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_AqW[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(t2), set); + } + return t1; + }); + _lazyFinal($, "_random2", "$get$_random1", () => A.Random_Random()); + _lazy($, "_previousUniqueId0", "$get$_previousUniqueId0", () => $.$get$_random1().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global12", "$get$global12", () => A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote0(), $.$get$_quote0(), $.$get$_toUpperCase0(), $.$get$_toLowerCase0(), $.$get$_uniqueId0(), $.$get$_length1().withName$1("str-length"), $.$get$_insert0().withName$1("str-insert"), $.$get$_index1().withName$1("str-index"), $.$get$_slice0().withName$1("str-slice")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "module10", "$get$module10", () => A.BuiltInModule$0("string", A._setArrayType([$.$get$_unquote0(), $.$get$_quote0(), $.$get$_toUpperCase0(), $.$get$_toLowerCase0(), $.$get$_length1(), $.$get$_insert0(), $.$get$_index1(), $.$get$_slice0(), $.$get$_uniqueId0()], type$.JSArray_BuiltInCallable_2), null, null, type$.BuiltInCallable_2)); + _lazyFinal($, "_unquote0", "$get$_unquote0", () => A._function6("unquote", "$string", new A._unquote_closure0())); + _lazyFinal($, "_quote0", "$get$_quote0", () => A._function6("quote", "$string", new A._quote_closure0())); + _lazyFinal($, "_length2", "$get$_length1", () => A._function6("length", "$string", new A._length_closure1())); + _lazyFinal($, "_insert0", "$get$_insert0", () => A._function6("insert", "$string, $insert, $index", new A._insert_closure0())); + _lazyFinal($, "_index2", "$get$_index1", () => A._function6("index", "$string, $substring", new A._index_closure1())); + _lazyFinal($, "_slice0", "$get$_slice0", () => A._function6("slice", "$string, $start-at, $end-at: -1", new A._slice_closure0())); + _lazyFinal($, "_toUpperCase0", "$get$_toUpperCase0", () => A._function6("to-upper-case", "$string", new A._toUpperCase_closure0())); + _lazyFinal($, "_toLowerCase0", "$get$_toLowerCase0", () => A._function6("to-lower-case", "$string", new A._toLowerCase_closure0())); + _lazyFinal($, "_uniqueId0", "$get$_uniqueId0", () => A._function6("unique-id", "", new A._uniqueId_closure0())); + _lazyFinal($, "legacyStringClass", "$get$legacyStringClass", () => { + var t1 = A.createJSClass("sass.types.String", new A.legacyStringClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyStringClass_closure0(), "setValue", new A.legacyStringClass_closure1()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "stringClass", "$get$stringClass", () => new A.stringClass_closure().call$0()); + _lazyFinal($, "_emptyQuoted0", "$get$_emptyQuoted0", () => A.SassString$0("", true)); + _lazyFinal($, "_emptyUnquoted0", "$get$_emptyUnquoted0", () => A.SassString$0("", false)); + _lazyFinal($, "_jsThrow", "$get$_jsThrow", () => new self.Function("error", "throw error;")); + _lazyFinal($, "_isUndefined", "$get$_isUndefined", () => new self.Function("value", "return value === undefined;")); + _lazyFinal($, "_noSourceUrl0", "$get$_noSourceUrl0", () => A.Uri_parse("-")); + _lazyFinal($, "_traces0", "$get$_traces0", () => A.Expando$()); + _lazyFinal($, "valueClass", "$get$valueClass", () => new A.valueClass_closure().call$0()); + })(); + (function nativeSupport() { + !function() { + var intern = function(s) { + var o = {}; + o[s] = 1; + return Object.keys(hunkHelpers.convertToFastObject(o))[0]; + }; + init.getIsolateTag = function(name) { + return intern("___dart_" + name + init.isolateTag); + }; + var tableProperty = "___dart_isolate_tags_"; + var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); + var rootProperty = "_ZxYxX"; + for (var i = 0;; i++) { + var property = intern(rootProperty + "_" + i + "_"); + if (!(property in usedProperties)) { + usedProperties[property] = 1; + init.isolateTag = property; + break; + } + } + init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); + }(); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, DataView: A.NativeTypedData, ArrayBufferView: A.NativeTypedData, Float32Array: A.NativeTypedArrayOfDouble, Float64Array: A.NativeTypedArrayOfDouble, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false}); + A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + })(); + Function.prototype.call$0 = function() { + return this(); + }; + Function.prototype.call$1 = function(a) { + return this(a); + }; + Function.prototype.call$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$3$1 = function(a) { + return this(a); + }; + Function.prototype.call$2$1 = function(a) { + return this(a); + }; + Function.prototype.call$1$1 = function(a) { + return this(a); + }; + Function.prototype.call$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$4 = function(a, b, c, d) { + return this(a, b, c, d); + }; + Function.prototype.call$3$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$2$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$6 = function(a, b, c, d, e, f) { + return this(a, b, c, d, e, f); + }; + Function.prototype.call$5 = function(a, b, c, d, e) { + return this(a, b, c, d, e); + }; + Function.prototype.call$1$0 = function() { + return this(); + }; + Function.prototype.call$2$0 = function() { + return this(); + }; + Function.prototype.call$2$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$1$2 = function(a, b) { + return this(a, b); + }; + convertAllToFastObject(holders); + convertToFastObject($); + (function(callback) { + if (typeof document === "undefined") { + callback(null); + return; + } + if (typeof document.currentScript != "undefined") { + callback(document.currentScript); + return; + } + var scripts = document.scripts; + function onLoad(event) { + for (var i = 0; i < scripts.length; ++i) + scripts[i].removeEventListener("load", onLoad, false); + callback(event.target); + } + for (var i = 0; i < scripts.length; ++i) + scripts[i].addEventListener("load", onLoad, false); + })(function(currentScript) { + init.currentScript = currentScript; + var callMain = A.main1; + if (typeof dartMainRunner === "function") + dartMainRunner(callMain, []); + else + callMain([]); + }); +})(); +} diff --git a/node_modules/sass/sass.default.dart.js b/node_modules/sass/sass.default.dart.js new file mode 100644 index 0000000..955ac04 --- /dev/null +++ b/node_modules/sass/sass.default.dart.js @@ -0,0 +1,4 @@ +var library = require('./sass.dart.js'); +library.load({}); + +module.exports = library; diff --git a/node_modules/sass/sass.js b/node_modules/sass/sass.js new file mode 100755 index 0000000..081f11a --- /dev/null +++ b/node_modules/sass/sass.js @@ -0,0 +1,9 @@ +#!/usr/bin/env node + +var library = require('./sass.dart.js'); +library.load({ + readline: require("readline"), + chokidar: require("chokidar"), +}); + +library.cli_pkg_main_0_(process.argv.slice(2)); diff --git a/node_modules/sass/types/compile.d.ts b/node_modules/sass/types/compile.d.ts new file mode 100644 index 0000000..32cc9b8 --- /dev/null +++ b/node_modules/sass/types/compile.d.ts @@ -0,0 +1,152 @@ +import {RawSourceMap} from 'source-map-js'; + +import {Options, StringOptions} from './options'; + +/** + * The result of compiling Sass to CSS. Returned by [[compile]], + * [[compileAsync]], [[compileString]], and [[compileStringAsync]]. + * + * @category Compile + */ +export interface CompileResult { + /** + * The generated CSS. + * + * Note that this *never* includes a `sourceMapUrl` comment—it's up to the + * caller to determine where to save the source map and how to link to it from + * the stylesheet. + */ + css: string; + + /** + * The canonical URLs of all the stylesheets that were loaded during the + * Sass compilation. The order of these URLs is not guaranteed. + */ + loadedUrls: URL[]; + + /** + * The object representation of the source map that maps locations in the + * generated CSS back to locations in the Sass source code. + * + * This typically uses absolute `file:` URLs to refer to Sass files, although + * this can be controlled by having a custom [[Importer]] return + * [[ImporterResult.sourceMapUrl]]. + * + * This is set if and only if [[Options.sourceMap]] is `true`. + */ + sourceMap?: RawSourceMap; +} + +/** + * Synchronously compiles the Sass file at `path` to CSS. If it succeeds it + * returns a [[CompileResult]], and if it fails it throws an [[Exception]]. + * + * This only allows synchronous [[Importer]]s and [[CustomFunction]]s. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compile("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compile(path: string, options?: Options<'sync'>): CompileResult; + +/** + * Asynchronously compiles the Sass file at `path` to CSS. Returns a promise + * that resolves with a [[CompileResult]] if it succeeds and rejects with an + * [[Exception]] if it fails. + * + * This only allows synchronous or asynchronous [[Importer]]s and + * [[CustomFunction]]s. + * + * **Heads up!** When using Dart Sass, **[[compile]] is almost twice as fast as + * [[compileAsync]]**, due to the overhead of making the entire evaluation + * process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileAsync("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileAsync( + path: string, + options?: Options<'async'> +): Promise; + +/** + * Synchronously compiles a stylesheet whose contents is `source` to CSS. If it + * succeeds it returns a [[CompileResult]], and if it fails it throws an + * [[Exception]]. + * + * This only allows synchronous [[Importer]]s and [[CustomFunction]]s. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compileString(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileString( + source: string, + options?: StringOptions<'sync'> +): CompileResult; + +/** + * Asynchronously compiles a stylesheet whose contents is `source` to CSS. + * Returns a promise that resolves with a [[CompileResult]] if it succeeds and + * rejects with an [[Exception]] if it fails. + * + * This only allows synchronous or asynchronous [[Importer]]s and + * [[CustomFunction]]s. + * + * **Heads up!** When using Dart Sass, **[[compile]] is almost twice as fast as + * [[compileAsync]]**, due to the overhead of making the entire evaluation + * process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileStringAsync(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileStringAsync( + source: string, + options?: StringOptions<'async'> +): Promise; diff --git a/node_modules/sass/types/exception.d.ts b/node_modules/sass/types/exception.d.ts new file mode 100644 index 0000000..07a6270 --- /dev/null +++ b/node_modules/sass/types/exception.d.ts @@ -0,0 +1,41 @@ +import {SourceSpan} from './logger'; + +/** + * An exception thrown because a Sass compilation failed. + * + * @category Other + */ +export class Exception extends Error { + private constructor(); + + /** + * A human-friendly representation of the exception. + * + * Because many tools simply print `Error.message` directly, this includes not + * only the textual description of what went wrong (the [[sassMessage]]) but + * also an indication of where in the Sass stylesheet the error occurred (the + * [[span]]) and the Sass stack trace at the point of error (the + * [[sassStack]]). + */ + message: string; + + /** + * A textual description of what went wrong. + * + * Unlike [[message]], this does *not* include representations of [[span]] or + * [[sassStack]]. + */ + readonly sassMessage: string; + + /** + * A human-friendly representation of the Sass stack trace at the point of + * error. + */ + readonly sassStack: string; + + /** The location the error occurred in the Sass file that triggered it. */ + readonly span: SourceSpan; + + /** Returns the same string as [[message]]. */ + toString(): string; +} diff --git a/node_modules/sass/types/importer.d.ts b/node_modules/sass/types/importer.d.ts new file mode 100644 index 0000000..124425a --- /dev/null +++ b/node_modules/sass/types/importer.d.ts @@ -0,0 +1,294 @@ +import {Syntax} from './options'; +import {PromiseOr} from './util/promise_or'; + +/** + * A special type of importer that redirects all loads to existing files on + * disk. Although this is less powerful than a full [[Importer]], it + * automatically takes care of Sass features like resolving partials and file + * extensions and of loading the file from disk. + * + * Like all importers, this implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to [[Options.importers]] or [[StringOptionsWithImporter.importer]]. + * + * @typeParam sync - A `FileImporter<'sync'>`'s [[findFileUrl]] must return + * synchronously, but in return it can be passed to [[compile]] and + * [[compileString]] in addition to [[compileAsync]] and [[compileStringAsync]]. + * + * A `FileImporter<'async'>`'s [[findFileUrl]] may either return synchronously + * or asynchronously, but it can only be used with [[compileAsync]] and + * [[compileStringAsync]]. + * + * @example + * + * ```js + * const {pathToFileURL} = require('url'); + * + * sass.compile('style.scss', { + * importers: [{ + * // An importer that redirects relative URLs starting with "~" to + * // `node_modules`. + * findFileUrl(url) { + * if (!url.startsWith('~')) return null; + * return new URL(url.substring(1), pathToFileURL('node_modules')); + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface FileImporter< + sync extends 'sync' | 'async' = 'sync' | 'async' +> { + /** + * A callback that's called to partially resolve a load (such as + * [`@use`](https://sass-lang.com/documentation/at-rules/use) or + * [`@import`](https://sass-lang.com/documentation/at-rules/import)) to a file + * on disk. + * + * Unlike an [[Importer]], the compiler will automatically handle relative + * loads for a [[FileImporter]]. See [[Options.importers]] for more details on + * the way loads are resolved. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a [[URL]] object. + * + * @param options.fromImport - Whether this is being invoked because of a Sass + * `@import` rule, as opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + * + * @returns An absolute `file:` URL if this importer recognizes the `url`. + * This may be only partially resolved: the compiler will automatically look + * for [partials](https://sass-lang.com/documentation/at-rules/use#partials), + * [index files](https://sass-lang.com/documentation/at-rules/use#index-files), + * and file extensions based on the returned URL. An importer may also return + * a fully resolved URL if it so chooses. + * + * If this importer doesn't recognize the URL, it should return `null` instead + * to allow other importers or {@link Options.loadPaths | load paths} to + * handle it. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or + * [[compileString]]. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + findFileUrl( + url: string, + options: {fromImport: boolean} + ): PromiseOr; + + /** @hidden */ + canonicalize?: never; +} + +/** + * An object that implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to [[Options.importers]] or [[StringOptionsWithImporter.importer]]. + * + * Importers that simply redirect to files on disk are encouraged to use the + * [[FileImporter]] interface instead. + * + * See [[Options.importers]] for more details on the way loads are resolved. + * + * @typeParam sync - An `Importer<'sync'>`'s [[canonicalize]] and [[load]] must + * return synchronously, but in return it can be passed to [[compile]] and + * [[compileString]] in addition to [[compileAsync]] and [[compileStringAsync]]. + * + * An `Importer<'async'>`'s [[canonicalize]] and [[load]] may either return + * synchronously or asynchronously, but it can only be used with + * [[compileAsync]] and [[compileStringAsync]]. + * + * @example Resolving a Load + * + * This is the process of resolving a load using a custom importer: + * + * - The compiler encounters `@use "db:foo/bar/baz"`. + * - It calls [[canonicalize]] with `"db:foo/bar/baz"`. + * - [[canonicalize]] returns `new URL("db:foo/bar/baz/_index.scss")`. + * - If the compiler has already loaded a stylesheet with this canonical URL, it + * re-uses the existing module. + * - Otherwise, it calls [[load]] with `new URL("db:foo/bar/baz/_index.scss")`. + * - [[load]] returns an [[ImporterResult]] that the compiler uses as the + * contents of the module. + * + * @example Code Sample + * + * ```js + * sass.compile('style.scss', { + * // An importer for URLs like `bgcolor:orange` that generates a + * // stylesheet with the given background color. + * importers: [{ + * canonicalize(url) { + * if (!url.startsWith('bgcolor:')) return null; + * return new URL(url); + * }, + * load(canonicalUrl) { + * return { + * contents: `body {background-color: ${canonicalUrl.pathname}}`, + * syntax: 'scss' + * }; + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface Importer { + /** + * If `url` is recognized by this importer, returns its canonical format. + * + * If Sass has already loaded a stylesheet with the returned canonical URL, it + * re-uses the existing parse tree (and the loaded module for `@use`). This + * means that importers **must ensure** that the same canonical URL always + * refers to the same stylesheet, *even across different importers*. As such, + * importers are encouraged to use unique URL schemes to disambiguate between + * one another. + * + * As much as possible, custom importers should canonicalize URLs the same way + * as the built-in filesystem importer: + * + * - The importer should look for stylesheets by adding the prefix `_` to the + * URL's basename, and by adding the extensions `.sass` and `.scss` if the + * URL doesn't already have one of those extensions. For example, if the + * URL was `foo/bar/baz`, the importer would look for: + * - `foo/bar/baz.sass` + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.sass` + * - `foo/bar/_baz.scss` + * + * If the URL was `foo/bar/baz.scss`, the importer would just look for: + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.scss` + * + * If the importer finds a stylesheet at more than one of these URLs, it + * should throw an exception indicating that the URL is ambiguous. Note that + * if the extension is explicitly specified, a stylesheet with the opposite + * extension is allowed to exist. + * + * - If none of the possible paths is valid, the importer should perform the + * same resolution on the URL followed by `/index`. In the example above, + * it would look for: + * - `foo/bar/baz/index.sass` + * - `foo/bar/baz/index.scss` + * - `foo/bar/baz/_index.sass` + * - `foo/bar/baz/_index.scss` + * + * As above, if the importer finds a stylesheet at more than one of these + * URLs, it should throw an exception indicating that the import is + * ambiguous. + * + * If no stylesheets are found, the importer should return `null`. + * + * Calling [[canonicalize]] multiple times with the same URL must return the + * same result. Calling [[canonicalize]] with a URL returned by a previous + * call to [[canonicalize]] must return that URL. + * + * Relative loads in stylesheets loaded from an importer are handled by + * resolving the loaded URL relative to the canonical URL of the stylesheet + * that contains it, and passing that URL back to the importer's + * [[canonicalize]] method. For example, suppose the "Resolving a Load" + * example {@link Importer | above} returned a stylesheet that contained + * `@use "mixins"`: + * + * - The compiler resolves the URL `mixins` relative to the current + * stylesheet's canonical URL `db:foo/bar/baz/_index.scss` to get + * `db:foo/bar/baz/mixins`. + * - It calls [[canonicalize]] with `"db:foo/bar/baz/mixins"`. + * - [[canonicalize]] returns `new URL("db:foo/bar/baz/_mixins.scss")`. + * + * Because of this, [[canonicalize]] must return a meaningful result when + * called with a URL relative to one returned by an earlier call to + * [[canonicalize]]. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a [[URL]] object. + * + * @param options.fromImport - Whether this is being invoked because of a Sass + * `@import` rule, as opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + * + * @returns An absolute URL if this importer recognizes the `url`, or `null` + * if it doesn't. If this returns `null`, other importers or {@link + * Options.loadPaths | load paths} may handle the load. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or + * [[compileString]]. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + canonicalize( + url: string, + options: {fromImport: boolean} + ): PromiseOr; + + /** + * Loads the Sass text for the given `canonicalUrl`, or returns `null` if this + * importer can't find the stylesheet it refers to. + * + * @param canonicalUrl - The canonical URL of the stylesheet to load. This is + * guaranteed to come from a call to [[canonicalize]], although not every call + * to [[canonicalize]] will result in a call to [[load]]. + * + * @returns The contents of the stylesheet at `canonicalUrl` if it can be + * loaded, or `null` if it can't. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or + * [[compileString]]. + * + * @throws any - If this importer finds a stylesheet at `url` but it fails to + * load for some reason, or if `url` is uniquely associated with this importer + * but doesn't refer to a real stylesheet, the importer may throw an exception + * that will be wrapped by Sass. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, + * the exception object's `toString()` will be used. This means it's safe for + * importers to throw plain strings. + */ + load(canonicalUrl: URL): PromiseOr; + + /** @hidden */ + findFileUrl?: never; +} + +/** + * The result of successfully loading a stylesheet with an [[Importer]]. + * + * @category Importer + */ +export interface ImporterResult { + /** The contents of the stylesheet. */ + contents: string; + + /** The syntax with which to parse [[contents]]. */ + syntax: Syntax; + + /** + * The URL to use to link to the loaded stylesheet's source code in source + * maps. A `file:` URL is ideal because it's accessible to both browsers and + * other build tools, but an `http:` URL is also acceptable. + * + * If this isn't set, it defaults to a `data:` URL that contains the contents + * of the loaded stylesheet. + */ + sourceMapUrl?: URL; +} diff --git a/node_modules/sass/types/index.d.ts b/node_modules/sass/types/index.d.ts new file mode 100644 index 0000000..3de4d37 --- /dev/null +++ b/node_modules/sass/types/index.d.ts @@ -0,0 +1,80 @@ +// This is a mirror of the JS API definitions in `spec/js-api`, but with comments +// written to provide user-facing documentation rather than to specify behavior for +// implementations. + +export { + CompileResult, + compile, + compileAsync, + compileString, + compileStringAsync, +} from './compile'; +export {Exception} from './exception'; +export {FileImporter, Importer, ImporterResult} from './importer'; +export {Logger, SourceSpan, SourceLocation} from './logger'; +export { + CustomFunction, + Options, + OutputStyle, + StringOptions, + StringOptionsWithImporter, + StringOptionsWithoutImporter, + Syntax, +} from './options'; +export {PromiseOr} from './util/promise_or'; +export { + ListSeparator, + SassArgumentList, + SassBoolean, + SassColor, + SassFunction, + SassList, + SassMap, + SassNumber, + SassString, + Value, + sassFalse, + sassNull, + sassTrue, +} from './value'; + +// Legacy APIs +export {LegacyException} from './legacy/exception'; +export { + FALSE, + LegacyAsyncFunction, + LegacyAsyncFunctionDone, + LegacyFunction, + LegacySyncFunction, + LegacyValue, + NULL, + TRUE, + types, +} from './legacy/function'; +export { + LegacyAsyncImporter, + LegacyImporter, + LegacyImporterResult, + LegacyImporterThis, + LegacySyncImporter, +} from './legacy/importer'; +export { + LegacySharedOptions, + LegacyFileOptions, + LegacyStringOptions, + LegacyOptions, +} from './legacy/options'; +export {LegacyPluginThis} from './legacy/plugin_this'; +export {LegacyResult, render, renderSync} from './legacy/render'; + +/** + * Information about the Sass implementation. This always begins with a unique + * identifier for the Sass implementation, followed by U+0009 TAB, followed by + * its npm package version. Some implementations include additional information + * as well, but not in any standardized format. + * + * * For Dart Sass, the implementation name is `dart-sass`. + * * For Node Sass, the implementation name is `node-sass`. + * * For the embedded host, the implementation name is `sass-embedded`. + */ +export const info: string; diff --git a/node_modules/sass/types/legacy/exception.d.ts b/node_modules/sass/types/legacy/exception.d.ts new file mode 100644 index 0000000..30b54d5 --- /dev/null +++ b/node_modules/sass/types/legacy/exception.d.ts @@ -0,0 +1,54 @@ +/** + * The exception type thrown by [[renderSync]] and passed as the error to + * [[render]]'s callback. + * + * @category Legacy + * @deprecated This is only thrown by the legacy [[render]] and [[renderSync]] + * APIs. Use [[compile]], [[compileString]], [[compileAsync]], and + * [[compileStringAsync]] instead. + */ +export interface LegacyException extends Error { + /** + * The error message. For Dart Sass, when possible this includes a highlighted + * indication of where in the source file the error occurred as well as the + * Sass stack trace. + */ + message: string; + + /** + * The error message. For Dart Sass, this is the same as the result of calling + * [[toString]], which is itself the same as [[message]] but with the prefix + * "Error:". + */ + formatted: string; + + /** + * The (1-based) line number on which the error occurred, if this exception is + * associated with a specific Sass file location. + */ + line?: number; + + /** + * The (1-based) column number within [[line]] at which the error occurred, if + * this exception is associated with a specific Sass file location. + */ + column?: number; + + /** + * Analogous to the exit code for an executable. `1` for an error caused by a + * Sass file, `3` for any other type of error. + */ + status: number; + + /** + * If this exception was caused by an error in a Sass file, this will + * represent the Sass file's location. It can be in one of three formats: + * + * * If the Sass file was loaded from disk, this is the path to that file. + * * If the Sass file was generated by an importer, this is its canonical URL. + * * If the Sass file was passed as [[LegacyStringOptions.data]] without a + * corresponding [[LegacyStringOptions.file]], this is the special string + * `"stdin"`. + */ + file?: string; +} diff --git a/node_modules/sass/types/legacy/function.d.ts b/node_modules/sass/types/legacy/function.d.ts new file mode 100644 index 0000000..d52e14c --- /dev/null +++ b/node_modules/sass/types/legacy/function.d.ts @@ -0,0 +1,756 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * A synchronous callback that implements a custom Sass function. This can be + * passed to [[LegacySharedOptions.functions]] for either [[render]] or + * [[renderSync]]. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * const result = sass.renderSync({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * return new sass.types.Number(arg1.getValue() + arg2.getValue()); + * } + * } + * }); + * ``` + * + * @param args - One argument for each argument that's declared in the signature + * that's passed to [[LegacySharedOptions.functions]]. If the signature [takes + * arbitrary arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export type LegacySyncFunction = ( + this: LegacyPluginThis, + ...args: LegacyValue[] +) => LegacyValue; + +/** + * An asynchronous callback that implements a custom Sass function. This can be + * passed to [[LegacySharedOptions.functions]], but only for [[render]]. + * + * An asynchronous function must return `undefined`. Its final argument will + * always be a callback, which it should call with the result of the function + * once it's done running. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * sass.render({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2, done) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * done(new sass.types.Number(arg1.getValue() + arg2.getValue())); + * } + * } + * }, (result, error) => { + * // ... + * }); + * ``` + * + * This is passed one argument for each argument that's declared in the + * signature that's passed to [[LegacySharedOptions.functions]]. If the + * signature [takes arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument before the + * callback. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export type LegacyAsyncFunction = + | ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + arg6: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + ...args: [...LegacyValue[], LegacyAsyncFunctionDone] + ) => void); + +/** + * The function called by a [[LegacyAsyncFunction]] to indicate that it's + * finished. + * + * @param result - If this is a [[LegacyValue]], that indicates that the + * function call completed successfully. If it's a [[types.Error]], that + * indicates that the function call failed. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export type LegacyAsyncFunctionDone = ( + result: LegacyValue | types.Error +) => void; + +/** + * A callback that implements a custom Sass function. For [[renderSync]], this + * must be a [[LegacySyncFunction]] which returns its result directly; for + * [[render]], it may be either a [[LegacySyncFunction]] or a + * [[LegacyAsyncFunction]] which calls a callback with its result. + * + * See [[LegacySharedOptions.functions]] for more details. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export type LegacyFunction = sync extends 'async' + ? LegacySyncFunction | LegacyAsyncFunction + : LegacySyncFunction; + +/** + * A type representing all the possible values that may be passed to or returned + * from a [[LegacyFunction]]. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Value]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export type LegacyValue = + | types.Null + | types.Number + | types.String + | types.Boolean + | types.Color + | types.List + | types.Map; + +/** + * A shorthand for `sass.types.Boolean.TRUE`. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[sassTrue]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export const TRUE: types.Boolean; + +/** + * A shorthand for `sass.types.Boolean.FALSE`. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[sassFalse]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export const FALSE: types.Boolean; + +/** + * A shorthand for `sass.types.Null.NULL`. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[sassNull]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export const NULL: types.Null; + +/** + * The namespace for value types used in the legacy function API. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Value]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export namespace types { + /** + * The class for Sass's singleton [`null` + * value](https://sass-lang.com/documentation/values/null). The value itself + * can be accessed through the [[NULL]] field. + */ + export class Null { + /** Sass's singleton `null` value. */ + static readonly NULL: Null; + } + + /** + * Sass's [number type](https://sass-lang.com/documentation/values/numbers). + */ + export class Number { + /** + * @param value - The numeric value of the number. + * + * @param unit - If passed, the number's unit. + * + * Complex units can be represented as + * `**.../**...`, with numerator units on the + * left-hand side of the `/` and denominator units on the right. A number + * with only numerator units may omit the `/` and the units after it, and a + * number with only denominator units may be represented + * with no units before the `/`. + * + * @example + * + * ```scss + * new sass.types.Number(0.5); // == 0.5 + * new sass.types.Number(10, "px"); // == 10px + * new sass.types.Number(10, "px*px"); // == 10px * 1px + * new sass.types.Number(10, "px/s"); // == math.div(10px, 1s) + * new sass.types.Number(10, "px*px/s*s"); // == 10px * math.div(math.div(1px, 1s), 1s) + * ``` + */ + constructor(value: number, unit?: string); + + /** + * Returns the value of the number, ignoring units. + * + * **Heads up!** This means that `96px` and `1in` will return different + * values, even though they represent the same length. + * + * @example + * + * ```js + * const number = new sass.types.Number(10, "px"); + * number.getValue(); // 10 + * ``` + */ + getValue(): number; + + /** + * Destructively modifies this number by setting its numeric value to + * `value`, independent of its units. + * + * @deprecated Use [[constructor]] instead. + */ + setValue(value: number): void; + + /** + * Returns a string representation of this number's units. Complex units are + * returned in the same format that [[constructor]] accepts them. + * + * @example + * + * ```js + * // number is `10px`. + * number.getUnit(); // "px" + * + * // number is `math.div(10px, 1s)`. + * number.getUnit(); // "px/s" + * ``` + */ + getUnit(): string; + + /** + * Destructively modifies this number by setting its units to `unit`, + * independent of its numeric value. Complex units are specified in the same + * format as [[constructor]]. + * + * @deprecated Use [[constructor]] instead. + */ + setUnit(unit: string): void; + } + + /** + * Sass's [string type](https://sass-lang.com/documentation/values/strings). + * + * **Heads up!** This API currently provides no way of distinguishing between + * a [quoted](https://sass-lang.com/documentation/values/strings#quoted) and + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted) + * string. + */ + export class String { + /** + * Creates an unquoted string with the given contents. + * + * **Heads up!** This API currently provides no way of creating a + * [quoted](https://sass-lang.com/documentation/values/strings#quoted) + * string. + */ + constructor(value: string); + + /** + * Returns the contents of the string. If the string contains escapes, + * those escapes are included literally if it’s + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted), + * while the values of the escapes are included if it’s + * [quoted](https://sass-lang.com/documentation/values/strings#quoted). + * + * @example + * + * ``` + * // string is `Arial`. + * string.getValue(); // "Arial" + * + * // string is `"Helvetica Neue"`. + * string.getValue(); // "Helvetica Neue" + * + * // string is `\1F46D`. + * string.getValue(); // "\\1F46D" + * + * // string is `"\1F46D"`. + * string.getValue(); // "👭" + * ``` + */ + getValue(): string; + + /** + * Destructively modifies this string by setting its numeric value to + * `value`. + * + * **Heads up!** Even if the string was originally quoted, this will cause + * it to become unquoted. + * + * @deprecated Use [[constructor]] instead. + */ + setValue(value: string): void; + } + + /** + * Sass's [boolean type](https://sass-lang.com/documentation/values/booleans). + * + * Custom functions should respect Sass’s notion of + * [truthiness](https://sass-lang.com/documentation/at-rules/control/if#truthiness-and-falsiness) + * by treating `false` and `null` as falsey and everything else as truthy. + * + * **Heads up!** Boolean values can't be constructed, they can only be + * accessed through the [[TRUE]] and [[FALSE]] constants. + */ + export class Boolean { + /** + * Returns `true` if this is Sass's `true` value and `false` if this is + * Sass's `false` value. + * + * @example + * + * ```js + * // boolean is `true`. + * boolean.getValue(); // true + * boolean === sass.types.Boolean.TRUE; // true + * + * // boolean is `false`. + * boolean.getValue(); // false + * boolean === sass.types.Boolean.FALSE; // true + * ``` + */ + getValue(): T; + + /** Sass's `true` value. */ + static readonly TRUE: Boolean; + + /** Sass's `false` value. */ + static readonly FALSE: Boolean; + } + + /** + * Sass's [color type](https://sass-lang.com/documentation/values/colors). + */ + export class Color { + /** + * Creates a new Sass color with the given red, green, blue, and alpha + * channels. The red, green, and blue channels must be integers between 0 + * and 255 (inclusive), and alpha must be between 0 and 1 (inclusive). + * + * @example + * + * ```js + * new sass.types.Color(107, 113, 127); // #6b717f + * new sass.types.Color(0, 0, 0, 0); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(r: number, g: number, b: number, a?: number); + + /** + * Creates a new Sass color with alpha, red, green, and blue channels taken + * from respective two-byte chunks of a hexidecimal number. + * + * @example + * + * ```js + * new sass.types.Color(0xff6b717f); // #6b717f + * new sass.types.Color(0x00000000); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(argb: number); + + /** + * Returns the red channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getR(); // 107 + * + * // color is `#b37399`. + * color.getR(); // 179 + * ``` + */ + getR(): number; + + /** + * Sets the red channel of the color. The value must be an integer between 0 + * and 255 (inclusive). + * + * @deprecated Use [[constructor]] instead. + */ + setR(value: number): void; + + /** + * Returns the green channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getG(); // 113 + * + * // color is `#b37399`. + * color.getG(); // 115 + * ``` + */ + getG(): number; + + /** + * Sets the green channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use [[constructor]] instead. + */ + setG(value: number): void; + + /** + * Returns the blue channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getB(); // 127 + * + * // color is `#b37399`. + * color.getB(); // 153 + * ``` + */ + getB(): number; + + /** + * Sets the blue channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use [[constructor]] instead. + */ + setB(value: number): void; + + /** + * Returns the alpha channel of the color as a number from 0 to 1. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getA(); // 1 + * + * // color is `transparent`. + * color.getA(); // 0 + * ``` + */ + getA(): number; + + /** + * Sets the alpha channel of the color. The value must be between 0 and 1 + * (inclusive). + * + * @deprecated Use [[constructor]] instead. + */ + setA(value: number): void; + } + + /** + * Sass's [list type](https://sass-lang.com/documentation/values/lists). + * + * **Heads up!** This list type’s methods use 0-based indexing, even though + * within Sass lists use 1-based indexing. These methods also don’t support + * using negative numbers to index backwards from the end of the list. + */ + export class List { + /** + * Creates a new Sass list. + * + * **Heads up!** The initial values of the list elements are undefined. + * These elements must be set using [[setValue]] before accessing them or + * passing the list back to Sass. + * + * @example + * + * ```js + * const list = new sass.types.List(3); + * list.setValue(0, new sass.types.Number(10, "px")); + * list.setValue(1, new sass.types.Number(15, "px")); + * list.setValue(2, new sass.types.Number(32, "px")); + * list; // 10px, 15px, 32px + * ``` + * + * @param length - The number of (initially undefined) elements in the list. + * @param commaSeparator - If `true`, the list is comma-separated; otherwise, + * it's space-separated. Defaults to `true`. + */ + constructor(length: number, commaSeparator?: boolean); + + /** + * Returns the element at `index`, or `undefined` if that value hasn't yet + * been set. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getValue(0); // 10px + * list.getValue(2); // 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + getValue(index: number): LegacyValue | undefined; + + /** + * Sets the element at `index` to `value`. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.setValue(1, new sass.types.Number(18, "px")); + * list; // 10px, 18px, 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns `true` if this list is comma-separated and `false` otherwise. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getSeparator(); // true + * + * // list is `1px solid` + * list.getSeparator(); // false + * ``` + */ + getSeparator(): boolean; + + /** + * Sets whether the list is comma-separated. + * + * @param isComma - `true` to make the list comma-separated, `false` otherwise. + */ + setSeparator(isComma: boolean): void; + + /** + * Returns the number of elements in the list. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getLength(); // 3 + * + * // list is `1px solid` + * list.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * Sass's [map type](https://sass-lang.com/documentation/values/maps). + * + * **Heads up!** This map type is represented as a list of key-value pairs + * rather than a mapping from keys to values. The only way to find the value + * associated with a given key is to iterate through the map checking for that + * key. Maps created through this API are still forbidden from having duplicate + * keys. + */ + export class Map { + /** + * Creates a new Sass map. + * + * **Heads up!** The initial keys and values of the map are undefined. They + * must be set using [[setKey]] and [[setValue]] before accessing them or + * passing the map back to Sass. + * + * @example + * + * ```js + * const map = new sass.types.Map(2); + * map.setKey(0, new sass.types.String("width")); + * map.setValue(0, new sass.types.Number(300, "px")); + * map.setKey(1, new sass.types.String("height")); + * map.setValue(1, new sass.types.Number(100, "px")); + * map; // (width: 300px, height: 100px) + * ``` + * + * @param length - The number of (initially undefined) key/value pairs in the map. + */ + constructor(length: number); + + /** + * Returns the value in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getValue(0); // 300px + * map.getValue(1); // 100px + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getValue(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.Number(300)); + * map; // ("light": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns the key in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getKey(0); // width + * map.getKey(1); // height + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getKey(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.String("lighter")); + * map; // ("lighter": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setKey(index: number, key: LegacyValue): void; + + /** + * Returns the number of key/value pairs in this map. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.getLength(); // 3 + * + * // map is `(width: 300px, height: 100px)` + * map.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * An error that can be returned from a Sass function to signal that it + * encountered an error. This is the only way to signal an error + * asynchronously from a [[LegacyAsyncFunction]]. + */ + export class Error { + constructor(message: string); + } +} diff --git a/node_modules/sass/types/legacy/importer.d.ts b/node_modules/sass/types/legacy/importer.d.ts new file mode 100644 index 0000000..70ef843 --- /dev/null +++ b/node_modules/sass/types/legacy/importer.d.ts @@ -0,0 +1,168 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * The value of `this` in the context of a [[LegacyImporter]] function. + * + * @category Legacy + * @deprecated This is only used by the legacy [[render]] and [[renderSync]] + * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +interface LegacyImporterThis extends LegacyPluginThis { + /** + * Whether the importer is being invoked because of a Sass `@import` rule, as + * opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + * + * @compatibility dart: "1.33.0", node: false + */ + fromImport: boolean; +} + +/** + * The result of running a [[LegacyImporter]]. It must be one of the following + * types: + * + * * An object with the key `contents` whose value is the contents of a stylesheet + * (in SCSS syntax). This causes Sass to load that stylesheet’s contents. + * + * * An object with the key `file` whose value is a path on disk. This causes Sass + * to load that file as though it had been imported directly. + * + * * `null`, which indicates that it doesn’t recognize the URL and another + * importer should be tried instead. + * + * * An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) + * object, indicating that importing failed. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[ImporterResult]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export type LegacyImporterResult = + | {file: string} + | {contents: string} + | Error + | null; + +/** + * A synchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to [[LegacySharedOptions.importer]] for either [[render]] or + * [[renderSync]]. + * + * See [[LegacySharedOptions.importer]] for more detailed documentation. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * importer: [ + * function(url, prev) { + * if (url != "big-headers") return null; + * + * return { + * contents: 'h1 { font-size: 40px; }' + * }; + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +type LegacySyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string +) => LegacyImporterResult; + +/** + * An asynchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to [[LegacySharedOptions.importer]] for either [[render]] or + * [[renderSync]]. + * + * An asynchronous importer must return `undefined`, and then call `done` with + * the result of its [[LegacyImporterResult]] once it's done running. + * + * See [[LegacySharedOptions.importer]] for more detailed documentation. + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * function(url, prev, done) { + * if (url != "big-headers") done(null); + * + * done({ + * contents: 'h1 { font-size: 40px; }' + * }); + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @param done - The callback to call once the importer has finished running. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +type LegacyAsyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string, + done: (result: LegacyImporterResult) => void +) => void; + +/** + * A callback that implements custom Sass loading logic for [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import) and [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use). For [[renderSync]], + * this must be a [[LegacySyncImporter]] which returns its result directly; for + * [[render]], it may be either a [[LegacySyncImporter]] or a + * [[LegacyAsyncImporter]] which calls a callback with its result. + * + * See [[LegacySharedOptions.importer]] for more details. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export type LegacyImporter = sync extends 'async' + ? LegacySyncImporter | LegacyAsyncImporter + : LegacySyncImporter; diff --git a/node_modules/sass/types/legacy/options.d.ts b/node_modules/sass/types/legacy/options.d.ts new file mode 100644 index 0000000..a7a33ea --- /dev/null +++ b/node_modules/sass/types/legacy/options.d.ts @@ -0,0 +1,642 @@ +import {Logger} from '../logger'; +import {LegacyImporter} from './importer'; +import {LegacyFunction} from './function'; + +/** + * Options for [[render]] and [[renderSync]] that are shared between + * [[LegacyFileOptions]] and [[LegacyStringOptions]]. + * + * @typeParam sync - This lets the TypeScript checker verify that + * [[LegacyAsyncImporter]]s and [[LegacyAsyncFunction]]s aren't passed to + * [[renderSync]]. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Options]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export interface LegacySharedOptions { + /** + * This array of strings option provides [load + * paths](https://sass-lang.com/documentation/at-rules/import#load-paths) for + * Sass to look for stylesheets. Earlier load paths will take precedence over + * later ones. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * includePaths: ["node_modules/bootstrap/dist/css"] + * }); + * ``` + * + * Load paths are also loaded from the `SASS_PATH` environment variable, if + * it’s set. This variable should be a list of paths separated by `;` (on + * Windows) or `:` (on other operating systems). Load paths from the + * `includePaths` option take precedence over load paths from `SASS_PATH`. + * + * ```sh + * $ SASS_PATH=node_modules/bootstrap/dist/css sass style.scss style.css + * ``` + * + * @category Input + * @compatibility feature: "SASS_PATH", dart: "1.15.0", node: "3.9.0" + * + * Earlier versions of Dart Sass and Node Sass didn’t support the `SASS_PATH` + * environment variable. + */ + includePaths?: string[]; + + /** + * Whether the generated CSS should use spaces or tabs for indentation. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * indentType: "tab", + * indentWidth: 1 + * }); + * + * result.css.toString(); + * // "h1 {\n\tfont-size: 40px;\n}\n" + * ``` + * + * @defaultValue `'space'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentType?: 'space' | 'tab'; + + /** + * How many spaces or tabs (depending on [[indentType]]) should be used per + * indentation level in the generated CSS. It must be between 0 and 10 + * (inclusive). + * + * @defaultValue `2` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentWidth?: number; + + /** + * Which character sequence to use at the end of each line in the generated + * CSS. It can have the following values: + * + * * `'lf'` uses U+000A LINE FEED. + * * `'lfcr'` uses U+000A LINE FEED followed by U+000D CARRIAGE RETURN. + * * `'cr'` uses U+000D CARRIAGE RETURN. + * * `'crlf'` uses U+000D CARRIAGE RETURN followed by U+000A LINE FEED. + * + * @defaultValue `'lf'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; + + /** + * If `true`, Sass won't add a link from the generated CSS to the source map. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * omitSourceMapUrl: true + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + omitSourceMapUrl?: boolean; + + /** + * The location that Sass expects the generated CSS to be saved to. It’s used + * to determine the URL used to link from the generated CSS to the source map, + * and from the source map to the Sass source files. + * + * **Heads up!** Despite the name, Sass does *not* write the CSS output to + * this file. The caller must do that themselves. + * + * ```js + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @category Source Maps + */ + outFile?: string; + + /** + * The output style of the compiled CSS. There are four possible output styles: + * + * * `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * * `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * * `"nested"` (the default for Node Sass, not supported by Dart Sass) + * indents CSS rules to match the nesting of the Sass source. + * + * * `"compact"` (not supported by Dart Sass) puts each CSS rule on its own single line. + * + * @example + * + * ```js + * const source = ` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`; + * + * let result = sass.renderSync({ + * data: source, + * outputStyle: "expanded" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // h1 code { + * // font-face: Roboto Mono; + * // } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compressed" + * }); + * console.log(result.css.toString()); + * // h1{font-size:40px}h1 code{font-face:Roboto Mono} + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "nested" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; } + * // h1 code { + * // font-face: Roboto Mono; } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compact" + * }); + * console.log(result.css.toString()); + * // h1 { font-size: 40px; } + * // h1 code { font-face: Roboto Mono; } + * ``` + * + * @category Output + */ + outputStyle?: 'compressed' | 'expanded' | 'nested' | 'compact'; + + /** + * Whether or not Sass should generate a source map. If it does, the source + * map will be available as [[LegacyResult.map]] (unless [[sourceMapEmbed]] is + * `true`). + * + * If this option is a string, it’s the path that the source map is expected + * to be written to, which is used to link to the source map from the + * generated CSS and to link *from* the source map to the Sass source files. + * Note that if `sourceMap` is a string and [[outFile]] isn’t passed, Sass + * assumes that the CSS will be written to the same directory as the file + * option if it’s passed. + * + * If this option is `true`, the path is assumed to be [[outFile]] with `.map` + * added to the end. If it’s `true` and [[outFile]] isn’t passed, it has no + * effect. + * + * @example + * + * ```js + * let result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.map * / + * + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMap?: boolean | string; + + /** + * Whether to embed the entire contents of the Sass files that contributed to + * the generated CSS in the source map. This may produce very large source + * maps, but it guarantees that the source will be available on any computer + * no matter how the CSS is served. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapContents: true + * }) + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapContents?: boolean; + + /** + * Whether to embed the contents of the source map file in the generated CSS, + * rather than creating a separate file and linking to it from the CSS. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapEmbed: true + * }); + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapEmbed?: boolean; + + /** + * If this is passed, it's prepended to all the links from the source map to + * the Sass source files. + * + * @category Source Maps + */ + sourceMapRoot?: string; + + /** + * Additional handler(s) for loading files when a [`@use` + * rule](https://sass-lang.com/documentation/at-rules/use) or an [`@import` + * rule](https://sass-lang.com/documentation/at-rules/import) is encountered. + * It can either be a single [[LegacyImporter]] function, or an array of + * [[LegacyImporter]]s. + * + * Importers take the URL of the `@import` or `@use` rule and return a + * [[LegacyImporterResult]] indicating how to handle that rule. For more + * details, see [[LegacySyncImporter]] and [[LegacyAsyncImporter]]. + * + * Loads are resolved by trying, in order: + * + * * Loading a file from disk relative to the file in which the `@use` or + * `@import` appeared. + * + * * Each custom importer. + * + * * Loading a file relative to the current working directory. + * + * * Each load path in [[includePaths]]. + * + * * Each load path specified in the `SASS_PATH` environment variable, which + * should be semicolon-separated on Windows and colon-separated elsewhere. + * + * @example + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * // This importer uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * function(url, prev) { + * // This generates a stylesheet from scratch for `@use "big-headers"`. + * if (url != "big-headers") return null; + * + * return { + * contents: ` + * h1 { + * font-size: 40px; + * }` + * }; + * }, + * + * // This importer uses the asynchronous API, and can only be passed to + * // render(). + * function(url, prev, done) { + * // Convert `@use "foo/bar"` to "node_modules/foo/sass/bar". + * const components = url.split('/'); + * const innerPath = components.slice(1).join('/'); + * done({ + * file: `node_modules/${components.first}/sass/${innerPath}` + * }); + * } + * ] + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Plugins + * @compatibility dart: true, node: "3.0.0" + * + * Versions of Node Sass before 3.0.0 don’t support arrays of importers, nor + * do they support importers that return `Error` objects. + * + * Versions of Node Sass before 2.0.0 don’t support the `importer` option at + * all. + * + * @compatibility feature: "Import order", dart: "1.20.2", node: false + * + * Versions of Dart Sass before 1.20.2 preferred resolving imports using + * [[includePaths]] before resolving them using custom importers. + * + * All versions of Node Sass currently pass imports to importers before + * loading them relative to the file in which the `@import` appears. This + * behavior is considered incorrect and should not be relied on because it + * violates the principle of *locality*, which says that it should be possible + * to reason about a stylesheet without knowing everything about how the + * entire system is set up. If a user tries to import a stylesheet relative to + * another stylesheet, that import should *always* work. It shouldn’t be + * possible for some configuration somewhere else to break it. + */ + importer?: LegacyImporter | LegacyImporter[]; + + /** + * Additional built-in Sass functions that are available in all stylesheets. + * This option takes an object whose keys are Sass function signatures and + * whose values are [[LegacyFunction]]s. Each function should take the same + * arguments as its signature. + * + * Functions are passed JavaScript representations of [Sass value + * types](https://sass-lang.com/documentation/js-api#value-types), and must + * return the same. + * + * **Heads up!** When writing custom functions, it’s important to ensure that + * all the arguments are the types you expect. Otherwise, users’ stylesheets + * could crash in hard-to-debug ways or, worse, compile to meaningless CSS. + * + * @example + * + * ```js + * sass.render({ + * data: ` + * h1 { + * font-size: pow(2, 5) * 1px; + * }`, + * functions: { + * // This function uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * 'pow($base, $exponent)': function(base, exponent) { + * if (!(base instanceof sass.types.Number)) { + * throw "$base: Expected a number."; + * } else if (base.getUnit()) { + * throw "$base: Expected a unitless number."; + * } + * + * if (!(exponent instanceof sass.types.Number)) { + * throw "$exponent: Expected a number."; + * } else if (exponent.getUnit()) { + * throw "$exponent: Expected a unitless number."; + * } + * + * return new sass.types.Number( + * Math.pow(base.getValue(), exponent.getValue())); + * }, + * + * // This function uses the asynchronous API, and can only be passed to + * // render(). + * 'sqrt($number)': function(number, done) { + * if (!(number instanceof sass.types.Number)) { + * throw "$number: Expected a number."; + * } else if (number.getUnit()) { + * throw "$number: Expected a unitless number."; + * } + * + * done(new sass.types.Number(Math.sqrt(number.getValue()))); + * } + * } + * }, function(err, result) { + * console.log(result.css.toString()); + * // h1 { + * // font-size: 32px; + * // } + * }); + * ``` + * + * @category Plugins + */ + functions?: {[key: string]: LegacyFunction}; + + /** + * By default, if the CSS document contains non-ASCII characters, Sass adds a + * `@charset` declaration (in expanded output mode) or a byte-order mark (in + * compressed mode) to indicate its encoding to browsers or other consumers. + * If `charset` is `false`, these annotations are omitted. + * + * @category Output + * @compatibility dart: "1.39.0", node: false + */ + charset?: boolean; + + /** + * If this option is set to `true`, Sass won’t print warnings that are caused + * by dependencies. A “dependency” is defined as any file that’s loaded + * through [[loadPaths]] or [[importer]]. Stylesheets that are imported + * relative to the entrypoint are not considered dependencies. + * + * This is useful for silencing deprecation warnings that you can’t fix on + * your own. However, please also notify your dependencies of the deprecations + * so that they can get fixed as soon as possible! + * + * **Heads up!** If [[render]] or [[renderSync]] is called without + * [[LegacyFileOptions.file]] or [[LegacyStringOptions.file]], all + * stylesheets it loads will be considered dependencies. Since it doesn’t have + * a path of its own, everything it loads is coming from a load path rather + * than a relative import. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + quietDeps?: boolean; + + /** + * By default, Dart Sass will print only five instances of the same + * deprecation warning per compilation to avoid deluging users in console + * noise. If you set `verbose` to `true`, it will instead print every + * deprecation warning it encounters. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + verbose?: boolean; + + /** + * An object to use to handle warnings and/or debug messages from Sass. + * + * By default, Sass emits warnings and debug messages to standard error, but + * if [[Logger.warn]] or [[Logger.debug]] is set, this will invoke them + * instead. + * + * The special value [[Logger.silent]] can be used to easily silence all + * messages. + * + * @category Messages + * @compatibility dart: "1.43.0", node: false + */ + logger?: Logger; +} + +/** + * If [[file]] is passed without [[data]], Sass will load the stylesheet at + * [[file]] and compile it to CSS. + * + * @typeParam sync - This lets the TypeScript checker verify that + * [[LegacyAsyncImporter]]s and [[LegacyAsyncFunction]]s aren't passed to + * [[renderSync]]. + */ +export interface LegacyFileOptions + extends LegacySharedOptions { + /** + * The path to the file for Sass to load and compile. If the file’s extension + * is `.scss`, it will be parsed as SCSS; if it’s `.sass`, it will be parsed + * as the indented syntax; and if it’s `.css`, it will be parsed as plain CSS. + * If it has no extension, it will be parsed as SCSS. + * + * @example + * + * ```js + * sass.renderSync({file: "style.scss"}); + * ``` + * + * @category Input + * @compatibility feature: "Plain CSS files", dart: "1.11.0", node: "partial" + * + * Node Sass and older versions of Dart Sass support loading files with the + * extension `.css`, but contrary to the specification they’re treated as SCSS + * files rather than being parsed as CSS. This behavior has been deprecated + * and should not be relied on. Any files that use Sass features should use + * the `.scss` extension. + * + * All versions of Node Sass and Dart Sass otherwise support the file option + * as described below. + */ + file: string; + + /** + * See [[LegacyStringOptions.file]] for documentation of passing [[file]] along + * with [[data]]. + * + * @category Input + */ + data?: never; +} + +/** + * If [[data]] is passed, Sass will use it as the contents of the stylesheet to + * compile. + * + * @typeParam sync - This lets the TypeScript checker verify that + * [[LegacyAsyncImporter]]s and [[LegacyAsyncFunction]]s aren't passed to + * [[renderSync]]. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[StringOptions]] with [[compile]], [[compileString]], + * [[compileAsync]], and [[compileStringAsync]] instead. + */ +export interface LegacyStringOptions + extends LegacySharedOptions { + /** + * The contents of the stylesheet to compile. Unless [[file]] is passed as + * well, the stylesheet’s URL is set to `"stdin"`. + * + * By default, this stylesheet is parsed as SCSS. This can be controlled using + * [[indentedSyntax]]. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 { + * font-size: 40px; + * }` + * }); + * ``` + * + * @category Input + */ + data: string; + + /** + * If `file` and [[data]] are both passed, `file` is used as the path of the + * stylesheet for error reporting, but [[data]] is used as the contents of the + * stylesheet. In this case, `file`’s extension is not used to determine the + * syntax of the stylesheet. + * + * @category Input + */ + file?: string; + + /** + * This flag controls whether [[data]] is parsed as the indented syntax or + * not. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 + * font-size: 40px`, + * indentedSyntax: true + * }); + * ``` + * + * @defaultValue `false` + * @category Input + */ + indentedSyntax?: boolean; +} + +/** + * Options for [[render]] and [[renderSync]]. This can either be + * [[LegacyFileOptions]] to load a file from disk, or [[LegacyStringOptions]] to + * compile a string of Sass code. + * + * See [[LegacySharedOptions]] for options that are shared across both file and + * string inputs. + * + * @category Legacy + * @deprecated This only works with the legacy [[render]] and [[renderSync]] + * APIs. Use [[Options]] with [[compile]], [[compileString]], [[compileAsync]], + * and [[compileStringAsync]] instead. + */ +export type LegacyOptions = + | LegacyFileOptions + | LegacyStringOptions; diff --git a/node_modules/sass/types/legacy/plugin_this.d.ts b/node_modules/sass/types/legacy/plugin_this.d.ts new file mode 100644 index 0000000..7a1a109 --- /dev/null +++ b/node_modules/sass/types/legacy/plugin_this.d.ts @@ -0,0 +1,73 @@ +/** + * The value of `this` in the context of a [[LegacyImporter]] or + * [[LegacyFunction]] callback. + * + * @category Legacy + * @deprecated This is only used by the legacy [[render]] and [[renderSync]] + * APIs. Use [[compile]], [[compileString]], [[compileAsync]], and + * [[compileStringAsync]] instead. + */ +export interface LegacyPluginThis { + /** + * A partial representation of the options passed to [[render]] or + * [[renderSync]]. + */ + options: { + /** The same [[LegacyPluginThis]] instance that contains this object. */ + context: LegacyPluginThis; + + /** + * The value passed to [[LegacyFileOptions.file]] or + * [[LegacyStringOptions.file]]. + */ + file?: string; + + /** The value passed to [[LegacyStringOptions.data]]. */ + data?: string; + + /** + * The value passed to [[LegacySharedOptions.includePaths]] separated by + * `";"` on Windows or `":"` on other operating systems. This always + * includes the current working directory as the first entry. + */ + includePaths: string; + + /** Always the number 10. */ + precision: 10; + + /** Always the number 1. */ + style: 1; + + /** 1 if [[LegacySharedOptions.indentType]] was `"tab"`, 0 otherwise. */ + indentType: 1 | 0; + + /** + * The value passed to [[LegacySharedOptions.indentWidth]], or `2` otherwise. + */ + indentWidth: number; + + /** + * The value passed to [[LegacySharedOptions.linefeed]], or `"\n"` + * otherwise. + */ + linefeed: '\r' | '\r\n' | '\n' | '\n\r'; + + /** A partially-constructed [[LegacyResult]] object. */ + result: { + /** Partial information about the compilation in progress. */ + stats: { + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and + * the time at which Sass compilation began. + */ + start: number; + + /** + * [[LegacyFileOptions.file]] if it was passed, otherwise the string + * `"data"`. + */ + entry: string; + }; + }; + }; +} diff --git a/node_modules/sass/types/legacy/render.d.ts b/node_modules/sass/types/legacy/render.d.ts new file mode 100644 index 0000000..80028db --- /dev/null +++ b/node_modules/sass/types/legacy/render.d.ts @@ -0,0 +1,139 @@ +import {LegacyException} from './exception'; +import {LegacyOptions} from './options'; + +/** + * The object returned by [[render]] and [[renderSync]] after a successful + * compilation. + * + * @category Legacy + * @deprecated This is only used by the legacy [[render]] and [[renderSync]] + * APIs. Use [[compile]], [[compileString]], [[compileAsync]], and + * [[compileStringAsync]] instead. + */ +export interface LegacyResult { + /** + * The compiled CSS. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * @example + * + * ```js + * const result = sass.renderSync({file: "style.scss"}); + * + * console.log(result.css.toString()); + * ``` + */ + css: Buffer; + + /** + * The source map that maps the compiled CSS to the source files from which it + * was generated. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * This is `undefined` unless either + * + * * [[LegacySharedOptions.sourceMap]] is a string; or + * * [[LegacySharedOptions.sourceMap]] is `true` and + * [[LegacySharedOptions.outFile]] is set. + * + * The source map uses absolute [`file:` + * URLs](https://en.wikipedia.org/wiki/File_URI_scheme) to link to the Sass + * source files, except if the source file comes from + * [[LegacyStringOptions.data]] in which case it lists its URL as `"stdin"`. + * + * @example + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "style.css" + * }) + * + * console.log(result.map.toString()); + * ``` + */ + map?: Buffer; + + /** Additional information about the compilation. */ + stats: { + /** + * The absolute path of [[LegacyFileOptions.file]] or + * [[LegacyStringOptions.file]], or `"data"` if [[LegacyStringOptions.file]] + * wasn't set. + */ + entry: string; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation began. + */ + start: number; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation ended. + */ + end: number; + + /** + * The number of milliseconds it took to compile the Sass file. This is + * always equal to `start` minus `end`. + */ + duration: number; + + /** + * An array of the absolute paths of all Sass files loaded during + * compilation. If a stylesheet was loaded from a [[LegacyImporter]] that + * returned the stylesheet’s contents, the raw string of the `@use` or + * `@import` that loaded that stylesheet included in this array. + */ + includedFiles: string[]; + }; +} + +/** + * This function synchronously compiles a Sass file to CSS. If it succeeds, it + * returns the result, and if it fails it throws an error. + * + * @example + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * const result = sass.renderSync({file: "style.scss"}); + * // ... + * ``` + * + * @category Legacy + * @deprecated Use [[compile]] or [[compileString]] instead. + */ +export function renderSync(options: LegacyOptions<'sync'>): LegacyResult; + +/** + + * This function asynchronously compiles a Sass file to CSS, and calls + * `callback` with a [[LegacyResult]] if compilation succeeds or + * [[LegacyException]] if it fails. + * + * **Heads up!** When using Dart Sass, **[[renderSync]] is almost twice as fast + * as [[render]]** by default, due to the overhead of making the entire + * evaluation process asynchronous. + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * sass.render({ + * file: "style.scss" + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Legacy + * @deprecated Use [[compileAsync]] or [[compileStringAsync]] instead. + */ +export function render( + options: LegacyOptions<'async'>, + callback: (exception?: LegacyException, result?: LegacyResult) => void +): void; diff --git a/node_modules/sass/types/logger/index.d.ts b/node_modules/sass/types/logger/index.d.ts new file mode 100644 index 0000000..aa9bcd0 --- /dev/null +++ b/node_modules/sass/types/logger/index.d.ts @@ -0,0 +1,94 @@ +import {SourceSpan} from './source_span'; + +export {SourceLocation} from './source_location'; +export {SourceSpan} from './source_span'; + +/** + * An object that can be passed to [[LegacySharedOptions.logger]] to control how + * Sass emits warnings and debug messages. + * + * @example + * + * ```js + * const fs = require('fs'); + * const sass = require('sass'); + * + * let log = ""; + * sass.renderSync({ + * file: 'input.scss', + * logger: { + * warn(message, options) { + * if (options.span) { + * log += `${span.url}:${span.start.line}:${span.start.column}: ` + + * `${message}\n`; + * } else { + * log += `::: ${message}\n`; + * } + * } + * } + * }); + * + * fs.writeFileSync('log.txt', log); + * ``` + * + * @category Logger + */ +export interface Logger { + /** + * This method is called when Sass emits a warning, whether due to a [`@warn` + * rule](https://sass-lang.com/documentation/at-rules/warn) or a warning + * generated by the Sass compiler. + * + * If this is `undefined`, Sass will print warnings to standard error. + * + * @param message - The warning message. + * @param options.deprecation - Whether this is a deprecation warning. + * @param options.span - The location in the Sass source code that generated this + * warning. + * @param options.stack - The Sass stack trace at the point the warning was issued. + */ + warn?( + message: string, + options: { + deprecation: boolean; + span?: SourceSpan; + stack?: string; + } + ): void; + + /** + * This method is called when Sass emits a debug message due to a [`@debug` + * rule](https://sass-lang.com/documentation/at-rules/debug). + * + * If this is `undefined`, Sass will print debug messages to standard error. + * + * @param message - The debug message. + * @param options.span - The location in the Sass source code that generated this + * debug message. + */ + debug?(message: string, options: {span: SourceSpan}): void; +} + +/** + * A namespace for built-in [[Logger]]s. + * + * @category Logger + * @compatibility dart: "1.43.0", node: false + */ +export namespace Logger { + /** + * A [[Logger]] that silently ignores all warnings and debug messages. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.renderSync({ + * file: 'input.scss', + * logger: sass.Logger.silent, + * }); + * ``` + */ + export const silent: Logger; +} diff --git a/node_modules/sass/types/logger/source_location.d.ts b/node_modules/sass/types/logger/source_location.d.ts new file mode 100644 index 0000000..1cf538b --- /dev/null +++ b/node_modules/sass/types/logger/source_location.d.ts @@ -0,0 +1,21 @@ +/** + * A specific location within a source file. + * + * This is always associated with a [[SourceSpan]] which indicates *which* file + * it refers to. + * + * @category Logger + */ +export interface SourceLocation { + /** + * The 0-based index of this location within its source file, in terms of + * UTF-16 code units. + */ + offset: number; + + /** The 0-based line number of this location. */ + line: number; + + /** The 0-based column number of this location. */ + column: number; +} diff --git a/node_modules/sass/types/logger/source_span.d.ts b/node_modules/sass/types/logger/source_span.d.ts new file mode 100644 index 0000000..4f84b3c --- /dev/null +++ b/node_modules/sass/types/logger/source_span.d.ts @@ -0,0 +1,34 @@ +import {SourceLocation} from './source_location'; + +/** + * A span of text within a source file. + * + * @category Logger + */ +export interface SourceSpan { + /** The beginning of this span, inclusive. */ + start: SourceLocation; + + /** + * The end of this span, exclusive. + * + * If [[start]] and [[end]] refer to the same location, the span has zero + * length and refers to the point immediately after [[start]] and before the + * next character. + */ + end: SourceLocation; + + /** The canonical URL of the file this span refers to. */ + url?: URL; + + /** The text covered by the span. */ + text: string; + + /** + * Text surrounding the span. + * + * If this is set, it must include only whole lines, and it must include at + * least all line(s) which are partially covered by this span. + */ + context?: string; +} diff --git a/node_modules/sass/types/options.d.ts b/node_modules/sass/types/options.d.ts new file mode 100644 index 0000000..4c9445d --- /dev/null +++ b/node_modules/sass/types/options.d.ts @@ -0,0 +1,435 @@ +import {FileImporter, Importer} from './importer'; +import {Logger} from './logger'; +import {Value} from './value'; +import {PromiseOr} from './util/promise_or'; + +/** + * Syntaxes supported by Sass: + * + * - `'scss'` is the [SCSS + * syntax](https://sass-lang.com/documentation/syntax#scss). + * - `'indented'` is the [indented + * syntax](https://sass-lang.com/documentation/syntax#the-indented-syntax) + * - `'css'` is plain CSS, which is parsed like SCSS but forbids the use of any + * special Sass features. + * + * @category Options + */ +export type Syntax = 'scss' | 'indented' | 'css'; + +/** + * Possible output styles for the compiled CSS: + * + * - `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * - `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * @category Options + */ +export type OutputStyle = 'expanded' | 'compressed'; + +/** + * A callback that implements a custom Sass function. This can be passed to + * [[Options.functions]]. + * + * ```js + * const result = sass.compile('style.scss', { + * functions: { + * "sum($arg1, $arg2)": (args) => { + * const arg1 = args[0].assertNumber('arg1'); + * const value1 = arg1.value; + * const value2 = args[1].assertNumber('arg2') + * .convertValueToMatch(arg1, 'arg2', 'arg1'); + * return new sass.SassNumber(value1 + value2).coerceToMatch(arg1); + * } + * } + * }); + * ``` + * + * @typeParam sync - A `CustomFunction<'sync'>` must return synchronously, but + * in return it can be passed to [[compile]] and [[compileString]] in addition + * to [[compileAsync]] and [[compileStringAsync]]. + * + * A `CustomFunction<'async'>` may either return synchronously or + * asynchronously, but it can only be used with [[compileAsync]] and + * [[compileStringAsync]]. + * + * @param args - An array of arguments passed by the function's caller. If the + * function takes [arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * the last element will be a [[SassArgumentList]]. + * + * @returns The function's result. This may be in the form of a `Promise`, but + * if it is the function may only be passed to [[compileAsync]] and + * [[compileStringAsync]], not [[compile]] or [[compileString]]. + * + * @throws any - This function may throw an error, which the Sass compiler will + * treat as the function call failing. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, the + * exception object's `toString()` will be used. This means it's safe for custom + * functions to throw plain strings. + * + * @category Custom Function + */ +export type CustomFunction = ( + args: Value[] +) => PromiseOr; + +/** + * Options that can be passed to [[compile]], [[compileAsync]], + * [[compileString]], or [[compileStringAsync]]. + * + * @typeParam sync - This lets the TypeScript checker verify that asynchronous + * [[Importer]]s, [[FileImporter]]s, and [[CustomFunction]]s aren't passed to + * [[compile]] or [[compileString]]. + * + * @category Options + */ +export interface Options { + /** + * If this is `true`, the compiler will exclusively use ASCII characters in + * its error and warning messages. Otherwise, it may use non-ASCII Unicode + * characters as well. + * + * @defaultValue `false` + * @category Messages + */ + alertAscii?: boolean; + + /** + * If this is `true`, the compiler will use ANSI color escape codes in its + * error and warning messages. If it's `false`, it won't use these. If it's + * undefined, the compiler will determine whether or not to use colors + * depending on whether the user is using an interactive terminal. + * + * @category Messages + */ + alertColor?: boolean; + + /** + * If `true`, the compiler may prepend `@charset "UTF-8";` or U+FEFF + * (byte-order marker) if it outputs non-ASCII CSS. + * + * If `false`, the compiler never emits these byte sequences. This is ideal + * when concatenating or embedding in HTML `

+ + + +